@rdfx/builder 0.0.41 → 0.0.43
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/BuilderBuilderParameters.d.ts +5 -5
- package/dist/IdentifierLike.d.ts +1 -1
- package/dist/IriLike.d.ts +1 -1
- package/dist/builder.d.ts +68 -66
- package/dist/builder.js +4 -3
- package/dist/sh.d.ts +38 -40
- package/dist/sh.js +11 -6
- package/dist/shapes.d.ts +198 -18355
- package/dist/shapes.js +1033 -1113
- package/dist/skos.d.ts +7 -7
- package/dist/skos.js +4 -2
- package/package.json +10 -10
package/dist/shapes.js
CHANGED
|
@@ -15,17 +15,19 @@ function $compactRecord(record) {
|
|
|
15
15
|
return definedProperties;
|
|
16
16
|
}, {});
|
|
17
17
|
}
|
|
18
|
-
function $convertToIdentifier(value) {
|
|
18
|
+
function $convertToIdentifier(value, defaultNamespace) {
|
|
19
19
|
switch (typeof value) {
|
|
20
20
|
case "object":
|
|
21
21
|
return Either.of(value);
|
|
22
22
|
case "string":
|
|
23
|
-
return Either.of(
|
|
23
|
+
return Either.of(defaultNamespace
|
|
24
|
+
? defaultNamespace(value)
|
|
25
|
+
: dataFactory.namedNode(value));
|
|
24
26
|
case "undefined":
|
|
25
27
|
return Either.of(dataFactory.blankNode());
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
|
-
function $convertToIdentifierProperty(identifier) {
|
|
30
|
+
function $convertToIdentifierProperty(identifier, defaultNamespace) {
|
|
29
31
|
switch (typeof identifier) {
|
|
30
32
|
case "function":
|
|
31
33
|
return Either.of(identifier);
|
|
@@ -34,7 +36,9 @@ function $convertToIdentifierProperty(identifier) {
|
|
|
34
36
|
return Either.of(() => captureIdentifier);
|
|
35
37
|
}
|
|
36
38
|
case "string": {
|
|
37
|
-
const captureIdentifier =
|
|
39
|
+
const captureIdentifier = defaultNamespace
|
|
40
|
+
? defaultNamespace(identifier)
|
|
41
|
+
: dataFactory.namedNode(identifier);
|
|
38
42
|
return Either.of(() => captureIdentifier);
|
|
39
43
|
}
|
|
40
44
|
case "undefined": {
|
|
@@ -43,7 +47,7 @@ function $convertToIdentifierProperty(identifier) {
|
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
49
|
}
|
|
46
|
-
function $
|
|
50
|
+
function $convertToInIri(value, _defaultNamespace) {
|
|
47
51
|
switch (typeof value) {
|
|
48
52
|
case "object":
|
|
49
53
|
return Either.of(value);
|
|
@@ -51,7 +55,17 @@ function $convertToIri(value) {
|
|
|
51
55
|
return Either.of(dataFactory.namedNode(value));
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
|
-
function $
|
|
58
|
+
function $convertToIri(value, defaultNamespace) {
|
|
59
|
+
switch (typeof value) {
|
|
60
|
+
case "object":
|
|
61
|
+
return Either.of(value);
|
|
62
|
+
case "string":
|
|
63
|
+
return Either.of(defaultNamespace
|
|
64
|
+
? defaultNamespace(value)
|
|
65
|
+
: dataFactory.namedNode(value));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function $convertToIriIdentifierProperty(identifier, defaultNamespace) {
|
|
55
69
|
switch (typeof identifier) {
|
|
56
70
|
case "function":
|
|
57
71
|
return Either.of(identifier);
|
|
@@ -60,15 +74,17 @@ function $convertToIriIdentifierProperty(identifier) {
|
|
|
60
74
|
return Either.of(() => captureIdentifier);
|
|
61
75
|
}
|
|
62
76
|
case "string": {
|
|
63
|
-
const captureIdentifier =
|
|
77
|
+
const captureIdentifier = defaultNamespace
|
|
78
|
+
? defaultNamespace(identifier)
|
|
79
|
+
: dataFactory.namedNode(identifier);
|
|
64
80
|
return Either.of(() => captureIdentifier);
|
|
65
81
|
}
|
|
66
82
|
}
|
|
67
83
|
}
|
|
68
|
-
function $convertToList(convertToItem
|
|
69
|
-
return (value) => Either.sequence(value.map(convertToItem));
|
|
84
|
+
function $convertToList(convertToItem) {
|
|
85
|
+
return (value, defaultNamespace) => Either.sequence(value.map((value) => convertToItem(value, defaultNamespace)));
|
|
70
86
|
}
|
|
71
|
-
|
|
87
|
+
const $convertToLiteral = (value) => {
|
|
72
88
|
if (typeof value === "object") {
|
|
73
89
|
if (value instanceof Date) {
|
|
74
90
|
return Either.of($literalFactory.date(value));
|
|
@@ -76,9 +92,9 @@ function $convertToLiteral(value) {
|
|
|
76
92
|
return Either.of(value);
|
|
77
93
|
}
|
|
78
94
|
return Either.of($literalFactory.primitive(value));
|
|
79
|
-
}
|
|
95
|
+
};
|
|
80
96
|
function $convertToMaybe(convertToItem) {
|
|
81
|
-
return (value) => {
|
|
97
|
+
return (value, defaultNamespace) => {
|
|
82
98
|
switch (typeof value) {
|
|
83
99
|
case "object": {
|
|
84
100
|
if (Maybe.isMaybe(value)) {
|
|
@@ -89,16 +105,16 @@ function $convertToMaybe(convertToItem) {
|
|
|
89
105
|
case "undefined":
|
|
90
106
|
return Either.of(Maybe.empty());
|
|
91
107
|
}
|
|
92
|
-
return convertToItem(value).map(Maybe.of);
|
|
108
|
+
return convertToItem(value, defaultNamespace).map(Maybe.of);
|
|
93
109
|
};
|
|
94
110
|
}
|
|
95
|
-
function $convertToScalarSet(convertToItem
|
|
96
|
-
return (value) => {
|
|
111
|
+
function $convertToScalarSet(convertToItem) {
|
|
112
|
+
return (value, defaultNamespace) => {
|
|
97
113
|
if (typeof value === "undefined") {
|
|
98
114
|
return Either.of([]);
|
|
99
115
|
}
|
|
100
116
|
if (Array.isArray(value)) {
|
|
101
|
-
return Either.sequence(value.map(convertToItem));
|
|
117
|
+
return Either.sequence(value.map((value) => convertToItem(value, defaultNamespace)));
|
|
102
118
|
}
|
|
103
119
|
return convertToItem(value).map((value) => [
|
|
104
120
|
value,
|
|
@@ -127,7 +143,7 @@ export var $EqualsResult;
|
|
|
127
143
|
}
|
|
128
144
|
$EqualsResult.fromBooleanEqualsResult = fromBooleanEqualsResult;
|
|
129
145
|
})($EqualsResult || ($EqualsResult = {}));
|
|
130
|
-
function $identityConversionFunction(value) {
|
|
146
|
+
function $identityConversionFunction(value, _defaultNamespace) {
|
|
131
147
|
return Either.of(value);
|
|
132
148
|
}
|
|
133
149
|
function $identityValidationFunction(_schema, value) {
|
|
@@ -183,6 +199,7 @@ var $RdfVocabularies;
|
|
|
183
199
|
byte: dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#byte"),
|
|
184
200
|
date: dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#date"),
|
|
185
201
|
dateTime: dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#dateTime"),
|
|
202
|
+
dateTimeStamp: dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#dateTimeStamp"),
|
|
186
203
|
decimal: dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#decimal"),
|
|
187
204
|
double: dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#double"),
|
|
188
205
|
float: dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#float"),
|
|
@@ -218,7 +235,7 @@ function $sequenceRecord(record) {
|
|
|
218
235
|
function $strictEquals(left, right) {
|
|
219
236
|
return $EqualsResult.fromBooleanEqualsResult(left, right, left === right);
|
|
220
237
|
}
|
|
221
|
-
function $validateArray(validateItem
|
|
238
|
+
function $validateArray(validateItem) {
|
|
222
239
|
return (schema, valueArray) => {
|
|
223
240
|
if (schema.minCount !== undefined && valueArray.length < schema.minCount) {
|
|
224
241
|
return Left(new Error(`value array has length (${valueArray.length}) less than minCount (${schema.minCount})`));
|
|
@@ -253,10 +270,23 @@ function $wrap_ToRdfResourceFunction(_toRdfResourceFunction) {
|
|
|
253
270
|
}
|
|
254
271
|
export var owl_Ontology;
|
|
255
272
|
(function (owl_Ontology) {
|
|
273
|
+
owl_Ontology._toRdfResource = (parameters) => {
|
|
274
|
+
if (!parameters.ignoreRdfType) {
|
|
275
|
+
parameters.resource.add($RdfVocabularies.rdf.type, owl_Ontology.schema.toRdfTypes, parameters.graph);
|
|
276
|
+
}
|
|
277
|
+
parameters.resource.add(owl_Ontology.schema.properties.comment.path, parameters.object.comment
|
|
278
|
+
.toList()
|
|
279
|
+
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
280
|
+
parameters.resource.add(owl_Ontology.schema.properties.label.path, parameters.object.label
|
|
281
|
+
.toList()
|
|
282
|
+
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
283
|
+
return parameters.resource;
|
|
284
|
+
};
|
|
285
|
+
owl_Ontology.$toString = (_owlOntology) => `owl_Ontology(${JSON.stringify(owl_Ontology.toStringRecord(_owlOntology))})`;
|
|
256
286
|
owl_Ontology.create = (parameters) => $sequenceRecord({
|
|
257
|
-
$identifier: $convertToIdentifierProperty(parameters?.$identifier),
|
|
258
|
-
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.comment.type, value)),
|
|
259
|
-
label: $convertToMaybe($identityConversionFunction)(parameters?.label).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.label.type, value)),
|
|
287
|
+
$identifier: $convertToIdentifierProperty(parameters?.$identifier, parameters?.$defaultNamespace),
|
|
288
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.comment.type, value)),
|
|
289
|
+
label: $convertToMaybe($identityConversionFunction)(parameters?.label, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.label.type, value)),
|
|
260
290
|
})
|
|
261
291
|
.map((properties) => ({
|
|
262
292
|
...properties,
|
|
@@ -302,20 +332,7 @@ export var owl_Ontology;
|
|
|
302
332
|
dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology"),
|
|
303
333
|
],
|
|
304
334
|
};
|
|
305
|
-
owl_Ontology._toRdfResource = (parameters) => {
|
|
306
|
-
if (!parameters.ignoreRdfType) {
|
|
307
|
-
parameters.resource.add($RdfVocabularies.rdf.type, owl_Ontology.schema.toRdfTypes, parameters.graph);
|
|
308
|
-
}
|
|
309
|
-
parameters.resource.add(owl_Ontology.schema.properties.comment.path, parameters.object.comment
|
|
310
|
-
.toList()
|
|
311
|
-
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
312
|
-
parameters.resource.add(owl_Ontology.schema.properties.label.path, parameters.object.label
|
|
313
|
-
.toList()
|
|
314
|
-
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
315
|
-
return parameters.resource;
|
|
316
|
-
};
|
|
317
335
|
owl_Ontology.toRdfResource = $wrap_ToRdfResourceFunction(owl_Ontology._toRdfResource);
|
|
318
|
-
owl_Ontology.$toString = (_owlOntology) => `owl_Ontology(${JSON.stringify(owl_Ontology.toStringRecord(_owlOntology))})`;
|
|
319
336
|
owl_Ontology.toStringRecord = (_owlOntology) => $compactRecord({
|
|
320
337
|
$identifier: _owlOntology.$identifier().toString(),
|
|
321
338
|
label: _owlOntology.label.map((item) => item.toString()).extract(),
|
|
@@ -323,270 +340,616 @@ export var owl_Ontology;
|
|
|
323
340
|
})(owl_Ontology || (owl_Ontology = {}));
|
|
324
341
|
export var sh_NodeShape;
|
|
325
342
|
(function (sh_NodeShape) {
|
|
326
|
-
sh_NodeShape.
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
.
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
},
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
}
|
|
343
|
+
sh_NodeShape._toRdfResource = (parameters) => {
|
|
344
|
+
if (!parameters.ignoreRdfType) {
|
|
345
|
+
parameters.resource.add($RdfVocabularies.rdf.type, sh_NodeShape.schema.toRdfTypes, parameters.graph);
|
|
346
|
+
}
|
|
347
|
+
parameters.resource.add(sh_NodeShape.schema.properties.and.path, parameters.object.and.toList().flatMap((value) => [
|
|
348
|
+
value.length > 0
|
|
349
|
+
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
350
|
+
if (itemIndex === 0) {
|
|
351
|
+
currentSubListResource = listResource;
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
|
|
355
|
+
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
|
|
356
|
+
currentSubListResource = newSubListResource;
|
|
357
|
+
}
|
|
358
|
+
currentSubListResource.add($RdfVocabularies.rdf.first, ((value, _options) => {
|
|
359
|
+
if (value["termType"] === "NamedNode") {
|
|
360
|
+
return [value];
|
|
361
|
+
}
|
|
362
|
+
if (sh_Shape.issh_Shape(value)) {
|
|
363
|
+
return sh_Shape.toRdfResourceValues(value, {
|
|
364
|
+
graph: _options.graph,
|
|
365
|
+
propertyPath: _options.propertyPath,
|
|
366
|
+
resource: _options.resource,
|
|
367
|
+
resourceSet: _options.resourceSet,
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
throw new Error("unable to serialize to RDF");
|
|
371
|
+
})(item, {
|
|
372
|
+
graph: parameters.graph,
|
|
373
|
+
propertyPath: $RdfVocabularies.rdf.first,
|
|
374
|
+
resource: currentSubListResource,
|
|
375
|
+
resourceSet: parameters.resourceSet,
|
|
376
|
+
}), parameters.graph);
|
|
377
|
+
if (itemIndex + 1 === list.length) {
|
|
378
|
+
currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
|
|
379
|
+
}
|
|
380
|
+
return { currentSubListResource, listResource };
|
|
381
|
+
}, {
|
|
382
|
+
currentSubListResource: null,
|
|
383
|
+
listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
|
|
384
|
+
}).listResource.identifier
|
|
385
|
+
: $RdfVocabularies.rdf.nil,
|
|
386
|
+
]), parameters.graph);
|
|
387
|
+
parameters.resource.add(sh_NodeShape.schema.properties.class_.path, parameters.object.class_.flatMap((item) => [item]), parameters.graph);
|
|
388
|
+
parameters.resource.add(sh_NodeShape.schema.properties.closed.path, parameters.object.closed
|
|
389
|
+
.toList()
|
|
390
|
+
.flatMap((value) => [
|
|
391
|
+
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
392
|
+
]), parameters.graph);
|
|
393
|
+
parameters.resource.add(owl_Ontology.schema.properties.comment.path, parameters.object.comment
|
|
394
|
+
.toList()
|
|
395
|
+
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
396
|
+
parameters.resource.add(sh_NodeShape.schema.properties.datatype.path, parameters.object.datatype.toList(), parameters.graph);
|
|
397
|
+
parameters.resource.add(sh_NodeShape.schema.properties.deactivated.path, parameters.object.deactivated
|
|
398
|
+
.toList()
|
|
399
|
+
.flatMap((value) => [
|
|
400
|
+
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
401
|
+
]), parameters.graph);
|
|
402
|
+
parameters.resource.add(sh_NodeShape.schema.properties.discriminantValue.path, parameters.object.discriminantValue
|
|
403
|
+
.toList()
|
|
404
|
+
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
405
|
+
parameters.resource.add(sh_NodeShape.schema.properties.extern.path, parameters.object.extern
|
|
406
|
+
.toList()
|
|
407
|
+
.flatMap((value) => [
|
|
408
|
+
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
409
|
+
]), parameters.graph);
|
|
410
|
+
parameters.resource.add(sh_NodeShape.schema.properties.flags.path, parameters.object.flags
|
|
411
|
+
.toList()
|
|
412
|
+
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
413
|
+
parameters.resource.add(sh_NodeShape.schema.properties.fromRdfType.path, parameters.object.fromRdfType.toList(), parameters.graph);
|
|
414
|
+
parameters.resource.add(sh_NodeShape.schema.properties.hasValues.path, parameters.object.hasValues.flatMap((item) => [item]), parameters.graph);
|
|
415
|
+
parameters.resource.add(sh_NodeShape.schema.properties.ignore.path, $strictEquals(parameters.object.ignore, false).isLeft()
|
|
416
|
+
? [
|
|
417
|
+
$literalFactory.boolean(parameters.object.ignore, $RdfVocabularies.xsd.boolean),
|
|
418
|
+
]
|
|
419
|
+
: [], parameters.graph);
|
|
420
|
+
parameters.resource.add(sh_NodeShape.schema.properties.ignoredProperties.path, parameters.object.ignoredProperties.toList().flatMap((value) => [
|
|
421
|
+
value.length > 0
|
|
422
|
+
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
423
|
+
if (itemIndex === 0) {
|
|
424
|
+
currentSubListResource = listResource;
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
|
|
428
|
+
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
|
|
429
|
+
currentSubListResource = newSubListResource;
|
|
430
|
+
}
|
|
431
|
+
currentSubListResource.add($RdfVocabularies.rdf.first, [item], parameters.graph);
|
|
432
|
+
if (itemIndex + 1 === list.length) {
|
|
433
|
+
currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
|
|
434
|
+
}
|
|
435
|
+
return { currentSubListResource, listResource };
|
|
436
|
+
}, {
|
|
437
|
+
currentSubListResource: null,
|
|
438
|
+
listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
|
|
439
|
+
}).listResource.identifier
|
|
440
|
+
: $RdfVocabularies.rdf.nil,
|
|
441
|
+
]), parameters.graph);
|
|
442
|
+
parameters.resource.add(sh_NodeShape.schema.properties.in_.path, parameters.object.in_.toList().flatMap((value) => [
|
|
443
|
+
value.length > 0
|
|
444
|
+
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
445
|
+
if (itemIndex === 0) {
|
|
446
|
+
currentSubListResource = listResource;
|
|
447
|
+
}
|
|
448
|
+
else {
|
|
449
|
+
const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
|
|
450
|
+
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
|
|
451
|
+
currentSubListResource = newSubListResource;
|
|
452
|
+
}
|
|
453
|
+
currentSubListResource.add($RdfVocabularies.rdf.first, [item], parameters.graph);
|
|
454
|
+
if (itemIndex + 1 === list.length) {
|
|
455
|
+
currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
|
|
456
|
+
}
|
|
457
|
+
return { currentSubListResource, listResource };
|
|
458
|
+
}, {
|
|
459
|
+
currentSubListResource: null,
|
|
460
|
+
listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
|
|
461
|
+
}).listResource.identifier
|
|
462
|
+
: $RdfVocabularies.rdf.nil,
|
|
463
|
+
]), parameters.graph);
|
|
464
|
+
parameters.resource.add(sh_NodeShape.schema.properties.isDefinedBy.path, parameters.object.isDefinedBy.toList().flatMap((value) => ((value, _options) => {
|
|
465
|
+
if (value["termType"] === "NamedNode") {
|
|
466
|
+
return [value];
|
|
467
|
+
}
|
|
468
|
+
if (owl_Ontology.isowl_Ontology(value)) {
|
|
469
|
+
return [
|
|
470
|
+
owl_Ontology.toRdfResource(value, {
|
|
471
|
+
graph: _options.graph,
|
|
472
|
+
resourceSet: _options.resourceSet,
|
|
473
|
+
}).identifier,
|
|
474
|
+
];
|
|
475
|
+
}
|
|
476
|
+
throw new Error("unable to serialize to RDF");
|
|
477
|
+
})(value, {
|
|
478
|
+
graph: parameters.graph,
|
|
479
|
+
resource: parameters.resource,
|
|
480
|
+
resourceSet: parameters.resourceSet,
|
|
481
|
+
propertyPath: sh_NodeShape.schema.properties.isDefinedBy.path,
|
|
482
|
+
})), parameters.graph);
|
|
483
|
+
parameters.resource.add(owl_Ontology.schema.properties.label.path, parameters.object.label
|
|
484
|
+
.toList()
|
|
485
|
+
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
486
|
+
parameters.resource.add(sh_NodeShape.schema.properties.languageIn.path, parameters.object.languageIn.toList().flatMap((value) => [
|
|
487
|
+
value.length > 0
|
|
488
|
+
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
489
|
+
if (itemIndex === 0) {
|
|
490
|
+
currentSubListResource = listResource;
|
|
491
|
+
}
|
|
492
|
+
else {
|
|
493
|
+
const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
|
|
494
|
+
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
|
|
495
|
+
currentSubListResource = newSubListResource;
|
|
496
|
+
}
|
|
497
|
+
currentSubListResource.add($RdfVocabularies.rdf.first, [$literalFactory.string(item)], parameters.graph);
|
|
498
|
+
if (itemIndex + 1 === list.length) {
|
|
499
|
+
currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
|
|
500
|
+
}
|
|
501
|
+
return { currentSubListResource, listResource };
|
|
502
|
+
}, {
|
|
503
|
+
currentSubListResource: null,
|
|
504
|
+
listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
|
|
505
|
+
}).listResource.identifier
|
|
506
|
+
: $RdfVocabularies.rdf.nil,
|
|
507
|
+
]), parameters.graph);
|
|
508
|
+
parameters.resource.add(sh_NodeShape.schema.properties.maxExclusive.path, parameters.object.maxExclusive.toList(), parameters.graph);
|
|
509
|
+
parameters.resource.add(sh_NodeShape.schema.properties.maxInclusive.path, parameters.object.maxInclusive.toList(), parameters.graph);
|
|
510
|
+
parameters.resource.add(sh_NodeShape.schema.properties.maxLength.path, parameters.object.maxLength
|
|
511
|
+
.toList()
|
|
512
|
+
.flatMap((value) => [
|
|
513
|
+
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
514
|
+
]), parameters.graph);
|
|
515
|
+
parameters.resource.add(sh_NodeShape.schema.properties.message.path, parameters.object.message
|
|
516
|
+
.toList()
|
|
517
|
+
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
518
|
+
parameters.resource.add(sh_NodeShape.schema.properties.minExclusive.path, parameters.object.minExclusive.toList(), parameters.graph);
|
|
519
|
+
parameters.resource.add(sh_NodeShape.schema.properties.minInclusive.path, parameters.object.minInclusive.toList(), parameters.graph);
|
|
520
|
+
parameters.resource.add(sh_NodeShape.schema.properties.minLength.path, parameters.object.minLength
|
|
521
|
+
.toList()
|
|
522
|
+
.flatMap((value) => [
|
|
523
|
+
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
524
|
+
]), parameters.graph);
|
|
525
|
+
parameters.resource.add(sh_NodeShape.schema.properties.mutable.path, parameters.object.mutable
|
|
526
|
+
.toList()
|
|
527
|
+
.flatMap((value) => [
|
|
528
|
+
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
529
|
+
]), parameters.graph);
|
|
530
|
+
parameters.resource.add(sh_NodeShape.schema.properties.node.path, parameters.object.node.toList().flatMap((value) => ((value, _options) => {
|
|
531
|
+
if (value["termType"] === "NamedNode") {
|
|
532
|
+
return [value];
|
|
533
|
+
}
|
|
534
|
+
if (sh_NodeShape.issh_NodeShape(value)) {
|
|
535
|
+
return [
|
|
536
|
+
sh_NodeShape.toRdfResource(value, {
|
|
537
|
+
graph: _options.graph,
|
|
538
|
+
resourceSet: _options.resourceSet,
|
|
539
|
+
}).identifier,
|
|
540
|
+
];
|
|
541
|
+
}
|
|
542
|
+
throw new Error("unable to serialize to RDF");
|
|
543
|
+
})(value, {
|
|
544
|
+
graph: parameters.graph,
|
|
545
|
+
resource: parameters.resource,
|
|
546
|
+
resourceSet: parameters.resourceSet,
|
|
547
|
+
propertyPath: sh_NodeShape.schema.properties.node.path,
|
|
548
|
+
})), parameters.graph);
|
|
549
|
+
parameters.resource.add(sh_NodeShape.schema.properties.nodeKind.path, parameters.object.nodeKind.toList(), parameters.graph);
|
|
550
|
+
parameters.resource.add(sh_NodeShape.schema.properties.not.path, parameters.object.not.flatMap((item) => ((value, _options) => {
|
|
551
|
+
if (value["termType"] === "NamedNode") {
|
|
552
|
+
return [value];
|
|
553
|
+
}
|
|
554
|
+
if (sh_NodeShape.issh_NodeShape(value)) {
|
|
555
|
+
return [
|
|
556
|
+
sh_NodeShape.toRdfResource(value, {
|
|
557
|
+
graph: _options.graph,
|
|
558
|
+
resourceSet: _options.resourceSet,
|
|
559
|
+
}).identifier,
|
|
560
|
+
];
|
|
561
|
+
}
|
|
562
|
+
throw new Error("unable to serialize to RDF");
|
|
563
|
+
})(item, {
|
|
564
|
+
graph: parameters.graph,
|
|
565
|
+
resource: parameters.resource,
|
|
566
|
+
resourceSet: parameters.resourceSet,
|
|
567
|
+
propertyPath: sh_NodeShape.schema.properties.not.path,
|
|
568
|
+
})), parameters.graph);
|
|
569
|
+
parameters.resource.add(sh_NodeShape.schema.properties.or.path, parameters.object.or.toList().flatMap((value) => [
|
|
570
|
+
value.length > 0
|
|
571
|
+
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
572
|
+
if (itemIndex === 0) {
|
|
573
|
+
currentSubListResource = listResource;
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
|
|
577
|
+
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
|
|
578
|
+
currentSubListResource = newSubListResource;
|
|
579
|
+
}
|
|
580
|
+
currentSubListResource.add($RdfVocabularies.rdf.first, ((value, _options) => {
|
|
581
|
+
if (value["termType"] === "NamedNode") {
|
|
582
|
+
return [value];
|
|
583
|
+
}
|
|
584
|
+
if (sh_Shape.issh_Shape(value)) {
|
|
585
|
+
return sh_Shape.toRdfResourceValues(value, {
|
|
586
|
+
graph: _options.graph,
|
|
587
|
+
propertyPath: _options.propertyPath,
|
|
588
|
+
resource: _options.resource,
|
|
589
|
+
resourceSet: _options.resourceSet,
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
throw new Error("unable to serialize to RDF");
|
|
593
|
+
})(item, {
|
|
594
|
+
graph: parameters.graph,
|
|
595
|
+
propertyPath: $RdfVocabularies.rdf.first,
|
|
596
|
+
resource: currentSubListResource,
|
|
597
|
+
resourceSet: parameters.resourceSet,
|
|
598
|
+
}), parameters.graph);
|
|
599
|
+
if (itemIndex + 1 === list.length) {
|
|
600
|
+
currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
|
|
601
|
+
}
|
|
602
|
+
return { currentSubListResource, listResource };
|
|
603
|
+
}, {
|
|
604
|
+
currentSubListResource: null,
|
|
605
|
+
listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
|
|
606
|
+
}).listResource.identifier
|
|
607
|
+
: $RdfVocabularies.rdf.nil,
|
|
608
|
+
]), parameters.graph);
|
|
609
|
+
parameters.resource.add(sh_NodeShape.schema.properties.pattern.path, parameters.object.pattern
|
|
610
|
+
.toList()
|
|
611
|
+
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
612
|
+
parameters.resource.add(sh_NodeShape.schema.properties.properties.path, parameters.object.properties.flatMap((item) => ((value, _options) => {
|
|
613
|
+
if (value["termType"] === "NamedNode") {
|
|
614
|
+
return [value];
|
|
615
|
+
}
|
|
616
|
+
if (sh_PropertyShape.issh_PropertyShape(value)) {
|
|
617
|
+
return [
|
|
618
|
+
sh_PropertyShape.toRdfResource(value, {
|
|
619
|
+
graph: _options.graph,
|
|
620
|
+
resourceSet: _options.resourceSet,
|
|
621
|
+
}).identifier,
|
|
622
|
+
];
|
|
623
|
+
}
|
|
624
|
+
throw new Error("unable to serialize to RDF");
|
|
625
|
+
})(item, {
|
|
626
|
+
graph: parameters.graph,
|
|
627
|
+
resource: parameters.resource,
|
|
628
|
+
resourceSet: parameters.resourceSet,
|
|
629
|
+
propertyPath: sh_NodeShape.schema.properties.properties.path,
|
|
630
|
+
})), parameters.graph);
|
|
631
|
+
parameters.resource.add(sh_NodeShape.schema.properties.rdfType.path, parameters.object.rdfType.toList(), parameters.graph);
|
|
632
|
+
parameters.resource.add(sh_NodeShape.schema.properties.severity.path, parameters.object.severity.toList(), parameters.graph);
|
|
633
|
+
parameters.resource.add(sh_NodeShape.schema.properties.shaclmateName.path, parameters.object.shaclmateName
|
|
634
|
+
.toList()
|
|
635
|
+
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
636
|
+
parameters.resource.add(sh_NodeShape.schema.properties.subClassOf.path, parameters.object.subClassOf.flatMap((item) => [item]), parameters.graph);
|
|
637
|
+
parameters.resource.add(sh_NodeShape.schema.properties.targetClasses.path, parameters.object.targetClasses.flatMap((item) => [item]), parameters.graph);
|
|
638
|
+
parameters.resource.add(sh_NodeShape.schema.properties.targetNodes.path, parameters.object.targetNodes.flatMap((item) => [item]), parameters.graph);
|
|
639
|
+
parameters.resource.add(sh_NodeShape.schema.properties.targetObjectsOf.path, parameters.object.targetObjectsOf.flatMap((item) => [item]), parameters.graph);
|
|
640
|
+
parameters.resource.add(sh_NodeShape.schema.properties.targetSubjectsOf.path, parameters.object.targetSubjectsOf.flatMap((item) => [item]), parameters.graph);
|
|
641
|
+
parameters.resource.add(sh_NodeShape.schema.properties.toRdfTypes.path, parameters.object.toRdfTypes.flatMap((item) => [item]), parameters.graph);
|
|
642
|
+
parameters.resource.add(sh_NodeShape.schema.properties.tsImports.path, parameters.object.tsImports.flatMap((item) => [
|
|
643
|
+
$literalFactory.string(item),
|
|
644
|
+
]), parameters.graph);
|
|
645
|
+
parameters.resource.add(sh_NodeShape.schema.properties.type.path, parameters.object.type.flatMap((item) => [item]), parameters.graph);
|
|
646
|
+
parameters.resource.add(sh_NodeShape.schema.properties.xone.path, parameters.object.xone.toList().flatMap((value) => [
|
|
647
|
+
value.length > 0
|
|
648
|
+
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
649
|
+
if (itemIndex === 0) {
|
|
650
|
+
currentSubListResource = listResource;
|
|
651
|
+
}
|
|
652
|
+
else {
|
|
653
|
+
const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
|
|
654
|
+
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
|
|
655
|
+
currentSubListResource = newSubListResource;
|
|
656
|
+
}
|
|
657
|
+
currentSubListResource.add($RdfVocabularies.rdf.first, ((value, _options) => {
|
|
658
|
+
if (value["termType"] === "NamedNode") {
|
|
659
|
+
return [value];
|
|
660
|
+
}
|
|
661
|
+
if (sh_Shape.issh_Shape(value)) {
|
|
662
|
+
return sh_Shape.toRdfResourceValues(value, {
|
|
663
|
+
graph: _options.graph,
|
|
664
|
+
propertyPath: _options.propertyPath,
|
|
665
|
+
resource: _options.resource,
|
|
666
|
+
resourceSet: _options.resourceSet,
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
throw new Error("unable to serialize to RDF");
|
|
670
|
+
})(item, {
|
|
671
|
+
graph: parameters.graph,
|
|
672
|
+
propertyPath: $RdfVocabularies.rdf.first,
|
|
673
|
+
resource: currentSubListResource,
|
|
674
|
+
resourceSet: parameters.resourceSet,
|
|
675
|
+
}), parameters.graph);
|
|
676
|
+
if (itemIndex + 1 === list.length) {
|
|
677
|
+
currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
|
|
678
|
+
}
|
|
679
|
+
return { currentSubListResource, listResource };
|
|
680
|
+
}, {
|
|
681
|
+
currentSubListResource: null,
|
|
682
|
+
listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
|
|
683
|
+
}).listResource.identifier
|
|
684
|
+
: $RdfVocabularies.rdf.nil,
|
|
685
|
+
]), parameters.graph);
|
|
686
|
+
return parameters.resource;
|
|
687
|
+
};
|
|
688
|
+
sh_NodeShape.$toString = (_shNodeShape) => `sh_NodeShape(${JSON.stringify(sh_NodeShape.toStringRecord(_shNodeShape))})`;
|
|
689
|
+
sh_NodeShape.create = (parameters) => $sequenceRecord({
|
|
690
|
+
$identifier: $convertToIdentifierProperty(parameters?.$identifier, parameters?.$defaultNamespace),
|
|
691
|
+
and: $convertToMaybe($convertToList($identityConversionFunction))(parameters?.and, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.and.type, value)),
|
|
692
|
+
class_: $convertToScalarSet($convertToIri)(parameters?.class_, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.class_.type, value)),
|
|
693
|
+
closed: $convertToMaybe($identityConversionFunction)(parameters?.closed, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.closed.type, value)),
|
|
694
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.comment.type, value)),
|
|
695
|
+
datatype: $convertToMaybe($convertToIri)(parameters?.datatype, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.datatype.type, value)),
|
|
696
|
+
deactivated: $convertToMaybe($identityConversionFunction)(parameters?.deactivated, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.deactivated.type, value)),
|
|
697
|
+
discriminantValue: $convertToMaybe($identityConversionFunction)(parameters?.discriminantValue, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.discriminantValue.type, value)),
|
|
698
|
+
extern: $convertToMaybe($identityConversionFunction)(parameters?.extern, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.extern.type, value)),
|
|
699
|
+
flags: $convertToMaybe($identityConversionFunction)(parameters?.flags, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.flags.type, value)),
|
|
700
|
+
fromRdfType: $convertToMaybe($convertToIri)(parameters?.fromRdfType, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.fromRdfType.type, value)),
|
|
701
|
+
hasValues: $convertToScalarSet($identityConversionFunction)(parameters?.hasValues, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.hasValues.type, value)),
|
|
702
|
+
ignore: $convertWithDefaultValue($identityConversionFunction, false)(parameters?.ignore, parameters?.$defaultNamespace),
|
|
703
|
+
ignoredProperties: $convertToMaybe($convertToList($convertToIri))(parameters?.ignoredProperties, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.ignoredProperties.type, value)),
|
|
704
|
+
in_: $convertToMaybe($convertToList($identityConversionFunction))(parameters?.in_, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.in_.type, value)),
|
|
705
|
+
isDefinedBy: $convertToMaybe($identityConversionFunction)(parameters?.isDefinedBy, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.isDefinedBy.type, value)),
|
|
706
|
+
label: $convertToMaybe($identityConversionFunction)(parameters?.label, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.label.type, value)),
|
|
707
|
+
languageIn: $convertToMaybe($convertToList($identityConversionFunction))(parameters?.languageIn, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.languageIn.type, value)),
|
|
708
|
+
maxExclusive: $convertToMaybe($convertToLiteral)(parameters?.maxExclusive, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.maxExclusive.type, value)),
|
|
709
|
+
maxInclusive: $convertToMaybe($convertToLiteral)(parameters?.maxInclusive, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.maxInclusive.type, value)),
|
|
710
|
+
maxLength: $convertToMaybe($identityConversionFunction)(parameters?.maxLength, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.maxLength.type, value)),
|
|
711
|
+
message: $convertToMaybe($identityConversionFunction)(parameters?.message, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.message.type, value)),
|
|
712
|
+
minExclusive: $convertToMaybe($convertToLiteral)(parameters?.minExclusive, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.minExclusive.type, value)),
|
|
713
|
+
minInclusive: $convertToMaybe($convertToLiteral)(parameters?.minInclusive, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.minInclusive.type, value)),
|
|
714
|
+
minLength: $convertToMaybe($identityConversionFunction)(parameters?.minLength, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.minLength.type, value)),
|
|
715
|
+
mutable: $convertToMaybe($identityConversionFunction)(parameters?.mutable, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.mutable.type, value)),
|
|
716
|
+
node: $convertToMaybe($identityConversionFunction)(parameters?.node, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.node.type, value)),
|
|
717
|
+
nodeKind: $convertToMaybe(($convertToInIri))(parameters?.nodeKind, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.nodeKind.type, value)),
|
|
718
|
+
not: $convertToScalarSet($identityConversionFunction)(parameters?.not, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.not.type, value)),
|
|
719
|
+
or: $convertToMaybe($convertToList($identityConversionFunction))(parameters?.or, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.or.type, value)),
|
|
720
|
+
pattern: $convertToMaybe($identityConversionFunction)(parameters?.pattern, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.pattern.type, value)),
|
|
721
|
+
properties: $convertToScalarSet($identityConversionFunction)(parameters?.properties, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.properties.type, value)),
|
|
722
|
+
rdfType: $convertToMaybe($convertToIri)(parameters?.rdfType, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.rdfType.type, value)),
|
|
723
|
+
severity: $convertToMaybe(($convertToInIri))(parameters?.severity, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.severity.type, value)),
|
|
724
|
+
shaclmateName: $convertToMaybe($identityConversionFunction)(parameters?.shaclmateName, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.shaclmateName.type, value)),
|
|
725
|
+
subClassOf: $convertToScalarSet($convertToIri)(parameters?.subClassOf, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.subClassOf.type, value)),
|
|
726
|
+
targetClasses: $convertToScalarSet($convertToIri)(parameters?.targetClasses, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.targetClasses.type, value)),
|
|
727
|
+
targetNodes: $convertToScalarSet($identityConversionFunction)(parameters?.targetNodes, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.targetNodes.type, value)),
|
|
728
|
+
targetObjectsOf: $convertToScalarSet($convertToIri)(parameters?.targetObjectsOf, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.targetObjectsOf.type, value)),
|
|
729
|
+
targetSubjectsOf: $convertToScalarSet($convertToIri)(parameters?.targetSubjectsOf, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.targetSubjectsOf.type, value)),
|
|
730
|
+
toRdfTypes: $convertToScalarSet($convertToIri)(parameters?.toRdfTypes, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.toRdfTypes.type, value)),
|
|
731
|
+
tsImports: $convertToScalarSet($identityConversionFunction)(parameters?.tsImports, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.tsImports.type, value)),
|
|
732
|
+
type: $convertToScalarSet($convertToIri)(parameters?.type, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.type.type, value)),
|
|
733
|
+
xone: $convertToMaybe($convertToList($identityConversionFunction))(parameters?.xone, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.xone.type, value)),
|
|
734
|
+
})
|
|
735
|
+
.map((properties) => ({
|
|
736
|
+
...properties,
|
|
737
|
+
termType: "sh_NodeShape",
|
|
738
|
+
}))
|
|
739
|
+
.map((object) => $monkeyPatchObject(object, { $toString: sh_NodeShape.$toString }));
|
|
740
|
+
function createUnsafe(parameters) {
|
|
741
|
+
return sh_NodeShape.create(parameters).unsafeCoerce();
|
|
742
|
+
}
|
|
743
|
+
sh_NodeShape.createUnsafe = createUnsafe;
|
|
744
|
+
let Identifier;
|
|
745
|
+
(function (Identifier) {
|
|
746
|
+
Identifier.parse = $parseIdentifier;
|
|
747
|
+
Identifier.stringify = NTriplesTerm.stringify;
|
|
748
|
+
})(Identifier = sh_NodeShape.Identifier || (sh_NodeShape.Identifier = {}));
|
|
749
|
+
sh_NodeShape.issh_NodeShape = (object) => object.termType === "sh_NodeShape";
|
|
750
|
+
sh_NodeShape.schema = {
|
|
751
|
+
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape"),
|
|
752
|
+
properties: {
|
|
753
|
+
$identifier: {
|
|
754
|
+
kind: "Identifier",
|
|
755
|
+
type: { kind: "Identifier" },
|
|
756
|
+
},
|
|
757
|
+
termType: { kind: "Discriminant", value: "sh_NodeShape" },
|
|
758
|
+
and: {
|
|
759
|
+
kind: "Shacl",
|
|
760
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#and"),
|
|
761
|
+
get type() {
|
|
762
|
+
return {
|
|
763
|
+
kind: "Option",
|
|
764
|
+
get itemType() {
|
|
765
|
+
return {
|
|
766
|
+
kind: "List",
|
|
767
|
+
get itemType() {
|
|
768
|
+
return {
|
|
769
|
+
kind: "DiscriminatedUnion",
|
|
770
|
+
members: {
|
|
771
|
+
NamedNode: {
|
|
772
|
+
discriminantValues: ["NamedNode"],
|
|
773
|
+
type: { kind: "Iri" },
|
|
774
|
+
},
|
|
775
|
+
sh_NodeShape: {
|
|
776
|
+
discriminantValues: [
|
|
777
|
+
"sh_NodeShape",
|
|
778
|
+
"sh_PropertyShape",
|
|
779
|
+
],
|
|
780
|
+
type: sh_Shape.schema,
|
|
781
|
+
},
|
|
782
|
+
},
|
|
783
|
+
};
|
|
784
|
+
},
|
|
785
|
+
};
|
|
786
|
+
},
|
|
787
|
+
};
|
|
788
|
+
},
|
|
789
|
+
},
|
|
790
|
+
class_: {
|
|
791
|
+
kind: "Shacl",
|
|
792
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#class"),
|
|
793
|
+
type: { kind: "Set", itemType: { kind: "Iri" } },
|
|
794
|
+
},
|
|
795
|
+
closed: {
|
|
796
|
+
kind: "Shacl",
|
|
797
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#closed"),
|
|
798
|
+
type: {
|
|
799
|
+
kind: "Option",
|
|
800
|
+
itemType: { kind: "Boolean" },
|
|
801
|
+
},
|
|
802
|
+
},
|
|
803
|
+
comment: {
|
|
804
|
+
kind: "Shacl",
|
|
805
|
+
path: dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#comment"),
|
|
806
|
+
type: {
|
|
807
|
+
kind: "Option",
|
|
808
|
+
itemType: { kind: "String" },
|
|
809
|
+
},
|
|
810
|
+
},
|
|
811
|
+
datatype: {
|
|
812
|
+
kind: "Shacl",
|
|
813
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#datatype"),
|
|
814
|
+
type: { kind: "Option", itemType: { kind: "Iri" } },
|
|
815
|
+
},
|
|
816
|
+
deactivated: {
|
|
817
|
+
kind: "Shacl",
|
|
818
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#deactivated"),
|
|
819
|
+
type: {
|
|
820
|
+
kind: "Option",
|
|
821
|
+
itemType: { kind: "Boolean" },
|
|
822
|
+
},
|
|
823
|
+
},
|
|
824
|
+
discriminantValue: {
|
|
825
|
+
kind: "Shacl",
|
|
826
|
+
path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#discriminantValue"),
|
|
827
|
+
type: {
|
|
828
|
+
kind: "Option",
|
|
829
|
+
itemType: { kind: "String" },
|
|
830
|
+
},
|
|
831
|
+
},
|
|
832
|
+
extern: {
|
|
833
|
+
kind: "Shacl",
|
|
834
|
+
path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#extern"),
|
|
835
|
+
type: {
|
|
836
|
+
kind: "Option",
|
|
837
|
+
itemType: { kind: "Boolean" },
|
|
838
|
+
},
|
|
839
|
+
},
|
|
840
|
+
flags: {
|
|
841
|
+
kind: "Shacl",
|
|
842
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#flags"),
|
|
843
|
+
type: {
|
|
844
|
+
kind: "Option",
|
|
845
|
+
itemType: { kind: "String" },
|
|
846
|
+
},
|
|
847
|
+
},
|
|
848
|
+
fromRdfType: {
|
|
849
|
+
kind: "Shacl",
|
|
850
|
+
path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#fromRdfType"),
|
|
851
|
+
type: { kind: "Option", itemType: { kind: "Iri" } },
|
|
852
|
+
},
|
|
853
|
+
hasValues: {
|
|
854
|
+
kind: "Shacl",
|
|
855
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#hasValue"),
|
|
856
|
+
type: {
|
|
857
|
+
kind: "Set",
|
|
858
|
+
itemType: { kind: "Term", types: ["NamedNode", "Literal"] },
|
|
859
|
+
},
|
|
860
|
+
},
|
|
861
|
+
ignore: {
|
|
862
|
+
kind: "Shacl",
|
|
863
|
+
path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#ignore"),
|
|
864
|
+
type: {
|
|
865
|
+
kind: "DefaultValue",
|
|
866
|
+
itemType: { kind: "Boolean" },
|
|
867
|
+
defaultValue: dataFactory.literal("false", $RdfVocabularies.xsd.boolean),
|
|
868
|
+
},
|
|
869
|
+
},
|
|
870
|
+
ignoredProperties: {
|
|
871
|
+
kind: "Shacl",
|
|
872
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#ignoredProperties"),
|
|
873
|
+
type: {
|
|
874
|
+
kind: "Option",
|
|
875
|
+
itemType: {
|
|
876
|
+
kind: "List",
|
|
877
|
+
itemType: { kind: "Iri" },
|
|
878
|
+
},
|
|
879
|
+
},
|
|
880
|
+
},
|
|
881
|
+
in_: {
|
|
882
|
+
kind: "Shacl",
|
|
883
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#in"),
|
|
884
|
+
type: {
|
|
885
|
+
kind: "Option",
|
|
886
|
+
itemType: {
|
|
887
|
+
kind: "List",
|
|
888
|
+
itemType: {
|
|
889
|
+
kind: "Term",
|
|
890
|
+
types: ["NamedNode", "Literal"],
|
|
891
|
+
},
|
|
892
|
+
},
|
|
893
|
+
},
|
|
894
|
+
},
|
|
895
|
+
isDefinedBy: {
|
|
896
|
+
kind: "Shacl",
|
|
897
|
+
path: dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#isDefinedBy"),
|
|
898
|
+
get type() {
|
|
899
|
+
return {
|
|
900
|
+
kind: "Option",
|
|
901
|
+
get itemType() {
|
|
902
|
+
return {
|
|
903
|
+
kind: "DiscriminatedUnion",
|
|
904
|
+
members: {
|
|
905
|
+
NamedNode: {
|
|
906
|
+
discriminantValues: ["NamedNode"],
|
|
907
|
+
type: { kind: "Iri" },
|
|
908
|
+
},
|
|
909
|
+
owl_Ontology: {
|
|
910
|
+
discriminantValues: ["owl_Ontology"],
|
|
911
|
+
type: owl_Ontology.schema,
|
|
912
|
+
},
|
|
913
|
+
},
|
|
914
|
+
};
|
|
915
|
+
},
|
|
916
|
+
};
|
|
917
|
+
},
|
|
918
|
+
},
|
|
919
|
+
label: {
|
|
920
|
+
kind: "Shacl",
|
|
921
|
+
path: dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#label"),
|
|
922
|
+
type: {
|
|
923
|
+
kind: "Option",
|
|
924
|
+
itemType: { kind: "String" },
|
|
925
|
+
},
|
|
926
|
+
},
|
|
927
|
+
languageIn: {
|
|
928
|
+
kind: "Shacl",
|
|
929
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#languageIn"),
|
|
930
|
+
type: {
|
|
931
|
+
kind: "Option",
|
|
932
|
+
itemType: {
|
|
933
|
+
kind: "List",
|
|
934
|
+
itemType: { kind: "String" },
|
|
935
|
+
},
|
|
936
|
+
},
|
|
937
|
+
},
|
|
938
|
+
maxExclusive: {
|
|
939
|
+
kind: "Shacl",
|
|
940
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxExclusive"),
|
|
941
|
+
type: {
|
|
942
|
+
kind: "Option",
|
|
943
|
+
itemType: { kind: "Literal" },
|
|
944
|
+
},
|
|
945
|
+
},
|
|
946
|
+
maxInclusive: {
|
|
947
|
+
kind: "Shacl",
|
|
948
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxInclusive"),
|
|
949
|
+
type: {
|
|
950
|
+
kind: "Option",
|
|
951
|
+
itemType: { kind: "Literal" },
|
|
952
|
+
},
|
|
590
953
|
},
|
|
591
954
|
maxLength: {
|
|
592
955
|
kind: "Shacl",
|
|
@@ -778,14 +1141,7 @@ export var sh_NodeShape;
|
|
|
778
1141
|
return {
|
|
779
1142
|
kind: "Option",
|
|
780
1143
|
get itemType() {
|
|
781
|
-
return
|
|
782
|
-
kind: "Iri",
|
|
783
|
-
in: [
|
|
784
|
-
dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
|
|
785
|
-
dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
|
|
786
|
-
dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
|
|
787
|
-
],
|
|
788
|
-
};
|
|
1144
|
+
return sh_Severity.schema;
|
|
789
1145
|
},
|
|
790
1146
|
};
|
|
791
1147
|
},
|
|
@@ -876,9 +1232,90 @@ export var sh_NodeShape;
|
|
|
876
1232
|
},
|
|
877
1233
|
toRdfTypes: [dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape")],
|
|
878
1234
|
};
|
|
879
|
-
sh_NodeShape.
|
|
1235
|
+
sh_NodeShape.toRdfResource = $wrap_ToRdfResourceFunction(sh_NodeShape._toRdfResource);
|
|
1236
|
+
sh_NodeShape.toStringRecord = (_shNodeShape) => $compactRecord({
|
|
1237
|
+
$identifier: _shNodeShape.$identifier().toString(),
|
|
1238
|
+
label: _shNodeShape.label.map((item) => item.toString()).extract(),
|
|
1239
|
+
shaclmateName: _shNodeShape.shaclmateName
|
|
1240
|
+
.map((item) => item.toString())
|
|
1241
|
+
.extract(),
|
|
1242
|
+
});
|
|
1243
|
+
})(sh_NodeShape || (sh_NodeShape = {}));
|
|
1244
|
+
export var sh_PropertyGroup;
|
|
1245
|
+
(function (sh_PropertyGroup) {
|
|
1246
|
+
sh_PropertyGroup._toRdfResource = (parameters) => {
|
|
880
1247
|
if (!parameters.ignoreRdfType) {
|
|
881
|
-
parameters.resource.add($RdfVocabularies.rdf.type,
|
|
1248
|
+
parameters.resource.add($RdfVocabularies.rdf.type, sh_PropertyGroup.schema.toRdfTypes, parameters.graph);
|
|
1249
|
+
}
|
|
1250
|
+
parameters.resource.add(owl_Ontology.schema.properties.comment.path, parameters.object.comment
|
|
1251
|
+
.toList()
|
|
1252
|
+
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1253
|
+
parameters.resource.add(owl_Ontology.schema.properties.label.path, parameters.object.label
|
|
1254
|
+
.toList()
|
|
1255
|
+
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1256
|
+
return parameters.resource;
|
|
1257
|
+
};
|
|
1258
|
+
sh_PropertyGroup.$toString = (_shPropertyGroup) => `sh_PropertyGroup(${JSON.stringify(sh_PropertyGroup.toStringRecord(_shPropertyGroup))})`;
|
|
1259
|
+
sh_PropertyGroup.create = (parameters) => $sequenceRecord({
|
|
1260
|
+
$identifier: $convertToIdentifierProperty(parameters?.$identifier, parameters?.$defaultNamespace),
|
|
1261
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.comment.type, value)),
|
|
1262
|
+
label: $convertToMaybe($identityConversionFunction)(parameters?.label, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.label.type, value)),
|
|
1263
|
+
})
|
|
1264
|
+
.map((properties) => ({
|
|
1265
|
+
...properties,
|
|
1266
|
+
termType: "sh_PropertyGroup",
|
|
1267
|
+
}))
|
|
1268
|
+
.map((object) => $monkeyPatchObject(object, { $toString: sh_PropertyGroup.$toString }));
|
|
1269
|
+
function createUnsafe(parameters) {
|
|
1270
|
+
return sh_PropertyGroup.create(parameters).unsafeCoerce();
|
|
1271
|
+
}
|
|
1272
|
+
sh_PropertyGroup.createUnsafe = createUnsafe;
|
|
1273
|
+
let Identifier;
|
|
1274
|
+
(function (Identifier) {
|
|
1275
|
+
Identifier.parse = $parseIdentifier;
|
|
1276
|
+
Identifier.stringify = NTriplesTerm.stringify;
|
|
1277
|
+
})(Identifier = sh_PropertyGroup.Identifier || (sh_PropertyGroup.Identifier = {}));
|
|
1278
|
+
sh_PropertyGroup.issh_PropertyGroup = (object) => object.termType === "sh_PropertyGroup";
|
|
1279
|
+
sh_PropertyGroup.schema = {
|
|
1280
|
+
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"),
|
|
1281
|
+
properties: {
|
|
1282
|
+
$identifier: {
|
|
1283
|
+
kind: "Identifier",
|
|
1284
|
+
type: { kind: "Identifier" },
|
|
1285
|
+
},
|
|
1286
|
+
termType: { kind: "Discriminant", value: "sh_PropertyGroup" },
|
|
1287
|
+
comment: {
|
|
1288
|
+
kind: "Shacl",
|
|
1289
|
+
path: dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#comment"),
|
|
1290
|
+
type: {
|
|
1291
|
+
kind: "Option",
|
|
1292
|
+
itemType: { kind: "String" },
|
|
1293
|
+
},
|
|
1294
|
+
},
|
|
1295
|
+
label: {
|
|
1296
|
+
kind: "Shacl",
|
|
1297
|
+
path: dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#label"),
|
|
1298
|
+
type: {
|
|
1299
|
+
kind: "Option",
|
|
1300
|
+
itemType: { kind: "String" },
|
|
1301
|
+
},
|
|
1302
|
+
},
|
|
1303
|
+
},
|
|
1304
|
+
toRdfTypes: [
|
|
1305
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"),
|
|
1306
|
+
],
|
|
1307
|
+
};
|
|
1308
|
+
sh_PropertyGroup.toRdfResource = $wrap_ToRdfResourceFunction(sh_PropertyGroup._toRdfResource);
|
|
1309
|
+
sh_PropertyGroup.toStringRecord = (_shPropertyGroup) => $compactRecord({
|
|
1310
|
+
$identifier: _shPropertyGroup.$identifier().toString(),
|
|
1311
|
+
label: _shPropertyGroup.label.map((item) => item.toString()).extract(),
|
|
1312
|
+
});
|
|
1313
|
+
})(sh_PropertyGroup || (sh_PropertyGroup = {}));
|
|
1314
|
+
export var sh_PropertyShape;
|
|
1315
|
+
(function (sh_PropertyShape) {
|
|
1316
|
+
sh_PropertyShape._toRdfResource = (parameters) => {
|
|
1317
|
+
if (!parameters.ignoreRdfType) {
|
|
1318
|
+
parameters.resource.add($RdfVocabularies.rdf.type, sh_PropertyShape.schema.toRdfTypes, parameters.graph);
|
|
882
1319
|
}
|
|
883
1320
|
parameters.resource.add(sh_NodeShape.schema.properties.and.path, parameters.object.and.toList().flatMap((value) => [
|
|
884
1321
|
value.length > 0
|
|
@@ -921,11 +1358,6 @@ export var sh_NodeShape;
|
|
|
921
1358
|
: $RdfVocabularies.rdf.nil,
|
|
922
1359
|
]), parameters.graph);
|
|
923
1360
|
parameters.resource.add(sh_NodeShape.schema.properties.class_.path, parameters.object.class_.flatMap((item) => [item]), parameters.graph);
|
|
924
|
-
parameters.resource.add(sh_NodeShape.schema.properties.closed.path, parameters.object.closed
|
|
925
|
-
.toList()
|
|
926
|
-
.flatMap((value) => [
|
|
927
|
-
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
928
|
-
]), parameters.graph);
|
|
929
1361
|
parameters.resource.add(owl_Ontology.schema.properties.comment.path, parameters.object.comment
|
|
930
1362
|
.toList()
|
|
931
1363
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
@@ -935,46 +1367,45 @@ export var sh_NodeShape;
|
|
|
935
1367
|
.flatMap((value) => [
|
|
936
1368
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
937
1369
|
]), parameters.graph);
|
|
938
|
-
parameters.resource.add(
|
|
1370
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.defaultValue.path, parameters.object.defaultValue.toList(), parameters.graph);
|
|
1371
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.description.path, parameters.object.description
|
|
939
1372
|
.toList()
|
|
940
1373
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
941
|
-
parameters.resource.add(
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1374
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.disjoint.path, parameters.object.disjoint.flatMap((item) => [item]), parameters.graph);
|
|
1375
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.display.path, $strictEquals(parameters.object.display, false).isLeft()
|
|
1376
|
+
? [
|
|
1377
|
+
$literalFactory.boolean(parameters.object.display, $RdfVocabularies.xsd.boolean),
|
|
1378
|
+
]
|
|
1379
|
+
: [], parameters.graph);
|
|
1380
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.equals.path, parameters.object.equals.flatMap((item) => [item]), parameters.graph);
|
|
946
1381
|
parameters.resource.add(sh_NodeShape.schema.properties.flags.path, parameters.object.flags
|
|
947
1382
|
.toList()
|
|
948
1383
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
949
|
-
parameters.resource.add(
|
|
1384
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.groups.path, parameters.object.groups.flatMap((item) => ((value, _options) => {
|
|
1385
|
+
if (value["termType"] === "NamedNode") {
|
|
1386
|
+
return [value];
|
|
1387
|
+
}
|
|
1388
|
+
if (sh_PropertyGroup.issh_PropertyGroup(value)) {
|
|
1389
|
+
return [
|
|
1390
|
+
sh_PropertyGroup.toRdfResource(value, {
|
|
1391
|
+
graph: _options.graph,
|
|
1392
|
+
resourceSet: _options.resourceSet,
|
|
1393
|
+
}).identifier,
|
|
1394
|
+
];
|
|
1395
|
+
}
|
|
1396
|
+
throw new Error("unable to serialize to RDF");
|
|
1397
|
+
})(item, {
|
|
1398
|
+
graph: parameters.graph,
|
|
1399
|
+
resource: parameters.resource,
|
|
1400
|
+
resourceSet: parameters.resourceSet,
|
|
1401
|
+
propertyPath: sh_PropertyShape.schema.properties.groups.path,
|
|
1402
|
+
})), parameters.graph);
|
|
950
1403
|
parameters.resource.add(sh_NodeShape.schema.properties.hasValues.path, parameters.object.hasValues.flatMap((item) => [item]), parameters.graph);
|
|
951
1404
|
parameters.resource.add(sh_NodeShape.schema.properties.ignore.path, $strictEquals(parameters.object.ignore, false).isLeft()
|
|
952
1405
|
? [
|
|
953
1406
|
$literalFactory.boolean(parameters.object.ignore, $RdfVocabularies.xsd.boolean),
|
|
954
1407
|
]
|
|
955
1408
|
: [], parameters.graph);
|
|
956
|
-
parameters.resource.add(sh_NodeShape.schema.properties.ignoredProperties.path, parameters.object.ignoredProperties.toList().flatMap((value) => [
|
|
957
|
-
value.length > 0
|
|
958
|
-
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
959
|
-
if (itemIndex === 0) {
|
|
960
|
-
currentSubListResource = listResource;
|
|
961
|
-
}
|
|
962
|
-
else {
|
|
963
|
-
const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
|
|
964
|
-
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
|
|
965
|
-
currentSubListResource = newSubListResource;
|
|
966
|
-
}
|
|
967
|
-
currentSubListResource.add($RdfVocabularies.rdf.first, [item], parameters.graph);
|
|
968
|
-
if (itemIndex + 1 === list.length) {
|
|
969
|
-
currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
|
|
970
|
-
}
|
|
971
|
-
return { currentSubListResource, listResource };
|
|
972
|
-
}, {
|
|
973
|
-
currentSubListResource: null,
|
|
974
|
-
listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
|
|
975
|
-
}).listResource.identifier
|
|
976
|
-
: $RdfVocabularies.rdf.nil,
|
|
977
|
-
]), parameters.graph);
|
|
978
1409
|
parameters.resource.add(sh_NodeShape.schema.properties.in_.path, parameters.object.in_.toList().flatMap((value) => [
|
|
979
1410
|
value.length > 0
|
|
980
1411
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
@@ -1041,6 +1472,13 @@ export var sh_NodeShape;
|
|
|
1041
1472
|
}).listResource.identifier
|
|
1042
1473
|
: $RdfVocabularies.rdf.nil,
|
|
1043
1474
|
]), parameters.graph);
|
|
1475
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.lessThan.path, parameters.object.lessThan.flatMap((item) => [item]), parameters.graph);
|
|
1476
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.lessThanOrEquals.path, parameters.object.lessThanOrEquals.flatMap((item) => [item]), parameters.graph);
|
|
1477
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.maxCount.path, parameters.object.maxCount
|
|
1478
|
+
.toList()
|
|
1479
|
+
.flatMap((value) => [
|
|
1480
|
+
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
1481
|
+
]), parameters.graph);
|
|
1044
1482
|
parameters.resource.add(sh_NodeShape.schema.properties.maxExclusive.path, parameters.object.maxExclusive.toList(), parameters.graph);
|
|
1045
1483
|
parameters.resource.add(sh_NodeShape.schema.properties.maxInclusive.path, parameters.object.maxInclusive.toList(), parameters.graph);
|
|
1046
1484
|
parameters.resource.add(sh_NodeShape.schema.properties.maxLength.path, parameters.object.maxLength
|
|
@@ -1051,6 +1489,11 @@ export var sh_NodeShape;
|
|
|
1051
1489
|
parameters.resource.add(sh_NodeShape.schema.properties.message.path, parameters.object.message
|
|
1052
1490
|
.toList()
|
|
1053
1491
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1492
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.minCount.path, parameters.object.minCount
|
|
1493
|
+
.toList()
|
|
1494
|
+
.flatMap((value) => [
|
|
1495
|
+
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
1496
|
+
]), parameters.graph);
|
|
1054
1497
|
parameters.resource.add(sh_NodeShape.schema.properties.minExclusive.path, parameters.object.minExclusive.toList(), parameters.graph);
|
|
1055
1498
|
parameters.resource.add(sh_NodeShape.schema.properties.minInclusive.path, parameters.object.minInclusive.toList(), parameters.graph);
|
|
1056
1499
|
parameters.resource.add(sh_NodeShape.schema.properties.minLength.path, parameters.object.minLength
|
|
@@ -1063,6 +1506,9 @@ export var sh_NodeShape;
|
|
|
1063
1506
|
.flatMap((value) => [
|
|
1064
1507
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
1065
1508
|
]), parameters.graph);
|
|
1509
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.name.path, parameters.object.name
|
|
1510
|
+
.toList()
|
|
1511
|
+
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1066
1512
|
parameters.resource.add(sh_NodeShape.schema.properties.node.path, parameters.object.node.toList().flatMap((value) => ((value, _options) => {
|
|
1067
1513
|
if (value["termType"] === "NamedNode") {
|
|
1068
1514
|
return [value];
|
|
@@ -1142,43 +1588,50 @@ export var sh_NodeShape;
|
|
|
1142
1588
|
}).listResource.identifier
|
|
1143
1589
|
: $RdfVocabularies.rdf.nil,
|
|
1144
1590
|
]), parameters.graph);
|
|
1591
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.order.path, parameters.object.order
|
|
1592
|
+
.toList()
|
|
1593
|
+
.flatMap((value) => [
|
|
1594
|
+
$literalFactory.number(value, $RdfVocabularies.xsd.double),
|
|
1595
|
+
]), parameters.graph);
|
|
1596
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.path.path, [
|
|
1597
|
+
$PropertyPath.toRdfResource(parameters.object.path, {
|
|
1598
|
+
graph: parameters.graph,
|
|
1599
|
+
resourceSet: parameters.resourceSet,
|
|
1600
|
+
}).identifier,
|
|
1601
|
+
], parameters.graph);
|
|
1145
1602
|
parameters.resource.add(sh_NodeShape.schema.properties.pattern.path, parameters.object.pattern
|
|
1146
1603
|
.toList()
|
|
1147
1604
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1148
|
-
parameters.resource.add(
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
propertyPath: sh_NodeShape.schema.properties.properties.path,
|
|
1166
|
-
})), parameters.graph);
|
|
1167
|
-
parameters.resource.add(sh_NodeShape.schema.properties.rdfType.path, parameters.object.rdfType.toList(), parameters.graph);
|
|
1605
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.qualifiedMaxCount.path, parameters.object.qualifiedMaxCount
|
|
1606
|
+
.toList()
|
|
1607
|
+
.flatMap((value) => [
|
|
1608
|
+
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
1609
|
+
]), parameters.graph);
|
|
1610
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.qualifiedMinCount.path, parameters.object.qualifiedMinCount
|
|
1611
|
+
.toList()
|
|
1612
|
+
.flatMap((value) => [
|
|
1613
|
+
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
1614
|
+
]), parameters.graph);
|
|
1615
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.qualifiedValueShape.path, parameters.object.qualifiedValueShape.toList(), parameters.graph);
|
|
1616
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.qualifiedValueShapesDisjoint.path, parameters.object.qualifiedValueShapesDisjoint
|
|
1617
|
+
.toList()
|
|
1618
|
+
.flatMap((value) => [
|
|
1619
|
+
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
1620
|
+
]), parameters.graph);
|
|
1621
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.resolve.path, parameters.object.resolve.toList(), parameters.graph);
|
|
1168
1622
|
parameters.resource.add(sh_NodeShape.schema.properties.severity.path, parameters.object.severity.toList(), parameters.graph);
|
|
1169
1623
|
parameters.resource.add(sh_NodeShape.schema.properties.shaclmateName.path, parameters.object.shaclmateName
|
|
1170
1624
|
.toList()
|
|
1171
1625
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1172
|
-
parameters.resource.add(sh_NodeShape.schema.properties.subClassOf.path, parameters.object.subClassOf.flatMap((item) => [item]), parameters.graph);
|
|
1173
1626
|
parameters.resource.add(sh_NodeShape.schema.properties.targetClasses.path, parameters.object.targetClasses.flatMap((item) => [item]), parameters.graph);
|
|
1174
1627
|
parameters.resource.add(sh_NodeShape.schema.properties.targetNodes.path, parameters.object.targetNodes.flatMap((item) => [item]), parameters.graph);
|
|
1175
1628
|
parameters.resource.add(sh_NodeShape.schema.properties.targetObjectsOf.path, parameters.object.targetObjectsOf.flatMap((item) => [item]), parameters.graph);
|
|
1176
1629
|
parameters.resource.add(sh_NodeShape.schema.properties.targetSubjectsOf.path, parameters.object.targetSubjectsOf.flatMap((item) => [item]), parameters.graph);
|
|
1177
|
-
parameters.resource.add(
|
|
1178
|
-
|
|
1179
|
-
|
|
1630
|
+
parameters.resource.add(sh_PropertyShape.schema.properties.uniqueLang.path, parameters.object.uniqueLang
|
|
1631
|
+
.toList()
|
|
1632
|
+
.flatMap((value) => [
|
|
1633
|
+
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
1180
1634
|
]), parameters.graph);
|
|
1181
|
-
parameters.resource.add(sh_NodeShape.schema.properties.type.path, parameters.object.type.flatMap((item) => [item]), parameters.graph);
|
|
1182
1635
|
parameters.resource.add(sh_NodeShape.schema.properties.xone.path, parameters.object.xone.toList().flatMap((value) => [
|
|
1183
1636
|
value.length > 0
|
|
1184
1637
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
@@ -1221,141 +1674,60 @@ export var sh_NodeShape;
|
|
|
1221
1674
|
]), parameters.graph);
|
|
1222
1675
|
return parameters.resource;
|
|
1223
1676
|
};
|
|
1224
|
-
|
|
1225
|
-
sh_NodeShape.$toString = (_shNodeShape) => `sh_NodeShape(${JSON.stringify(sh_NodeShape.toStringRecord(_shNodeShape))})`;
|
|
1226
|
-
sh_NodeShape.toStringRecord = (_shNodeShape) => $compactRecord({
|
|
1227
|
-
$identifier: _shNodeShape.$identifier().toString(),
|
|
1228
|
-
label: _shNodeShape.label.map((item) => item.toString()).extract(),
|
|
1229
|
-
shaclmateName: _shNodeShape.shaclmateName
|
|
1230
|
-
.map((item) => item.toString())
|
|
1231
|
-
.extract(),
|
|
1232
|
-
});
|
|
1233
|
-
})(sh_NodeShape || (sh_NodeShape = {}));
|
|
1234
|
-
export var sh_PropertyGroup;
|
|
1235
|
-
(function (sh_PropertyGroup) {
|
|
1236
|
-
sh_PropertyGroup.create = (parameters) => $sequenceRecord({
|
|
1237
|
-
$identifier: $convertToIdentifierProperty(parameters?.$identifier),
|
|
1238
|
-
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.comment.type, value)),
|
|
1239
|
-
label: $convertToMaybe($identityConversionFunction)(parameters?.label).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.label.type, value)),
|
|
1240
|
-
})
|
|
1241
|
-
.map((properties) => ({
|
|
1242
|
-
...properties,
|
|
1243
|
-
termType: "sh_PropertyGroup",
|
|
1244
|
-
}))
|
|
1245
|
-
.map((object) => $monkeyPatchObject(object, { $toString: sh_PropertyGroup.$toString }));
|
|
1246
|
-
function createUnsafe(parameters) {
|
|
1247
|
-
return sh_PropertyGroup.create(parameters).unsafeCoerce();
|
|
1248
|
-
}
|
|
1249
|
-
sh_PropertyGroup.createUnsafe = createUnsafe;
|
|
1250
|
-
let Identifier;
|
|
1251
|
-
(function (Identifier) {
|
|
1252
|
-
Identifier.parse = $parseIdentifier;
|
|
1253
|
-
Identifier.stringify = NTriplesTerm.stringify;
|
|
1254
|
-
})(Identifier = sh_PropertyGroup.Identifier || (sh_PropertyGroup.Identifier = {}));
|
|
1255
|
-
sh_PropertyGroup.issh_PropertyGroup = (object) => object.termType === "sh_PropertyGroup";
|
|
1256
|
-
sh_PropertyGroup.schema = {
|
|
1257
|
-
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"),
|
|
1258
|
-
properties: {
|
|
1259
|
-
$identifier: {
|
|
1260
|
-
kind: "Identifier",
|
|
1261
|
-
type: { kind: "Identifier" },
|
|
1262
|
-
},
|
|
1263
|
-
termType: { kind: "Discriminant", value: "sh_PropertyGroup" },
|
|
1264
|
-
comment: {
|
|
1265
|
-
kind: "Shacl",
|
|
1266
|
-
path: dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#comment"),
|
|
1267
|
-
type: {
|
|
1268
|
-
kind: "Option",
|
|
1269
|
-
itemType: { kind: "String" },
|
|
1270
|
-
},
|
|
1271
|
-
},
|
|
1272
|
-
label: {
|
|
1273
|
-
kind: "Shacl",
|
|
1274
|
-
path: dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#label"),
|
|
1275
|
-
type: {
|
|
1276
|
-
kind: "Option",
|
|
1277
|
-
itemType: { kind: "String" },
|
|
1278
|
-
},
|
|
1279
|
-
},
|
|
1280
|
-
},
|
|
1281
|
-
toRdfTypes: [
|
|
1282
|
-
dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"),
|
|
1283
|
-
],
|
|
1284
|
-
};
|
|
1285
|
-
sh_PropertyGroup._toRdfResource = (parameters) => {
|
|
1286
|
-
if (!parameters.ignoreRdfType) {
|
|
1287
|
-
parameters.resource.add($RdfVocabularies.rdf.type, sh_PropertyGroup.schema.toRdfTypes, parameters.graph);
|
|
1288
|
-
}
|
|
1289
|
-
parameters.resource.add(owl_Ontology.schema.properties.comment.path, parameters.object.comment
|
|
1290
|
-
.toList()
|
|
1291
|
-
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1292
|
-
parameters.resource.add(owl_Ontology.schema.properties.label.path, parameters.object.label
|
|
1293
|
-
.toList()
|
|
1294
|
-
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1295
|
-
return parameters.resource;
|
|
1296
|
-
};
|
|
1297
|
-
sh_PropertyGroup.toRdfResource = $wrap_ToRdfResourceFunction(sh_PropertyGroup._toRdfResource);
|
|
1298
|
-
sh_PropertyGroup.$toString = (_shPropertyGroup) => `sh_PropertyGroup(${JSON.stringify(sh_PropertyGroup.toStringRecord(_shPropertyGroup))})`;
|
|
1299
|
-
sh_PropertyGroup.toStringRecord = (_shPropertyGroup) => $compactRecord({
|
|
1300
|
-
$identifier: _shPropertyGroup.$identifier().toString(),
|
|
1301
|
-
label: _shPropertyGroup.label.map((item) => item.toString()).extract(),
|
|
1302
|
-
});
|
|
1303
|
-
})(sh_PropertyGroup || (sh_PropertyGroup = {}));
|
|
1304
|
-
export var sh_PropertyShape;
|
|
1305
|
-
(function (sh_PropertyShape) {
|
|
1677
|
+
sh_PropertyShape.$toString = (_shPropertyShape) => `sh_PropertyShape(${JSON.stringify(sh_PropertyShape.toStringRecord(_shPropertyShape))})`;
|
|
1306
1678
|
sh_PropertyShape.create = (parameters) => $sequenceRecord({
|
|
1307
|
-
$identifier: $convertToIdentifierProperty(parameters.$identifier),
|
|
1308
|
-
and: $convertToMaybe($convertToList($identityConversionFunction
|
|
1309
|
-
class_: $convertToScalarSet(
|
|
1310
|
-
comment: $convertToMaybe($identityConversionFunction)(parameters.comment).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.comment.type, value)),
|
|
1311
|
-
datatype: $convertToMaybe(
|
|
1312
|
-
deactivated: $convertToMaybe($identityConversionFunction)(parameters.deactivated).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.deactivated.type, value)),
|
|
1313
|
-
defaultValue: $convertToMaybe($identityConversionFunction)(parameters.defaultValue).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.defaultValue.type, value)),
|
|
1314
|
-
description: $convertToMaybe($identityConversionFunction)(parameters.description).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.description.type, value)),
|
|
1315
|
-
disjoint: $convertToScalarSet(
|
|
1316
|
-
display: $convertWithDefaultValue($identityConversionFunction, false)(parameters.display),
|
|
1317
|
-
equals: $convertToScalarSet(
|
|
1318
|
-
flags: $convertToMaybe($identityConversionFunction)(parameters.flags).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.flags.type, value)),
|
|
1319
|
-
groups: $convertToScalarSet($identityConversionFunction
|
|
1320
|
-
hasValues: $convertToScalarSet($identityConversionFunction
|
|
1321
|
-
ignore: $convertWithDefaultValue($identityConversionFunction, false)(parameters.ignore),
|
|
1322
|
-
in_: $convertToMaybe($convertToList($identityConversionFunction
|
|
1323
|
-
isDefinedBy: $convertToMaybe($identityConversionFunction)(parameters.isDefinedBy).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.isDefinedBy.type, value)),
|
|
1324
|
-
label: $convertToMaybe($identityConversionFunction)(parameters.label).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.label.type, value)),
|
|
1325
|
-
languageIn: $convertToMaybe($convertToList($identityConversionFunction
|
|
1326
|
-
lessThan: $convertToScalarSet(
|
|
1327
|
-
lessThanOrEquals: $convertToScalarSet(
|
|
1328
|
-
maxCount: $convertToMaybe($identityConversionFunction)(parameters.maxCount).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.maxCount.type, value)),
|
|
1329
|
-
maxExclusive: $convertToMaybe($convertToLiteral)(parameters.maxExclusive).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.maxExclusive.type, value)),
|
|
1330
|
-
maxInclusive: $convertToMaybe($convertToLiteral)(parameters.maxInclusive).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.maxInclusive.type, value)),
|
|
1331
|
-
maxLength: $convertToMaybe($identityConversionFunction)(parameters.maxLength).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.maxLength.type, value)),
|
|
1332
|
-
message: $convertToMaybe($identityConversionFunction)(parameters.message).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.message.type, value)),
|
|
1333
|
-
minCount: $convertToMaybe($identityConversionFunction)(parameters.minCount).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.minCount.type, value)),
|
|
1334
|
-
minExclusive: $convertToMaybe($convertToLiteral)(parameters.minExclusive).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.minExclusive.type, value)),
|
|
1335
|
-
minInclusive: $convertToMaybe($convertToLiteral)(parameters.minInclusive).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.minInclusive.type, value)),
|
|
1336
|
-
minLength: $convertToMaybe($identityConversionFunction)(parameters.minLength).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.minLength.type, value)),
|
|
1337
|
-
mutable: $convertToMaybe($identityConversionFunction)(parameters.mutable).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.mutable.type, value)),
|
|
1338
|
-
name: $convertToMaybe($identityConversionFunction)(parameters.name).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.name.type, value)),
|
|
1339
|
-
node: $convertToMaybe($identityConversionFunction)(parameters.node).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.node.type, value)),
|
|
1340
|
-
nodeKind: $convertToMaybe(($
|
|
1341
|
-
not: $convertToScalarSet($identityConversionFunction
|
|
1342
|
-
or: $convertToMaybe($convertToList($identityConversionFunction
|
|
1343
|
-
order: $convertToMaybe($identityConversionFunction)(parameters.order).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.order.type, value)),
|
|
1679
|
+
$identifier: $convertToIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
|
|
1680
|
+
and: $convertToMaybe($convertToList($identityConversionFunction))(parameters.and, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.and.type, value)),
|
|
1681
|
+
class_: $convertToScalarSet($convertToIri)(parameters.class_, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.class_.type, value)),
|
|
1682
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.comment.type, value)),
|
|
1683
|
+
datatype: $convertToMaybe($convertToIri)(parameters.datatype, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.datatype.type, value)),
|
|
1684
|
+
deactivated: $convertToMaybe($identityConversionFunction)(parameters.deactivated, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.deactivated.type, value)),
|
|
1685
|
+
defaultValue: $convertToMaybe($identityConversionFunction)(parameters.defaultValue, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.defaultValue.type, value)),
|
|
1686
|
+
description: $convertToMaybe($identityConversionFunction)(parameters.description, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.description.type, value)),
|
|
1687
|
+
disjoint: $convertToScalarSet($convertToIri)(parameters.disjoint, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_PropertyShape.schema.properties.disjoint.type, value)),
|
|
1688
|
+
display: $convertWithDefaultValue($identityConversionFunction, false)(parameters.display, parameters.$defaultNamespace),
|
|
1689
|
+
equals: $convertToScalarSet($convertToIri)(parameters.equals, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_PropertyShape.schema.properties.equals.type, value)),
|
|
1690
|
+
flags: $convertToMaybe($identityConversionFunction)(parameters.flags, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.flags.type, value)),
|
|
1691
|
+
groups: $convertToScalarSet($identityConversionFunction)(parameters.groups, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_PropertyShape.schema.properties.groups.type, value)),
|
|
1692
|
+
hasValues: $convertToScalarSet($identityConversionFunction)(parameters.hasValues, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.hasValues.type, value)),
|
|
1693
|
+
ignore: $convertWithDefaultValue($identityConversionFunction, false)(parameters.ignore, parameters.$defaultNamespace),
|
|
1694
|
+
in_: $convertToMaybe($convertToList($identityConversionFunction))(parameters.in_, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.in_.type, value)),
|
|
1695
|
+
isDefinedBy: $convertToMaybe($identityConversionFunction)(parameters.isDefinedBy, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.isDefinedBy.type, value)),
|
|
1696
|
+
label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(owl_Ontology.schema.properties.label.type, value)),
|
|
1697
|
+
languageIn: $convertToMaybe($convertToList($identityConversionFunction))(parameters.languageIn, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.languageIn.type, value)),
|
|
1698
|
+
lessThan: $convertToScalarSet($convertToIri)(parameters.lessThan, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_PropertyShape.schema.properties.lessThan.type, value)),
|
|
1699
|
+
lessThanOrEquals: $convertToScalarSet($convertToIri)(parameters.lessThanOrEquals, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_PropertyShape.schema.properties.lessThanOrEquals.type, value)),
|
|
1700
|
+
maxCount: $convertToMaybe($identityConversionFunction)(parameters.maxCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.maxCount.type, value)),
|
|
1701
|
+
maxExclusive: $convertToMaybe($convertToLiteral)(parameters.maxExclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.maxExclusive.type, value)),
|
|
1702
|
+
maxInclusive: $convertToMaybe($convertToLiteral)(parameters.maxInclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.maxInclusive.type, value)),
|
|
1703
|
+
maxLength: $convertToMaybe($identityConversionFunction)(parameters.maxLength, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.maxLength.type, value)),
|
|
1704
|
+
message: $convertToMaybe($identityConversionFunction)(parameters.message, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.message.type, value)),
|
|
1705
|
+
minCount: $convertToMaybe($identityConversionFunction)(parameters.minCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.minCount.type, value)),
|
|
1706
|
+
minExclusive: $convertToMaybe($convertToLiteral)(parameters.minExclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.minExclusive.type, value)),
|
|
1707
|
+
minInclusive: $convertToMaybe($convertToLiteral)(parameters.minInclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.minInclusive.type, value)),
|
|
1708
|
+
minLength: $convertToMaybe($identityConversionFunction)(parameters.minLength, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.minLength.type, value)),
|
|
1709
|
+
mutable: $convertToMaybe($identityConversionFunction)(parameters.mutable, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.mutable.type, value)),
|
|
1710
|
+
name: $convertToMaybe($identityConversionFunction)(parameters.name, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.name.type, value)),
|
|
1711
|
+
node: $convertToMaybe($identityConversionFunction)(parameters.node, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.node.type, value)),
|
|
1712
|
+
nodeKind: $convertToMaybe(($convertToInIri))(parameters.nodeKind, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.nodeKind.type, value)),
|
|
1713
|
+
not: $convertToScalarSet($identityConversionFunction)(parameters.not, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.not.type, value)),
|
|
1714
|
+
or: $convertToMaybe($convertToList($identityConversionFunction))(parameters.or, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.or.type, value)),
|
|
1715
|
+
order: $convertToMaybe($identityConversionFunction)(parameters.order, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.order.type, value)),
|
|
1344
1716
|
path: Either.of(parameters.path),
|
|
1345
|
-
pattern: $convertToMaybe($identityConversionFunction)(parameters.pattern).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.pattern.type, value)),
|
|
1346
|
-
qualifiedMaxCount: $convertToMaybe($identityConversionFunction)(parameters.qualifiedMaxCount).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.qualifiedMaxCount.type, value)),
|
|
1347
|
-
qualifiedMinCount: $convertToMaybe($identityConversionFunction)(parameters.qualifiedMinCount).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.qualifiedMinCount.type, value)),
|
|
1348
|
-
qualifiedValueShape: $convertToMaybe($convertToIdentifier)(parameters.qualifiedValueShape).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.qualifiedValueShape.type, value)),
|
|
1349
|
-
qualifiedValueShapesDisjoint: $convertToMaybe($identityConversionFunction)(parameters.qualifiedValueShapesDisjoint).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.qualifiedValueShapesDisjoint.type, value)),
|
|
1350
|
-
resolve: $convertToMaybe($convertToIdentifier)(parameters.resolve).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.resolve.type, value)),
|
|
1351
|
-
severity: $convertToMaybe(($
|
|
1352
|
-
shaclmateName: $convertToMaybe($identityConversionFunction)(parameters.shaclmateName).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.shaclmateName.type, value)),
|
|
1353
|
-
targetClasses: $convertToScalarSet(
|
|
1354
|
-
targetNodes: $convertToScalarSet($identityConversionFunction
|
|
1355
|
-
targetObjectsOf: $convertToScalarSet(
|
|
1356
|
-
targetSubjectsOf: $convertToScalarSet(
|
|
1357
|
-
uniqueLang: $convertToMaybe($identityConversionFunction)(parameters.uniqueLang).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.uniqueLang.type, value)),
|
|
1358
|
-
xone: $convertToMaybe($convertToList($identityConversionFunction
|
|
1717
|
+
pattern: $convertToMaybe($identityConversionFunction)(parameters.pattern, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.pattern.type, value)),
|
|
1718
|
+
qualifiedMaxCount: $convertToMaybe($identityConversionFunction)(parameters.qualifiedMaxCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.qualifiedMaxCount.type, value)),
|
|
1719
|
+
qualifiedMinCount: $convertToMaybe($identityConversionFunction)(parameters.qualifiedMinCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.qualifiedMinCount.type, value)),
|
|
1720
|
+
qualifiedValueShape: $convertToMaybe($convertToIdentifier)(parameters.qualifiedValueShape, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.qualifiedValueShape.type, value)),
|
|
1721
|
+
qualifiedValueShapesDisjoint: $convertToMaybe($identityConversionFunction)(parameters.qualifiedValueShapesDisjoint, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.qualifiedValueShapesDisjoint.type, value)),
|
|
1722
|
+
resolve: $convertToMaybe($convertToIdentifier)(parameters.resolve, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.resolve.type, value)),
|
|
1723
|
+
severity: $convertToMaybe(($convertToInIri))(parameters.severity, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.severity.type, value)),
|
|
1724
|
+
shaclmateName: $convertToMaybe($identityConversionFunction)(parameters.shaclmateName, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_NodeShape.schema.properties.shaclmateName.type, value)),
|
|
1725
|
+
targetClasses: $convertToScalarSet($convertToIri)(parameters.targetClasses, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.targetClasses.type, value)),
|
|
1726
|
+
targetNodes: $convertToScalarSet($identityConversionFunction)(parameters.targetNodes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.targetNodes.type, value)),
|
|
1727
|
+
targetObjectsOf: $convertToScalarSet($convertToIri)(parameters.targetObjectsOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.targetObjectsOf.type, value)),
|
|
1728
|
+
targetSubjectsOf: $convertToScalarSet($convertToIri)(parameters.targetSubjectsOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.targetSubjectsOf.type, value)),
|
|
1729
|
+
uniqueLang: $convertToMaybe($identityConversionFunction)(parameters.uniqueLang, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(sh_PropertyShape.schema.properties.uniqueLang.type, value)),
|
|
1730
|
+
xone: $convertToMaybe($convertToList($identityConversionFunction))(parameters.xone, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(sh_NodeShape.schema.properties.xone.type, value)),
|
|
1359
1731
|
})
|
|
1360
1732
|
.map((properties) => ({
|
|
1361
1733
|
...properties,
|
|
@@ -1842,14 +2214,7 @@ export var sh_PropertyShape;
|
|
|
1842
2214
|
return {
|
|
1843
2215
|
kind: "Option",
|
|
1844
2216
|
get itemType() {
|
|
1845
|
-
return
|
|
1846
|
-
kind: "Iri",
|
|
1847
|
-
in: [
|
|
1848
|
-
dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
|
|
1849
|
-
dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
|
|
1850
|
-
dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
|
|
1851
|
-
],
|
|
1852
|
-
};
|
|
2217
|
+
return sh_Severity.schema;
|
|
1853
2218
|
},
|
|
1854
2219
|
};
|
|
1855
2220
|
},
|
|
@@ -1930,390 +2295,125 @@ export var sh_PropertyShape;
|
|
|
1930
2295
|
dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape"),
|
|
1931
2296
|
],
|
|
1932
2297
|
};
|
|
1933
|
-
sh_PropertyShape.
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
}), parameters.graph);
|
|
1967
|
-
if (itemIndex + 1 === list.length) {
|
|
1968
|
-
currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
|
|
1969
|
-
}
|
|
1970
|
-
return { currentSubListResource, listResource };
|
|
1971
|
-
}, {
|
|
1972
|
-
currentSubListResource: null,
|
|
1973
|
-
listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
|
|
1974
|
-
}).listResource.identifier
|
|
1975
|
-
: $RdfVocabularies.rdf.nil,
|
|
1976
|
-
]), parameters.graph);
|
|
1977
|
-
parameters.resource.add(sh_NodeShape.schema.properties.class_.path, parameters.object.class_.flatMap((item) => [item]), parameters.graph);
|
|
1978
|
-
parameters.resource.add(owl_Ontology.schema.properties.comment.path, parameters.object.comment
|
|
1979
|
-
.toList()
|
|
1980
|
-
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1981
|
-
parameters.resource.add(sh_NodeShape.schema.properties.datatype.path, parameters.object.datatype.toList(), parameters.graph);
|
|
1982
|
-
parameters.resource.add(sh_NodeShape.schema.properties.deactivated.path, parameters.object.deactivated
|
|
1983
|
-
.toList()
|
|
1984
|
-
.flatMap((value) => [
|
|
1985
|
-
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
1986
|
-
]), parameters.graph);
|
|
1987
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.defaultValue.path, parameters.object.defaultValue.toList(), parameters.graph);
|
|
1988
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.description.path, parameters.object.description
|
|
1989
|
-
.toList()
|
|
1990
|
-
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1991
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.disjoint.path, parameters.object.disjoint.flatMap((item) => [item]), parameters.graph);
|
|
1992
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.display.path, $strictEquals(parameters.object.display, false).isLeft()
|
|
1993
|
-
? [
|
|
1994
|
-
$literalFactory.boolean(parameters.object.display, $RdfVocabularies.xsd.boolean),
|
|
1995
|
-
]
|
|
1996
|
-
: [], parameters.graph);
|
|
1997
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.equals.path, parameters.object.equals.flatMap((item) => [item]), parameters.graph);
|
|
1998
|
-
parameters.resource.add(sh_NodeShape.schema.properties.flags.path, parameters.object.flags
|
|
1999
|
-
.toList()
|
|
2000
|
-
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
2001
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.groups.path, parameters.object.groups.flatMap((item) => ((value, _options) => {
|
|
2002
|
-
if (value["termType"] === "NamedNode") {
|
|
2003
|
-
return [value];
|
|
2004
|
-
}
|
|
2005
|
-
if (sh_PropertyGroup.issh_PropertyGroup(value)) {
|
|
2006
|
-
return [
|
|
2007
|
-
sh_PropertyGroup.toRdfResource(value, {
|
|
2008
|
-
graph: _options.graph,
|
|
2009
|
-
resourceSet: _options.resourceSet,
|
|
2010
|
-
}).identifier,
|
|
2011
|
-
];
|
|
2012
|
-
}
|
|
2013
|
-
throw new Error("unable to serialize to RDF");
|
|
2014
|
-
})(item, {
|
|
2015
|
-
graph: parameters.graph,
|
|
2016
|
-
resource: parameters.resource,
|
|
2017
|
-
resourceSet: parameters.resourceSet,
|
|
2018
|
-
propertyPath: sh_PropertyShape.schema.properties.groups.path,
|
|
2019
|
-
})), parameters.graph);
|
|
2020
|
-
parameters.resource.add(sh_NodeShape.schema.properties.hasValues.path, parameters.object.hasValues.flatMap((item) => [item]), parameters.graph);
|
|
2021
|
-
parameters.resource.add(sh_NodeShape.schema.properties.ignore.path, $strictEquals(parameters.object.ignore, false).isLeft()
|
|
2022
|
-
? [
|
|
2023
|
-
$literalFactory.boolean(parameters.object.ignore, $RdfVocabularies.xsd.boolean),
|
|
2024
|
-
]
|
|
2025
|
-
: [], parameters.graph);
|
|
2026
|
-
parameters.resource.add(sh_NodeShape.schema.properties.in_.path, parameters.object.in_.toList().flatMap((value) => [
|
|
2027
|
-
value.length > 0
|
|
2028
|
-
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
2029
|
-
if (itemIndex === 0) {
|
|
2030
|
-
currentSubListResource = listResource;
|
|
2031
|
-
}
|
|
2032
|
-
else {
|
|
2033
|
-
const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
|
|
2034
|
-
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
|
|
2035
|
-
currentSubListResource = newSubListResource;
|
|
2036
|
-
}
|
|
2037
|
-
currentSubListResource.add($RdfVocabularies.rdf.first, [item], parameters.graph);
|
|
2038
|
-
if (itemIndex + 1 === list.length) {
|
|
2039
|
-
currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
|
|
2040
|
-
}
|
|
2041
|
-
return { currentSubListResource, listResource };
|
|
2042
|
-
}, {
|
|
2043
|
-
currentSubListResource: null,
|
|
2044
|
-
listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
|
|
2045
|
-
}).listResource.identifier
|
|
2046
|
-
: $RdfVocabularies.rdf.nil,
|
|
2047
|
-
]), parameters.graph);
|
|
2048
|
-
parameters.resource.add(sh_NodeShape.schema.properties.isDefinedBy.path, parameters.object.isDefinedBy.toList().flatMap((value) => ((value, _options) => {
|
|
2049
|
-
if (value["termType"] === "NamedNode") {
|
|
2050
|
-
return [value];
|
|
2298
|
+
sh_PropertyShape.toRdfResource = $wrap_ToRdfResourceFunction(sh_PropertyShape._toRdfResource);
|
|
2299
|
+
sh_PropertyShape.toStringRecord = (_shPropertyShape) => $compactRecord({
|
|
2300
|
+
$identifier: _shPropertyShape.$identifier().toString(),
|
|
2301
|
+
label: _shPropertyShape.label.map((item) => item.toString()).extract(),
|
|
2302
|
+
name: _shPropertyShape.name.map((item) => item.toString()).extract(),
|
|
2303
|
+
path: $PropertyPath.$toString(_shPropertyShape.path),
|
|
2304
|
+
shaclmateName: _shPropertyShape.shaclmateName
|
|
2305
|
+
.map((item) => item.toString())
|
|
2306
|
+
.extract(),
|
|
2307
|
+
});
|
|
2308
|
+
})(sh_PropertyShape || (sh_PropertyShape = {}));
|
|
2309
|
+
export var sh_Severity;
|
|
2310
|
+
(function (sh_Severity) {
|
|
2311
|
+
const inValues = [
|
|
2312
|
+
"http://www.w3.org/ns/shacl#Info",
|
|
2313
|
+
"http://www.w3.org/ns/shacl#Warning",
|
|
2314
|
+
"http://www.w3.org/ns/shacl#Violation",
|
|
2315
|
+
];
|
|
2316
|
+
sh_Severity.schema = {
|
|
2317
|
+
kind: "Iri",
|
|
2318
|
+
in: inValues.map((inValue) => dataFactory.namedNode(inValue)),
|
|
2319
|
+
inValues,
|
|
2320
|
+
};
|
|
2321
|
+
})(sh_Severity || (sh_Severity = {}));
|
|
2322
|
+
export var skos_Concept;
|
|
2323
|
+
(function (skos_Concept) {
|
|
2324
|
+
skos_Concept._toRdfResource = (parameters) => {
|
|
2325
|
+
if (!parameters.ignoreRdfType) {
|
|
2326
|
+
parameters.resource.add($RdfVocabularies.rdf.type, skos_Concept.schema.toRdfTypes, parameters.graph);
|
|
2327
|
+
}
|
|
2328
|
+
parameters.resource.add(skos_Concept.schema.properties.altLabel.path, parameters.object.altLabel.flatMap((item) => ((value, _options) => {
|
|
2329
|
+
if (typeof value === "string") {
|
|
2330
|
+
return [$literalFactory.string(value)];
|
|
2051
2331
|
}
|
|
2052
|
-
if (
|
|
2053
|
-
return [
|
|
2054
|
-
owl_Ontology.toRdfResource(value, {
|
|
2055
|
-
graph: _options.graph,
|
|
2056
|
-
resourceSet: _options.resourceSet,
|
|
2057
|
-
}).identifier,
|
|
2058
|
-
];
|
|
2332
|
+
if (typeof value === "object") {
|
|
2333
|
+
return [value];
|
|
2059
2334
|
}
|
|
2060
2335
|
throw new Error("unable to serialize to RDF");
|
|
2061
|
-
})(
|
|
2336
|
+
})(item, {
|
|
2062
2337
|
graph: parameters.graph,
|
|
2063
2338
|
resource: parameters.resource,
|
|
2064
2339
|
resourceSet: parameters.resourceSet,
|
|
2065
|
-
propertyPath:
|
|
2340
|
+
propertyPath: skos_Concept.schema.properties.altLabel.path,
|
|
2066
2341
|
})), parameters.graph);
|
|
2067
|
-
parameters.resource.add(
|
|
2068
|
-
.toList()
|
|
2069
|
-
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
2070
|
-
parameters.resource.add(sh_NodeShape.schema.properties.languageIn.path, parameters.object.languageIn.toList().flatMap((value) => [
|
|
2071
|
-
value.length > 0
|
|
2072
|
-
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
2073
|
-
if (itemIndex === 0) {
|
|
2074
|
-
currentSubListResource = listResource;
|
|
2075
|
-
}
|
|
2076
|
-
else {
|
|
2077
|
-
const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
|
|
2078
|
-
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
|
|
2079
|
-
currentSubListResource = newSubListResource;
|
|
2080
|
-
}
|
|
2081
|
-
currentSubListResource.add($RdfVocabularies.rdf.first, [$literalFactory.string(item)], parameters.graph);
|
|
2082
|
-
if (itemIndex + 1 === list.length) {
|
|
2083
|
-
currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
|
|
2084
|
-
}
|
|
2085
|
-
return { currentSubListResource, listResource };
|
|
2086
|
-
}, {
|
|
2087
|
-
currentSubListResource: null,
|
|
2088
|
-
listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
|
|
2089
|
-
}).listResource.identifier
|
|
2090
|
-
: $RdfVocabularies.rdf.nil,
|
|
2091
|
-
]), parameters.graph);
|
|
2092
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.lessThan.path, parameters.object.lessThan.flatMap((item) => [item]), parameters.graph);
|
|
2093
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.lessThanOrEquals.path, parameters.object.lessThanOrEquals.flatMap((item) => [item]), parameters.graph);
|
|
2094
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.maxCount.path, parameters.object.maxCount
|
|
2095
|
-
.toList()
|
|
2096
|
-
.flatMap((value) => [
|
|
2097
|
-
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
2098
|
-
]), parameters.graph);
|
|
2099
|
-
parameters.resource.add(sh_NodeShape.schema.properties.maxExclusive.path, parameters.object.maxExclusive.toList(), parameters.graph);
|
|
2100
|
-
parameters.resource.add(sh_NodeShape.schema.properties.maxInclusive.path, parameters.object.maxInclusive.toList(), parameters.graph);
|
|
2101
|
-
parameters.resource.add(sh_NodeShape.schema.properties.maxLength.path, parameters.object.maxLength
|
|
2102
|
-
.toList()
|
|
2103
|
-
.flatMap((value) => [
|
|
2104
|
-
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
2105
|
-
]), parameters.graph);
|
|
2106
|
-
parameters.resource.add(sh_NodeShape.schema.properties.message.path, parameters.object.message
|
|
2107
|
-
.toList()
|
|
2108
|
-
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
2109
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.minCount.path, parameters.object.minCount
|
|
2110
|
-
.toList()
|
|
2111
|
-
.flatMap((value) => [
|
|
2112
|
-
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
2113
|
-
]), parameters.graph);
|
|
2114
|
-
parameters.resource.add(sh_NodeShape.schema.properties.minExclusive.path, parameters.object.minExclusive.toList(), parameters.graph);
|
|
2115
|
-
parameters.resource.add(sh_NodeShape.schema.properties.minInclusive.path, parameters.object.minInclusive.toList(), parameters.graph);
|
|
2116
|
-
parameters.resource.add(sh_NodeShape.schema.properties.minLength.path, parameters.object.minLength
|
|
2117
|
-
.toList()
|
|
2118
|
-
.flatMap((value) => [
|
|
2119
|
-
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
2120
|
-
]), parameters.graph);
|
|
2121
|
-
parameters.resource.add(sh_NodeShape.schema.properties.mutable.path, parameters.object.mutable
|
|
2122
|
-
.toList()
|
|
2123
|
-
.flatMap((value) => [
|
|
2124
|
-
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
2125
|
-
]), parameters.graph);
|
|
2126
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.name.path, parameters.object.name
|
|
2127
|
-
.toList()
|
|
2128
|
-
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
2129
|
-
parameters.resource.add(sh_NodeShape.schema.properties.node.path, parameters.object.node.toList().flatMap((value) => ((value, _options) => {
|
|
2342
|
+
parameters.resource.add(skos_Concept.schema.properties.broader.path, parameters.object.broader.flatMap((item) => ((value, _options) => {
|
|
2130
2343
|
if (value["termType"] === "NamedNode") {
|
|
2131
2344
|
return [value];
|
|
2132
2345
|
}
|
|
2133
|
-
if (
|
|
2346
|
+
if (skos_Concept.isskos_Concept(value)) {
|
|
2134
2347
|
return [
|
|
2135
|
-
|
|
2348
|
+
skos_Concept.toRdfResource(value, {
|
|
2136
2349
|
graph: _options.graph,
|
|
2137
2350
|
resourceSet: _options.resourceSet,
|
|
2138
2351
|
}).identifier,
|
|
2139
2352
|
];
|
|
2140
2353
|
}
|
|
2141
2354
|
throw new Error("unable to serialize to RDF");
|
|
2142
|
-
})(
|
|
2355
|
+
})(item, {
|
|
2143
2356
|
graph: parameters.graph,
|
|
2144
2357
|
resource: parameters.resource,
|
|
2145
2358
|
resourceSet: parameters.resourceSet,
|
|
2146
|
-
propertyPath:
|
|
2359
|
+
propertyPath: skos_Concept.schema.properties.broader.path,
|
|
2147
2360
|
})), parameters.graph);
|
|
2148
|
-
parameters.resource.add(
|
|
2149
|
-
|
|
2150
|
-
|
|
2361
|
+
parameters.resource.add(skos_Concept.schema.properties.definition.path, parameters.object.definition.flatMap((item) => ((value, _options) => {
|
|
2362
|
+
if (typeof value === "string") {
|
|
2363
|
+
return [$literalFactory.string(value)];
|
|
2364
|
+
}
|
|
2365
|
+
if (typeof value === "object") {
|
|
2151
2366
|
return [value];
|
|
2152
2367
|
}
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2368
|
+
throw new Error("unable to serialize to RDF");
|
|
2369
|
+
})(item, {
|
|
2370
|
+
graph: parameters.graph,
|
|
2371
|
+
resource: parameters.resource,
|
|
2372
|
+
resourceSet: parameters.resourceSet,
|
|
2373
|
+
propertyPath: skos_Concept.schema.properties.definition.path,
|
|
2374
|
+
})), parameters.graph);
|
|
2375
|
+
parameters.resource.add(skos_Concept.schema.properties.hiddenLabel.path, parameters.object.hiddenLabel.flatMap((item) => ((value, _options) => {
|
|
2376
|
+
if (typeof value === "string") {
|
|
2377
|
+
return [$literalFactory.string(value)];
|
|
2378
|
+
}
|
|
2379
|
+
if (typeof value === "object") {
|
|
2380
|
+
return [value];
|
|
2160
2381
|
}
|
|
2161
2382
|
throw new Error("unable to serialize to RDF");
|
|
2162
2383
|
})(item, {
|
|
2163
2384
|
graph: parameters.graph,
|
|
2164
2385
|
resource: parameters.resource,
|
|
2165
2386
|
resourceSet: parameters.resourceSet,
|
|
2166
|
-
propertyPath:
|
|
2387
|
+
propertyPath: skos_Concept.schema.properties.hiddenLabel.path,
|
|
2167
2388
|
})), parameters.graph);
|
|
2168
|
-
parameters.resource.add(
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
return sh_Shape.toRdfResourceValues(value, {
|
|
2185
|
-
graph: _options.graph,
|
|
2186
|
-
propertyPath: _options.propertyPath,
|
|
2187
|
-
resource: _options.resource,
|
|
2188
|
-
resourceSet: _options.resourceSet,
|
|
2189
|
-
});
|
|
2190
|
-
}
|
|
2191
|
-
throw new Error("unable to serialize to RDF");
|
|
2192
|
-
})(item, {
|
|
2193
|
-
graph: parameters.graph,
|
|
2194
|
-
propertyPath: $RdfVocabularies.rdf.first,
|
|
2195
|
-
resource: currentSubListResource,
|
|
2196
|
-
resourceSet: parameters.resourceSet,
|
|
2197
|
-
}), parameters.graph);
|
|
2198
|
-
if (itemIndex + 1 === list.length) {
|
|
2199
|
-
currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
|
|
2200
|
-
}
|
|
2201
|
-
return { currentSubListResource, listResource };
|
|
2202
|
-
}, {
|
|
2203
|
-
currentSubListResource: null,
|
|
2204
|
-
listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
|
|
2205
|
-
}).listResource.identifier
|
|
2206
|
-
: $RdfVocabularies.rdf.nil,
|
|
2207
|
-
]), parameters.graph);
|
|
2208
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.order.path, parameters.object.order
|
|
2209
|
-
.toList()
|
|
2210
|
-
.flatMap((value) => [
|
|
2211
|
-
$literalFactory.number(value, $RdfVocabularies.xsd.double),
|
|
2212
|
-
]), parameters.graph);
|
|
2213
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.path.path, [
|
|
2214
|
-
$PropertyPath.toRdfResource(parameters.object.path, {
|
|
2215
|
-
graph: parameters.graph,
|
|
2216
|
-
resourceSet: parameters.resourceSet,
|
|
2217
|
-
}).identifier,
|
|
2218
|
-
], parameters.graph);
|
|
2219
|
-
parameters.resource.add(sh_NodeShape.schema.properties.pattern.path, parameters.object.pattern
|
|
2220
|
-
.toList()
|
|
2221
|
-
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
2222
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.qualifiedMaxCount.path, parameters.object.qualifiedMaxCount
|
|
2223
|
-
.toList()
|
|
2224
|
-
.flatMap((value) => [
|
|
2225
|
-
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
2226
|
-
]), parameters.graph);
|
|
2227
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.qualifiedMinCount.path, parameters.object.qualifiedMinCount
|
|
2228
|
-
.toList()
|
|
2229
|
-
.flatMap((value) => [
|
|
2230
|
-
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
2231
|
-
]), parameters.graph);
|
|
2232
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.qualifiedValueShape.path, parameters.object.qualifiedValueShape.toList(), parameters.graph);
|
|
2233
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.qualifiedValueShapesDisjoint.path, parameters.object.qualifiedValueShapesDisjoint
|
|
2234
|
-
.toList()
|
|
2235
|
-
.flatMap((value) => [
|
|
2236
|
-
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
2237
|
-
]), parameters.graph);
|
|
2238
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.resolve.path, parameters.object.resolve.toList(), parameters.graph);
|
|
2239
|
-
parameters.resource.add(sh_NodeShape.schema.properties.severity.path, parameters.object.severity.toList(), parameters.graph);
|
|
2240
|
-
parameters.resource.add(sh_NodeShape.schema.properties.shaclmateName.path, parameters.object.shaclmateName
|
|
2241
|
-
.toList()
|
|
2242
|
-
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
2243
|
-
parameters.resource.add(sh_NodeShape.schema.properties.targetClasses.path, parameters.object.targetClasses.flatMap((item) => [item]), parameters.graph);
|
|
2244
|
-
parameters.resource.add(sh_NodeShape.schema.properties.targetNodes.path, parameters.object.targetNodes.flatMap((item) => [item]), parameters.graph);
|
|
2245
|
-
parameters.resource.add(sh_NodeShape.schema.properties.targetObjectsOf.path, parameters.object.targetObjectsOf.flatMap((item) => [item]), parameters.graph);
|
|
2246
|
-
parameters.resource.add(sh_NodeShape.schema.properties.targetSubjectsOf.path, parameters.object.targetSubjectsOf.flatMap((item) => [item]), parameters.graph);
|
|
2247
|
-
parameters.resource.add(sh_PropertyShape.schema.properties.uniqueLang.path, parameters.object.uniqueLang
|
|
2248
|
-
.toList()
|
|
2249
|
-
.flatMap((value) => [
|
|
2250
|
-
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
2251
|
-
]), parameters.graph);
|
|
2252
|
-
parameters.resource.add(sh_NodeShape.schema.properties.xone.path, parameters.object.xone.toList().flatMap((value) => [
|
|
2253
|
-
value.length > 0
|
|
2254
|
-
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
2255
|
-
if (itemIndex === 0) {
|
|
2256
|
-
currentSubListResource = listResource;
|
|
2257
|
-
}
|
|
2258
|
-
else {
|
|
2259
|
-
const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
|
|
2260
|
-
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
|
|
2261
|
-
currentSubListResource = newSubListResource;
|
|
2262
|
-
}
|
|
2263
|
-
currentSubListResource.add($RdfVocabularies.rdf.first, ((value, _options) => {
|
|
2264
|
-
if (value["termType"] === "NamedNode") {
|
|
2265
|
-
return [value];
|
|
2266
|
-
}
|
|
2267
|
-
if (sh_Shape.issh_Shape(value)) {
|
|
2268
|
-
return sh_Shape.toRdfResourceValues(value, {
|
|
2269
|
-
graph: _options.graph,
|
|
2270
|
-
propertyPath: _options.propertyPath,
|
|
2271
|
-
resource: _options.resource,
|
|
2272
|
-
resourceSet: _options.resourceSet,
|
|
2273
|
-
});
|
|
2274
|
-
}
|
|
2275
|
-
throw new Error("unable to serialize to RDF");
|
|
2276
|
-
})(item, {
|
|
2277
|
-
graph: parameters.graph,
|
|
2278
|
-
propertyPath: $RdfVocabularies.rdf.first,
|
|
2279
|
-
resource: currentSubListResource,
|
|
2280
|
-
resourceSet: parameters.resourceSet,
|
|
2281
|
-
}), parameters.graph);
|
|
2282
|
-
if (itemIndex + 1 === list.length) {
|
|
2283
|
-
currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
|
|
2284
|
-
}
|
|
2285
|
-
return { currentSubListResource, listResource };
|
|
2286
|
-
}, {
|
|
2287
|
-
currentSubListResource: null,
|
|
2288
|
-
listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
|
|
2289
|
-
}).listResource.identifier
|
|
2290
|
-
: $RdfVocabularies.rdf.nil,
|
|
2291
|
-
]), parameters.graph);
|
|
2389
|
+
parameters.resource.add(skos_Concept.schema.properties.notation.path, parameters.object.notation.flatMap((item) => [item]), parameters.graph);
|
|
2390
|
+
parameters.resource.add(skos_Concept.schema.properties.prefLabel.path, parameters.object.prefLabel.flatMap((item) => ((value, _options) => {
|
|
2391
|
+
if (typeof value === "string") {
|
|
2392
|
+
return [$literalFactory.string(value)];
|
|
2393
|
+
}
|
|
2394
|
+
if (typeof value === "object") {
|
|
2395
|
+
return [value];
|
|
2396
|
+
}
|
|
2397
|
+
throw new Error("unable to serialize to RDF");
|
|
2398
|
+
})(item, {
|
|
2399
|
+
graph: parameters.graph,
|
|
2400
|
+
resource: parameters.resource,
|
|
2401
|
+
resourceSet: parameters.resourceSet,
|
|
2402
|
+
propertyPath: skos_Concept.schema.properties.prefLabel.path,
|
|
2403
|
+
})), parameters.graph);
|
|
2404
|
+
parameters.resource.add(sh_NodeShape.schema.properties.type.path, parameters.object.type.flatMap((item) => [item]), parameters.graph);
|
|
2292
2405
|
return parameters.resource;
|
|
2293
2406
|
};
|
|
2294
|
-
|
|
2295
|
-
sh_PropertyShape.$toString = (_shPropertyShape) => `sh_PropertyShape(${JSON.stringify(sh_PropertyShape.toStringRecord(_shPropertyShape))})`;
|
|
2296
|
-
sh_PropertyShape.toStringRecord = (_shPropertyShape) => $compactRecord({
|
|
2297
|
-
$identifier: _shPropertyShape.$identifier().toString(),
|
|
2298
|
-
label: _shPropertyShape.label.map((item) => item.toString()).extract(),
|
|
2299
|
-
name: _shPropertyShape.name.map((item) => item.toString()).extract(),
|
|
2300
|
-
path: $PropertyPath.$toString(_shPropertyShape.path),
|
|
2301
|
-
shaclmateName: _shPropertyShape.shaclmateName
|
|
2302
|
-
.map((item) => item.toString())
|
|
2303
|
-
.extract(),
|
|
2304
|
-
});
|
|
2305
|
-
})(sh_PropertyShape || (sh_PropertyShape = {}));
|
|
2306
|
-
export var skos_Concept;
|
|
2307
|
-
(function (skos_Concept) {
|
|
2407
|
+
skos_Concept.$toString = (_skosConcept) => `skos_Concept(${JSON.stringify(skos_Concept.toStringRecord(_skosConcept))})`;
|
|
2308
2408
|
skos_Concept.create = (parameters) => $sequenceRecord({
|
|
2309
|
-
$identifier: $convertToIriIdentifierProperty(parameters.$identifier),
|
|
2310
|
-
altLabel: $convertToScalarSet($identityConversionFunction
|
|
2311
|
-
broader: $convertToScalarSet($identityConversionFunction
|
|
2312
|
-
definition: $convertToScalarSet($identityConversionFunction
|
|
2313
|
-
hiddenLabel: $convertToScalarSet($identityConversionFunction
|
|
2314
|
-
notation: $convertToScalarSet($convertToLiteral
|
|
2315
|
-
prefLabel: $convertToScalarSet($identityConversionFunction
|
|
2316
|
-
type: $convertToScalarSet(
|
|
2409
|
+
$identifier: $convertToIriIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
|
|
2410
|
+
altLabel: $convertToScalarSet($identityConversionFunction)(parameters.altLabel, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.altLabel.type, value)),
|
|
2411
|
+
broader: $convertToScalarSet($identityConversionFunction)(parameters.broader, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.broader.type, value)),
|
|
2412
|
+
definition: $convertToScalarSet($identityConversionFunction)(parameters.definition, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.definition.type, value)),
|
|
2413
|
+
hiddenLabel: $convertToScalarSet($identityConversionFunction)(parameters.hiddenLabel, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.hiddenLabel.type, value)),
|
|
2414
|
+
notation: $convertToScalarSet($convertToLiteral)(parameters.notation, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.notation.type, value)),
|
|
2415
|
+
prefLabel: $convertToScalarSet($identityConversionFunction)(parameters.prefLabel, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.prefLabel.type, value)),
|
|
2416
|
+
type: $convertToScalarSet($convertToIri)(parameters.type, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.type.type, value)),
|
|
2317
2417
|
})
|
|
2318
2418
|
.map((properties) => ({
|
|
2319
2419
|
...properties,
|
|
@@ -2454,9 +2554,14 @@ export var skos_Concept;
|
|
|
2454
2554
|
dataFactory.namedNode("http://www.w3.org/2004/02/skos/core#Concept"),
|
|
2455
2555
|
],
|
|
2456
2556
|
};
|
|
2457
|
-
skos_Concept.
|
|
2557
|
+
skos_Concept.toRdfResource = $wrap_ToRdfResourceFunction(skos_Concept._toRdfResource);
|
|
2558
|
+
skos_Concept.toStringRecord = (_skosConcept) => $compactRecord({ $identifier: _skosConcept.$identifier().toString() });
|
|
2559
|
+
})(skos_Concept || (skos_Concept = {}));
|
|
2560
|
+
export var skos_ConceptScheme;
|
|
2561
|
+
(function (skos_ConceptScheme) {
|
|
2562
|
+
skos_ConceptScheme._toRdfResource = (parameters) => {
|
|
2458
2563
|
if (!parameters.ignoreRdfType) {
|
|
2459
|
-
parameters.resource.add($RdfVocabularies.rdf.type,
|
|
2564
|
+
parameters.resource.add($RdfVocabularies.rdf.type, skos_ConceptScheme.schema.toRdfTypes, parameters.graph);
|
|
2460
2565
|
}
|
|
2461
2566
|
parameters.resource.add(skos_Concept.schema.properties.altLabel.path, parameters.object.altLabel.flatMap((item) => ((value, _options) => {
|
|
2462
2567
|
if (typeof value === "string") {
|
|
@@ -2472,7 +2577,7 @@ export var skos_Concept;
|
|
|
2472
2577
|
resourceSet: parameters.resourceSet,
|
|
2473
2578
|
propertyPath: skos_Concept.schema.properties.altLabel.path,
|
|
2474
2579
|
})), parameters.graph);
|
|
2475
|
-
parameters.resource.add(
|
|
2580
|
+
parameters.resource.add(skos_ConceptScheme.schema.properties.concepts.path, parameters.object.concepts.flatMap((item) => ((value, _options) => {
|
|
2476
2581
|
if (value["termType"] === "NamedNode") {
|
|
2477
2582
|
return [value];
|
|
2478
2583
|
}
|
|
@@ -2489,7 +2594,7 @@ export var skos_Concept;
|
|
|
2489
2594
|
graph: parameters.graph,
|
|
2490
2595
|
resource: parameters.resource,
|
|
2491
2596
|
resourceSet: parameters.resourceSet,
|
|
2492
|
-
propertyPath:
|
|
2597
|
+
propertyPath: skos_ConceptScheme.schema.properties.concepts.path,
|
|
2493
2598
|
})), parameters.graph);
|
|
2494
2599
|
parameters.resource.add(skos_Concept.schema.properties.definition.path, parameters.object.definition.flatMap((item) => ((value, _options) => {
|
|
2495
2600
|
if (typeof value === "string") {
|
|
@@ -2534,25 +2639,39 @@ export var skos_Concept;
|
|
|
2534
2639
|
resourceSet: parameters.resourceSet,
|
|
2535
2640
|
propertyPath: skos_Concept.schema.properties.prefLabel.path,
|
|
2536
2641
|
})), parameters.graph);
|
|
2642
|
+
parameters.resource.add(skos_ConceptScheme.schema.properties.topConcepts.path, parameters.object.topConcepts.flatMap((item) => ((value, _options) => {
|
|
2643
|
+
if (value["termType"] === "NamedNode") {
|
|
2644
|
+
return [value];
|
|
2645
|
+
}
|
|
2646
|
+
if (skos_Concept.isskos_Concept(value)) {
|
|
2647
|
+
return [
|
|
2648
|
+
skos_Concept.toRdfResource(value, {
|
|
2649
|
+
graph: _options.graph,
|
|
2650
|
+
resourceSet: _options.resourceSet,
|
|
2651
|
+
}).identifier,
|
|
2652
|
+
];
|
|
2653
|
+
}
|
|
2654
|
+
throw new Error("unable to serialize to RDF");
|
|
2655
|
+
})(item, {
|
|
2656
|
+
graph: parameters.graph,
|
|
2657
|
+
resource: parameters.resource,
|
|
2658
|
+
resourceSet: parameters.resourceSet,
|
|
2659
|
+
propertyPath: skos_ConceptScheme.schema.properties.topConcepts.path,
|
|
2660
|
+
})), parameters.graph);
|
|
2537
2661
|
parameters.resource.add(sh_NodeShape.schema.properties.type.path, parameters.object.type.flatMap((item) => [item]), parameters.graph);
|
|
2538
2662
|
return parameters.resource;
|
|
2539
2663
|
};
|
|
2540
|
-
|
|
2541
|
-
skos_Concept.$toString = (_skosConcept) => `skos_Concept(${JSON.stringify(skos_Concept.toStringRecord(_skosConcept))})`;
|
|
2542
|
-
skos_Concept.toStringRecord = (_skosConcept) => $compactRecord({ $identifier: _skosConcept.$identifier().toString() });
|
|
2543
|
-
})(skos_Concept || (skos_Concept = {}));
|
|
2544
|
-
export var skos_ConceptScheme;
|
|
2545
|
-
(function (skos_ConceptScheme) {
|
|
2664
|
+
skos_ConceptScheme.$toString = (_skosConceptScheme) => `skos_ConceptScheme(${JSON.stringify(skos_ConceptScheme.toStringRecord(_skosConceptScheme))})`;
|
|
2546
2665
|
skos_ConceptScheme.create = (parameters) => $sequenceRecord({
|
|
2547
|
-
$identifier: $convertToIriIdentifierProperty(parameters.$identifier),
|
|
2548
|
-
altLabel: $convertToScalarSet($identityConversionFunction
|
|
2549
|
-
concepts: $convertToScalarSet($identityConversionFunction
|
|
2550
|
-
definition: $convertToScalarSet($identityConversionFunction
|
|
2551
|
-
hiddenLabel: $convertToScalarSet($identityConversionFunction
|
|
2552
|
-
notation: $convertToScalarSet($convertToLiteral
|
|
2553
|
-
prefLabel: $convertToScalarSet($identityConversionFunction
|
|
2554
|
-
topConcepts: $convertToScalarSet($identityConversionFunction
|
|
2555
|
-
type: $convertToScalarSet(
|
|
2666
|
+
$identifier: $convertToIriIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
|
|
2667
|
+
altLabel: $convertToScalarSet($identityConversionFunction)(parameters.altLabel, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.altLabel.type, value)),
|
|
2668
|
+
concepts: $convertToScalarSet($identityConversionFunction)(parameters.concepts, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_ConceptScheme.schema.properties.concepts.type, value)),
|
|
2669
|
+
definition: $convertToScalarSet($identityConversionFunction)(parameters.definition, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.definition.type, value)),
|
|
2670
|
+
hiddenLabel: $convertToScalarSet($identityConversionFunction)(parameters.hiddenLabel, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.hiddenLabel.type, value)),
|
|
2671
|
+
notation: $convertToScalarSet($convertToLiteral)(parameters.notation, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.notation.type, value)),
|
|
2672
|
+
prefLabel: $convertToScalarSet($identityConversionFunction)(parameters.prefLabel, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_Concept.schema.properties.prefLabel.type, value)),
|
|
2673
|
+
topConcepts: $convertToScalarSet($identityConversionFunction)(parameters.topConcepts, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(skos_ConceptScheme.schema.properties.topConcepts.type, value)),
|
|
2674
|
+
type: $convertToScalarSet($convertToIri)(parameters.type, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(sh_NodeShape.schema.properties.type.type, value)),
|
|
2556
2675
|
})
|
|
2557
2676
|
.map((properties) => ({
|
|
2558
2677
|
...properties,
|
|
@@ -2723,110 +2842,7 @@ export var skos_ConceptScheme;
|
|
|
2723
2842
|
dataFactory.namedNode("http://www.w3.org/2004/02/skos/core#ConceptScheme"),
|
|
2724
2843
|
],
|
|
2725
2844
|
};
|
|
2726
|
-
skos_ConceptScheme._toRdfResource = (parameters) => {
|
|
2727
|
-
if (!parameters.ignoreRdfType) {
|
|
2728
|
-
parameters.resource.add($RdfVocabularies.rdf.type, skos_ConceptScheme.schema.toRdfTypes, parameters.graph);
|
|
2729
|
-
}
|
|
2730
|
-
parameters.resource.add(skos_Concept.schema.properties.altLabel.path, parameters.object.altLabel.flatMap((item) => ((value, _options) => {
|
|
2731
|
-
if (typeof value === "string") {
|
|
2732
|
-
return [$literalFactory.string(value)];
|
|
2733
|
-
}
|
|
2734
|
-
if (typeof value === "object") {
|
|
2735
|
-
return [value];
|
|
2736
|
-
}
|
|
2737
|
-
throw new Error("unable to serialize to RDF");
|
|
2738
|
-
})(item, {
|
|
2739
|
-
graph: parameters.graph,
|
|
2740
|
-
resource: parameters.resource,
|
|
2741
|
-
resourceSet: parameters.resourceSet,
|
|
2742
|
-
propertyPath: skos_Concept.schema.properties.altLabel.path,
|
|
2743
|
-
})), parameters.graph);
|
|
2744
|
-
parameters.resource.add(skos_ConceptScheme.schema.properties.concepts.path, parameters.object.concepts.flatMap((item) => ((value, _options) => {
|
|
2745
|
-
if (value["termType"] === "NamedNode") {
|
|
2746
|
-
return [value];
|
|
2747
|
-
}
|
|
2748
|
-
if (skos_Concept.isskos_Concept(value)) {
|
|
2749
|
-
return [
|
|
2750
|
-
skos_Concept.toRdfResource(value, {
|
|
2751
|
-
graph: _options.graph,
|
|
2752
|
-
resourceSet: _options.resourceSet,
|
|
2753
|
-
}).identifier,
|
|
2754
|
-
];
|
|
2755
|
-
}
|
|
2756
|
-
throw new Error("unable to serialize to RDF");
|
|
2757
|
-
})(item, {
|
|
2758
|
-
graph: parameters.graph,
|
|
2759
|
-
resource: parameters.resource,
|
|
2760
|
-
resourceSet: parameters.resourceSet,
|
|
2761
|
-
propertyPath: skos_ConceptScheme.schema.properties.concepts.path,
|
|
2762
|
-
})), parameters.graph);
|
|
2763
|
-
parameters.resource.add(skos_Concept.schema.properties.definition.path, parameters.object.definition.flatMap((item) => ((value, _options) => {
|
|
2764
|
-
if (typeof value === "string") {
|
|
2765
|
-
return [$literalFactory.string(value)];
|
|
2766
|
-
}
|
|
2767
|
-
if (typeof value === "object") {
|
|
2768
|
-
return [value];
|
|
2769
|
-
}
|
|
2770
|
-
throw new Error("unable to serialize to RDF");
|
|
2771
|
-
})(item, {
|
|
2772
|
-
graph: parameters.graph,
|
|
2773
|
-
resource: parameters.resource,
|
|
2774
|
-
resourceSet: parameters.resourceSet,
|
|
2775
|
-
propertyPath: skos_Concept.schema.properties.definition.path,
|
|
2776
|
-
})), parameters.graph);
|
|
2777
|
-
parameters.resource.add(skos_Concept.schema.properties.hiddenLabel.path, parameters.object.hiddenLabel.flatMap((item) => ((value, _options) => {
|
|
2778
|
-
if (typeof value === "string") {
|
|
2779
|
-
return [$literalFactory.string(value)];
|
|
2780
|
-
}
|
|
2781
|
-
if (typeof value === "object") {
|
|
2782
|
-
return [value];
|
|
2783
|
-
}
|
|
2784
|
-
throw new Error("unable to serialize to RDF");
|
|
2785
|
-
})(item, {
|
|
2786
|
-
graph: parameters.graph,
|
|
2787
|
-
resource: parameters.resource,
|
|
2788
|
-
resourceSet: parameters.resourceSet,
|
|
2789
|
-
propertyPath: skos_Concept.schema.properties.hiddenLabel.path,
|
|
2790
|
-
})), parameters.graph);
|
|
2791
|
-
parameters.resource.add(skos_Concept.schema.properties.notation.path, parameters.object.notation.flatMap((item) => [item]), parameters.graph);
|
|
2792
|
-
parameters.resource.add(skos_Concept.schema.properties.prefLabel.path, parameters.object.prefLabel.flatMap((item) => ((value, _options) => {
|
|
2793
|
-
if (typeof value === "string") {
|
|
2794
|
-
return [$literalFactory.string(value)];
|
|
2795
|
-
}
|
|
2796
|
-
if (typeof value === "object") {
|
|
2797
|
-
return [value];
|
|
2798
|
-
}
|
|
2799
|
-
throw new Error("unable to serialize to RDF");
|
|
2800
|
-
})(item, {
|
|
2801
|
-
graph: parameters.graph,
|
|
2802
|
-
resource: parameters.resource,
|
|
2803
|
-
resourceSet: parameters.resourceSet,
|
|
2804
|
-
propertyPath: skos_Concept.schema.properties.prefLabel.path,
|
|
2805
|
-
})), parameters.graph);
|
|
2806
|
-
parameters.resource.add(skos_ConceptScheme.schema.properties.topConcepts.path, parameters.object.topConcepts.flatMap((item) => ((value, _options) => {
|
|
2807
|
-
if (value["termType"] === "NamedNode") {
|
|
2808
|
-
return [value];
|
|
2809
|
-
}
|
|
2810
|
-
if (skos_Concept.isskos_Concept(value)) {
|
|
2811
|
-
return [
|
|
2812
|
-
skos_Concept.toRdfResource(value, {
|
|
2813
|
-
graph: _options.graph,
|
|
2814
|
-
resourceSet: _options.resourceSet,
|
|
2815
|
-
}).identifier,
|
|
2816
|
-
];
|
|
2817
|
-
}
|
|
2818
|
-
throw new Error("unable to serialize to RDF");
|
|
2819
|
-
})(item, {
|
|
2820
|
-
graph: parameters.graph,
|
|
2821
|
-
resource: parameters.resource,
|
|
2822
|
-
resourceSet: parameters.resourceSet,
|
|
2823
|
-
propertyPath: skos_ConceptScheme.schema.properties.topConcepts.path,
|
|
2824
|
-
})), parameters.graph);
|
|
2825
|
-
parameters.resource.add(sh_NodeShape.schema.properties.type.path, parameters.object.type.flatMap((item) => [item]), parameters.graph);
|
|
2826
|
-
return parameters.resource;
|
|
2827
|
-
};
|
|
2828
2845
|
skos_ConceptScheme.toRdfResource = $wrap_ToRdfResourceFunction(skos_ConceptScheme._toRdfResource);
|
|
2829
|
-
skos_ConceptScheme.$toString = (_skosConceptScheme) => `skos_ConceptScheme(${JSON.stringify(skos_ConceptScheme.toStringRecord(_skosConceptScheme))})`;
|
|
2830
2846
|
skos_ConceptScheme.toStringRecord = (_skosConceptScheme) => $compactRecord({
|
|
2831
2847
|
$identifier: _skosConceptScheme.$identifier().toString(),
|
|
2832
2848
|
});
|
|
@@ -3182,14 +3198,7 @@ export var sh_Shape;
|
|
|
3182
3198
|
return {
|
|
3183
3199
|
kind: "Option",
|
|
3184
3200
|
get itemType() {
|
|
3185
|
-
return
|
|
3186
|
-
kind: "Iri",
|
|
3187
|
-
in: [
|
|
3188
|
-
dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
|
|
3189
|
-
dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
|
|
3190
|
-
dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
|
|
3191
|
-
],
|
|
3192
|
-
};
|
|
3201
|
+
return sh_Severity.schema;
|
|
3193
3202
|
},
|
|
3194
3203
|
};
|
|
3195
3204
|
},
|
|
@@ -3290,133 +3299,44 @@ export var sh_Shape;
|
|
|
3290
3299
|
})(sh_Shape || (sh_Shape = {}));
|
|
3291
3300
|
export var $Object;
|
|
3292
3301
|
(function ($Object) {
|
|
3293
|
-
$Object.$toString = (value) => {
|
|
3294
|
-
if (owl_Ontology.isowl_Ontology(value)) {
|
|
3295
|
-
return owl_Ontology.$toString(value);
|
|
3296
|
-
}
|
|
3297
|
-
if (sh_NodeShape.issh_NodeShape(value)) {
|
|
3298
|
-
return sh_NodeShape.$toString(value);
|
|
3299
|
-
}
|
|
3300
|
-
if (sh_PropertyGroup.issh_PropertyGroup(value)) {
|
|
3301
|
-
return sh_PropertyGroup.$toString(value);
|
|
3302
|
-
}
|
|
3303
|
-
if (sh_PropertyShape.issh_PropertyShape(value)) {
|
|
3304
|
-
return sh_PropertyShape.$toString(value);
|
|
3305
|
-
}
|
|
3306
|
-
if (skos_Concept.isskos_Concept(value)) {
|
|
3307
|
-
return skos_Concept.$toString(value);
|
|
3308
|
-
}
|
|
3309
|
-
if (skos_ConceptScheme.isskos_ConceptScheme(value)) {
|
|
3310
|
-
return skos_ConceptScheme.$toString(value);
|
|
3311
|
-
}
|
|
3312
|
-
throw new Error("unable to serialize to string");
|
|
3313
|
-
};
|
|
3314
|
-
let Identifier;
|
|
3315
|
-
(function (Identifier) {
|
|
3316
|
-
Identifier.parse = $parseIdentifier;
|
|
3317
|
-
Identifier.stringify = NTriplesTerm.stringify;
|
|
3318
|
-
})(Identifier = $Object.Identifier || ($Object.Identifier = {}));
|
|
3319
|
-
$Object.schema = {
|
|
3320
|
-
kind: "ObjectDiscriminatedUnion",
|
|
3321
|
-
members: {
|
|
3322
|
-
owl_Ontology: {
|
|
3323
|
-
discriminantValues: ["owl_Ontology"],
|
|
3324
|
-
type: owl_Ontology.schema,
|
|
3325
|
-
},
|
|
3326
|
-
sh_NodeShape: {
|
|
3327
|
-
discriminantValues: ["sh_NodeShape"],
|
|
3328
|
-
type: sh_NodeShape.schema,
|
|
3329
|
-
},
|
|
3330
|
-
sh_PropertyGroup: {
|
|
3331
|
-
discriminantValues: ["sh_PropertyGroup"],
|
|
3332
|
-
type: sh_PropertyGroup.schema,
|
|
3333
|
-
},
|
|
3334
|
-
sh_PropertyShape: {
|
|
3335
|
-
discriminantValues: ["sh_PropertyShape"],
|
|
3336
|
-
type: sh_PropertyShape.schema,
|
|
3337
|
-
},
|
|
3338
|
-
skos_Concept: {
|
|
3339
|
-
discriminantValues: ["skos_Concept"],
|
|
3340
|
-
type: skos_Concept.schema,
|
|
3341
|
-
},
|
|
3342
|
-
skos_ConceptScheme: {
|
|
3343
|
-
discriminantValues: ["skos_ConceptScheme"],
|
|
3344
|
-
type: skos_ConceptScheme.schema,
|
|
3345
|
-
},
|
|
3346
|
-
},
|
|
3347
|
-
properties: {},
|
|
3348
|
-
};
|
|
3349
3302
|
$Object.toRdfResource = (object, options) => {
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3303
|
+
switch (object.termType) {
|
|
3304
|
+
case "owl_Ontology":
|
|
3305
|
+
return owl_Ontology.toRdfResource(object, options);
|
|
3306
|
+
case "sh_NodeShape":
|
|
3307
|
+
return sh_NodeShape.toRdfResource(object, options);
|
|
3308
|
+
case "sh_PropertyGroup":
|
|
3309
|
+
return sh_PropertyGroup.toRdfResource(object, options);
|
|
3310
|
+
case "sh_PropertyShape":
|
|
3311
|
+
return sh_PropertyShape.toRdfResource(object, options);
|
|
3312
|
+
case "skos_Concept":
|
|
3313
|
+
return skos_Concept.toRdfResource(object, options);
|
|
3314
|
+
case "skos_ConceptScheme":
|
|
3315
|
+
return skos_ConceptScheme.toRdfResource(object, options);
|
|
3316
|
+
default:
|
|
3317
|
+
object;
|
|
3318
|
+
throw new Error("should never reach this point");
|
|
3358
3319
|
}
|
|
3359
|
-
if (sh_PropertyShape.issh_PropertyShape(object)) {
|
|
3360
|
-
return sh_PropertyShape.toRdfResource(object, options);
|
|
3361
|
-
}
|
|
3362
|
-
if (skos_Concept.isskos_Concept(object)) {
|
|
3363
|
-
return skos_Concept.toRdfResource(object, options);
|
|
3364
|
-
}
|
|
3365
|
-
if (skos_ConceptScheme.isskos_ConceptScheme(object)) {
|
|
3366
|
-
return skos_ConceptScheme.toRdfResource(object, options);
|
|
3367
|
-
}
|
|
3368
|
-
throw new Error("unrecognized type");
|
|
3369
3320
|
};
|
|
3370
|
-
$
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
owl_Ontology
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
if (sh_PropertyGroup.issh_PropertyGroup(value)) {
|
|
3388
|
-
return [
|
|
3389
|
-
sh_PropertyGroup.toRdfResource(value, {
|
|
3390
|
-
graph: _options.graph,
|
|
3391
|
-
resourceSet: _options.resourceSet,
|
|
3392
|
-
}).identifier,
|
|
3393
|
-
];
|
|
3394
|
-
}
|
|
3395
|
-
if (sh_PropertyShape.issh_PropertyShape(value)) {
|
|
3396
|
-
return [
|
|
3397
|
-
sh_PropertyShape.toRdfResource(value, {
|
|
3398
|
-
graph: _options.graph,
|
|
3399
|
-
resourceSet: _options.resourceSet,
|
|
3400
|
-
}).identifier,
|
|
3401
|
-
];
|
|
3402
|
-
}
|
|
3403
|
-
if (skos_Concept.isskos_Concept(value)) {
|
|
3404
|
-
return [
|
|
3405
|
-
skos_Concept.toRdfResource(value, {
|
|
3406
|
-
graph: _options.graph,
|
|
3407
|
-
resourceSet: _options.resourceSet,
|
|
3408
|
-
}).identifier,
|
|
3409
|
-
];
|
|
3410
|
-
}
|
|
3411
|
-
if (skos_ConceptScheme.isskos_ConceptScheme(value)) {
|
|
3412
|
-
return [
|
|
3413
|
-
skos_ConceptScheme.toRdfResource(value, {
|
|
3414
|
-
graph: _options.graph,
|
|
3415
|
-
resourceSet: _options.resourceSet,
|
|
3416
|
-
}).identifier,
|
|
3417
|
-
];
|
|
3321
|
+
function $toString(object) {
|
|
3322
|
+
switch (object.termType) {
|
|
3323
|
+
case "owl_Ontology":
|
|
3324
|
+
return owl_Ontology.$toString(object);
|
|
3325
|
+
case "sh_NodeShape":
|
|
3326
|
+
return sh_NodeShape.$toString(object);
|
|
3327
|
+
case "sh_PropertyGroup":
|
|
3328
|
+
return sh_PropertyGroup.$toString(object);
|
|
3329
|
+
case "sh_PropertyShape":
|
|
3330
|
+
return sh_PropertyShape.$toString(object);
|
|
3331
|
+
case "skos_Concept":
|
|
3332
|
+
return skos_Concept.$toString(object);
|
|
3333
|
+
case "skos_ConceptScheme":
|
|
3334
|
+
return skos_ConceptScheme.$toString(object);
|
|
3335
|
+
default:
|
|
3336
|
+
object;
|
|
3337
|
+
throw new Error("should never reach this point");
|
|
3418
3338
|
}
|
|
3419
|
-
|
|
3420
|
-
|
|
3339
|
+
}
|
|
3340
|
+
$Object.$toString = $toString;
|
|
3421
3341
|
})($Object || ($Object = {}));
|
|
3422
3342
|
//# sourceMappingURL=shapes.js.map
|