@shaclmate/compiler 4.0.31 → 4.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generators/ts/Snippets.d.ts +1 -0
- package/dist/generators/ts/Snippets.js +7 -0
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_createFunctionDeclaration.js +6 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceFunctionDeclaration.js +29 -12
- package/dist/generators/ts/_snippets/snippets_sequenceRecord.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_sequenceRecord.js +18 -0
- package/dist/input/generated.js +1366 -1669
- package/package.json +6 -6
package/dist/input/generated.js
CHANGED
|
@@ -255,6 +255,17 @@ var $RdfVocabularies;
|
|
|
255
255
|
xsd.unsignedShort = dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#unsignedShort");
|
|
256
256
|
})(xsd = $RdfVocabularies.xsd || ($RdfVocabularies.xsd = {}));
|
|
257
257
|
})($RdfVocabularies || ($RdfVocabularies = {}));
|
|
258
|
+
function $sequenceRecord(record) {
|
|
259
|
+
const result = {};
|
|
260
|
+
for (const key of globalThis.Object.keys(record)) {
|
|
261
|
+
const either = record[key];
|
|
262
|
+
if (either.isLeft()) {
|
|
263
|
+
return either;
|
|
264
|
+
}
|
|
265
|
+
result[key] = either.extract();
|
|
266
|
+
}
|
|
267
|
+
return Right(result);
|
|
268
|
+
}
|
|
258
269
|
function $shaclPropertyFromRdf({ graph, propertySchema, resource, typeFromRdf, }) {
|
|
259
270
|
return typeFromRdf(Right(resource.values(propertySchema.path, { graph, unique: true }))).chain((values) => values.head());
|
|
260
271
|
}
|
|
@@ -905,7 +916,7 @@ export var PropertyShape;
|
|
|
905
916
|
else {
|
|
906
917
|
xone = parameters.xone;
|
|
907
918
|
}
|
|
908
|
-
|
|
919
|
+
const $object = {
|
|
909
920
|
$identifier,
|
|
910
921
|
$type,
|
|
911
922
|
and,
|
|
@@ -945,6 +956,10 @@ export var PropertyShape;
|
|
|
945
956
|
uniqueLang,
|
|
946
957
|
xone,
|
|
947
958
|
};
|
|
959
|
+
if (!globalThis.Object.prototype.hasOwnProperty.call($object, "toString")) {
|
|
960
|
+
$object.toString = $toString;
|
|
961
|
+
}
|
|
962
|
+
return $object;
|
|
948
963
|
}
|
|
949
964
|
PropertyShape.create = create;
|
|
950
965
|
let Identifier;
|
|
@@ -1123,758 +1138,604 @@ export var PropertyShape;
|
|
|
1123
1138
|
}
|
|
1124
1139
|
return Left(new Error(`${$resource.identifier} has unexpected RDF type (actual: ${actualRdfType.value}, expected: http://www.w3.org/ns/shacl#PropertyShape)`));
|
|
1125
1140
|
})
|
|
1126
|
-
: Right(true)).chain((_rdfTypeCheck) =>
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
propertyPath: $RdfVocabularies.rdf.subject,
|
|
1130
|
-
term: $resource.identifier,
|
|
1131
|
-
}).toValues())
|
|
1132
|
-
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
1133
|
-
.chain((values) => values.head())
|
|
1134
|
-
.chain(($identifier) => $shaclPropertyFromRdf({
|
|
1135
|
-
graph: _$options.graph,
|
|
1136
|
-
resource: $resource,
|
|
1137
|
-
propertySchema: PropertyShape.schema.properties.and,
|
|
1138
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1139
|
-
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
1140
|
-
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
1141
|
-
focusResource: $resource,
|
|
1142
|
-
propertyPath: PropertyShape.schema.properties.and.path,
|
|
1143
|
-
values: valueList.toArray(),
|
|
1144
|
-
})).chain((values) => values.chainMap((value) => value.toIdentifier()))))
|
|
1145
|
-
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
1146
|
-
.map((values) => values.length > 0
|
|
1147
|
-
? values.map((value) => Maybe.of(value))
|
|
1148
|
-
: Resource.Values.fromValue({
|
|
1149
|
-
focusResource: $resource,
|
|
1150
|
-
propertyPath: PropertyShape.schema.properties.and.path,
|
|
1151
|
-
value: Maybe.empty(),
|
|
1152
|
-
})),
|
|
1153
|
-
}).chain((and) => $shaclPropertyFromRdf({
|
|
1154
|
-
graph: _$options.graph,
|
|
1155
|
-
resource: $resource,
|
|
1156
|
-
propertySchema: PropertyShape.schema.properties.classes,
|
|
1157
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1158
|
-
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
1159
|
-
.map((values) => values.toArray())
|
|
1160
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
1161
|
-
focusResource: $resource,
|
|
1162
|
-
propertyPath: PropertyShape.schema.properties.classes.path,
|
|
1163
|
-
value: valuesArray,
|
|
1164
|
-
})),
|
|
1165
|
-
}).chain((classes) => $shaclPropertyFromRdf({
|
|
1166
|
-
graph: _$options.graph,
|
|
1167
|
-
resource: $resource,
|
|
1168
|
-
propertySchema: PropertyShape.schema.properties.comment,
|
|
1169
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1170
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1171
|
-
.chain((values) => values.chainMap((value) => value.toString()))
|
|
1172
|
-
.map((values) => values.length > 0
|
|
1173
|
-
? values.map((value) => Maybe.of(value))
|
|
1174
|
-
: Resource.Values.fromValue({
|
|
1175
|
-
focusResource: $resource,
|
|
1176
|
-
propertyPath: PropertyShape.schema.properties.comment.path,
|
|
1177
|
-
value: Maybe.empty(),
|
|
1178
|
-
})),
|
|
1179
|
-
}).chain((comment) => $shaclPropertyFromRdf({
|
|
1180
|
-
graph: _$options.graph,
|
|
1181
|
-
resource: $resource,
|
|
1182
|
-
propertySchema: PropertyShape.schema.properties.datatype,
|
|
1183
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1184
|
-
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
1185
|
-
.map((values) => values.length > 0
|
|
1186
|
-
? values.map((value) => Maybe.of(value))
|
|
1187
|
-
: Resource.Values.fromValue({
|
|
1188
|
-
focusResource: $resource,
|
|
1189
|
-
propertyPath: PropertyShape.schema.properties.datatype.path,
|
|
1190
|
-
value: Maybe.empty(),
|
|
1191
|
-
})),
|
|
1192
|
-
}).chain((datatype) => $shaclPropertyFromRdf({
|
|
1193
|
-
graph: _$options.graph,
|
|
1194
|
-
resource: $resource,
|
|
1195
|
-
propertySchema: PropertyShape.schema.properties.deactivated,
|
|
1196
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1197
|
-
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
1198
|
-
.map((values) => values.length > 0
|
|
1199
|
-
? values.map((value) => Maybe.of(value))
|
|
1200
|
-
: Resource.Values.fromValue({
|
|
1201
|
-
focusResource: $resource,
|
|
1202
|
-
propertyPath: PropertyShape.schema.properties.deactivated
|
|
1203
|
-
.path,
|
|
1204
|
-
value: Maybe.empty(),
|
|
1205
|
-
})),
|
|
1206
|
-
}).chain((deactivated) => $shaclPropertyFromRdf({
|
|
1207
|
-
graph: _$options.graph,
|
|
1208
|
-
resource: $resource,
|
|
1209
|
-
propertySchema: PropertyShape.schema.properties.defaultValue,
|
|
1210
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1211
|
-
.chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
|
|
1212
|
-
switch (term.termType) {
|
|
1213
|
-
case "NamedNode":
|
|
1214
|
-
case "Literal":
|
|
1215
|
-
return Either.of(term);
|
|
1216
|
-
default:
|
|
1217
|
-
return Left(new Resource.MistypedTermValueError({
|
|
1218
|
-
actualValue: term,
|
|
1219
|
-
expectedValueType: "(NamedNode | Literal)",
|
|
1220
|
-
focusResource: $resource,
|
|
1221
|
-
propertyPath: PropertyShape.schema.properties
|
|
1222
|
-
.defaultValue.path,
|
|
1223
|
-
}));
|
|
1224
|
-
}
|
|
1225
|
-
})))
|
|
1226
|
-
.map((values) => values.length > 0
|
|
1227
|
-
? values.map((value) => Maybe.of(value))
|
|
1228
|
-
: Resource.Values.fromValue({
|
|
1229
|
-
focusResource: $resource,
|
|
1230
|
-
propertyPath: PropertyShape.schema.properties.defaultValue
|
|
1231
|
-
.path,
|
|
1232
|
-
value: Maybe.empty(),
|
|
1233
|
-
})),
|
|
1234
|
-
}).chain((defaultValue) => $shaclPropertyFromRdf({
|
|
1235
|
-
graph: _$options.graph,
|
|
1236
|
-
resource: $resource,
|
|
1237
|
-
propertySchema: PropertyShape.schema.properties.description,
|
|
1238
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1239
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1240
|
-
.chain((values) => values.chainMap((value) => value.toString()))
|
|
1241
|
-
.map((values) => values.length > 0
|
|
1242
|
-
? values.map((value) => Maybe.of(value))
|
|
1243
|
-
: Resource.Values.fromValue({
|
|
1244
|
-
focusResource: $resource,
|
|
1245
|
-
propertyPath: PropertyShape.schema.properties
|
|
1246
|
-
.description.path,
|
|
1247
|
-
value: Maybe.empty(),
|
|
1248
|
-
})),
|
|
1249
|
-
}).chain((description) => $shaclPropertyFromRdf({
|
|
1250
|
-
graph: _$options.graph,
|
|
1251
|
-
resource: $resource,
|
|
1252
|
-
propertySchema: PropertyShape.schema.properties.display,
|
|
1253
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1254
|
-
.map((values) => values.length > 0
|
|
1255
|
-
? values
|
|
1256
|
-
: new Resource.Value({
|
|
1257
|
-
dataFactory: dataFactory,
|
|
1258
|
-
focusResource: $resource,
|
|
1259
|
-
propertyPath: PropertyShape.schema.properties.display
|
|
1260
|
-
.path,
|
|
1261
|
-
term: dataFactory.literal("false", $RdfVocabularies.xsd.boolean),
|
|
1262
|
-
}).toValues())
|
|
1263
|
-
.chain((values) => values.chainMap((value) => value.toBoolean())),
|
|
1264
|
-
}).chain((display) => $shaclPropertyFromRdf({
|
|
1265
|
-
graph: _$options.graph,
|
|
1266
|
-
resource: $resource,
|
|
1267
|
-
propertySchema: PropertyShape.schema.properties.flags,
|
|
1268
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1269
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1270
|
-
.chain((values) => values.chainMap((value) => value.toString()))
|
|
1271
|
-
.map((values) => values.toArray())
|
|
1272
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
1141
|
+
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
1142
|
+
$identifier: Right(new Resource.Value({
|
|
1143
|
+
dataFactory: dataFactory,
|
|
1273
1144
|
focusResource: $resource,
|
|
1274
|
-
propertyPath:
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
})),
|
|
1278
|
-
}).chain((flags) => $shaclPropertyFromRdf({
|
|
1279
|
-
graph: _$options.graph,
|
|
1280
|
-
resource: $resource,
|
|
1281
|
-
propertySchema: PropertyShape.schema.properties.groups,
|
|
1282
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1145
|
+
propertyPath: $RdfVocabularies.rdf.subject,
|
|
1146
|
+
term: $resource.identifier,
|
|
1147
|
+
}).toValues())
|
|
1283
1148
|
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
1284
|
-
.
|
|
1285
|
-
|
|
1286
|
-
focusResource: $resource,
|
|
1287
|
-
propertyPath: PropertyShape.schema.properties.groups
|
|
1288
|
-
.path,
|
|
1289
|
-
value: valuesArray,
|
|
1290
|
-
})),
|
|
1291
|
-
}).chain((groups) => $shaclPropertyFromRdf({
|
|
1292
|
-
graph: _$options.graph,
|
|
1293
|
-
resource: $resource,
|
|
1294
|
-
propertySchema: PropertyShape.schema.properties.hasValues,
|
|
1295
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1296
|
-
.chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
|
|
1297
|
-
switch (term.termType) {
|
|
1298
|
-
case "NamedNode":
|
|
1299
|
-
case "Literal":
|
|
1300
|
-
return Either.of(term);
|
|
1301
|
-
default:
|
|
1302
|
-
return Left(new Resource.MistypedTermValueError({
|
|
1303
|
-
actualValue: term,
|
|
1304
|
-
expectedValueType: "(NamedNode | Literal)",
|
|
1305
|
-
focusResource: $resource,
|
|
1306
|
-
propertyPath: PropertyShape.schema
|
|
1307
|
-
.properties.hasValues
|
|
1308
|
-
.path,
|
|
1309
|
-
}));
|
|
1310
|
-
}
|
|
1311
|
-
})))
|
|
1312
|
-
.map((values) => values.toArray())
|
|
1313
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
1314
|
-
focusResource: $resource,
|
|
1315
|
-
propertyPath: PropertyShape.schema.properties
|
|
1316
|
-
.hasValues.path,
|
|
1317
|
-
value: valuesArray,
|
|
1318
|
-
})),
|
|
1319
|
-
}).chain((hasValues) => $shaclPropertyFromRdf({
|
|
1320
|
-
graph: _$options.graph,
|
|
1321
|
-
resource: $resource,
|
|
1322
|
-
propertySchema: PropertyShape.schema.properties.in_,
|
|
1323
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1324
|
-
.chain((values) => values.chainMap((value) => value.toList({
|
|
1149
|
+
.chain((values) => values.head()),
|
|
1150
|
+
and: $shaclPropertyFromRdf({
|
|
1325
1151
|
graph: _$options.graph,
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
.
|
|
1331
|
-
values: valueList.toArray(),
|
|
1332
|
-
})).chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
|
|
1333
|
-
switch (term.termType) {
|
|
1334
|
-
case "NamedNode":
|
|
1335
|
-
case "Literal":
|
|
1336
|
-
return Either.of(term);
|
|
1337
|
-
default:
|
|
1338
|
-
return Left(new Resource.MistypedTermValueError({
|
|
1339
|
-
actualValue: term,
|
|
1340
|
-
expectedValueType: "(NamedNode | Literal)",
|
|
1341
|
-
focusResource: $resource,
|
|
1342
|
-
propertyPath: PropertyShape.schema
|
|
1343
|
-
.properties.in_
|
|
1344
|
-
.path,
|
|
1345
|
-
}));
|
|
1346
|
-
}
|
|
1347
|
-
})))))
|
|
1348
|
-
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
1349
|
-
.map((values) => values.length > 0
|
|
1350
|
-
? values.map((value) => Maybe.of(value))
|
|
1351
|
-
: Resource.Values.fromValue({
|
|
1352
|
-
focusResource: $resource,
|
|
1353
|
-
propertyPath: PropertyShape.schema.properties
|
|
1354
|
-
.in_.path,
|
|
1355
|
-
value: Maybe.empty(),
|
|
1356
|
-
})),
|
|
1357
|
-
}).chain((in_) => $shaclPropertyFromRdf({
|
|
1358
|
-
graph: _$options.graph,
|
|
1359
|
-
resource: $resource,
|
|
1360
|
-
propertySchema: PropertyShape.schema.properties.isDefinedBy,
|
|
1361
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1362
|
-
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
1363
|
-
.map((values) => values.length > 0
|
|
1364
|
-
? values.map((value) => Maybe.of(value))
|
|
1365
|
-
: Resource.Values.fromValue({
|
|
1366
|
-
focusResource: $resource,
|
|
1367
|
-
propertyPath: PropertyShape.schema
|
|
1368
|
-
.properties.isDefinedBy
|
|
1369
|
-
.path,
|
|
1370
|
-
value: Maybe.empty(),
|
|
1371
|
-
})),
|
|
1372
|
-
}).chain((isDefinedBy) => $shaclPropertyFromRdf({
|
|
1373
|
-
graph: _$options.graph,
|
|
1374
|
-
resource: $resource,
|
|
1375
|
-
propertySchema: PropertyShape.schema.properties.label,
|
|
1376
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1377
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1378
|
-
.chain((values) => values.chainMap((value) => value.toString()))
|
|
1379
|
-
.map((values) => values.length > 0
|
|
1380
|
-
? values.map((value) => Maybe.of(value))
|
|
1381
|
-
: Resource.Values.fromValue({
|
|
1152
|
+
resource: $resource,
|
|
1153
|
+
propertySchema: PropertyShape.schema.properties.and,
|
|
1154
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1155
|
+
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
1156
|
+
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
1382
1157
|
focusResource: $resource,
|
|
1383
|
-
propertyPath: PropertyShape.schema
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1158
|
+
propertyPath: PropertyShape.schema.properties.and.path,
|
|
1159
|
+
values: valueList.toArray(),
|
|
1160
|
+
})).chain((values) => values.chainMap((value) => value.toIdentifier()))))
|
|
1161
|
+
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
1162
|
+
.map((values) => values.length > 0
|
|
1163
|
+
? values.map((value) => Maybe.of(value))
|
|
1164
|
+
: Resource.Values.fromValue({
|
|
1165
|
+
focusResource: $resource,
|
|
1166
|
+
propertyPath: PropertyShape.schema.properties.and.path,
|
|
1167
|
+
value: Maybe.empty(),
|
|
1168
|
+
})),
|
|
1169
|
+
}),
|
|
1170
|
+
classes: $shaclPropertyFromRdf({
|
|
1393
1171
|
graph: _$options.graph,
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
.
|
|
1399
|
-
.
|
|
1400
|
-
values: valueList.toArray(),
|
|
1401
|
-
}))
|
|
1402
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1403
|
-
.chain((values) => values.chainMap((value) => value.toString()))))
|
|
1404
|
-
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
1405
|
-
.map((values) => values.length > 0
|
|
1406
|
-
? values.map((value) => Maybe.of(value))
|
|
1407
|
-
: Resource.Values.fromValue({
|
|
1408
|
-
focusResource: $resource,
|
|
1409
|
-
propertyPath: PropertyShape.schema
|
|
1410
|
-
.properties.languageIn
|
|
1411
|
-
.path,
|
|
1412
|
-
value: Maybe.empty(),
|
|
1413
|
-
})),
|
|
1414
|
-
}).chain((languageIn) => $shaclPropertyFromRdf({
|
|
1415
|
-
graph: _$options.graph,
|
|
1416
|
-
resource: $resource,
|
|
1417
|
-
propertySchema: PropertyShape.schema.properties.maxCount,
|
|
1418
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1419
|
-
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
1420
|
-
.map((values) => values.length > 0
|
|
1421
|
-
? values.map((value) => Maybe.of(value))
|
|
1422
|
-
: Resource.Values.fromValue({
|
|
1423
|
-
focusResource: $resource,
|
|
1424
|
-
propertyPath: PropertyShape.schema
|
|
1425
|
-
.properties.maxCount
|
|
1426
|
-
.path,
|
|
1427
|
-
value: Maybe.empty(),
|
|
1428
|
-
})),
|
|
1429
|
-
}).chain((maxCount) => $shaclPropertyFromRdf({
|
|
1430
|
-
graph: _$options.graph,
|
|
1431
|
-
resource: $resource,
|
|
1432
|
-
propertySchema: PropertyShape.schema.properties.maxExclusive,
|
|
1433
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1434
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1435
|
-
.chain((values) => values.chainMap((value) => value.toLiteral()))
|
|
1436
|
-
.map((values) => values.length > 0
|
|
1437
|
-
? values.map((value) => Maybe.of(value))
|
|
1438
|
-
: Resource.Values.fromValue({
|
|
1439
|
-
focusResource: $resource,
|
|
1440
|
-
propertyPath: PropertyShape.schema
|
|
1441
|
-
.properties
|
|
1442
|
-
.maxExclusive.path,
|
|
1443
|
-
value: Maybe.empty(),
|
|
1444
|
-
})),
|
|
1445
|
-
}).chain((maxExclusive) => $shaclPropertyFromRdf({
|
|
1446
|
-
graph: _$options.graph,
|
|
1447
|
-
resource: $resource,
|
|
1448
|
-
propertySchema: PropertyShape.schema.properties.maxInclusive,
|
|
1449
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1450
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1451
|
-
.chain((values) => values.chainMap((value) => value.toLiteral()))
|
|
1452
|
-
.map((values) => values.length > 0
|
|
1453
|
-
? values.map((value) => Maybe.of(value))
|
|
1454
|
-
: Resource.Values.fromValue({
|
|
1455
|
-
focusResource: $resource,
|
|
1456
|
-
propertyPath: PropertyShape.schema
|
|
1457
|
-
.properties
|
|
1458
|
-
.maxInclusive
|
|
1459
|
-
.path,
|
|
1460
|
-
value: Maybe.empty(),
|
|
1461
|
-
})),
|
|
1462
|
-
}).chain((maxInclusive) => $shaclPropertyFromRdf({
|
|
1463
|
-
graph: _$options.graph,
|
|
1464
|
-
resource: $resource,
|
|
1465
|
-
propertySchema: PropertyShape.schema.properties.maxLength,
|
|
1466
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1467
|
-
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
1468
|
-
.map((values) => values.length > 0
|
|
1469
|
-
? values.map((value) => Maybe.of(value))
|
|
1470
|
-
: Resource.Values.fromValue({
|
|
1471
|
-
focusResource: $resource,
|
|
1472
|
-
propertyPath: PropertyShape
|
|
1473
|
-
.schema
|
|
1474
|
-
.properties
|
|
1475
|
-
.maxLength.path,
|
|
1476
|
-
value: Maybe.empty(),
|
|
1477
|
-
})),
|
|
1478
|
-
}).chain((maxLength) => $shaclPropertyFromRdf({
|
|
1479
|
-
graph: _$options.graph,
|
|
1480
|
-
resource: $resource,
|
|
1481
|
-
propertySchema: PropertyShape.schema.properties.minCount,
|
|
1482
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1483
|
-
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
1484
|
-
.map((values) => values.length > 0
|
|
1485
|
-
? values.map((value) => Maybe.of(value))
|
|
1486
|
-
: Resource.Values.fromValue({
|
|
1487
|
-
focusResource: $resource,
|
|
1488
|
-
propertyPath: PropertyShape
|
|
1489
|
-
.schema
|
|
1490
|
-
.properties
|
|
1491
|
-
.minCount
|
|
1492
|
-
.path,
|
|
1493
|
-
value: Maybe.empty(),
|
|
1494
|
-
})),
|
|
1495
|
-
}).chain((minCount) => $shaclPropertyFromRdf({
|
|
1496
|
-
graph: _$options.graph,
|
|
1497
|
-
resource: $resource,
|
|
1498
|
-
propertySchema: PropertyShape.schema.properties
|
|
1499
|
-
.minExclusive,
|
|
1500
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1501
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1502
|
-
.chain((values) => values.chainMap((value) => value.toLiteral()))
|
|
1503
|
-
.map((values) => values.length > 0
|
|
1504
|
-
? values.map((value) => Maybe.of(value))
|
|
1505
|
-
: Resource.Values.fromValue({
|
|
1506
|
-
focusResource: $resource,
|
|
1507
|
-
propertyPath: PropertyShape
|
|
1508
|
-
.schema
|
|
1509
|
-
.properties
|
|
1510
|
-
.minExclusive
|
|
1511
|
-
.path,
|
|
1512
|
-
value: Maybe.empty(),
|
|
1513
|
-
})),
|
|
1514
|
-
}).chain((minExclusive) => $shaclPropertyFromRdf({
|
|
1515
|
-
graph: _$options.graph,
|
|
1516
|
-
resource: $resource,
|
|
1517
|
-
propertySchema: PropertyShape.schema.properties
|
|
1518
|
-
.minInclusive,
|
|
1519
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1520
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1521
|
-
.chain((values) => values.chainMap((value) => value.toLiteral()))
|
|
1522
|
-
.map((values) => values.length > 0
|
|
1523
|
-
? values.map((value) => Maybe.of(value))
|
|
1524
|
-
: Resource.Values.fromValue({
|
|
1525
|
-
focusResource: $resource,
|
|
1526
|
-
propertyPath: PropertyShape
|
|
1527
|
-
.schema
|
|
1528
|
-
.properties
|
|
1529
|
-
.minInclusive
|
|
1530
|
-
.path,
|
|
1531
|
-
value: Maybe.empty(),
|
|
1532
|
-
})),
|
|
1533
|
-
}).chain((minInclusive) => $shaclPropertyFromRdf({
|
|
1534
|
-
graph: _$options.graph,
|
|
1535
|
-
resource: $resource,
|
|
1536
|
-
propertySchema: PropertyShape.schema.properties
|
|
1537
|
-
.minLength,
|
|
1538
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1539
|
-
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
1540
|
-
.map((values) => values.length > 0
|
|
1541
|
-
? values.map((value) => Maybe.of(value))
|
|
1542
|
-
: Resource.Values.fromValue({
|
|
1543
|
-
focusResource: $resource,
|
|
1544
|
-
propertyPath: PropertyShape
|
|
1545
|
-
.schema
|
|
1546
|
-
.properties
|
|
1547
|
-
.minLength
|
|
1548
|
-
.path,
|
|
1549
|
-
value: Maybe.empty(),
|
|
1550
|
-
})),
|
|
1551
|
-
}).chain((minLength) => $shaclPropertyFromRdf({
|
|
1552
|
-
graph: _$options.graph,
|
|
1553
|
-
resource: $resource,
|
|
1554
|
-
propertySchema: PropertyShape.schema.properties
|
|
1555
|
-
.mutable,
|
|
1556
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1557
|
-
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
1558
|
-
.map((values) => values.length >
|
|
1559
|
-
0
|
|
1560
|
-
? values.map((value) => Maybe.of(value))
|
|
1561
|
-
: Resource.Values.fromValue({
|
|
1172
|
+
resource: $resource,
|
|
1173
|
+
propertySchema: PropertyShape.schema.properties.classes,
|
|
1174
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1175
|
+
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
1176
|
+
.map((values) => values.toArray())
|
|
1177
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
1562
1178
|
focusResource: $resource,
|
|
1563
|
-
propertyPath: PropertyShape
|
|
1564
|
-
|
|
1565
|
-
.properties
|
|
1566
|
-
.mutable
|
|
1567
|
-
.path,
|
|
1568
|
-
value: Maybe.empty(),
|
|
1179
|
+
propertyPath: PropertyShape.schema.properties.classes.path,
|
|
1180
|
+
value: valuesArray,
|
|
1569
1181
|
})),
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
.properties
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1182
|
+
}),
|
|
1183
|
+
comment: $shaclPropertyFromRdf({
|
|
1184
|
+
graph: _$options.graph,
|
|
1185
|
+
resource: $resource,
|
|
1186
|
+
propertySchema: PropertyShape.schema.properties.comment,
|
|
1187
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1188
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1189
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
1190
|
+
.map((values) => values.length > 0
|
|
1191
|
+
? values.map((value) => Maybe.of(value))
|
|
1192
|
+
: Resource.Values.fromValue({
|
|
1193
|
+
focusResource: $resource,
|
|
1194
|
+
propertyPath: PropertyShape.schema.properties.comment.path,
|
|
1195
|
+
value: Maybe.empty(),
|
|
1196
|
+
})),
|
|
1197
|
+
}),
|
|
1198
|
+
datatype: $shaclPropertyFromRdf({
|
|
1199
|
+
graph: _$options.graph,
|
|
1200
|
+
resource: $resource,
|
|
1201
|
+
propertySchema: PropertyShape.schema.properties.datatype,
|
|
1202
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1203
|
+
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
1204
|
+
.map((values) => values.length > 0
|
|
1205
|
+
? values.map((value) => Maybe.of(value))
|
|
1206
|
+
: Resource.Values.fromValue({
|
|
1207
|
+
focusResource: $resource,
|
|
1208
|
+
propertyPath: PropertyShape.schema.properties.datatype.path,
|
|
1209
|
+
value: Maybe.empty(),
|
|
1210
|
+
})),
|
|
1211
|
+
}),
|
|
1212
|
+
deactivated: $shaclPropertyFromRdf({
|
|
1213
|
+
graph: _$options.graph,
|
|
1214
|
+
resource: $resource,
|
|
1215
|
+
propertySchema: PropertyShape.schema.properties.deactivated,
|
|
1216
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1217
|
+
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
1218
|
+
.map((values) => values.length > 0
|
|
1219
|
+
? values.map((value) => Maybe.of(value))
|
|
1220
|
+
: Resource.Values.fromValue({
|
|
1221
|
+
focusResource: $resource,
|
|
1222
|
+
propertyPath: PropertyShape.schema.properties.deactivated.path,
|
|
1223
|
+
value: Maybe.empty(),
|
|
1224
|
+
})),
|
|
1225
|
+
}),
|
|
1226
|
+
defaultValue: $shaclPropertyFromRdf({
|
|
1227
|
+
graph: _$options.graph,
|
|
1228
|
+
resource: $resource,
|
|
1229
|
+
propertySchema: PropertyShape.schema.properties.defaultValue,
|
|
1230
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1231
|
+
.chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
|
|
1232
|
+
switch (term.termType) {
|
|
1233
|
+
case "NamedNode":
|
|
1234
|
+
case "Literal":
|
|
1235
|
+
return Either.of(term);
|
|
1236
|
+
default:
|
|
1237
|
+
return Left(new Resource.MistypedTermValueError({
|
|
1238
|
+
actualValue: term,
|
|
1239
|
+
expectedValueType: "(NamedNode | Literal)",
|
|
1240
|
+
focusResource: $resource,
|
|
1241
|
+
propertyPath: PropertyShape.schema.properties.defaultValue.path,
|
|
1242
|
+
}));
|
|
1243
|
+
}
|
|
1244
|
+
})))
|
|
1245
|
+
.map((values) => values.length > 0
|
|
1246
|
+
? values.map((value) => Maybe.of(value))
|
|
1247
|
+
: Resource.Values.fromValue({
|
|
1248
|
+
focusResource: $resource,
|
|
1249
|
+
propertyPath: PropertyShape.schema.properties.defaultValue.path,
|
|
1250
|
+
value: Maybe.empty(),
|
|
1251
|
+
})),
|
|
1252
|
+
}),
|
|
1253
|
+
description: $shaclPropertyFromRdf({
|
|
1254
|
+
graph: _$options.graph,
|
|
1255
|
+
resource: $resource,
|
|
1256
|
+
propertySchema: PropertyShape.schema.properties.description,
|
|
1257
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1258
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1259
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
1260
|
+
.map((values) => values.length > 0
|
|
1261
|
+
? values.map((value) => Maybe.of(value))
|
|
1262
|
+
: Resource.Values.fromValue({
|
|
1263
|
+
focusResource: $resource,
|
|
1264
|
+
propertyPath: PropertyShape.schema.properties.description.path,
|
|
1265
|
+
value: Maybe.empty(),
|
|
1266
|
+
})),
|
|
1267
|
+
}),
|
|
1268
|
+
display: $shaclPropertyFromRdf({
|
|
1269
|
+
graph: _$options.graph,
|
|
1270
|
+
resource: $resource,
|
|
1271
|
+
propertySchema: PropertyShape.schema.properties.display,
|
|
1272
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1273
|
+
.map((values) => values.length > 0
|
|
1274
|
+
? values
|
|
1275
|
+
: new Resource.Value({
|
|
1276
|
+
dataFactory: dataFactory,
|
|
1277
|
+
focusResource: $resource,
|
|
1278
|
+
propertyPath: PropertyShape.schema.properties.display.path,
|
|
1279
|
+
term: dataFactory.literal("false", $RdfVocabularies.xsd.boolean),
|
|
1280
|
+
}).toValues())
|
|
1281
|
+
.chain((values) => values.chainMap((value) => value.toBoolean())),
|
|
1282
|
+
}),
|
|
1283
|
+
flags: $shaclPropertyFromRdf({
|
|
1284
|
+
graph: _$options.graph,
|
|
1285
|
+
resource: $resource,
|
|
1286
|
+
propertySchema: PropertyShape.schema.properties.flags,
|
|
1287
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1288
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1289
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
1290
|
+
.map((values) => values.toArray())
|
|
1291
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
1583
1292
|
focusResource: $resource,
|
|
1584
|
-
propertyPath: PropertyShape
|
|
1585
|
-
|
|
1586
|
-
.properties
|
|
1587
|
-
.name
|
|
1588
|
-
.path,
|
|
1589
|
-
value: Maybe.empty(),
|
|
1293
|
+
propertyPath: PropertyShape.schema.properties.flags.path,
|
|
1294
|
+
value: valuesArray,
|
|
1590
1295
|
})),
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
.properties
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
0
|
|
1601
|
-
? values.map((value) => Maybe.of(value))
|
|
1602
|
-
: Resource.Values.fromValue({
|
|
1296
|
+
}),
|
|
1297
|
+
groups: $shaclPropertyFromRdf({
|
|
1298
|
+
graph: _$options.graph,
|
|
1299
|
+
resource: $resource,
|
|
1300
|
+
propertySchema: PropertyShape.schema.properties.groups,
|
|
1301
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1302
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
1303
|
+
.map((values) => values.toArray())
|
|
1304
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
1603
1305
|
focusResource: $resource,
|
|
1604
|
-
propertyPath: PropertyShape
|
|
1605
|
-
|
|
1606
|
-
.properties
|
|
1607
|
-
.node
|
|
1608
|
-
.path,
|
|
1609
|
-
value: Maybe.empty(),
|
|
1306
|
+
propertyPath: PropertyShape.schema.properties.groups.path,
|
|
1307
|
+
value: valuesArray,
|
|
1610
1308
|
})),
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
.properties
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1309
|
+
}),
|
|
1310
|
+
hasValues: $shaclPropertyFromRdf({
|
|
1311
|
+
graph: _$options.graph,
|
|
1312
|
+
resource: $resource,
|
|
1313
|
+
propertySchema: PropertyShape.schema.properties.hasValues,
|
|
1314
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1315
|
+
.chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
|
|
1316
|
+
switch (term.termType) {
|
|
1317
|
+
case "NamedNode":
|
|
1318
|
+
case "Literal":
|
|
1319
|
+
return Either.of(term);
|
|
1320
|
+
default:
|
|
1321
|
+
return Left(new Resource.MistypedTermValueError({
|
|
1322
|
+
actualValue: term,
|
|
1323
|
+
expectedValueType: "(NamedNode | Literal)",
|
|
1324
|
+
focusResource: $resource,
|
|
1325
|
+
propertyPath: PropertyShape.schema.properties.hasValues.path,
|
|
1326
|
+
}));
|
|
1327
|
+
}
|
|
1328
|
+
})))
|
|
1329
|
+
.map((values) => values.toArray())
|
|
1330
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
1630
1331
|
focusResource: $resource,
|
|
1631
|
-
propertyPath: PropertyShape
|
|
1632
|
-
|
|
1633
|
-
.properties
|
|
1634
|
-
.nodeKind
|
|
1635
|
-
.path,
|
|
1636
|
-
value: Maybe.empty(),
|
|
1332
|
+
propertyPath: PropertyShape.schema.properties.hasValues.path,
|
|
1333
|
+
value: valuesArray,
|
|
1637
1334
|
})),
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
resource: $resource,
|
|
1641
|
-
propertySchema: PropertyShape.schema
|
|
1642
|
-
.properties
|
|
1643
|
-
.not,
|
|
1644
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1645
|
-
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
1646
|
-
.map((values) => values.toArray())
|
|
1647
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
1648
|
-
focusResource: $resource,
|
|
1649
|
-
propertyPath: PropertyShape
|
|
1650
|
-
.schema
|
|
1651
|
-
.properties
|
|
1652
|
-
.not
|
|
1653
|
-
.path,
|
|
1654
|
-
value: valuesArray,
|
|
1655
|
-
})),
|
|
1656
|
-
}).chain((not) => $shaclPropertyFromRdf({
|
|
1657
|
-
graph: _$options.graph,
|
|
1658
|
-
resource: $resource,
|
|
1659
|
-
propertySchema: PropertyShape.schema
|
|
1660
|
-
.properties
|
|
1661
|
-
.or,
|
|
1662
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1663
|
-
.chain((values) => values.chainMap((value) => value.toList({
|
|
1335
|
+
}),
|
|
1336
|
+
in_: $shaclPropertyFromRdf({
|
|
1664
1337
|
graph: _$options.graph,
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
.
|
|
1670
|
-
.properties
|
|
1671
|
-
.or
|
|
1672
|
-
.path,
|
|
1673
|
-
values: valueList.toArray(),
|
|
1674
|
-
})).chain((values) => values.chainMap((value) => value.toIdentifier()))))
|
|
1675
|
-
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
1676
|
-
.map((values) => values.length >
|
|
1677
|
-
0
|
|
1678
|
-
? values.map((value) => Maybe.of(value))
|
|
1679
|
-
: Resource.Values.fromValue({
|
|
1338
|
+
resource: $resource,
|
|
1339
|
+
propertySchema: PropertyShape.schema.properties.in_,
|
|
1340
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1341
|
+
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
1342
|
+
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
1680
1343
|
focusResource: $resource,
|
|
1681
|
-
propertyPath: PropertyShape
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1344
|
+
propertyPath: PropertyShape.schema.properties.in_.path,
|
|
1345
|
+
values: valueList.toArray(),
|
|
1346
|
+
})).chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
|
|
1347
|
+
switch (term.termType) {
|
|
1348
|
+
case "NamedNode":
|
|
1349
|
+
case "Literal":
|
|
1350
|
+
return Either.of(term);
|
|
1351
|
+
default:
|
|
1352
|
+
return Left(new Resource.MistypedTermValueError({
|
|
1353
|
+
actualValue: term,
|
|
1354
|
+
expectedValueType: "(NamedNode | Literal)",
|
|
1355
|
+
focusResource: $resource,
|
|
1356
|
+
propertyPath: PropertyShape.schema.properties.in_.path,
|
|
1357
|
+
}));
|
|
1358
|
+
}
|
|
1359
|
+
})))))
|
|
1360
|
+
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
1361
|
+
.map((values) => values.length > 0
|
|
1362
|
+
? values.map((value) => Maybe.of(value))
|
|
1363
|
+
: Resource.Values.fromValue({
|
|
1364
|
+
focusResource: $resource,
|
|
1365
|
+
propertyPath: PropertyShape.schema.properties.in_.path,
|
|
1366
|
+
value: Maybe.empty(),
|
|
1367
|
+
})),
|
|
1368
|
+
}),
|
|
1369
|
+
isDefinedBy: $shaclPropertyFromRdf({
|
|
1370
|
+
graph: _$options.graph,
|
|
1371
|
+
resource: $resource,
|
|
1372
|
+
propertySchema: PropertyShape.schema.properties.isDefinedBy,
|
|
1373
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1374
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
1375
|
+
.map((values) => values.length > 0
|
|
1376
|
+
? values.map((value) => Maybe.of(value))
|
|
1377
|
+
: Resource.Values.fromValue({
|
|
1378
|
+
focusResource: $resource,
|
|
1379
|
+
propertyPath: PropertyShape.schema.properties.isDefinedBy.path,
|
|
1380
|
+
value: Maybe.empty(),
|
|
1381
|
+
})),
|
|
1382
|
+
}),
|
|
1383
|
+
label: $shaclPropertyFromRdf({
|
|
1384
|
+
graph: _$options.graph,
|
|
1385
|
+
resource: $resource,
|
|
1386
|
+
propertySchema: PropertyShape.schema.properties.label,
|
|
1387
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1388
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1389
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
1390
|
+
.map((values) => values.length > 0
|
|
1391
|
+
? values.map((value) => Maybe.of(value))
|
|
1392
|
+
: Resource.Values.fromValue({
|
|
1393
|
+
focusResource: $resource,
|
|
1394
|
+
propertyPath: PropertyShape.schema.properties.label.path,
|
|
1395
|
+
value: Maybe.empty(),
|
|
1396
|
+
})),
|
|
1397
|
+
}),
|
|
1398
|
+
languageIn: $shaclPropertyFromRdf({
|
|
1399
|
+
graph: _$options.graph,
|
|
1400
|
+
resource: $resource,
|
|
1401
|
+
propertySchema: PropertyShape.schema.properties.languageIn,
|
|
1402
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1403
|
+
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
1404
|
+
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
1700
1405
|
focusResource: $resource,
|
|
1701
|
-
propertyPath: PropertyShape
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1406
|
+
propertyPath: PropertyShape.schema.properties.languageIn.path,
|
|
1407
|
+
values: valueList.toArray(),
|
|
1408
|
+
}))
|
|
1409
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1410
|
+
.chain((values) => values.chainMap((value) => value.toString()))))
|
|
1411
|
+
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
1412
|
+
.map((values) => values.length > 0
|
|
1413
|
+
? values.map((value) => Maybe.of(value))
|
|
1414
|
+
: Resource.Values.fromValue({
|
|
1415
|
+
focusResource: $resource,
|
|
1416
|
+
propertyPath: PropertyShape.schema.properties.languageIn.path,
|
|
1417
|
+
value: Maybe.empty(),
|
|
1418
|
+
})),
|
|
1419
|
+
}),
|
|
1420
|
+
maxCount: $shaclPropertyFromRdf({
|
|
1716
1421
|
graph: _$options.graph,
|
|
1717
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1718
|
-
objectSet: _$options.objectSet,
|
|
1719
1422
|
resource: $resource,
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
.
|
|
1723
|
-
.
|
|
1724
|
-
.
|
|
1725
|
-
.
|
|
1423
|
+
propertySchema: PropertyShape.schema.properties.maxCount,
|
|
1424
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1425
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
1426
|
+
.map((values) => values.length > 0
|
|
1427
|
+
? values.map((value) => Maybe.of(value))
|
|
1428
|
+
: Resource.Values.fromValue({
|
|
1429
|
+
focusResource: $resource,
|
|
1430
|
+
propertyPath: PropertyShape.schema.properties.maxCount.path,
|
|
1431
|
+
value: Maybe.empty(),
|
|
1432
|
+
})),
|
|
1726
1433
|
}),
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1434
|
+
maxExclusive: $shaclPropertyFromRdf({
|
|
1435
|
+
graph: _$options.graph,
|
|
1436
|
+
resource: $resource,
|
|
1437
|
+
propertySchema: PropertyShape.schema.properties.maxExclusive,
|
|
1438
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1439
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1440
|
+
.chain((values) => values.chainMap((value) => value.toLiteral()))
|
|
1441
|
+
.map((values) => values.length > 0
|
|
1442
|
+
? values.map((value) => Maybe.of(value))
|
|
1443
|
+
: Resource.Values.fromValue({
|
|
1444
|
+
focusResource: $resource,
|
|
1445
|
+
propertyPath: PropertyShape.schema.properties.maxExclusive.path,
|
|
1446
|
+
value: Maybe.empty(),
|
|
1447
|
+
})),
|
|
1448
|
+
}),
|
|
1449
|
+
maxInclusive: $shaclPropertyFromRdf({
|
|
1450
|
+
graph: _$options.graph,
|
|
1451
|
+
resource: $resource,
|
|
1452
|
+
propertySchema: PropertyShape.schema.properties.maxInclusive,
|
|
1453
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1454
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1455
|
+
.chain((values) => values.chainMap((value) => value.toLiteral()))
|
|
1456
|
+
.map((values) => values.length > 0
|
|
1457
|
+
? values.map((value) => Maybe.of(value))
|
|
1458
|
+
: Resource.Values.fromValue({
|
|
1459
|
+
focusResource: $resource,
|
|
1460
|
+
propertyPath: PropertyShape.schema.properties.maxInclusive.path,
|
|
1461
|
+
value: Maybe.empty(),
|
|
1462
|
+
})),
|
|
1463
|
+
}),
|
|
1464
|
+
maxLength: $shaclPropertyFromRdf({
|
|
1465
|
+
graph: _$options.graph,
|
|
1466
|
+
resource: $resource,
|
|
1467
|
+
propertySchema: PropertyShape.schema.properties.maxLength,
|
|
1468
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1469
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
1470
|
+
.map((values) => values.length > 0
|
|
1471
|
+
? values.map((value) => Maybe.of(value))
|
|
1472
|
+
: Resource.Values.fromValue({
|
|
1473
|
+
focusResource: $resource,
|
|
1474
|
+
propertyPath: PropertyShape.schema.properties.maxLength.path,
|
|
1475
|
+
value: Maybe.empty(),
|
|
1476
|
+
})),
|
|
1477
|
+
}),
|
|
1478
|
+
minCount: $shaclPropertyFromRdf({
|
|
1479
|
+
graph: _$options.graph,
|
|
1480
|
+
resource: $resource,
|
|
1481
|
+
propertySchema: PropertyShape.schema.properties.minCount,
|
|
1482
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1483
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
1484
|
+
.map((values) => values.length > 0
|
|
1485
|
+
? values.map((value) => Maybe.of(value))
|
|
1486
|
+
: Resource.Values.fromValue({
|
|
1487
|
+
focusResource: $resource,
|
|
1488
|
+
propertyPath: PropertyShape.schema.properties.minCount.path,
|
|
1489
|
+
value: Maybe.empty(),
|
|
1490
|
+
})),
|
|
1491
|
+
}),
|
|
1492
|
+
minExclusive: $shaclPropertyFromRdf({
|
|
1493
|
+
graph: _$options.graph,
|
|
1494
|
+
resource: $resource,
|
|
1495
|
+
propertySchema: PropertyShape.schema.properties.minExclusive,
|
|
1496
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1497
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1498
|
+
.chain((values) => values.chainMap((value) => value.toLiteral()))
|
|
1499
|
+
.map((values) => values.length > 0
|
|
1500
|
+
? values.map((value) => Maybe.of(value))
|
|
1501
|
+
: Resource.Values.fromValue({
|
|
1502
|
+
focusResource: $resource,
|
|
1503
|
+
propertyPath: PropertyShape.schema.properties.minExclusive.path,
|
|
1504
|
+
value: Maybe.empty(),
|
|
1505
|
+
})),
|
|
1506
|
+
}),
|
|
1507
|
+
minInclusive: $shaclPropertyFromRdf({
|
|
1508
|
+
graph: _$options.graph,
|
|
1509
|
+
resource: $resource,
|
|
1510
|
+
propertySchema: PropertyShape.schema.properties.minInclusive,
|
|
1511
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1512
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1513
|
+
.chain((values) => values.chainMap((value) => value.toLiteral()))
|
|
1514
|
+
.map((values) => values.length > 0
|
|
1515
|
+
? values.map((value) => Maybe.of(value))
|
|
1516
|
+
: Resource.Values.fromValue({
|
|
1517
|
+
focusResource: $resource,
|
|
1518
|
+
propertyPath: PropertyShape.schema.properties.minInclusive.path,
|
|
1519
|
+
value: Maybe.empty(),
|
|
1520
|
+
})),
|
|
1521
|
+
}),
|
|
1522
|
+
minLength: $shaclPropertyFromRdf({
|
|
1523
|
+
graph: _$options.graph,
|
|
1524
|
+
resource: $resource,
|
|
1525
|
+
propertySchema: PropertyShape.schema.properties.minLength,
|
|
1526
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1527
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
1528
|
+
.map((values) => values.length > 0
|
|
1529
|
+
? values.map((value) => Maybe.of(value))
|
|
1530
|
+
: Resource.Values.fromValue({
|
|
1531
|
+
focusResource: $resource,
|
|
1532
|
+
propertyPath: PropertyShape.schema.properties.minLength.path,
|
|
1533
|
+
value: Maybe.empty(),
|
|
1534
|
+
})),
|
|
1535
|
+
}),
|
|
1536
|
+
mutable: $shaclPropertyFromRdf({
|
|
1537
|
+
graph: _$options.graph,
|
|
1538
|
+
resource: $resource,
|
|
1539
|
+
propertySchema: PropertyShape.schema.properties.mutable,
|
|
1540
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1541
|
+
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
1542
|
+
.map((values) => values.length > 0
|
|
1543
|
+
? values.map((value) => Maybe.of(value))
|
|
1544
|
+
: Resource.Values.fromValue({
|
|
1545
|
+
focusResource: $resource,
|
|
1546
|
+
propertyPath: PropertyShape.schema.properties.mutable.path,
|
|
1547
|
+
value: Maybe.empty(),
|
|
1548
|
+
})),
|
|
1549
|
+
}),
|
|
1550
|
+
name: $shaclPropertyFromRdf({
|
|
1551
|
+
graph: _$options.graph,
|
|
1552
|
+
resource: $resource,
|
|
1553
|
+
propertySchema: PropertyShape.schema.properties.name,
|
|
1554
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1555
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1556
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
1557
|
+
.map((values) => values.length > 0
|
|
1558
|
+
? values.map((value) => Maybe.of(value))
|
|
1559
|
+
: Resource.Values.fromValue({
|
|
1560
|
+
focusResource: $resource,
|
|
1561
|
+
propertyPath: PropertyShape.schema.properties.name.path,
|
|
1562
|
+
value: Maybe.empty(),
|
|
1563
|
+
})),
|
|
1564
|
+
}),
|
|
1565
|
+
node: $shaclPropertyFromRdf({
|
|
1566
|
+
graph: _$options.graph,
|
|
1567
|
+
resource: $resource,
|
|
1568
|
+
propertySchema: PropertyShape.schema.properties.node,
|
|
1569
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1570
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
1571
|
+
.map((values) => values.length > 0
|
|
1572
|
+
? values.map((value) => Maybe.of(value))
|
|
1573
|
+
: Resource.Values.fromValue({
|
|
1574
|
+
focusResource: $resource,
|
|
1575
|
+
propertyPath: PropertyShape.schema.properties.node.path,
|
|
1576
|
+
value: Maybe.empty(),
|
|
1577
|
+
})),
|
|
1578
|
+
}),
|
|
1579
|
+
nodeKind: $shaclPropertyFromRdf({
|
|
1580
|
+
graph: _$options.graph,
|
|
1581
|
+
resource: $resource,
|
|
1582
|
+
propertySchema: PropertyShape.schema.properties.nodeKind,
|
|
1583
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1584
|
+
.chain((values) => values.chainMap((value) => value.toIri([
|
|
1585
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#BlankNode"),
|
|
1586
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#BlankNodeOrIRI"),
|
|
1587
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#BlankNodeOrLiteral"),
|
|
1588
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#IRI"),
|
|
1589
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#IRIOrLiteral"),
|
|
1590
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Literal"),
|
|
1591
|
+
])))
|
|
1592
|
+
.map((values) => values.length > 0
|
|
1593
|
+
? values.map((value) => Maybe.of(value))
|
|
1594
|
+
: Resource.Values.fromValue({
|
|
1595
|
+
focusResource: $resource,
|
|
1596
|
+
propertyPath: PropertyShape.schema.properties.nodeKind.path,
|
|
1597
|
+
value: Maybe.empty(),
|
|
1598
|
+
})),
|
|
1599
|
+
}),
|
|
1600
|
+
not: $shaclPropertyFromRdf({
|
|
1601
|
+
graph: _$options.graph,
|
|
1602
|
+
resource: $resource,
|
|
1603
|
+
propertySchema: PropertyShape.schema.properties.not,
|
|
1604
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1605
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
1606
|
+
.map((values) => values.toArray())
|
|
1607
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
1758
1608
|
focusResource: $resource,
|
|
1759
|
-
propertyPath: PropertyShape
|
|
1760
|
-
|
|
1761
|
-
.properties
|
|
1762
|
-
.resolve
|
|
1763
|
-
.path,
|
|
1764
|
-
value: Maybe.empty(),
|
|
1609
|
+
propertyPath: PropertyShape.schema.properties.not.path,
|
|
1610
|
+
value: valuesArray,
|
|
1765
1611
|
})),
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
.properties
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
.chain((values) => values.chainMap((value) => value.toString()))
|
|
1775
|
-
.map((values) => values.length >
|
|
1776
|
-
0
|
|
1777
|
-
? values.map((value) => Maybe.of(value))
|
|
1778
|
-
: Resource.Values.fromValue({
|
|
1612
|
+
}),
|
|
1613
|
+
or: $shaclPropertyFromRdf({
|
|
1614
|
+
graph: _$options.graph,
|
|
1615
|
+
resource: $resource,
|
|
1616
|
+
propertySchema: PropertyShape.schema.properties.or,
|
|
1617
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1618
|
+
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
1619
|
+
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
1779
1620
|
focusResource: $resource,
|
|
1780
|
-
propertyPath: PropertyShape
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
value
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1621
|
+
propertyPath: PropertyShape.schema.properties.or.path,
|
|
1622
|
+
values: valueList.toArray(),
|
|
1623
|
+
})).chain((values) => values.chainMap((value) => value.toIdentifier()))))
|
|
1624
|
+
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
1625
|
+
.map((values) => values.length > 0
|
|
1626
|
+
? values.map((value) => Maybe.of(value))
|
|
1627
|
+
: Resource.Values.fromValue({
|
|
1628
|
+
focusResource: $resource,
|
|
1629
|
+
propertyPath: PropertyShape.schema.properties.or.path,
|
|
1630
|
+
value: Maybe.empty(),
|
|
1631
|
+
})),
|
|
1632
|
+
}),
|
|
1633
|
+
order: $shaclPropertyFromRdf({
|
|
1634
|
+
graph: _$options.graph,
|
|
1635
|
+
resource: $resource,
|
|
1636
|
+
propertySchema: PropertyShape.schema.properties.order,
|
|
1637
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1638
|
+
.chain((values) => values.chainMap((value) => value.toFloat()))
|
|
1639
|
+
.map((values) => values.length > 0
|
|
1640
|
+
? values.map((value) => Maybe.of(value))
|
|
1641
|
+
: Resource.Values.fromValue({
|
|
1642
|
+
focusResource: $resource,
|
|
1643
|
+
propertyPath: PropertyShape.schema.properties.order.path,
|
|
1644
|
+
value: Maybe.empty(),
|
|
1645
|
+
})),
|
|
1646
|
+
}),
|
|
1647
|
+
path: $shaclPropertyFromRdf({
|
|
1648
|
+
graph: _$options.graph,
|
|
1649
|
+
resource: $resource,
|
|
1650
|
+
propertySchema: PropertyShape.schema.properties.path,
|
|
1651
|
+
typeFromRdf: (resourceValues) => $PropertyPath.fromRdfResourceValues(resourceValues, {
|
|
1652
|
+
context: _$options.context,
|
|
1653
|
+
graph: _$options.graph,
|
|
1654
|
+
objectSet: _$options.objectSet,
|
|
1655
|
+
preferredLanguages: _$options.preferredLanguages,
|
|
1656
|
+
resource: $resource,
|
|
1657
|
+
ignoreRdfType: true,
|
|
1658
|
+
propertyPath: PropertyShape.schema.properties.path.path,
|
|
1659
|
+
}),
|
|
1660
|
+
}),
|
|
1661
|
+
patterns: $shaclPropertyFromRdf({
|
|
1662
|
+
graph: _$options.graph,
|
|
1663
|
+
resource: $resource,
|
|
1664
|
+
propertySchema: PropertyShape.schema.properties.patterns,
|
|
1665
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1666
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1667
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
1668
|
+
.map((values) => values.toArray())
|
|
1669
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
1799
1670
|
focusResource: $resource,
|
|
1800
|
-
propertyPath: PropertyShape
|
|
1801
|
-
|
|
1802
|
-
.properties
|
|
1803
|
-
.uniqueLang
|
|
1804
|
-
.path,
|
|
1805
|
-
value: Maybe.empty(),
|
|
1671
|
+
propertyPath: PropertyShape.schema.properties.patterns.path,
|
|
1672
|
+
value: valuesArray,
|
|
1806
1673
|
})),
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
resource: $resource,
|
|
1810
|
-
propertySchema: PropertyShape.schema
|
|
1811
|
-
.properties
|
|
1812
|
-
.xone,
|
|
1813
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1814
|
-
.chain((values) => values.chainMap((value) => value.toList({
|
|
1674
|
+
}),
|
|
1675
|
+
resolve: $shaclPropertyFromRdf({
|
|
1815
1676
|
graph: _$options.graph,
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
.
|
|
1821
|
-
.
|
|
1822
|
-
.
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
:
|
|
1677
|
+
resource: $resource,
|
|
1678
|
+
propertySchema: PropertyShape.schema.properties.resolve,
|
|
1679
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1680
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
1681
|
+
.map((values) => values.length > 0
|
|
1682
|
+
? values.map((value) => Maybe.of(value))
|
|
1683
|
+
: Resource.Values.fromValue({
|
|
1684
|
+
focusResource: $resource,
|
|
1685
|
+
propertyPath: PropertyShape.schema.properties.resolve.path,
|
|
1686
|
+
value: Maybe.empty(),
|
|
1687
|
+
})),
|
|
1688
|
+
}),
|
|
1689
|
+
shaclmateName: $shaclPropertyFromRdf({
|
|
1690
|
+
graph: _$options.graph,
|
|
1691
|
+
resource: $resource,
|
|
1692
|
+
propertySchema: PropertyShape.schema.properties.shaclmateName,
|
|
1693
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1694
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1695
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
1696
|
+
.map((values) => values.length > 0
|
|
1697
|
+
? values.map((value) => Maybe.of(value))
|
|
1698
|
+
: Resource.Values.fromValue({
|
|
1699
|
+
focusResource: $resource,
|
|
1700
|
+
propertyPath: PropertyShape.schema.properties.shaclmateName.path,
|
|
1701
|
+
value: Maybe.empty(),
|
|
1702
|
+
})),
|
|
1703
|
+
}),
|
|
1704
|
+
uniqueLang: $shaclPropertyFromRdf({
|
|
1705
|
+
graph: _$options.graph,
|
|
1706
|
+
resource: $resource,
|
|
1707
|
+
propertySchema: PropertyShape.schema.properties.uniqueLang,
|
|
1708
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1709
|
+
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
1710
|
+
.map((values) => values.length > 0
|
|
1711
|
+
? values.map((value) => Maybe.of(value))
|
|
1712
|
+
: Resource.Values.fromValue({
|
|
1713
|
+
focusResource: $resource,
|
|
1714
|
+
propertyPath: PropertyShape.schema.properties.uniqueLang.path,
|
|
1715
|
+
value: Maybe.empty(),
|
|
1716
|
+
})),
|
|
1717
|
+
}),
|
|
1718
|
+
xone: $shaclPropertyFromRdf({
|
|
1719
|
+
graph: _$options.graph,
|
|
1720
|
+
resource: $resource,
|
|
1721
|
+
propertySchema: PropertyShape.schema.properties.xone,
|
|
1722
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1723
|
+
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
1724
|
+
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
1831
1725
|
focusResource: $resource,
|
|
1832
|
-
propertyPath: PropertyShape
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
value
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
deactivated,
|
|
1846
|
-
defaultValue,
|
|
1847
|
-
description,
|
|
1848
|
-
display,
|
|
1849
|
-
flags,
|
|
1850
|
-
groups,
|
|
1851
|
-
hasValues,
|
|
1852
|
-
in_,
|
|
1853
|
-
isDefinedBy,
|
|
1854
|
-
label,
|
|
1855
|
-
languageIn,
|
|
1856
|
-
maxCount,
|
|
1857
|
-
maxExclusive,
|
|
1858
|
-
maxInclusive,
|
|
1859
|
-
maxLength,
|
|
1860
|
-
minCount,
|
|
1861
|
-
minExclusive,
|
|
1862
|
-
minInclusive,
|
|
1863
|
-
minLength,
|
|
1864
|
-
mutable,
|
|
1865
|
-
name,
|
|
1866
|
-
node,
|
|
1867
|
-
nodeKind,
|
|
1868
|
-
not,
|
|
1869
|
-
or,
|
|
1870
|
-
order,
|
|
1871
|
-
path,
|
|
1872
|
-
patterns,
|
|
1873
|
-
resolve,
|
|
1874
|
-
shaclmateName,
|
|
1875
|
-
uniqueLang,
|
|
1876
|
-
xone,
|
|
1877
|
-
})))))))))))))))))))))))))))))))))))))));
|
|
1726
|
+
propertyPath: PropertyShape.schema.properties.xone.path,
|
|
1727
|
+
values: valueList.toArray(),
|
|
1728
|
+
})).chain((values) => values.chainMap((value) => value.toIdentifier()))))
|
|
1729
|
+
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
1730
|
+
.map((values) => values.length > 0
|
|
1731
|
+
? values.map((value) => Maybe.of(value))
|
|
1732
|
+
: Resource.Values.fromValue({
|
|
1733
|
+
focusResource: $resource,
|
|
1734
|
+
propertyPath: PropertyShape.schema.properties.xone.path,
|
|
1735
|
+
value: Maybe.empty(),
|
|
1736
|
+
})),
|
|
1737
|
+
}),
|
|
1738
|
+
}).map((properties) => create(properties)));
|
|
1878
1739
|
};
|
|
1879
1740
|
PropertyShape.fromRdfResource = $wrap_FromRdfResourceFunction(PropertyShape._fromRdfResource);
|
|
1880
1741
|
PropertyShape.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
@@ -2482,7 +2343,11 @@ export var PropertyGroup;
|
|
|
2482
2343
|
else {
|
|
2483
2344
|
label = parameters?.label;
|
|
2484
2345
|
}
|
|
2485
|
-
|
|
2346
|
+
const $object = { $identifier, $type, comment, label };
|
|
2347
|
+
if (!globalThis.Object.prototype.hasOwnProperty.call($object, "toString")) {
|
|
2348
|
+
$object.toString = $toString;
|
|
2349
|
+
}
|
|
2350
|
+
return $object;
|
|
2486
2351
|
}
|
|
2487
2352
|
PropertyGroup.create = create;
|
|
2488
2353
|
let Identifier;
|
|
@@ -2525,43 +2390,46 @@ export var PropertyGroup;
|
|
|
2525
2390
|
}
|
|
2526
2391
|
return Left(new Error(`${$resource.identifier} has unexpected RDF type (actual: ${actualRdfType.value}, expected: http://www.w3.org/ns/shacl#PropertyGroup)`));
|
|
2527
2392
|
})
|
|
2528
|
-
: Right(true)).chain((_rdfTypeCheck) =>
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
.
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2393
|
+
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
2394
|
+
$identifier: Right(new Resource.Value({
|
|
2395
|
+
dataFactory: dataFactory,
|
|
2396
|
+
focusResource: $resource,
|
|
2397
|
+
propertyPath: $RdfVocabularies.rdf.subject,
|
|
2398
|
+
term: $resource.identifier,
|
|
2399
|
+
}).toValues())
|
|
2400
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
2401
|
+
.chain((values) => values.head()),
|
|
2402
|
+
comment: $shaclPropertyFromRdf({
|
|
2403
|
+
graph: _$options.graph,
|
|
2404
|
+
resource: $resource,
|
|
2405
|
+
propertySchema: PropertyGroup.schema.properties.comment,
|
|
2406
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
2407
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
2408
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
2409
|
+
.map((values) => values.length > 0
|
|
2410
|
+
? values.map((value) => Maybe.of(value))
|
|
2411
|
+
: Resource.Values.fromValue({
|
|
2412
|
+
focusResource: $resource,
|
|
2413
|
+
propertyPath: PropertyShape.schema.properties.comment.path,
|
|
2414
|
+
value: Maybe.empty(),
|
|
2415
|
+
})),
|
|
2416
|
+
}),
|
|
2417
|
+
label: $shaclPropertyFromRdf({
|
|
2418
|
+
graph: _$options.graph,
|
|
2419
|
+
resource: $resource,
|
|
2420
|
+
propertySchema: PropertyGroup.schema.properties.label,
|
|
2421
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
2422
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
2423
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
2424
|
+
.map((values) => values.length > 0
|
|
2425
|
+
? values.map((value) => Maybe.of(value))
|
|
2426
|
+
: Resource.Values.fromValue({
|
|
2427
|
+
focusResource: $resource,
|
|
2428
|
+
propertyPath: PropertyShape.schema.properties.label.path,
|
|
2429
|
+
value: Maybe.empty(),
|
|
2430
|
+
})),
|
|
2431
|
+
}),
|
|
2432
|
+
}).map((properties) => create(properties)));
|
|
2565
2433
|
};
|
|
2566
2434
|
PropertyGroup.fromRdfResource = $wrap_FromRdfResourceFunction(PropertyGroup._fromRdfResource);
|
|
2567
2435
|
PropertyGroup.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
@@ -2717,7 +2585,7 @@ export var Ontology;
|
|
|
2717
2585
|
else {
|
|
2718
2586
|
tsImports = parameters?.tsImports;
|
|
2719
2587
|
}
|
|
2720
|
-
|
|
2588
|
+
const $object = {
|
|
2721
2589
|
$identifier,
|
|
2722
2590
|
$type,
|
|
2723
2591
|
comment,
|
|
@@ -2726,6 +2594,10 @@ export var Ontology;
|
|
|
2726
2594
|
tsFeatureIncludes,
|
|
2727
2595
|
tsImports,
|
|
2728
2596
|
};
|
|
2597
|
+
if (!globalThis.Object.prototype.hasOwnProperty.call($object, "toString")) {
|
|
2598
|
+
$object.toString = $toString;
|
|
2599
|
+
}
|
|
2600
|
+
return $object;
|
|
2729
2601
|
}
|
|
2730
2602
|
Ontology.create = create;
|
|
2731
2603
|
let Identifier;
|
|
@@ -2780,109 +2652,108 @@ export var Ontology;
|
|
|
2780
2652
|
}
|
|
2781
2653
|
return Left(new Error(`${$resource.identifier} has unexpected RDF type (actual: ${actualRdfType.value}, expected: http://www.w3.org/2002/07/owl#Ontology)`));
|
|
2782
2654
|
})
|
|
2783
|
-
: Right(true)).chain((_rdfTypeCheck) =>
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2655
|
+
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
2656
|
+
$identifier: Right(new Resource.Value({
|
|
2657
|
+
dataFactory: dataFactory,
|
|
2658
|
+
focusResource: $resource,
|
|
2659
|
+
propertyPath: $RdfVocabularies.rdf.subject,
|
|
2660
|
+
term: $resource.identifier,
|
|
2661
|
+
}).toValues())
|
|
2662
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
2663
|
+
.chain((values) => values.head()),
|
|
2664
|
+
comment: $shaclPropertyFromRdf({
|
|
2665
|
+
graph: _$options.graph,
|
|
2666
|
+
resource: $resource,
|
|
2667
|
+
propertySchema: Ontology.schema.properties.comment,
|
|
2668
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
2669
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
2670
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
2671
|
+
.map((values) => values.length > 0
|
|
2672
|
+
? values.map((value) => Maybe.of(value))
|
|
2673
|
+
: Resource.Values.fromValue({
|
|
2674
|
+
focusResource: $resource,
|
|
2675
|
+
propertyPath: PropertyShape.schema.properties.comment.path,
|
|
2676
|
+
value: Maybe.empty(),
|
|
2677
|
+
})),
|
|
2678
|
+
}),
|
|
2679
|
+
label: $shaclPropertyFromRdf({
|
|
2680
|
+
graph: _$options.graph,
|
|
2681
|
+
resource: $resource,
|
|
2682
|
+
propertySchema: Ontology.schema.properties.label,
|
|
2683
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
2684
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
2685
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
2686
|
+
.map((values) => values.length > 0
|
|
2687
|
+
? values.map((value) => Maybe.of(value))
|
|
2688
|
+
: Resource.Values.fromValue({
|
|
2689
|
+
focusResource: $resource,
|
|
2690
|
+
propertyPath: PropertyShape.schema.properties.label.path,
|
|
2691
|
+
value: Maybe.empty(),
|
|
2692
|
+
})),
|
|
2693
|
+
}),
|
|
2694
|
+
tsFeatureExcludes: $shaclPropertyFromRdf({
|
|
2695
|
+
graph: _$options.graph,
|
|
2696
|
+
resource: $resource,
|
|
2697
|
+
propertySchema: Ontology.schema.properties.tsFeatureExcludes,
|
|
2698
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
2699
|
+
.chain((values) => values.chainMap((value) => value.toIri([
|
|
2700
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_All"),
|
|
2701
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Create"),
|
|
2702
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_Default"),
|
|
2703
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Equals"),
|
|
2704
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Graphql"),
|
|
2705
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Hash"),
|
|
2706
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Json"),
|
|
2707
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_None"),
|
|
2708
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Rdf"),
|
|
2709
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Sparql"),
|
|
2710
|
+
])))
|
|
2711
|
+
.map((values) => values.toArray())
|
|
2712
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
2801
2713
|
focusResource: $resource,
|
|
2802
|
-
propertyPath:
|
|
2803
|
-
value:
|
|
2714
|
+
propertyPath: Ontology.schema.properties.tsFeatureExcludes.path,
|
|
2715
|
+
value: valuesArray,
|
|
2804
2716
|
})),
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2717
|
+
}),
|
|
2718
|
+
tsFeatureIncludes: $shaclPropertyFromRdf({
|
|
2719
|
+
graph: _$options.graph,
|
|
2720
|
+
resource: $resource,
|
|
2721
|
+
propertySchema: Ontology.schema.properties.tsFeatureIncludes,
|
|
2722
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
2723
|
+
.chain((values) => values.chainMap((value) => value.toIri([
|
|
2724
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_All"),
|
|
2725
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Create"),
|
|
2726
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_Default"),
|
|
2727
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Equals"),
|
|
2728
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Graphql"),
|
|
2729
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Hash"),
|
|
2730
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Json"),
|
|
2731
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_None"),
|
|
2732
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Rdf"),
|
|
2733
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Sparql"),
|
|
2734
|
+
])))
|
|
2735
|
+
.map((values) => values.toArray())
|
|
2736
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
2815
2737
|
focusResource: $resource,
|
|
2816
|
-
propertyPath:
|
|
2817
|
-
value:
|
|
2738
|
+
propertyPath: Ontology.schema.properties.tsFeatureIncludes.path,
|
|
2739
|
+
value: valuesArray,
|
|
2818
2740
|
})),
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
])))
|
|
2836
|
-
.map((values) => values.toArray())
|
|
2837
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
2838
|
-
focusResource: $resource,
|
|
2839
|
-
propertyPath: Ontology.schema.properties.tsFeatureExcludes.path,
|
|
2840
|
-
value: valuesArray,
|
|
2841
|
-
})),
|
|
2842
|
-
}).chain((tsFeatureExcludes) => $shaclPropertyFromRdf({
|
|
2843
|
-
graph: _$options.graph,
|
|
2844
|
-
resource: $resource,
|
|
2845
|
-
propertySchema: Ontology.schema.properties.tsFeatureIncludes,
|
|
2846
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
2847
|
-
.chain((values) => values.chainMap((value) => value.toIri([
|
|
2848
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_All"),
|
|
2849
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Create"),
|
|
2850
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_Default"),
|
|
2851
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Equals"),
|
|
2852
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Graphql"),
|
|
2853
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Hash"),
|
|
2854
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Json"),
|
|
2855
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_None"),
|
|
2856
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Rdf"),
|
|
2857
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Sparql"),
|
|
2858
|
-
])))
|
|
2859
|
-
.map((values) => values.toArray())
|
|
2860
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
2861
|
-
focusResource: $resource,
|
|
2862
|
-
propertyPath: Ontology.schema.properties.tsFeatureIncludes.path,
|
|
2863
|
-
value: valuesArray,
|
|
2864
|
-
})),
|
|
2865
|
-
}).chain((tsFeatureIncludes) => $shaclPropertyFromRdf({
|
|
2866
|
-
graph: _$options.graph,
|
|
2867
|
-
resource: $resource,
|
|
2868
|
-
propertySchema: Ontology.schema.properties.tsImports,
|
|
2869
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
2870
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
2871
|
-
.chain((values) => values.chainMap((value) => value.toString()))
|
|
2872
|
-
.map((values) => values.toArray())
|
|
2873
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
2874
|
-
focusResource: $resource,
|
|
2875
|
-
propertyPath: Ontology.schema.properties.tsImports.path,
|
|
2876
|
-
value: valuesArray,
|
|
2877
|
-
})),
|
|
2878
|
-
}).map((tsImports) => create({
|
|
2879
|
-
$identifier,
|
|
2880
|
-
comment,
|
|
2881
|
-
label,
|
|
2882
|
-
tsFeatureExcludes,
|
|
2883
|
-
tsFeatureIncludes,
|
|
2884
|
-
tsImports,
|
|
2885
|
-
}))))))));
|
|
2741
|
+
}),
|
|
2742
|
+
tsImports: $shaclPropertyFromRdf({
|
|
2743
|
+
graph: _$options.graph,
|
|
2744
|
+
resource: $resource,
|
|
2745
|
+
propertySchema: Ontology.schema.properties.tsImports,
|
|
2746
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
2747
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
2748
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
2749
|
+
.map((values) => values.toArray())
|
|
2750
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
2751
|
+
focusResource: $resource,
|
|
2752
|
+
propertyPath: Ontology.schema.properties.tsImports.path,
|
|
2753
|
+
value: valuesArray,
|
|
2754
|
+
})),
|
|
2755
|
+
}),
|
|
2756
|
+
}).map((properties) => create(properties)));
|
|
2886
2757
|
};
|
|
2887
2758
|
Ontology.fromRdfResource = $wrap_FromRdfResourceFunction(Ontology._fromRdfResource);
|
|
2888
2759
|
Ontology.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
@@ -3671,7 +3542,7 @@ export var NodeShape;
|
|
|
3671
3542
|
else {
|
|
3672
3543
|
xone = parameters?.xone;
|
|
3673
3544
|
}
|
|
3674
|
-
|
|
3545
|
+
const $object = {
|
|
3675
3546
|
$identifier,
|
|
3676
3547
|
$type,
|
|
3677
3548
|
and,
|
|
@@ -3715,6 +3586,10 @@ export var NodeShape;
|
|
|
3715
3586
|
types,
|
|
3716
3587
|
xone,
|
|
3717
3588
|
};
|
|
3589
|
+
if (!globalThis.Object.prototype.hasOwnProperty.call($object, "toString")) {
|
|
3590
|
+
$object.toString = $toString;
|
|
3591
|
+
}
|
|
3592
|
+
return $object;
|
|
3718
3593
|
}
|
|
3719
3594
|
NodeShape.create = create;
|
|
3720
3595
|
let Identifier;
|
|
@@ -3909,846 +3784,668 @@ export var NodeShape;
|
|
|
3909
3784
|
}
|
|
3910
3785
|
return Left(new Error(`${$resource.identifier} has unexpected RDF type (actual: ${actualRdfType.value}, expected: http://www.w3.org/ns/shacl#NodeShape)`));
|
|
3911
3786
|
})
|
|
3912
|
-
: Right(true)).chain((_rdfTypeCheck) =>
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
propertyPath: $RdfVocabularies.rdf.subject,
|
|
3916
|
-
term: $resource.identifier,
|
|
3917
|
-
}).toValues())
|
|
3918
|
-
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
3919
|
-
.chain((values) => values.head())
|
|
3920
|
-
.chain(($identifier) => $shaclPropertyFromRdf({
|
|
3921
|
-
graph: _$options.graph,
|
|
3922
|
-
resource: $resource,
|
|
3923
|
-
propertySchema: NodeShape.schema.properties.and,
|
|
3924
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
3925
|
-
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
3926
|
-
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
3787
|
+
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
3788
|
+
$identifier: Right(new Resource.Value({
|
|
3789
|
+
dataFactory: dataFactory,
|
|
3927
3790
|
focusResource: $resource,
|
|
3928
|
-
propertyPath:
|
|
3929
|
-
|
|
3930
|
-
})
|
|
3931
|
-
.
|
|
3932
|
-
.
|
|
3933
|
-
|
|
3934
|
-
:
|
|
3791
|
+
propertyPath: $RdfVocabularies.rdf.subject,
|
|
3792
|
+
term: $resource.identifier,
|
|
3793
|
+
}).toValues())
|
|
3794
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
3795
|
+
.chain((values) => values.head()),
|
|
3796
|
+
and: $shaclPropertyFromRdf({
|
|
3797
|
+
graph: _$options.graph,
|
|
3798
|
+
resource: $resource,
|
|
3799
|
+
propertySchema: NodeShape.schema.properties.and,
|
|
3800
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
3801
|
+
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
3802
|
+
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
3935
3803
|
focusResource: $resource,
|
|
3936
3804
|
propertyPath: PropertyShape.schema.properties.and.path,
|
|
3937
|
-
|
|
3938
|
-
}))
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
value: valuesArray,
|
|
3950
|
-
})),
|
|
3951
|
-
}).chain((classes) => $shaclPropertyFromRdf({
|
|
3952
|
-
graph: _$options.graph,
|
|
3953
|
-
resource: $resource,
|
|
3954
|
-
propertySchema: NodeShape.schema.properties.closed,
|
|
3955
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
3956
|
-
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
3957
|
-
.map((values) => values.length > 0
|
|
3958
|
-
? values.map((value) => Maybe.of(value))
|
|
3959
|
-
: Resource.Values.fromValue({
|
|
3960
|
-
focusResource: $resource,
|
|
3961
|
-
propertyPath: NodeShape.schema.properties.closed.path,
|
|
3962
|
-
value: Maybe.empty(),
|
|
3963
|
-
})),
|
|
3964
|
-
}).chain((closed) => $shaclPropertyFromRdf({
|
|
3965
|
-
graph: _$options.graph,
|
|
3966
|
-
resource: $resource,
|
|
3967
|
-
propertySchema: NodeShape.schema.properties.comment,
|
|
3968
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
3969
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
3970
|
-
.chain((values) => values.chainMap((value) => value.toString()))
|
|
3971
|
-
.map((values) => values.length > 0
|
|
3972
|
-
? values.map((value) => Maybe.of(value))
|
|
3973
|
-
: Resource.Values.fromValue({
|
|
3974
|
-
focusResource: $resource,
|
|
3975
|
-
propertyPath: PropertyShape.schema.properties.comment.path,
|
|
3976
|
-
value: Maybe.empty(),
|
|
3977
|
-
})),
|
|
3978
|
-
}).chain((comment) => $shaclPropertyFromRdf({
|
|
3979
|
-
graph: _$options.graph,
|
|
3980
|
-
resource: $resource,
|
|
3981
|
-
propertySchema: NodeShape.schema.properties.datatype,
|
|
3982
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
3983
|
-
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
3984
|
-
.map((values) => values.length > 0
|
|
3985
|
-
? values.map((value) => Maybe.of(value))
|
|
3986
|
-
: Resource.Values.fromValue({
|
|
3987
|
-
focusResource: $resource,
|
|
3988
|
-
propertyPath: PropertyShape.schema.properties.datatype.path,
|
|
3989
|
-
value: Maybe.empty(),
|
|
3990
|
-
})),
|
|
3991
|
-
}).chain((datatype) => $shaclPropertyFromRdf({
|
|
3992
|
-
graph: _$options.graph,
|
|
3993
|
-
resource: $resource,
|
|
3994
|
-
propertySchema: NodeShape.schema.properties.deactivated,
|
|
3995
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
3996
|
-
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
3997
|
-
.map((values) => values.length > 0
|
|
3998
|
-
? values.map((value) => Maybe.of(value))
|
|
3999
|
-
: Resource.Values.fromValue({
|
|
4000
|
-
focusResource: $resource,
|
|
4001
|
-
propertyPath: PropertyShape.schema.properties.deactivated
|
|
4002
|
-
.path,
|
|
4003
|
-
value: Maybe.empty(),
|
|
4004
|
-
})),
|
|
4005
|
-
}).chain((deactivated) => $shaclPropertyFromRdf({
|
|
4006
|
-
graph: _$options.graph,
|
|
4007
|
-
resource: $resource,
|
|
4008
|
-
propertySchema: NodeShape.schema.properties.discriminantValue,
|
|
4009
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4010
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4011
|
-
.chain((values) => values.chainMap((value) => value.toString()))
|
|
4012
|
-
.map((values) => values.length > 0
|
|
4013
|
-
? values.map((value) => Maybe.of(value))
|
|
4014
|
-
: Resource.Values.fromValue({
|
|
4015
|
-
focusResource: $resource,
|
|
4016
|
-
propertyPath: NodeShape.schema.properties
|
|
4017
|
-
.discriminantValue.path,
|
|
4018
|
-
value: Maybe.empty(),
|
|
4019
|
-
})),
|
|
4020
|
-
}).chain((discriminantValue) => $shaclPropertyFromRdf({
|
|
4021
|
-
graph: _$options.graph,
|
|
4022
|
-
resource: $resource,
|
|
4023
|
-
propertySchema: NodeShape.schema.properties.extern,
|
|
4024
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4025
|
-
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
4026
|
-
.map((values) => values.length > 0
|
|
4027
|
-
? values.map((value) => Maybe.of(value))
|
|
4028
|
-
: Resource.Values.fromValue({
|
|
4029
|
-
focusResource: $resource,
|
|
4030
|
-
propertyPath: NodeShape.schema.properties.extern.path,
|
|
4031
|
-
value: Maybe.empty(),
|
|
4032
|
-
})),
|
|
4033
|
-
}).chain((extern) => $shaclPropertyFromRdf({
|
|
4034
|
-
graph: _$options.graph,
|
|
4035
|
-
resource: $resource,
|
|
4036
|
-
propertySchema: NodeShape.schema.properties.flags,
|
|
4037
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4038
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4039
|
-
.chain((values) => values.chainMap((value) => value.toString()))
|
|
4040
|
-
.map((values) => values.toArray())
|
|
4041
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
4042
|
-
focusResource: $resource,
|
|
4043
|
-
propertyPath: PropertyShape.schema.properties.flags
|
|
4044
|
-
.path,
|
|
4045
|
-
value: valuesArray,
|
|
4046
|
-
})),
|
|
4047
|
-
}).chain((flags) => $shaclPropertyFromRdf({
|
|
4048
|
-
graph: _$options.graph,
|
|
4049
|
-
resource: $resource,
|
|
4050
|
-
propertySchema: NodeShape.schema.properties.fromRdfType,
|
|
4051
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4052
|
-
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
4053
|
-
.map((values) => values.length > 0
|
|
4054
|
-
? values.map((value) => Maybe.of(value))
|
|
4055
|
-
: Resource.Values.fromValue({
|
|
4056
|
-
focusResource: $resource,
|
|
4057
|
-
propertyPath: NodeShape.schema.properties
|
|
4058
|
-
.fromRdfType.path,
|
|
4059
|
-
value: Maybe.empty(),
|
|
4060
|
-
})),
|
|
4061
|
-
}).chain((fromRdfType) => $shaclPropertyFromRdf({
|
|
4062
|
-
graph: _$options.graph,
|
|
4063
|
-
resource: $resource,
|
|
4064
|
-
propertySchema: NodeShape.schema.properties.hasValues,
|
|
4065
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4066
|
-
.chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
|
|
4067
|
-
switch (term.termType) {
|
|
4068
|
-
case "NamedNode":
|
|
4069
|
-
case "Literal":
|
|
4070
|
-
return Either.of(term);
|
|
4071
|
-
default:
|
|
4072
|
-
return Left(new Resource.MistypedTermValueError({
|
|
4073
|
-
actualValue: term,
|
|
4074
|
-
expectedValueType: "(NamedNode | Literal)",
|
|
4075
|
-
focusResource: $resource,
|
|
4076
|
-
propertyPath: PropertyShape.schema
|
|
4077
|
-
.properties.hasValues
|
|
4078
|
-
.path,
|
|
4079
|
-
}));
|
|
4080
|
-
}
|
|
4081
|
-
})))
|
|
4082
|
-
.map((values) => values.toArray())
|
|
4083
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
4084
|
-
focusResource: $resource,
|
|
4085
|
-
propertyPath: PropertyShape.schema.properties
|
|
4086
|
-
.hasValues.path,
|
|
4087
|
-
value: valuesArray,
|
|
4088
|
-
})),
|
|
4089
|
-
}).chain((hasValues) => $shaclPropertyFromRdf({
|
|
4090
|
-
graph: _$options.graph,
|
|
4091
|
-
resource: $resource,
|
|
4092
|
-
propertySchema: NodeShape.schema.properties.ignoredProperties,
|
|
4093
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4094
|
-
.chain((values) => values.chainMap((value) => value.toList({
|
|
3805
|
+
values: valueList.toArray(),
|
|
3806
|
+
})).chain((values) => values.chainMap((value) => value.toIdentifier()))))
|
|
3807
|
+
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
3808
|
+
.map((values) => values.length > 0
|
|
3809
|
+
? values.map((value) => Maybe.of(value))
|
|
3810
|
+
: Resource.Values.fromValue({
|
|
3811
|
+
focusResource: $resource,
|
|
3812
|
+
propertyPath: PropertyShape.schema.properties.and.path,
|
|
3813
|
+
value: Maybe.empty(),
|
|
3814
|
+
})),
|
|
3815
|
+
}),
|
|
3816
|
+
classes: $shaclPropertyFromRdf({
|
|
4095
3817
|
graph: _$options.graph,
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
.
|
|
4101
|
-
|
|
4102
|
-
})).chain((values) => values.chainMap((value) => value.toIri()))))
|
|
4103
|
-
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
4104
|
-
.map((values) => values.length > 0
|
|
4105
|
-
? values.map((value) => Maybe.of(value))
|
|
4106
|
-
: Resource.Values.fromValue({
|
|
3818
|
+
resource: $resource,
|
|
3819
|
+
propertySchema: NodeShape.schema.properties.classes,
|
|
3820
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
3821
|
+
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
3822
|
+
.map((values) => values.toArray())
|
|
3823
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
4107
3824
|
focusResource: $resource,
|
|
4108
|
-
propertyPath:
|
|
4109
|
-
|
|
4110
|
-
value: Maybe.empty(),
|
|
3825
|
+
propertyPath: PropertyShape.schema.properties.classes.path,
|
|
3826
|
+
value: valuesArray,
|
|
4111
3827
|
})),
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
resource: $resource,
|
|
4115
|
-
propertySchema: NodeShape.schema.properties.in_,
|
|
4116
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4117
|
-
.chain((values) => values.chainMap((value) => value.toList({
|
|
3828
|
+
}),
|
|
3829
|
+
closed: $shaclPropertyFromRdf({
|
|
4118
3830
|
graph: _$options.graph,
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
.
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
actualValue: term,
|
|
4133
|
-
expectedValueType: "(NamedNode | Literal)",
|
|
4134
|
-
focusResource: $resource,
|
|
4135
|
-
propertyPath: PropertyShape
|
|
4136
|
-
.schema
|
|
4137
|
-
.properties.in_
|
|
4138
|
-
.path,
|
|
4139
|
-
}));
|
|
4140
|
-
}
|
|
4141
|
-
})))))
|
|
4142
|
-
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
4143
|
-
.map((values) => values.length > 0
|
|
4144
|
-
? values.map((value) => Maybe.of(value))
|
|
4145
|
-
: Resource.Values.fromValue({
|
|
4146
|
-
focusResource: $resource,
|
|
4147
|
-
propertyPath: PropertyShape.schema
|
|
4148
|
-
.properties.in_.path,
|
|
4149
|
-
value: Maybe.empty(),
|
|
4150
|
-
})),
|
|
4151
|
-
}).chain((in_) => $shaclPropertyFromRdf({
|
|
4152
|
-
graph: _$options.graph,
|
|
4153
|
-
resource: $resource,
|
|
4154
|
-
propertySchema: NodeShape.schema.properties.isDefinedBy,
|
|
4155
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4156
|
-
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
4157
|
-
.map((values) => values.length > 0
|
|
4158
|
-
? values.map((value) => Maybe.of(value))
|
|
4159
|
-
: Resource.Values.fromValue({
|
|
4160
|
-
focusResource: $resource,
|
|
4161
|
-
propertyPath: PropertyShape.schema
|
|
4162
|
-
.properties.isDefinedBy
|
|
4163
|
-
.path,
|
|
4164
|
-
value: Maybe.empty(),
|
|
4165
|
-
})),
|
|
4166
|
-
}).chain((isDefinedBy) => $shaclPropertyFromRdf({
|
|
4167
|
-
graph: _$options.graph,
|
|
4168
|
-
resource: $resource,
|
|
4169
|
-
propertySchema: NodeShape.schema.properties.label,
|
|
4170
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4171
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4172
|
-
.chain((values) => values.chainMap((value) => value.toString()))
|
|
4173
|
-
.map((values) => values.length > 0
|
|
4174
|
-
? values.map((value) => Maybe.of(value))
|
|
4175
|
-
: Resource.Values.fromValue({
|
|
4176
|
-
focusResource: $resource,
|
|
4177
|
-
propertyPath: PropertyShape.schema
|
|
4178
|
-
.properties.label.path,
|
|
4179
|
-
value: Maybe.empty(),
|
|
4180
|
-
})),
|
|
4181
|
-
}).chain((label) => $shaclPropertyFromRdf({
|
|
4182
|
-
graph: _$options.graph,
|
|
4183
|
-
resource: $resource,
|
|
4184
|
-
propertySchema: NodeShape.schema.properties.languageIn,
|
|
4185
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4186
|
-
.chain((values) => values.chainMap((value) => value.toList({
|
|
3831
|
+
resource: $resource,
|
|
3832
|
+
propertySchema: NodeShape.schema.properties.closed,
|
|
3833
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
3834
|
+
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
3835
|
+
.map((values) => values.length > 0
|
|
3836
|
+
? values.map((value) => Maybe.of(value))
|
|
3837
|
+
: Resource.Values.fromValue({
|
|
3838
|
+
focusResource: $resource,
|
|
3839
|
+
propertyPath: NodeShape.schema.properties.closed.path,
|
|
3840
|
+
value: Maybe.empty(),
|
|
3841
|
+
})),
|
|
3842
|
+
}),
|
|
3843
|
+
comment: $shaclPropertyFromRdf({
|
|
4187
3844
|
graph: _$options.graph,
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
.
|
|
4193
|
-
.
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
3845
|
+
resource: $resource,
|
|
3846
|
+
propertySchema: NodeShape.schema.properties.comment,
|
|
3847
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
3848
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
3849
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
3850
|
+
.map((values) => values.length > 0
|
|
3851
|
+
? values.map((value) => Maybe.of(value))
|
|
3852
|
+
: Resource.Values.fromValue({
|
|
3853
|
+
focusResource: $resource,
|
|
3854
|
+
propertyPath: PropertyShape.schema.properties.comment.path,
|
|
3855
|
+
value: Maybe.empty(),
|
|
3856
|
+
})),
|
|
3857
|
+
}),
|
|
3858
|
+
datatype: $shaclPropertyFromRdf({
|
|
3859
|
+
graph: _$options.graph,
|
|
3860
|
+
resource: $resource,
|
|
3861
|
+
propertySchema: NodeShape.schema.properties.datatype,
|
|
3862
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
3863
|
+
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
3864
|
+
.map((values) => values.length > 0
|
|
3865
|
+
? values.map((value) => Maybe.of(value))
|
|
3866
|
+
: Resource.Values.fromValue({
|
|
3867
|
+
focusResource: $resource,
|
|
3868
|
+
propertyPath: PropertyShape.schema.properties.datatype.path,
|
|
3869
|
+
value: Maybe.empty(),
|
|
3870
|
+
})),
|
|
3871
|
+
}),
|
|
3872
|
+
deactivated: $shaclPropertyFromRdf({
|
|
3873
|
+
graph: _$options.graph,
|
|
3874
|
+
resource: $resource,
|
|
3875
|
+
propertySchema: NodeShape.schema.properties.deactivated,
|
|
3876
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
3877
|
+
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
3878
|
+
.map((values) => values.length > 0
|
|
3879
|
+
? values.map((value) => Maybe.of(value))
|
|
3880
|
+
: Resource.Values.fromValue({
|
|
3881
|
+
focusResource: $resource,
|
|
3882
|
+
propertyPath: PropertyShape.schema.properties.deactivated.path,
|
|
3883
|
+
value: Maybe.empty(),
|
|
3884
|
+
})),
|
|
3885
|
+
}),
|
|
3886
|
+
discriminantValue: $shaclPropertyFromRdf({
|
|
3887
|
+
graph: _$options.graph,
|
|
3888
|
+
resource: $resource,
|
|
3889
|
+
propertySchema: NodeShape.schema.properties.discriminantValue,
|
|
3890
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
3891
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
3892
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
3893
|
+
.map((values) => values.length > 0
|
|
3894
|
+
? values.map((value) => Maybe.of(value))
|
|
3895
|
+
: Resource.Values.fromValue({
|
|
3896
|
+
focusResource: $resource,
|
|
3897
|
+
propertyPath: NodeShape.schema.properties.discriminantValue.path,
|
|
3898
|
+
value: Maybe.empty(),
|
|
3899
|
+
})),
|
|
3900
|
+
}),
|
|
3901
|
+
extern: $shaclPropertyFromRdf({
|
|
3902
|
+
graph: _$options.graph,
|
|
3903
|
+
resource: $resource,
|
|
3904
|
+
propertySchema: NodeShape.schema.properties.extern,
|
|
3905
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
3906
|
+
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
3907
|
+
.map((values) => values.length > 0
|
|
3908
|
+
? values.map((value) => Maybe.of(value))
|
|
3909
|
+
: Resource.Values.fromValue({
|
|
3910
|
+
focusResource: $resource,
|
|
3911
|
+
propertyPath: NodeShape.schema.properties.extern.path,
|
|
3912
|
+
value: Maybe.empty(),
|
|
3913
|
+
})),
|
|
3914
|
+
}),
|
|
3915
|
+
flags: $shaclPropertyFromRdf({
|
|
3916
|
+
graph: _$options.graph,
|
|
3917
|
+
resource: $resource,
|
|
3918
|
+
propertySchema: NodeShape.schema.properties.flags,
|
|
3919
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
3920
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
3921
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
3922
|
+
.map((values) => values.toArray())
|
|
3923
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
4202
3924
|
focusResource: $resource,
|
|
4203
|
-
propertyPath: PropertyShape.schema
|
|
4204
|
-
|
|
4205
|
-
.path,
|
|
4206
|
-
value: Maybe.empty(),
|
|
3925
|
+
propertyPath: PropertyShape.schema.properties.flags.path,
|
|
3926
|
+
value: valuesArray,
|
|
4207
3927
|
})),
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
3928
|
+
}),
|
|
3929
|
+
fromRdfType: $shaclPropertyFromRdf({
|
|
3930
|
+
graph: _$options.graph,
|
|
3931
|
+
resource: $resource,
|
|
3932
|
+
propertySchema: NodeShape.schema.properties.fromRdfType,
|
|
3933
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
3934
|
+
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
3935
|
+
.map((values) => values.length > 0
|
|
3936
|
+
? values.map((value) => Maybe.of(value))
|
|
3937
|
+
: Resource.Values.fromValue({
|
|
3938
|
+
focusResource: $resource,
|
|
3939
|
+
propertyPath: NodeShape.schema.properties.fromRdfType.path,
|
|
3940
|
+
value: Maybe.empty(),
|
|
3941
|
+
})),
|
|
3942
|
+
}),
|
|
3943
|
+
hasValues: $shaclPropertyFromRdf({
|
|
3944
|
+
graph: _$options.graph,
|
|
3945
|
+
resource: $resource,
|
|
3946
|
+
propertySchema: NodeShape.schema.properties.hasValues,
|
|
3947
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
3948
|
+
.chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
|
|
3949
|
+
switch (term.termType) {
|
|
3950
|
+
case "NamedNode":
|
|
3951
|
+
case "Literal":
|
|
3952
|
+
return Either.of(term);
|
|
3953
|
+
default:
|
|
3954
|
+
return Left(new Resource.MistypedTermValueError({
|
|
3955
|
+
actualValue: term,
|
|
3956
|
+
expectedValueType: "(NamedNode | Literal)",
|
|
3957
|
+
focusResource: $resource,
|
|
3958
|
+
propertyPath: PropertyShape.schema.properties.hasValues.path,
|
|
3959
|
+
}));
|
|
3960
|
+
}
|
|
3961
|
+
})))
|
|
3962
|
+
.map((values) => values.toArray())
|
|
3963
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
4217
3964
|
focusResource: $resource,
|
|
4218
|
-
propertyPath: PropertyShape.schema
|
|
4219
|
-
|
|
4220
|
-
.path,
|
|
4221
|
-
value: Maybe.empty(),
|
|
3965
|
+
propertyPath: PropertyShape.schema.properties.hasValues.path,
|
|
3966
|
+
value: valuesArray,
|
|
4222
3967
|
})),
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
? values.map((value) => Maybe.of(value))
|
|
4232
|
-
: Resource.Values.fromValue({
|
|
3968
|
+
}),
|
|
3969
|
+
ignoredProperties: $shaclPropertyFromRdf({
|
|
3970
|
+
graph: _$options.graph,
|
|
3971
|
+
resource: $resource,
|
|
3972
|
+
propertySchema: NodeShape.schema.properties.ignoredProperties,
|
|
3973
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
3974
|
+
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
3975
|
+
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
4233
3976
|
focusResource: $resource,
|
|
4234
|
-
propertyPath:
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
:
|
|
3977
|
+
propertyPath: NodeShape.schema.properties.ignoredProperties.path,
|
|
3978
|
+
values: valueList.toArray(),
|
|
3979
|
+
})).chain((values) => values.chainMap((value) => value.toIri()))))
|
|
3980
|
+
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
3981
|
+
.map((values) => values.length > 0
|
|
3982
|
+
? values.map((value) => Maybe.of(value))
|
|
3983
|
+
: Resource.Values.fromValue({
|
|
3984
|
+
focusResource: $resource,
|
|
3985
|
+
propertyPath: NodeShape.schema.properties.ignoredProperties.path,
|
|
3986
|
+
value: Maybe.empty(),
|
|
3987
|
+
})),
|
|
3988
|
+
}),
|
|
3989
|
+
in_: $shaclPropertyFromRdf({
|
|
3990
|
+
graph: _$options.graph,
|
|
3991
|
+
resource: $resource,
|
|
3992
|
+
propertySchema: NodeShape.schema.properties.in_,
|
|
3993
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
3994
|
+
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
3995
|
+
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
4251
3996
|
focusResource: $resource,
|
|
4252
|
-
propertyPath: PropertyShape
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
3997
|
+
propertyPath: PropertyShape.schema.properties.in_.path,
|
|
3998
|
+
values: valueList.toArray(),
|
|
3999
|
+
})).chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
|
|
4000
|
+
switch (term.termType) {
|
|
4001
|
+
case "NamedNode":
|
|
4002
|
+
case "Literal":
|
|
4003
|
+
return Either.of(term);
|
|
4004
|
+
default:
|
|
4005
|
+
return Left(new Resource.MistypedTermValueError({
|
|
4006
|
+
actualValue: term,
|
|
4007
|
+
expectedValueType: "(NamedNode | Literal)",
|
|
4008
|
+
focusResource: $resource,
|
|
4009
|
+
propertyPath: PropertyShape.schema.properties.in_.path,
|
|
4010
|
+
}));
|
|
4011
|
+
}
|
|
4012
|
+
})))))
|
|
4013
|
+
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
4014
|
+
.map((values) => values.length > 0
|
|
4015
|
+
? values.map((value) => Maybe.of(value))
|
|
4016
|
+
: Resource.Values.fromValue({
|
|
4017
|
+
focusResource: $resource,
|
|
4018
|
+
propertyPath: PropertyShape.schema.properties.in_.path,
|
|
4019
|
+
value: Maybe.empty(),
|
|
4020
|
+
})),
|
|
4021
|
+
}),
|
|
4022
|
+
isDefinedBy: $shaclPropertyFromRdf({
|
|
4023
|
+
graph: _$options.graph,
|
|
4024
|
+
resource: $resource,
|
|
4025
|
+
propertySchema: NodeShape.schema.properties.isDefinedBy,
|
|
4026
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4027
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
4028
|
+
.map((values) => values.length > 0
|
|
4029
|
+
? values.map((value) => Maybe.of(value))
|
|
4030
|
+
: Resource.Values.fromValue({
|
|
4031
|
+
focusResource: $resource,
|
|
4032
|
+
propertyPath: PropertyShape.schema.properties.isDefinedBy.path,
|
|
4033
|
+
value: Maybe.empty(),
|
|
4034
|
+
})),
|
|
4035
|
+
}),
|
|
4036
|
+
label: $shaclPropertyFromRdf({
|
|
4037
|
+
graph: _$options.graph,
|
|
4038
|
+
resource: $resource,
|
|
4039
|
+
propertySchema: NodeShape.schema.properties.label,
|
|
4040
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4041
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4042
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
4043
|
+
.map((values) => values.length > 0
|
|
4044
|
+
? values.map((value) => Maybe.of(value))
|
|
4045
|
+
: Resource.Values.fromValue({
|
|
4046
|
+
focusResource: $resource,
|
|
4047
|
+
propertyPath: PropertyShape.schema.properties.label.path,
|
|
4048
|
+
value: Maybe.empty(),
|
|
4049
|
+
})),
|
|
4050
|
+
}),
|
|
4051
|
+
languageIn: $shaclPropertyFromRdf({
|
|
4052
|
+
graph: _$options.graph,
|
|
4053
|
+
resource: $resource,
|
|
4054
|
+
propertySchema: NodeShape.schema.properties.languageIn,
|
|
4055
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4056
|
+
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
4057
|
+
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
4268
4058
|
focusResource: $resource,
|
|
4269
|
-
propertyPath: PropertyShape
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
:
|
|
4059
|
+
propertyPath: PropertyShape.schema.properties.languageIn.path,
|
|
4060
|
+
values: valueList.toArray(),
|
|
4061
|
+
}))
|
|
4062
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4063
|
+
.chain((values) => values.chainMap((value) => value.toString()))))
|
|
4064
|
+
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
4065
|
+
.map((values) => values.length > 0
|
|
4066
|
+
? values.map((value) => Maybe.of(value))
|
|
4067
|
+
: Resource.Values.fromValue({
|
|
4068
|
+
focusResource: $resource,
|
|
4069
|
+
propertyPath: PropertyShape.schema.properties.languageIn.path,
|
|
4070
|
+
value: Maybe.empty(),
|
|
4071
|
+
})),
|
|
4072
|
+
}),
|
|
4073
|
+
maxCount: $shaclPropertyFromRdf({
|
|
4074
|
+
graph: _$options.graph,
|
|
4075
|
+
resource: $resource,
|
|
4076
|
+
propertySchema: NodeShape.schema.properties.maxCount,
|
|
4077
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4078
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
4079
|
+
.map((values) => values.length > 0
|
|
4080
|
+
? values.map((value) => Maybe.of(value))
|
|
4081
|
+
: Resource.Values.fromValue({
|
|
4082
|
+
focusResource: $resource,
|
|
4083
|
+
propertyPath: PropertyShape.schema.properties.maxCount.path,
|
|
4084
|
+
value: Maybe.empty(),
|
|
4085
|
+
})),
|
|
4086
|
+
}),
|
|
4087
|
+
maxExclusive: $shaclPropertyFromRdf({
|
|
4088
|
+
graph: _$options.graph,
|
|
4089
|
+
resource: $resource,
|
|
4090
|
+
propertySchema: NodeShape.schema.properties.maxExclusive,
|
|
4091
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4092
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4093
|
+
.chain((values) => values.chainMap((value) => value.toLiteral()))
|
|
4094
|
+
.map((values) => values.length > 0
|
|
4095
|
+
? values.map((value) => Maybe.of(value))
|
|
4096
|
+
: Resource.Values.fromValue({
|
|
4097
|
+
focusResource: $resource,
|
|
4098
|
+
propertyPath: PropertyShape.schema.properties.maxExclusive.path,
|
|
4099
|
+
value: Maybe.empty(),
|
|
4100
|
+
})),
|
|
4101
|
+
}),
|
|
4102
|
+
maxInclusive: $shaclPropertyFromRdf({
|
|
4103
|
+
graph: _$options.graph,
|
|
4104
|
+
resource: $resource,
|
|
4105
|
+
propertySchema: NodeShape.schema.properties.maxInclusive,
|
|
4106
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4107
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4108
|
+
.chain((values) => values.chainMap((value) => value.toLiteral()))
|
|
4109
|
+
.map((values) => values.length > 0
|
|
4110
|
+
? values.map((value) => Maybe.of(value))
|
|
4111
|
+
: Resource.Values.fromValue({
|
|
4112
|
+
focusResource: $resource,
|
|
4113
|
+
propertyPath: PropertyShape.schema.properties.maxInclusive.path,
|
|
4114
|
+
value: Maybe.empty(),
|
|
4115
|
+
})),
|
|
4116
|
+
}),
|
|
4117
|
+
maxLength: $shaclPropertyFromRdf({
|
|
4118
|
+
graph: _$options.graph,
|
|
4119
|
+
resource: $resource,
|
|
4120
|
+
propertySchema: NodeShape.schema.properties.maxLength,
|
|
4121
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4122
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
4123
|
+
.map((values) => values.length > 0
|
|
4124
|
+
? values.map((value) => Maybe.of(value))
|
|
4125
|
+
: Resource.Values.fromValue({
|
|
4126
|
+
focusResource: $resource,
|
|
4127
|
+
propertyPath: PropertyShape.schema.properties.maxLength.path,
|
|
4128
|
+
value: Maybe.empty(),
|
|
4129
|
+
})),
|
|
4130
|
+
}),
|
|
4131
|
+
minCount: $shaclPropertyFromRdf({
|
|
4132
|
+
graph: _$options.graph,
|
|
4133
|
+
resource: $resource,
|
|
4134
|
+
propertySchema: NodeShape.schema.properties.minCount,
|
|
4135
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4136
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
4137
|
+
.map((values) => values.length > 0
|
|
4138
|
+
? values.map((value) => Maybe.of(value))
|
|
4139
|
+
: Resource.Values.fromValue({
|
|
4140
|
+
focusResource: $resource,
|
|
4141
|
+
propertyPath: PropertyShape.schema.properties.minCount.path,
|
|
4142
|
+
value: Maybe.empty(),
|
|
4143
|
+
})),
|
|
4144
|
+
}),
|
|
4145
|
+
minExclusive: $shaclPropertyFromRdf({
|
|
4146
|
+
graph: _$options.graph,
|
|
4147
|
+
resource: $resource,
|
|
4148
|
+
propertySchema: NodeShape.schema.properties.minExclusive,
|
|
4149
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4150
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4151
|
+
.chain((values) => values.chainMap((value) => value.toLiteral()))
|
|
4152
|
+
.map((values) => values.length > 0
|
|
4153
|
+
? values.map((value) => Maybe.of(value))
|
|
4154
|
+
: Resource.Values.fromValue({
|
|
4155
|
+
focusResource: $resource,
|
|
4156
|
+
propertyPath: PropertyShape.schema.properties.minExclusive.path,
|
|
4157
|
+
value: Maybe.empty(),
|
|
4158
|
+
})),
|
|
4159
|
+
}),
|
|
4160
|
+
minInclusive: $shaclPropertyFromRdf({
|
|
4161
|
+
graph: _$options.graph,
|
|
4162
|
+
resource: $resource,
|
|
4163
|
+
propertySchema: NodeShape.schema.properties.minInclusive,
|
|
4164
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4165
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4166
|
+
.chain((values) => values.chainMap((value) => value.toLiteral()))
|
|
4167
|
+
.map((values) => values.length > 0
|
|
4168
|
+
? values.map((value) => Maybe.of(value))
|
|
4169
|
+
: Resource.Values.fromValue({
|
|
4170
|
+
focusResource: $resource,
|
|
4171
|
+
propertyPath: PropertyShape.schema.properties.minInclusive.path,
|
|
4172
|
+
value: Maybe.empty(),
|
|
4173
|
+
})),
|
|
4174
|
+
}),
|
|
4175
|
+
minLength: $shaclPropertyFromRdf({
|
|
4176
|
+
graph: _$options.graph,
|
|
4177
|
+
resource: $resource,
|
|
4178
|
+
propertySchema: NodeShape.schema.properties.minLength,
|
|
4179
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4180
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
4181
|
+
.map((values) => values.length > 0
|
|
4182
|
+
? values.map((value) => Maybe.of(value))
|
|
4183
|
+
: Resource.Values.fromValue({
|
|
4184
|
+
focusResource: $resource,
|
|
4185
|
+
propertyPath: PropertyShape.schema.properties.minLength.path,
|
|
4186
|
+
value: Maybe.empty(),
|
|
4187
|
+
})),
|
|
4188
|
+
}),
|
|
4189
|
+
mutable: $shaclPropertyFromRdf({
|
|
4190
|
+
graph: _$options.graph,
|
|
4191
|
+
resource: $resource,
|
|
4192
|
+
propertySchema: NodeShape.schema.properties.mutable,
|
|
4193
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4194
|
+
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
4195
|
+
.map((values) => values.length > 0
|
|
4196
|
+
? values.map((value) => Maybe.of(value))
|
|
4197
|
+
: Resource.Values.fromValue({
|
|
4198
|
+
focusResource: $resource,
|
|
4199
|
+
propertyPath: PropertyShape.schema.properties.mutable.path,
|
|
4200
|
+
value: Maybe.empty(),
|
|
4201
|
+
})),
|
|
4202
|
+
}),
|
|
4203
|
+
node: $shaclPropertyFromRdf({
|
|
4204
|
+
graph: _$options.graph,
|
|
4205
|
+
resource: $resource,
|
|
4206
|
+
propertySchema: NodeShape.schema.properties.node,
|
|
4207
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4208
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
4209
|
+
.map((values) => values.length > 0
|
|
4210
|
+
? values.map((value) => Maybe.of(value))
|
|
4211
|
+
: Resource.Values.fromValue({
|
|
4212
|
+
focusResource: $resource,
|
|
4213
|
+
propertyPath: PropertyShape.schema.properties.node.path,
|
|
4214
|
+
value: Maybe.empty(),
|
|
4215
|
+
})),
|
|
4216
|
+
}),
|
|
4217
|
+
nodeKind: $shaclPropertyFromRdf({
|
|
4218
|
+
graph: _$options.graph,
|
|
4219
|
+
resource: $resource,
|
|
4220
|
+
propertySchema: NodeShape.schema.properties.nodeKind,
|
|
4221
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4222
|
+
.chain((values) => values.chainMap((value) => value.toIri([
|
|
4223
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#BlankNode"),
|
|
4224
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#BlankNodeOrIRI"),
|
|
4225
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#BlankNodeOrLiteral"),
|
|
4226
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#IRI"),
|
|
4227
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#IRIOrLiteral"),
|
|
4228
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Literal"),
|
|
4229
|
+
])))
|
|
4230
|
+
.map((values) => values.length > 0
|
|
4231
|
+
? values.map((value) => Maybe.of(value))
|
|
4232
|
+
: Resource.Values.fromValue({
|
|
4233
|
+
focusResource: $resource,
|
|
4234
|
+
propertyPath: PropertyShape.schema.properties.nodeKind.path,
|
|
4235
|
+
value: Maybe.empty(),
|
|
4236
|
+
})),
|
|
4237
|
+
}),
|
|
4238
|
+
not: $shaclPropertyFromRdf({
|
|
4239
|
+
graph: _$options.graph,
|
|
4240
|
+
resource: $resource,
|
|
4241
|
+
propertySchema: NodeShape.schema.properties.not,
|
|
4242
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4243
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
4244
|
+
.map((values) => values.toArray())
|
|
4245
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
4286
4246
|
focusResource: $resource,
|
|
4287
|
-
propertyPath: PropertyShape
|
|
4288
|
-
|
|
4289
|
-
.properties
|
|
4290
|
-
.minCount
|
|
4291
|
-
.path,
|
|
4292
|
-
value: Maybe.empty(),
|
|
4247
|
+
propertyPath: PropertyShape.schema.properties.not.path,
|
|
4248
|
+
value: valuesArray,
|
|
4293
4249
|
})),
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
.
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
.map((values) => values.length > 0
|
|
4303
|
-
? values.map((value) => Maybe.of(value))
|
|
4304
|
-
: Resource.Values.fromValue({
|
|
4250
|
+
}),
|
|
4251
|
+
or: $shaclPropertyFromRdf({
|
|
4252
|
+
graph: _$options.graph,
|
|
4253
|
+
resource: $resource,
|
|
4254
|
+
propertySchema: NodeShape.schema.properties.or,
|
|
4255
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4256
|
+
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
4257
|
+
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
4305
4258
|
focusResource: $resource,
|
|
4306
|
-
propertyPath: PropertyShape
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
value
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4259
|
+
propertyPath: PropertyShape.schema.properties.or.path,
|
|
4260
|
+
values: valueList.toArray(),
|
|
4261
|
+
})).chain((values) => values.chainMap((value) => value.toIdentifier()))))
|
|
4262
|
+
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
4263
|
+
.map((values) => values.length > 0
|
|
4264
|
+
? values.map((value) => Maybe.of(value))
|
|
4265
|
+
: Resource.Values.fromValue({
|
|
4266
|
+
focusResource: $resource,
|
|
4267
|
+
propertyPath: PropertyShape.schema.properties.or.path,
|
|
4268
|
+
value: Maybe.empty(),
|
|
4269
|
+
})),
|
|
4270
|
+
}),
|
|
4271
|
+
patterns: $shaclPropertyFromRdf({
|
|
4272
|
+
graph: _$options.graph,
|
|
4273
|
+
resource: $resource,
|
|
4274
|
+
propertySchema: NodeShape.schema.properties.patterns,
|
|
4275
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4276
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4277
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
4278
|
+
.map((values) => values.toArray())
|
|
4279
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
4324
4280
|
focusResource: $resource,
|
|
4325
|
-
propertyPath: PropertyShape
|
|
4326
|
-
|
|
4327
|
-
.properties
|
|
4328
|
-
.minInclusive
|
|
4329
|
-
.path,
|
|
4330
|
-
value: Maybe.empty(),
|
|
4281
|
+
propertyPath: PropertyShape.schema.properties.patterns.path,
|
|
4282
|
+
value: valuesArray,
|
|
4331
4283
|
})),
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
.
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
? values.map((value) => Maybe.of(value))
|
|
4342
|
-
: Resource.Values.fromValue({
|
|
4284
|
+
}),
|
|
4285
|
+
properties: $shaclPropertyFromRdf({
|
|
4286
|
+
graph: _$options.graph,
|
|
4287
|
+
resource: $resource,
|
|
4288
|
+
propertySchema: NodeShape.schema.properties.properties,
|
|
4289
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4290
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
4291
|
+
.map((values) => values.toArray())
|
|
4292
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
4343
4293
|
focusResource: $resource,
|
|
4344
|
-
propertyPath:
|
|
4345
|
-
|
|
4346
|
-
.properties
|
|
4347
|
-
.minLength
|
|
4348
|
-
.path,
|
|
4349
|
-
value: Maybe.empty(),
|
|
4294
|
+
propertyPath: NodeShape.schema.properties.properties.path,
|
|
4295
|
+
value: valuesArray,
|
|
4350
4296
|
})),
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
.properties
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4297
|
+
}),
|
|
4298
|
+
rdfType: $shaclPropertyFromRdf({
|
|
4299
|
+
graph: _$options.graph,
|
|
4300
|
+
resource: $resource,
|
|
4301
|
+
propertySchema: NodeShape.schema.properties.rdfType,
|
|
4302
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4303
|
+
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
4304
|
+
.map((values) => values.length > 0
|
|
4305
|
+
? values.map((value) => Maybe.of(value))
|
|
4306
|
+
: Resource.Values.fromValue({
|
|
4307
|
+
focusResource: $resource,
|
|
4308
|
+
propertyPath: NodeShape.schema.properties.rdfType.path,
|
|
4309
|
+
value: Maybe.empty(),
|
|
4310
|
+
})),
|
|
4311
|
+
}),
|
|
4312
|
+
shaclmateName: $shaclPropertyFromRdf({
|
|
4313
|
+
graph: _$options.graph,
|
|
4314
|
+
resource: $resource,
|
|
4315
|
+
propertySchema: NodeShape.schema.properties.shaclmateName,
|
|
4316
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4317
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4318
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
4319
|
+
.map((values) => values.length > 0
|
|
4320
|
+
? values.map((value) => Maybe.of(value))
|
|
4321
|
+
: Resource.Values.fromValue({
|
|
4322
|
+
focusResource: $resource,
|
|
4323
|
+
propertyPath: PropertyShape.schema.properties.shaclmateName.path,
|
|
4324
|
+
value: Maybe.empty(),
|
|
4325
|
+
})),
|
|
4326
|
+
}),
|
|
4327
|
+
subClassOf: $shaclPropertyFromRdf({
|
|
4328
|
+
graph: _$options.graph,
|
|
4329
|
+
resource: $resource,
|
|
4330
|
+
propertySchema: NodeShape.schema.properties.subClassOf,
|
|
4331
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4332
|
+
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
4333
|
+
.map((values) => values.toArray())
|
|
4334
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
4363
4335
|
focusResource: $resource,
|
|
4364
|
-
propertyPath:
|
|
4365
|
-
|
|
4366
|
-
.properties
|
|
4367
|
-
.mutable
|
|
4368
|
-
.path,
|
|
4369
|
-
value: Maybe.empty(),
|
|
4336
|
+
propertyPath: NodeShape.schema.properties.subClassOf.path,
|
|
4337
|
+
value: valuesArray,
|
|
4370
4338
|
})),
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
.properties
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
0
|
|
4381
|
-
? values.map((value) => Maybe.of(value))
|
|
4382
|
-
: Resource.Values.fromValue({
|
|
4339
|
+
}),
|
|
4340
|
+
toRdfTypes: $shaclPropertyFromRdf({
|
|
4341
|
+
graph: _$options.graph,
|
|
4342
|
+
resource: $resource,
|
|
4343
|
+
propertySchema: NodeShape.schema.properties.toRdfTypes,
|
|
4344
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4345
|
+
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
4346
|
+
.map((values) => values.toArray())
|
|
4347
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
4383
4348
|
focusResource: $resource,
|
|
4384
|
-
propertyPath:
|
|
4385
|
-
|
|
4386
|
-
.properties
|
|
4387
|
-
.node
|
|
4388
|
-
.path,
|
|
4389
|
-
value: Maybe.empty(),
|
|
4349
|
+
propertyPath: NodeShape.schema.properties.toRdfTypes.path,
|
|
4350
|
+
value: valuesArray,
|
|
4390
4351
|
})),
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
.properties
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4352
|
+
}),
|
|
4353
|
+
tsFeatureExcludes: $shaclPropertyFromRdf({
|
|
4354
|
+
graph: _$options.graph,
|
|
4355
|
+
resource: $resource,
|
|
4356
|
+
propertySchema: NodeShape.schema.properties.tsFeatureExcludes,
|
|
4357
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4358
|
+
.chain((values) => values.chainMap((value) => value.toIri([
|
|
4359
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_All"),
|
|
4360
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Create"),
|
|
4361
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_Default"),
|
|
4362
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Equals"),
|
|
4363
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Graphql"),
|
|
4364
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Hash"),
|
|
4365
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Json"),
|
|
4366
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_None"),
|
|
4367
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Rdf"),
|
|
4368
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Sparql"),
|
|
4369
|
+
])))
|
|
4370
|
+
.map((values) => values.toArray())
|
|
4371
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
4410
4372
|
focusResource: $resource,
|
|
4411
|
-
propertyPath:
|
|
4412
|
-
|
|
4413
|
-
.properties
|
|
4414
|
-
.nodeKind
|
|
4415
|
-
.path,
|
|
4416
|
-
value: Maybe.empty(),
|
|
4373
|
+
propertyPath: Ontology.schema.properties.tsFeatureExcludes.path,
|
|
4374
|
+
value: valuesArray,
|
|
4417
4375
|
})),
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
resource: $resource,
|
|
4421
|
-
propertySchema: NodeShape.schema
|
|
4422
|
-
.properties
|
|
4423
|
-
.not,
|
|
4424
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4425
|
-
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
4426
|
-
.map((values) => values.toArray())
|
|
4427
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
4428
|
-
focusResource: $resource,
|
|
4429
|
-
propertyPath: PropertyShape
|
|
4430
|
-
.schema
|
|
4431
|
-
.properties
|
|
4432
|
-
.not
|
|
4433
|
-
.path,
|
|
4434
|
-
value: valuesArray,
|
|
4435
|
-
})),
|
|
4436
|
-
}).chain((not) => $shaclPropertyFromRdf({
|
|
4437
|
-
graph: _$options.graph,
|
|
4438
|
-
resource: $resource,
|
|
4439
|
-
propertySchema: NodeShape.schema
|
|
4440
|
-
.properties
|
|
4441
|
-
.or,
|
|
4442
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4443
|
-
.chain((values) => values.chainMap((value) => value.toList({
|
|
4376
|
+
}),
|
|
4377
|
+
tsFeatureIncludes: $shaclPropertyFromRdf({
|
|
4444
4378
|
graph: _$options.graph,
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
.
|
|
4450
|
-
.
|
|
4451
|
-
.
|
|
4452
|
-
.
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4379
|
+
resource: $resource,
|
|
4380
|
+
propertySchema: NodeShape.schema.properties.tsFeatureIncludes,
|
|
4381
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4382
|
+
.chain((values) => values.chainMap((value) => value.toIri([
|
|
4383
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_All"),
|
|
4384
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Create"),
|
|
4385
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_Default"),
|
|
4386
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Equals"),
|
|
4387
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Graphql"),
|
|
4388
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Hash"),
|
|
4389
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Json"),
|
|
4390
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_None"),
|
|
4391
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Rdf"),
|
|
4392
|
+
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Sparql"),
|
|
4393
|
+
])))
|
|
4394
|
+
.map((values) => values.toArray())
|
|
4395
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
4460
4396
|
focusResource: $resource,
|
|
4461
|
-
propertyPath:
|
|
4462
|
-
|
|
4463
|
-
.properties
|
|
4464
|
-
.or
|
|
4465
|
-
.path,
|
|
4466
|
-
value: Maybe.empty(),
|
|
4397
|
+
propertyPath: Ontology.schema.properties.tsFeatureIncludes.path,
|
|
4398
|
+
value: valuesArray,
|
|
4467
4399
|
})),
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
.properties
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
4479
|
-
focusResource: $resource,
|
|
4480
|
-
propertyPath: PropertyShape
|
|
4481
|
-
.schema
|
|
4482
|
-
.properties
|
|
4483
|
-
.patterns
|
|
4484
|
-
.path,
|
|
4485
|
-
value: valuesArray,
|
|
4486
|
-
})),
|
|
4487
|
-
}).chain((patterns) => $shaclPropertyFromRdf({
|
|
4488
|
-
graph: _$options.graph,
|
|
4489
|
-
resource: $resource,
|
|
4490
|
-
propertySchema: NodeShape.schema
|
|
4491
|
-
.properties
|
|
4492
|
-
.properties,
|
|
4493
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4494
|
-
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
4495
|
-
.map((values) => values.toArray())
|
|
4496
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
4497
|
-
focusResource: $resource,
|
|
4498
|
-
propertyPath: NodeShape
|
|
4499
|
-
.schema
|
|
4500
|
-
.properties
|
|
4501
|
-
.properties
|
|
4502
|
-
.path,
|
|
4503
|
-
value: valuesArray,
|
|
4504
|
-
})),
|
|
4505
|
-
}).chain((properties) => $shaclPropertyFromRdf({
|
|
4506
|
-
graph: _$options.graph,
|
|
4507
|
-
resource: $resource,
|
|
4508
|
-
propertySchema: NodeShape.schema
|
|
4509
|
-
.properties
|
|
4510
|
-
.rdfType,
|
|
4511
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4512
|
-
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
4513
|
-
.map((values) => values.length >
|
|
4514
|
-
0
|
|
4515
|
-
? values.map((value) => Maybe.of(value))
|
|
4516
|
-
: Resource.Values.fromValue({
|
|
4400
|
+
}),
|
|
4401
|
+
tsImports: $shaclPropertyFromRdf({
|
|
4402
|
+
graph: _$options.graph,
|
|
4403
|
+
resource: $resource,
|
|
4404
|
+
propertySchema: NodeShape.schema.properties.tsImports,
|
|
4405
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4406
|
+
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4407
|
+
.chain((values) => values.chainMap((value) => value.toString()))
|
|
4408
|
+
.map((values) => values.toArray())
|
|
4409
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
4517
4410
|
focusResource: $resource,
|
|
4518
|
-
propertyPath:
|
|
4519
|
-
|
|
4520
|
-
.properties
|
|
4521
|
-
.rdfType
|
|
4522
|
-
.path,
|
|
4523
|
-
value: Maybe.empty(),
|
|
4411
|
+
propertyPath: Ontology.schema.properties.tsImports.path,
|
|
4412
|
+
value: valuesArray,
|
|
4524
4413
|
})),
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
.properties
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
.map((values) => values.length >
|
|
4535
|
-
0
|
|
4536
|
-
? values.map((value) => Maybe.of(value))
|
|
4537
|
-
: Resource.Values.fromValue({
|
|
4414
|
+
}),
|
|
4415
|
+
types: $shaclPropertyFromRdf({
|
|
4416
|
+
graph: _$options.graph,
|
|
4417
|
+
resource: $resource,
|
|
4418
|
+
propertySchema: NodeShape.schema.properties.types,
|
|
4419
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4420
|
+
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
4421
|
+
.map((values) => values.toArray())
|
|
4422
|
+
.map((valuesArray) => Resource.Values.fromValue({
|
|
4538
4423
|
focusResource: $resource,
|
|
4539
|
-
propertyPath:
|
|
4540
|
-
|
|
4541
|
-
.properties
|
|
4542
|
-
.shaclmateName
|
|
4543
|
-
.path,
|
|
4544
|
-
value: Maybe.empty(),
|
|
4424
|
+
propertyPath: NodeShape.schema.properties.types.path,
|
|
4425
|
+
value: valuesArray,
|
|
4545
4426
|
})),
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
resource: $resource,
|
|
4549
|
-
propertySchema: NodeShape.schema
|
|
4550
|
-
.properties
|
|
4551
|
-
.subClassOf,
|
|
4552
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4553
|
-
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
4554
|
-
.map((values) => values.toArray())
|
|
4555
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
4556
|
-
focusResource: $resource,
|
|
4557
|
-
propertyPath: NodeShape
|
|
4558
|
-
.schema
|
|
4559
|
-
.properties
|
|
4560
|
-
.subClassOf
|
|
4561
|
-
.path,
|
|
4562
|
-
value: valuesArray,
|
|
4563
|
-
})),
|
|
4564
|
-
}).chain((subClassOf) => $shaclPropertyFromRdf({
|
|
4565
|
-
graph: _$options.graph,
|
|
4566
|
-
resource: $resource,
|
|
4567
|
-
propertySchema: NodeShape.schema
|
|
4568
|
-
.properties
|
|
4569
|
-
.toRdfTypes,
|
|
4570
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4571
|
-
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
4572
|
-
.map((values) => values.toArray())
|
|
4573
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
4574
|
-
focusResource: $resource,
|
|
4575
|
-
propertyPath: NodeShape
|
|
4576
|
-
.schema
|
|
4577
|
-
.properties
|
|
4578
|
-
.toRdfTypes
|
|
4579
|
-
.path,
|
|
4580
|
-
value: valuesArray,
|
|
4581
|
-
})),
|
|
4582
|
-
}).chain((toRdfTypes) => $shaclPropertyFromRdf({
|
|
4583
|
-
graph: _$options.graph,
|
|
4584
|
-
resource: $resource,
|
|
4585
|
-
propertySchema: NodeShape.schema
|
|
4586
|
-
.properties
|
|
4587
|
-
.tsFeatureExcludes,
|
|
4588
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4589
|
-
.chain((values) => values.chainMap((value) => value.toIri([
|
|
4590
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_All"),
|
|
4591
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Create"),
|
|
4592
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_Default"),
|
|
4593
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Equals"),
|
|
4594
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Graphql"),
|
|
4595
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Hash"),
|
|
4596
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Json"),
|
|
4597
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_None"),
|
|
4598
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Rdf"),
|
|
4599
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Sparql"),
|
|
4600
|
-
])))
|
|
4601
|
-
.map((values) => values.toArray())
|
|
4602
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
4603
|
-
focusResource: $resource,
|
|
4604
|
-
propertyPath: Ontology
|
|
4605
|
-
.schema
|
|
4606
|
-
.properties
|
|
4607
|
-
.tsFeatureExcludes
|
|
4608
|
-
.path,
|
|
4609
|
-
value: valuesArray,
|
|
4610
|
-
})),
|
|
4611
|
-
}).chain((tsFeatureExcludes) => $shaclPropertyFromRdf({
|
|
4612
|
-
graph: _$options.graph,
|
|
4613
|
-
resource: $resource,
|
|
4614
|
-
propertySchema: NodeShape.schema
|
|
4615
|
-
.properties
|
|
4616
|
-
.tsFeatureIncludes,
|
|
4617
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4618
|
-
.chain((values) => values.chainMap((value) => value.toIri([
|
|
4619
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_All"),
|
|
4620
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Create"),
|
|
4621
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_Default"),
|
|
4622
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Equals"),
|
|
4623
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Graphql"),
|
|
4624
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Hash"),
|
|
4625
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Json"),
|
|
4626
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_None"),
|
|
4627
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Rdf"),
|
|
4628
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeature_Sparql"),
|
|
4629
|
-
])))
|
|
4630
|
-
.map((values) => values.toArray())
|
|
4631
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
4632
|
-
focusResource: $resource,
|
|
4633
|
-
propertyPath: Ontology
|
|
4634
|
-
.schema
|
|
4635
|
-
.properties
|
|
4636
|
-
.tsFeatureIncludes
|
|
4637
|
-
.path,
|
|
4638
|
-
value: valuesArray,
|
|
4639
|
-
})),
|
|
4640
|
-
}).chain((tsFeatureIncludes) => $shaclPropertyFromRdf({
|
|
4641
|
-
graph: _$options.graph,
|
|
4642
|
-
resource: $resource,
|
|
4643
|
-
propertySchema: NodeShape.schema
|
|
4644
|
-
.properties
|
|
4645
|
-
.tsImports,
|
|
4646
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4647
|
-
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4648
|
-
.chain((values) => values.chainMap((value) => value.toString()))
|
|
4649
|
-
.map((values) => values.toArray())
|
|
4650
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
4651
|
-
focusResource: $resource,
|
|
4652
|
-
propertyPath: Ontology
|
|
4653
|
-
.schema
|
|
4654
|
-
.properties
|
|
4655
|
-
.tsImports
|
|
4656
|
-
.path,
|
|
4657
|
-
value: valuesArray,
|
|
4658
|
-
})),
|
|
4659
|
-
}).chain((tsImports) => $shaclPropertyFromRdf({
|
|
4660
|
-
graph: _$options.graph,
|
|
4661
|
-
resource: $resource,
|
|
4662
|
-
propertySchema: NodeShape.schema
|
|
4663
|
-
.properties
|
|
4664
|
-
.types,
|
|
4665
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4666
|
-
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
4667
|
-
.map((values) => values.toArray())
|
|
4668
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
4669
|
-
focusResource: $resource,
|
|
4670
|
-
propertyPath: NodeShape
|
|
4671
|
-
.schema
|
|
4672
|
-
.properties
|
|
4673
|
-
.types
|
|
4674
|
-
.path,
|
|
4675
|
-
value: valuesArray,
|
|
4676
|
-
})),
|
|
4677
|
-
}).chain((types) => $shaclPropertyFromRdf({
|
|
4678
|
-
graph: _$options.graph,
|
|
4679
|
-
resource: $resource,
|
|
4680
|
-
propertySchema: NodeShape.schema
|
|
4681
|
-
.properties
|
|
4682
|
-
.xone,
|
|
4683
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4684
|
-
.chain((values) => values.chainMap((value) => value.toList({
|
|
4427
|
+
}),
|
|
4428
|
+
xone: $shaclPropertyFromRdf({
|
|
4685
4429
|
graph: _$options.graph,
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
.
|
|
4691
|
-
.properties
|
|
4692
|
-
.xone
|
|
4693
|
-
.path,
|
|
4694
|
-
values: valueList.toArray(),
|
|
4695
|
-
})).chain((values) => values.chainMap((value) => value.toIdentifier()))))
|
|
4696
|
-
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
4697
|
-
.map((values) => values.length >
|
|
4698
|
-
0
|
|
4699
|
-
? values.map((value) => Maybe.of(value))
|
|
4700
|
-
: Resource.Values.fromValue({
|
|
4430
|
+
resource: $resource,
|
|
4431
|
+
propertySchema: NodeShape.schema.properties.xone,
|
|
4432
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4433
|
+
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
4434
|
+
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
4701
4435
|
focusResource: $resource,
|
|
4702
|
-
propertyPath: PropertyShape
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
value
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
datatype,
|
|
4716
|
-
deactivated,
|
|
4717
|
-
discriminantValue,
|
|
4718
|
-
extern,
|
|
4719
|
-
flags,
|
|
4720
|
-
fromRdfType,
|
|
4721
|
-
hasValues,
|
|
4722
|
-
ignoredProperties,
|
|
4723
|
-
in_,
|
|
4724
|
-
isDefinedBy,
|
|
4725
|
-
label,
|
|
4726
|
-
languageIn,
|
|
4727
|
-
maxCount,
|
|
4728
|
-
maxExclusive,
|
|
4729
|
-
maxInclusive,
|
|
4730
|
-
maxLength,
|
|
4731
|
-
minCount,
|
|
4732
|
-
minExclusive,
|
|
4733
|
-
minInclusive,
|
|
4734
|
-
minLength,
|
|
4735
|
-
mutable,
|
|
4736
|
-
node,
|
|
4737
|
-
nodeKind,
|
|
4738
|
-
not,
|
|
4739
|
-
or,
|
|
4740
|
-
patterns,
|
|
4741
|
-
properties,
|
|
4742
|
-
rdfType,
|
|
4743
|
-
shaclmateName,
|
|
4744
|
-
subClassOf,
|
|
4745
|
-
toRdfTypes,
|
|
4746
|
-
tsFeatureExcludes,
|
|
4747
|
-
tsFeatureIncludes,
|
|
4748
|
-
tsImports,
|
|
4749
|
-
types,
|
|
4750
|
-
xone,
|
|
4751
|
-
})))))))))))))))))))))))))))))))))))))))))));
|
|
4436
|
+
propertyPath: PropertyShape.schema.properties.xone.path,
|
|
4437
|
+
values: valueList.toArray(),
|
|
4438
|
+
})).chain((values) => values.chainMap((value) => value.toIdentifier()))))
|
|
4439
|
+
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
4440
|
+
.map((values) => values.length > 0
|
|
4441
|
+
? values.map((value) => Maybe.of(value))
|
|
4442
|
+
: Resource.Values.fromValue({
|
|
4443
|
+
focusResource: $resource,
|
|
4444
|
+
propertyPath: PropertyShape.schema.properties.xone.path,
|
|
4445
|
+
value: Maybe.empty(),
|
|
4446
|
+
})),
|
|
4447
|
+
}),
|
|
4448
|
+
}).map((properties) => create(properties)));
|
|
4752
4449
|
};
|
|
4753
4450
|
NodeShape.fromRdfResource = $wrap_FromRdfResourceFunction(NodeShape._fromRdfResource);
|
|
4754
4451
|
NodeShape.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|