@shaclmate/compiler 4.0.49 → 4.0.51
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/_ShapesGraphToAstTransformer/transformShapeToAstStructType.js +7 -2
- package/dist/generators/ts/ObjectType.d.ts +1 -0
- package/dist/generators/ts/ObjectType.js +12 -1
- package/dist/generators/ts/Snippets.d.ts +3 -0
- package/dist/generators/ts/Snippets.js +21 -0
- package/dist/generators/ts/_ObjectType/AbstractProperty.d.ts +1 -4
- package/dist/generators/ts/_ObjectType/IdentifierProperty.js +2 -13
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionExpression.js +6 -2
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionExpression.js +6 -11
- package/dist/generators/ts/_ObjectType/ObjectType_schemaExpression.js +4 -1
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionExpression.js +3 -3
- package/dist/generators/ts/_ObjectType/ShaclProperty.js +8 -16
- package/dist/generators/ts/_snippets/snippets_EqualsFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_EqualsFunction.js +4 -0
- package/dist/generators/ts/_snippets/snippets_propertyEquals.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_propertyEquals.js +11 -0
- package/dist/generators/ts/_snippets/snippets_rdfResourceIdentifierValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_rdfResourceIdentifierValues.js +12 -0
- package/dist/input/ShapesGraph.d.ts +1 -1
- package/dist/input/ShapesGraph.js +1 -1
- package/dist/input/index.d.ts +1 -1
- package/dist/input/index.js +1 -1
- package/dist/input/{generated.d.ts → input.shaclmate.d.ts} +536 -43
- package/dist/input/{generated.js → input.shaclmate.js} +673 -495
- package/dist/input/input.shaclmate.ttl +85 -0
- package/package.json +602 -19
|
@@ -222,6 +222,14 @@ export var $PropertyPath;
|
|
|
222
222
|
$PropertyPath.toRdfResource = RdfxResourcePropertyPath.toResource;
|
|
223
223
|
$PropertyPath.$toString = RdfxResourcePropertyPath.toString;
|
|
224
224
|
})($PropertyPath || ($PropertyPath = {}));
|
|
225
|
+
function $rdfResourceIdentifierValues(resource) {
|
|
226
|
+
return new Resource.Value({
|
|
227
|
+
dataFactory: dataFactory,
|
|
228
|
+
focusResource: resource,
|
|
229
|
+
propertyPath: $RdfVocabularies.rdf.subject,
|
|
230
|
+
term: resource.identifier,
|
|
231
|
+
}).toValues();
|
|
232
|
+
}
|
|
225
233
|
var $RdfVocabularies;
|
|
226
234
|
(function ($RdfVocabularies) {
|
|
227
235
|
$RdfVocabularies.rdf = {
|
|
@@ -471,408 +479,315 @@ export var NodeShape;
|
|
|
471
479
|
return NodeShape.create(parameters).unsafeCoerce();
|
|
472
480
|
}
|
|
473
481
|
NodeShape.createUnsafe = createUnsafe;
|
|
474
|
-
NodeShape._fromRdfResource = (
|
|
475
|
-
? $ensureRdfResourceType(
|
|
476
|
-
graph:
|
|
482
|
+
NodeShape._fromRdfResource = (resource, options) => (!options.ignoreRdfType
|
|
483
|
+
? $ensureRdfResourceType(resource, [NodeShape.schema.fromRdfType], {
|
|
484
|
+
graph: options.graph,
|
|
477
485
|
})
|
|
478
486
|
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
479
|
-
$identifier: $identifierFromRdfResourceValues(
|
|
480
|
-
|
|
481
|
-
focusResource:
|
|
482
|
-
propertyPath: $RdfVocabularies.rdf.subject,
|
|
483
|
-
term: $resource.identifier,
|
|
484
|
-
}).toValues(), {
|
|
485
|
-
context: _$options.context,
|
|
486
|
-
graph: _$options.graph,
|
|
487
|
-
focusResource: $resource,
|
|
488
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
487
|
+
$identifier: $identifierFromRdfResourceValues($rdfResourceIdentifierValues(resource), {
|
|
488
|
+
...options,
|
|
489
|
+
focusResource: resource,
|
|
489
490
|
propertyPath: $RdfVocabularies.rdf.subject,
|
|
490
491
|
schema: NodeShape.schema.properties.$identifier.type,
|
|
491
492
|
}).chain((values) => values.head()),
|
|
492
493
|
and: $shaclPropertyFromRdf({
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
focusResource: $resource,
|
|
494
|
+
...options,
|
|
495
|
+
focusResource: resource,
|
|
496
496
|
ignoreRdfType: true,
|
|
497
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
498
497
|
propertySchema: NodeShape.schema.properties.and,
|
|
499
498
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
|
|
500
499
|
}),
|
|
501
500
|
classes: $shaclPropertyFromRdf({
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
focusResource: $resource,
|
|
501
|
+
...options,
|
|
502
|
+
focusResource: resource,
|
|
505
503
|
ignoreRdfType: true,
|
|
506
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
507
504
|
propertySchema: NodeShape.schema.properties.classes,
|
|
508
505
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
509
506
|
}),
|
|
510
507
|
closed: $shaclPropertyFromRdf({
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
focusResource: $resource,
|
|
508
|
+
...options,
|
|
509
|
+
focusResource: resource,
|
|
514
510
|
ignoreRdfType: true,
|
|
515
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
516
511
|
propertySchema: NodeShape.schema.properties.closed,
|
|
517
512
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
|
|
518
513
|
}),
|
|
519
514
|
comment: $shaclPropertyFromRdf({
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
focusResource: $resource,
|
|
515
|
+
...options,
|
|
516
|
+
focusResource: resource,
|
|
523
517
|
ignoreRdfType: true,
|
|
524
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
525
518
|
propertySchema: NodeShape.schema.properties.comment,
|
|
526
519
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
527
520
|
}),
|
|
528
521
|
datatype: $shaclPropertyFromRdf({
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
focusResource: $resource,
|
|
522
|
+
...options,
|
|
523
|
+
focusResource: resource,
|
|
532
524
|
ignoreRdfType: true,
|
|
533
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
534
525
|
propertySchema: NodeShape.schema.properties.datatype,
|
|
535
526
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
536
527
|
}),
|
|
537
528
|
deactivated: $shaclPropertyFromRdf({
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
focusResource: $resource,
|
|
529
|
+
...options,
|
|
530
|
+
focusResource: resource,
|
|
541
531
|
ignoreRdfType: true,
|
|
542
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
543
532
|
propertySchema: NodeShape.schema.properties.deactivated,
|
|
544
533
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
|
|
545
534
|
}),
|
|
546
535
|
discriminantValue: $shaclPropertyFromRdf({
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
focusResource: $resource,
|
|
536
|
+
...options,
|
|
537
|
+
focusResource: resource,
|
|
550
538
|
ignoreRdfType: true,
|
|
551
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
552
539
|
propertySchema: NodeShape.schema.properties.discriminantValue,
|
|
553
540
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
554
541
|
}),
|
|
555
542
|
extern: $shaclPropertyFromRdf({
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
focusResource: $resource,
|
|
543
|
+
...options,
|
|
544
|
+
focusResource: resource,
|
|
559
545
|
ignoreRdfType: true,
|
|
560
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
561
546
|
propertySchema: NodeShape.schema.properties.extern,
|
|
562
547
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
|
|
563
548
|
}),
|
|
564
549
|
flags: $shaclPropertyFromRdf({
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
focusResource: $resource,
|
|
550
|
+
...options,
|
|
551
|
+
focusResource: resource,
|
|
568
552
|
ignoreRdfType: true,
|
|
569
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
570
553
|
propertySchema: NodeShape.schema.properties.flags,
|
|
571
554
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
572
555
|
}),
|
|
573
556
|
fromRdfType: $shaclPropertyFromRdf({
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
focusResource: $resource,
|
|
557
|
+
...options,
|
|
558
|
+
focusResource: resource,
|
|
577
559
|
ignoreRdfType: true,
|
|
578
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
579
560
|
propertySchema: NodeShape.schema.properties.fromRdfType,
|
|
580
561
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
581
562
|
}),
|
|
582
563
|
hasValues: $shaclPropertyFromRdf({
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
focusResource: $resource,
|
|
564
|
+
...options,
|
|
565
|
+
focusResource: resource,
|
|
586
566
|
ignoreRdfType: true,
|
|
587
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
588
567
|
propertySchema: NodeShape.schema.properties.hasValues,
|
|
589
568
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($termFromRdfResourceValues)),
|
|
590
569
|
}),
|
|
591
570
|
ignore: $shaclPropertyFromRdf({
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
focusResource: $resource,
|
|
571
|
+
...options,
|
|
572
|
+
focusResource: resource,
|
|
595
573
|
ignoreRdfType: true,
|
|
596
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
597
574
|
propertySchema: NodeShape.schema.properties.ignore,
|
|
598
575
|
typeFromRdfResourceValues: $defaultValueFromRdfResourceValues(($booleanFromRdfResourceValues)),
|
|
599
576
|
}),
|
|
600
577
|
ignoredProperties: $shaclPropertyFromRdf({
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
focusResource: $resource,
|
|
578
|
+
...options,
|
|
579
|
+
focusResource: resource,
|
|
604
580
|
ignoreRdfType: true,
|
|
605
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
606
581
|
propertySchema: NodeShape.schema.properties.ignoredProperties,
|
|
607
582
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues(($iriFromRdfResourceValues))),
|
|
608
583
|
}),
|
|
609
584
|
in_: $shaclPropertyFromRdf({
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
focusResource: $resource,
|
|
585
|
+
...options,
|
|
586
|
+
focusResource: resource,
|
|
613
587
|
ignoreRdfType: true,
|
|
614
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
615
588
|
propertySchema: NodeShape.schema.properties.in_,
|
|
616
589
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues(($termFromRdfResourceValues))),
|
|
617
590
|
}),
|
|
618
591
|
isDefinedBy: $shaclPropertyFromRdf({
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
focusResource: $resource,
|
|
592
|
+
...options,
|
|
593
|
+
focusResource: resource,
|
|
622
594
|
ignoreRdfType: true,
|
|
623
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
624
595
|
propertySchema: NodeShape.schema.properties.isDefinedBy,
|
|
625
596
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
626
597
|
}),
|
|
627
598
|
label: $shaclPropertyFromRdf({
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
focusResource: $resource,
|
|
599
|
+
...options,
|
|
600
|
+
focusResource: resource,
|
|
631
601
|
ignoreRdfType: true,
|
|
632
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
633
602
|
propertySchema: NodeShape.schema.properties.label,
|
|
634
603
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
635
604
|
}),
|
|
636
605
|
languageIn: $shaclPropertyFromRdf({
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
focusResource: $resource,
|
|
606
|
+
...options,
|
|
607
|
+
focusResource: resource,
|
|
640
608
|
ignoreRdfType: true,
|
|
641
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
642
609
|
propertySchema: NodeShape.schema.properties.languageIn,
|
|
643
610
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues(($stringFromRdfResourceValues))),
|
|
644
611
|
}),
|
|
645
612
|
maxExclusive: $shaclPropertyFromRdf({
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
focusResource: $resource,
|
|
613
|
+
...options,
|
|
614
|
+
focusResource: resource,
|
|
649
615
|
ignoreRdfType: true,
|
|
650
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
651
616
|
propertySchema: NodeShape.schema.properties.maxExclusive,
|
|
652
617
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
|
|
653
618
|
}),
|
|
654
619
|
maxInclusive: $shaclPropertyFromRdf({
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
focusResource: $resource,
|
|
620
|
+
...options,
|
|
621
|
+
focusResource: resource,
|
|
658
622
|
ignoreRdfType: true,
|
|
659
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
660
623
|
propertySchema: NodeShape.schema.properties.maxInclusive,
|
|
661
624
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
|
|
662
625
|
}),
|
|
663
626
|
maxLength: $shaclPropertyFromRdf({
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
focusResource: $resource,
|
|
627
|
+
...options,
|
|
628
|
+
focusResource: resource,
|
|
667
629
|
ignoreRdfType: true,
|
|
668
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
669
630
|
propertySchema: NodeShape.schema.properties.maxLength,
|
|
670
631
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
|
|
671
632
|
}),
|
|
672
633
|
message: $shaclPropertyFromRdf({
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
focusResource: $resource,
|
|
634
|
+
...options,
|
|
635
|
+
focusResource: resource,
|
|
676
636
|
ignoreRdfType: true,
|
|
677
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
678
637
|
propertySchema: NodeShape.schema.properties.message,
|
|
679
638
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
680
639
|
}),
|
|
681
640
|
minExclusive: $shaclPropertyFromRdf({
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
focusResource: $resource,
|
|
641
|
+
...options,
|
|
642
|
+
focusResource: resource,
|
|
685
643
|
ignoreRdfType: true,
|
|
686
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
687
644
|
propertySchema: NodeShape.schema.properties.minExclusive,
|
|
688
645
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
|
|
689
646
|
}),
|
|
690
647
|
minInclusive: $shaclPropertyFromRdf({
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
focusResource: $resource,
|
|
648
|
+
...options,
|
|
649
|
+
focusResource: resource,
|
|
694
650
|
ignoreRdfType: true,
|
|
695
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
696
651
|
propertySchema: NodeShape.schema.properties.minInclusive,
|
|
697
652
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
|
|
698
653
|
}),
|
|
699
654
|
minLength: $shaclPropertyFromRdf({
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
focusResource: $resource,
|
|
655
|
+
...options,
|
|
656
|
+
focusResource: resource,
|
|
703
657
|
ignoreRdfType: true,
|
|
704
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
705
658
|
propertySchema: NodeShape.schema.properties.minLength,
|
|
706
659
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
|
|
707
660
|
}),
|
|
708
661
|
mutable: $shaclPropertyFromRdf({
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
focusResource: $resource,
|
|
662
|
+
...options,
|
|
663
|
+
focusResource: resource,
|
|
712
664
|
ignoreRdfType: true,
|
|
713
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
714
665
|
propertySchema: NodeShape.schema.properties.mutable,
|
|
715
666
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
|
|
716
667
|
}),
|
|
717
668
|
node: $shaclPropertyFromRdf({
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
focusResource: $resource,
|
|
669
|
+
...options,
|
|
670
|
+
focusResource: resource,
|
|
721
671
|
ignoreRdfType: true,
|
|
722
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
723
672
|
propertySchema: NodeShape.schema.properties.node,
|
|
724
673
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
725
674
|
}),
|
|
726
675
|
nodeKind: $shaclPropertyFromRdf({
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
focusResource: $resource,
|
|
676
|
+
...options,
|
|
677
|
+
focusResource: resource,
|
|
730
678
|
ignoreRdfType: true,
|
|
731
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
732
679
|
propertySchema: NodeShape.schema.properties.nodeKind,
|
|
733
680
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
734
681
|
}),
|
|
735
682
|
not: $shaclPropertyFromRdf({
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
focusResource: $resource,
|
|
683
|
+
...options,
|
|
684
|
+
focusResource: resource,
|
|
739
685
|
ignoreRdfType: true,
|
|
740
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
741
686
|
propertySchema: NodeShape.schema.properties.not,
|
|
742
687
|
typeFromRdfResourceValues: $setFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
743
688
|
}),
|
|
744
689
|
or: $shaclPropertyFromRdf({
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
focusResource: $resource,
|
|
690
|
+
...options,
|
|
691
|
+
focusResource: resource,
|
|
748
692
|
ignoreRdfType: true,
|
|
749
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
750
693
|
propertySchema: NodeShape.schema.properties.or,
|
|
751
694
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
|
|
752
695
|
}),
|
|
753
696
|
pattern: $shaclPropertyFromRdf({
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
focusResource: $resource,
|
|
697
|
+
...options,
|
|
698
|
+
focusResource: resource,
|
|
757
699
|
ignoreRdfType: true,
|
|
758
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
759
700
|
propertySchema: NodeShape.schema.properties.pattern,
|
|
760
701
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
761
702
|
}),
|
|
762
703
|
properties: $shaclPropertyFromRdf({
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
focusResource: $resource,
|
|
704
|
+
...options,
|
|
705
|
+
focusResource: resource,
|
|
766
706
|
ignoreRdfType: true,
|
|
767
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
768
707
|
propertySchema: NodeShape.schema.properties.properties,
|
|
769
708
|
typeFromRdfResourceValues: $setFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
770
709
|
}),
|
|
771
710
|
rdfType: $shaclPropertyFromRdf({
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
focusResource: $resource,
|
|
711
|
+
...options,
|
|
712
|
+
focusResource: resource,
|
|
775
713
|
ignoreRdfType: true,
|
|
776
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
777
714
|
propertySchema: NodeShape.schema.properties.rdfType,
|
|
778
715
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
779
716
|
}),
|
|
780
717
|
severity: $shaclPropertyFromRdf({
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
focusResource: $resource,
|
|
718
|
+
...options,
|
|
719
|
+
focusResource: resource,
|
|
784
720
|
ignoreRdfType: true,
|
|
785
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
786
721
|
propertySchema: NodeShape.schema.properties.severity,
|
|
787
722
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
788
723
|
}),
|
|
789
724
|
shaclmateName: $shaclPropertyFromRdf({
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
focusResource: $resource,
|
|
725
|
+
...options,
|
|
726
|
+
focusResource: resource,
|
|
793
727
|
ignoreRdfType: true,
|
|
794
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
795
728
|
propertySchema: NodeShape.schema.properties.shaclmateName,
|
|
796
729
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
797
730
|
}),
|
|
798
731
|
subClassOf: $shaclPropertyFromRdf({
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
focusResource: $resource,
|
|
732
|
+
...options,
|
|
733
|
+
focusResource: resource,
|
|
802
734
|
ignoreRdfType: true,
|
|
803
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
804
735
|
propertySchema: NodeShape.schema.properties.subClassOf,
|
|
805
736
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
806
737
|
}),
|
|
807
738
|
targetClasses: $shaclPropertyFromRdf({
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
focusResource: $resource,
|
|
739
|
+
...options,
|
|
740
|
+
focusResource: resource,
|
|
811
741
|
ignoreRdfType: true,
|
|
812
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
813
742
|
propertySchema: NodeShape.schema.properties.targetClasses,
|
|
814
743
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
815
744
|
}),
|
|
816
745
|
targetNodes: $shaclPropertyFromRdf({
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
focusResource: $resource,
|
|
746
|
+
...options,
|
|
747
|
+
focusResource: resource,
|
|
820
748
|
ignoreRdfType: true,
|
|
821
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
822
749
|
propertySchema: NodeShape.schema.properties.targetNodes,
|
|
823
750
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($termFromRdfResourceValues)),
|
|
824
751
|
}),
|
|
825
752
|
targetObjectsOf: $shaclPropertyFromRdf({
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
focusResource: $resource,
|
|
753
|
+
...options,
|
|
754
|
+
focusResource: resource,
|
|
829
755
|
ignoreRdfType: true,
|
|
830
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
831
756
|
propertySchema: NodeShape.schema.properties.targetObjectsOf,
|
|
832
757
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
833
758
|
}),
|
|
834
759
|
targetSubjectsOf: $shaclPropertyFromRdf({
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
focusResource: $resource,
|
|
760
|
+
...options,
|
|
761
|
+
focusResource: resource,
|
|
838
762
|
ignoreRdfType: true,
|
|
839
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
840
763
|
propertySchema: NodeShape.schema.properties.targetSubjectsOf,
|
|
841
764
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
842
765
|
}),
|
|
843
766
|
toRdfTypes: $shaclPropertyFromRdf({
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
focusResource: $resource,
|
|
767
|
+
...options,
|
|
768
|
+
focusResource: resource,
|
|
847
769
|
ignoreRdfType: true,
|
|
848
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
849
770
|
propertySchema: NodeShape.schema.properties.toRdfTypes,
|
|
850
771
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
851
772
|
}),
|
|
852
773
|
tsImports: $shaclPropertyFromRdf({
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
focusResource: $resource,
|
|
774
|
+
...options,
|
|
775
|
+
focusResource: resource,
|
|
856
776
|
ignoreRdfType: true,
|
|
857
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
858
777
|
propertySchema: NodeShape.schema.properties.tsImports,
|
|
859
778
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
860
779
|
}),
|
|
861
780
|
types: $shaclPropertyFromRdf({
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
focusResource: $resource,
|
|
781
|
+
...options,
|
|
782
|
+
focusResource: resource,
|
|
865
783
|
ignoreRdfType: true,
|
|
866
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
867
784
|
propertySchema: NodeShape.schema.properties.types,
|
|
868
785
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
869
786
|
}),
|
|
870
787
|
xone: $shaclPropertyFromRdf({
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
focusResource: $resource,
|
|
788
|
+
...options,
|
|
789
|
+
focusResource: resource,
|
|
874
790
|
ignoreRdfType: true,
|
|
875
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
876
791
|
propertySchema: NodeShape.schema.properties.xone,
|
|
877
792
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
|
|
878
793
|
}),
|
|
@@ -1173,16 +1088,20 @@ export var NodeShape;
|
|
|
1173
1088
|
severity: {
|
|
1174
1089
|
kind: "Shacl",
|
|
1175
1090
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#severity"),
|
|
1176
|
-
type
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1091
|
+
get type() {
|
|
1092
|
+
return {
|
|
1093
|
+
kind: "Option",
|
|
1094
|
+
get itemType() {
|
|
1095
|
+
return {
|
|
1096
|
+
kind: "Iri",
|
|
1097
|
+
in: [
|
|
1098
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
|
|
1099
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
|
|
1100
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
|
|
1101
|
+
],
|
|
1102
|
+
};
|
|
1103
|
+
},
|
|
1104
|
+
};
|
|
1186
1105
|
},
|
|
1187
1106
|
},
|
|
1188
1107
|
shaclmateName: {
|
|
@@ -1248,10 +1167,11 @@ export var NodeShape;
|
|
|
1248
1167
|
},
|
|
1249
1168
|
},
|
|
1250
1169
|
},
|
|
1170
|
+
toRdfTypes: [dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape")],
|
|
1251
1171
|
};
|
|
1252
1172
|
NodeShape._toRdfResource = (parameters) => {
|
|
1253
1173
|
if (!parameters.ignoreRdfType) {
|
|
1254
|
-
parameters.resource.add($RdfVocabularies.rdf.type,
|
|
1174
|
+
parameters.resource.add($RdfVocabularies.rdf.type, NodeShape.schema.toRdfTypes, parameters.graph);
|
|
1255
1175
|
}
|
|
1256
1176
|
parameters.resource.add(NodeShape.schema.properties.and.path, parameters.object.and.toList().flatMap((value) => [
|
|
1257
1177
|
value.length > 0
|
|
@@ -1491,39 +1411,28 @@ export var Ontology;
|
|
|
1491
1411
|
return Ontology.create(parameters).unsafeCoerce();
|
|
1492
1412
|
}
|
|
1493
1413
|
Ontology.createUnsafe = createUnsafe;
|
|
1494
|
-
Ontology._fromRdfResource = (
|
|
1495
|
-
? $ensureRdfResourceType(
|
|
1496
|
-
graph:
|
|
1414
|
+
Ontology._fromRdfResource = (resource, options) => (!options.ignoreRdfType
|
|
1415
|
+
? $ensureRdfResourceType(resource, [Ontology.schema.fromRdfType], {
|
|
1416
|
+
graph: options.graph,
|
|
1497
1417
|
})
|
|
1498
1418
|
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
1499
|
-
$identifier: $identifierFromRdfResourceValues(
|
|
1500
|
-
|
|
1501
|
-
focusResource:
|
|
1502
|
-
propertyPath: $RdfVocabularies.rdf.subject,
|
|
1503
|
-
term: $resource.identifier,
|
|
1504
|
-
}).toValues(), {
|
|
1505
|
-
context: _$options.context,
|
|
1506
|
-
graph: _$options.graph,
|
|
1507
|
-
focusResource: $resource,
|
|
1508
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1419
|
+
$identifier: $identifierFromRdfResourceValues($rdfResourceIdentifierValues(resource), {
|
|
1420
|
+
...options,
|
|
1421
|
+
focusResource: resource,
|
|
1509
1422
|
propertyPath: $RdfVocabularies.rdf.subject,
|
|
1510
1423
|
schema: Ontology.schema.properties.$identifier.type,
|
|
1511
1424
|
}).chain((values) => values.head()),
|
|
1512
1425
|
comment: $shaclPropertyFromRdf({
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
focusResource: $resource,
|
|
1426
|
+
...options,
|
|
1427
|
+
focusResource: resource,
|
|
1516
1428
|
ignoreRdfType: true,
|
|
1517
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1518
1429
|
propertySchema: NodeShape.schema.properties.comment,
|
|
1519
1430
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1520
1431
|
}),
|
|
1521
1432
|
label: $shaclPropertyFromRdf({
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
focusResource: $resource,
|
|
1433
|
+
...options,
|
|
1434
|
+
focusResource: resource,
|
|
1525
1435
|
ignoreRdfType: true,
|
|
1526
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1527
1436
|
propertySchema: NodeShape.schema.properties.label,
|
|
1528
1437
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1529
1438
|
}),
|
|
@@ -1565,10 +1474,13 @@ export var Ontology;
|
|
|
1565
1474
|
},
|
|
1566
1475
|
},
|
|
1567
1476
|
},
|
|
1477
|
+
toRdfTypes: [
|
|
1478
|
+
dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology"),
|
|
1479
|
+
],
|
|
1568
1480
|
};
|
|
1569
1481
|
Ontology._toRdfResource = (parameters) => {
|
|
1570
1482
|
if (!parameters.ignoreRdfType) {
|
|
1571
|
-
parameters.resource.add($RdfVocabularies.rdf.type,
|
|
1483
|
+
parameters.resource.add($RdfVocabularies.rdf.type, Ontology.schema.toRdfTypes, parameters.graph);
|
|
1572
1484
|
}
|
|
1573
1485
|
parameters.resource.add(NodeShape.schema.properties.comment.path, parameters.object.comment
|
|
1574
1486
|
.toList()
|
|
@@ -1598,39 +1510,28 @@ export var PropertyGroup;
|
|
|
1598
1510
|
return PropertyGroup.create(parameters).unsafeCoerce();
|
|
1599
1511
|
}
|
|
1600
1512
|
PropertyGroup.createUnsafe = createUnsafe;
|
|
1601
|
-
PropertyGroup._fromRdfResource = (
|
|
1602
|
-
? $ensureRdfResourceType(
|
|
1603
|
-
graph:
|
|
1513
|
+
PropertyGroup._fromRdfResource = (resource, options) => (!options.ignoreRdfType
|
|
1514
|
+
? $ensureRdfResourceType(resource, [PropertyGroup.schema.fromRdfType], {
|
|
1515
|
+
graph: options.graph,
|
|
1604
1516
|
})
|
|
1605
1517
|
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
1606
|
-
$identifier: $identifierFromRdfResourceValues(
|
|
1607
|
-
|
|
1608
|
-
focusResource:
|
|
1609
|
-
propertyPath: $RdfVocabularies.rdf.subject,
|
|
1610
|
-
term: $resource.identifier,
|
|
1611
|
-
}).toValues(), {
|
|
1612
|
-
context: _$options.context,
|
|
1613
|
-
graph: _$options.graph,
|
|
1614
|
-
focusResource: $resource,
|
|
1615
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1518
|
+
$identifier: $identifierFromRdfResourceValues($rdfResourceIdentifierValues(resource), {
|
|
1519
|
+
...options,
|
|
1520
|
+
focusResource: resource,
|
|
1616
1521
|
propertyPath: $RdfVocabularies.rdf.subject,
|
|
1617
1522
|
schema: PropertyGroup.schema.properties.$identifier.type,
|
|
1618
1523
|
}).chain((values) => values.head()),
|
|
1619
1524
|
comment: $shaclPropertyFromRdf({
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
focusResource: $resource,
|
|
1525
|
+
...options,
|
|
1526
|
+
focusResource: resource,
|
|
1623
1527
|
ignoreRdfType: true,
|
|
1624
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1625
1528
|
propertySchema: NodeShape.schema.properties.comment,
|
|
1626
1529
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1627
1530
|
}),
|
|
1628
1531
|
label: $shaclPropertyFromRdf({
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
focusResource: $resource,
|
|
1532
|
+
...options,
|
|
1533
|
+
focusResource: resource,
|
|
1632
1534
|
ignoreRdfType: true,
|
|
1633
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1634
1535
|
propertySchema: NodeShape.schema.properties.label,
|
|
1635
1536
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1636
1537
|
}),
|
|
@@ -1672,10 +1573,13 @@ export var PropertyGroup;
|
|
|
1672
1573
|
},
|
|
1673
1574
|
},
|
|
1674
1575
|
},
|
|
1576
|
+
toRdfTypes: [
|
|
1577
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"),
|
|
1578
|
+
],
|
|
1675
1579
|
};
|
|
1676
1580
|
PropertyGroup._toRdfResource = (parameters) => {
|
|
1677
1581
|
if (!parameters.ignoreRdfType) {
|
|
1678
|
-
parameters.resource.add($RdfVocabularies.rdf.type,
|
|
1582
|
+
parameters.resource.add($RdfVocabularies.rdf.type, PropertyGroup.schema.toRdfTypes, parameters.graph);
|
|
1679
1583
|
}
|
|
1680
1584
|
parameters.resource.add(NodeShape.schema.properties.comment.path, parameters.object.comment
|
|
1681
1585
|
.toList()
|
|
@@ -1754,480 +1658,371 @@ export var PropertyShape;
|
|
|
1754
1658
|
return PropertyShape.create(parameters).unsafeCoerce();
|
|
1755
1659
|
}
|
|
1756
1660
|
PropertyShape.createUnsafe = createUnsafe;
|
|
1757
|
-
PropertyShape._fromRdfResource = (
|
|
1758
|
-
? $ensureRdfResourceType(
|
|
1759
|
-
graph:
|
|
1661
|
+
PropertyShape._fromRdfResource = (resource, options) => (!options.ignoreRdfType
|
|
1662
|
+
? $ensureRdfResourceType(resource, [PropertyShape.schema.fromRdfType], {
|
|
1663
|
+
graph: options.graph,
|
|
1760
1664
|
})
|
|
1761
1665
|
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
1762
|
-
$identifier: $identifierFromRdfResourceValues(
|
|
1763
|
-
|
|
1764
|
-
focusResource:
|
|
1765
|
-
propertyPath: $RdfVocabularies.rdf.subject,
|
|
1766
|
-
term: $resource.identifier,
|
|
1767
|
-
}).toValues(), {
|
|
1768
|
-
context: _$options.context,
|
|
1769
|
-
graph: _$options.graph,
|
|
1770
|
-
focusResource: $resource,
|
|
1771
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1666
|
+
$identifier: $identifierFromRdfResourceValues($rdfResourceIdentifierValues(resource), {
|
|
1667
|
+
...options,
|
|
1668
|
+
focusResource: resource,
|
|
1772
1669
|
propertyPath: $RdfVocabularies.rdf.subject,
|
|
1773
1670
|
schema: PropertyShape.schema.properties.$identifier.type,
|
|
1774
1671
|
}).chain((values) => values.head()),
|
|
1775
1672
|
and: $shaclPropertyFromRdf({
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
focusResource: $resource,
|
|
1673
|
+
...options,
|
|
1674
|
+
focusResource: resource,
|
|
1779
1675
|
ignoreRdfType: true,
|
|
1780
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1781
1676
|
propertySchema: NodeShape.schema.properties.and,
|
|
1782
1677
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
|
|
1783
1678
|
}),
|
|
1784
1679
|
classes: $shaclPropertyFromRdf({
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
focusResource: $resource,
|
|
1680
|
+
...options,
|
|
1681
|
+
focusResource: resource,
|
|
1788
1682
|
ignoreRdfType: true,
|
|
1789
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1790
1683
|
propertySchema: NodeShape.schema.properties.classes,
|
|
1791
1684
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
1792
1685
|
}),
|
|
1793
1686
|
comment: $shaclPropertyFromRdf({
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
focusResource: $resource,
|
|
1687
|
+
...options,
|
|
1688
|
+
focusResource: resource,
|
|
1797
1689
|
ignoreRdfType: true,
|
|
1798
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1799
1690
|
propertySchema: NodeShape.schema.properties.comment,
|
|
1800
1691
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1801
1692
|
}),
|
|
1802
1693
|
datatype: $shaclPropertyFromRdf({
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
focusResource: $resource,
|
|
1694
|
+
...options,
|
|
1695
|
+
focusResource: resource,
|
|
1806
1696
|
ignoreRdfType: true,
|
|
1807
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1808
1697
|
propertySchema: NodeShape.schema.properties.datatype,
|
|
1809
1698
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
1810
1699
|
}),
|
|
1811
1700
|
deactivated: $shaclPropertyFromRdf({
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
focusResource: $resource,
|
|
1701
|
+
...options,
|
|
1702
|
+
focusResource: resource,
|
|
1815
1703
|
ignoreRdfType: true,
|
|
1816
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1817
1704
|
propertySchema: NodeShape.schema.properties.deactivated,
|
|
1818
1705
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
|
|
1819
1706
|
}),
|
|
1820
1707
|
defaultValue: $shaclPropertyFromRdf({
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
focusResource: $resource,
|
|
1708
|
+
...options,
|
|
1709
|
+
focusResource: resource,
|
|
1824
1710
|
ignoreRdfType: true,
|
|
1825
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1826
1711
|
propertySchema: PropertyShape.schema.properties.defaultValue,
|
|
1827
1712
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($termFromRdfResourceValues)),
|
|
1828
1713
|
}),
|
|
1829
1714
|
description: $shaclPropertyFromRdf({
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
focusResource: $resource,
|
|
1715
|
+
...options,
|
|
1716
|
+
focusResource: resource,
|
|
1833
1717
|
ignoreRdfType: true,
|
|
1834
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1835
1718
|
propertySchema: PropertyShape.schema.properties.description,
|
|
1836
1719
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1837
1720
|
}),
|
|
1838
1721
|
disjoint: $shaclPropertyFromRdf({
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
focusResource: $resource,
|
|
1722
|
+
...options,
|
|
1723
|
+
focusResource: resource,
|
|
1842
1724
|
ignoreRdfType: true,
|
|
1843
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1844
1725
|
propertySchema: PropertyShape.schema.properties.disjoint,
|
|
1845
1726
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
1846
1727
|
}),
|
|
1847
1728
|
display: $shaclPropertyFromRdf({
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
focusResource: $resource,
|
|
1729
|
+
...options,
|
|
1730
|
+
focusResource: resource,
|
|
1851
1731
|
ignoreRdfType: true,
|
|
1852
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1853
1732
|
propertySchema: PropertyShape.schema.properties.display,
|
|
1854
1733
|
typeFromRdfResourceValues: $defaultValueFromRdfResourceValues(($booleanFromRdfResourceValues)),
|
|
1855
1734
|
}),
|
|
1856
1735
|
equals: $shaclPropertyFromRdf({
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
focusResource: $resource,
|
|
1736
|
+
...options,
|
|
1737
|
+
focusResource: resource,
|
|
1860
1738
|
ignoreRdfType: true,
|
|
1861
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1862
1739
|
propertySchema: PropertyShape.schema.properties.equals,
|
|
1863
1740
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
1864
1741
|
}),
|
|
1865
1742
|
flags: $shaclPropertyFromRdf({
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
focusResource: $resource,
|
|
1743
|
+
...options,
|
|
1744
|
+
focusResource: resource,
|
|
1869
1745
|
ignoreRdfType: true,
|
|
1870
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1871
1746
|
propertySchema: NodeShape.schema.properties.flags,
|
|
1872
1747
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1873
1748
|
}),
|
|
1874
1749
|
groups: $shaclPropertyFromRdf({
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
focusResource: $resource,
|
|
1750
|
+
...options,
|
|
1751
|
+
focusResource: resource,
|
|
1878
1752
|
ignoreRdfType: true,
|
|
1879
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1880
1753
|
propertySchema: PropertyShape.schema.properties.groups,
|
|
1881
1754
|
typeFromRdfResourceValues: $setFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
1882
1755
|
}),
|
|
1883
1756
|
hasValues: $shaclPropertyFromRdf({
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
focusResource: $resource,
|
|
1757
|
+
...options,
|
|
1758
|
+
focusResource: resource,
|
|
1887
1759
|
ignoreRdfType: true,
|
|
1888
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1889
1760
|
propertySchema: NodeShape.schema.properties.hasValues,
|
|
1890
1761
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($termFromRdfResourceValues)),
|
|
1891
1762
|
}),
|
|
1892
1763
|
ignore: $shaclPropertyFromRdf({
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
focusResource: $resource,
|
|
1764
|
+
...options,
|
|
1765
|
+
focusResource: resource,
|
|
1896
1766
|
ignoreRdfType: true,
|
|
1897
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1898
1767
|
propertySchema: NodeShape.schema.properties.ignore,
|
|
1899
1768
|
typeFromRdfResourceValues: $defaultValueFromRdfResourceValues(($booleanFromRdfResourceValues)),
|
|
1900
1769
|
}),
|
|
1901
1770
|
in_: $shaclPropertyFromRdf({
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
focusResource: $resource,
|
|
1771
|
+
...options,
|
|
1772
|
+
focusResource: resource,
|
|
1905
1773
|
ignoreRdfType: true,
|
|
1906
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1907
1774
|
propertySchema: NodeShape.schema.properties.in_,
|
|
1908
1775
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues(($termFromRdfResourceValues))),
|
|
1909
1776
|
}),
|
|
1910
1777
|
isDefinedBy: $shaclPropertyFromRdf({
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
focusResource: $resource,
|
|
1778
|
+
...options,
|
|
1779
|
+
focusResource: resource,
|
|
1914
1780
|
ignoreRdfType: true,
|
|
1915
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1916
1781
|
propertySchema: NodeShape.schema.properties.isDefinedBy,
|
|
1917
1782
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
1918
1783
|
}),
|
|
1919
1784
|
label: $shaclPropertyFromRdf({
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
focusResource: $resource,
|
|
1785
|
+
...options,
|
|
1786
|
+
focusResource: resource,
|
|
1923
1787
|
ignoreRdfType: true,
|
|
1924
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1925
1788
|
propertySchema: NodeShape.schema.properties.label,
|
|
1926
1789
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1927
1790
|
}),
|
|
1928
1791
|
languageIn: $shaclPropertyFromRdf({
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
focusResource: $resource,
|
|
1792
|
+
...options,
|
|
1793
|
+
focusResource: resource,
|
|
1932
1794
|
ignoreRdfType: true,
|
|
1933
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1934
1795
|
propertySchema: NodeShape.schema.properties.languageIn,
|
|
1935
1796
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues(($stringFromRdfResourceValues))),
|
|
1936
1797
|
}),
|
|
1937
1798
|
lessThan: $shaclPropertyFromRdf({
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
focusResource: $resource,
|
|
1799
|
+
...options,
|
|
1800
|
+
focusResource: resource,
|
|
1941
1801
|
ignoreRdfType: true,
|
|
1942
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1943
1802
|
propertySchema: PropertyShape.schema.properties.lessThan,
|
|
1944
1803
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
1945
1804
|
}),
|
|
1946
1805
|
lessThanOrEquals: $shaclPropertyFromRdf({
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
focusResource: $resource,
|
|
1806
|
+
...options,
|
|
1807
|
+
focusResource: resource,
|
|
1950
1808
|
ignoreRdfType: true,
|
|
1951
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1952
1809
|
propertySchema: PropertyShape.schema.properties.lessThanOrEquals,
|
|
1953
1810
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
1954
1811
|
}),
|
|
1955
1812
|
maxCount: $shaclPropertyFromRdf({
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
focusResource: $resource,
|
|
1813
|
+
...options,
|
|
1814
|
+
focusResource: resource,
|
|
1959
1815
|
ignoreRdfType: true,
|
|
1960
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1961
1816
|
propertySchema: PropertyShape.schema.properties.maxCount,
|
|
1962
1817
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
|
|
1963
1818
|
}),
|
|
1964
1819
|
maxExclusive: $shaclPropertyFromRdf({
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
focusResource: $resource,
|
|
1820
|
+
...options,
|
|
1821
|
+
focusResource: resource,
|
|
1968
1822
|
ignoreRdfType: true,
|
|
1969
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1970
1823
|
propertySchema: NodeShape.schema.properties.maxExclusive,
|
|
1971
1824
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
|
|
1972
1825
|
}),
|
|
1973
1826
|
maxInclusive: $shaclPropertyFromRdf({
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
focusResource: $resource,
|
|
1827
|
+
...options,
|
|
1828
|
+
focusResource: resource,
|
|
1977
1829
|
ignoreRdfType: true,
|
|
1978
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1979
1830
|
propertySchema: NodeShape.schema.properties.maxInclusive,
|
|
1980
1831
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
|
|
1981
1832
|
}),
|
|
1982
1833
|
maxLength: $shaclPropertyFromRdf({
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
focusResource: $resource,
|
|
1834
|
+
...options,
|
|
1835
|
+
focusResource: resource,
|
|
1986
1836
|
ignoreRdfType: true,
|
|
1987
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1988
1837
|
propertySchema: NodeShape.schema.properties.maxLength,
|
|
1989
1838
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
|
|
1990
1839
|
}),
|
|
1991
1840
|
message: $shaclPropertyFromRdf({
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
focusResource: $resource,
|
|
1841
|
+
...options,
|
|
1842
|
+
focusResource: resource,
|
|
1995
1843
|
ignoreRdfType: true,
|
|
1996
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
1997
1844
|
propertySchema: NodeShape.schema.properties.message,
|
|
1998
1845
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1999
1846
|
}),
|
|
2000
1847
|
minCount: $shaclPropertyFromRdf({
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
focusResource: $resource,
|
|
1848
|
+
...options,
|
|
1849
|
+
focusResource: resource,
|
|
2004
1850
|
ignoreRdfType: true,
|
|
2005
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2006
1851
|
propertySchema: PropertyShape.schema.properties.minCount,
|
|
2007
1852
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
|
|
2008
1853
|
}),
|
|
2009
1854
|
minExclusive: $shaclPropertyFromRdf({
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
focusResource: $resource,
|
|
1855
|
+
...options,
|
|
1856
|
+
focusResource: resource,
|
|
2013
1857
|
ignoreRdfType: true,
|
|
2014
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2015
1858
|
propertySchema: NodeShape.schema.properties.minExclusive,
|
|
2016
1859
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
|
|
2017
1860
|
}),
|
|
2018
1861
|
minInclusive: $shaclPropertyFromRdf({
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
focusResource: $resource,
|
|
1862
|
+
...options,
|
|
1863
|
+
focusResource: resource,
|
|
2022
1864
|
ignoreRdfType: true,
|
|
2023
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2024
1865
|
propertySchema: NodeShape.schema.properties.minInclusive,
|
|
2025
1866
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
|
|
2026
1867
|
}),
|
|
2027
1868
|
minLength: $shaclPropertyFromRdf({
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
focusResource: $resource,
|
|
1869
|
+
...options,
|
|
1870
|
+
focusResource: resource,
|
|
2031
1871
|
ignoreRdfType: true,
|
|
2032
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2033
1872
|
propertySchema: NodeShape.schema.properties.minLength,
|
|
2034
1873
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
|
|
2035
1874
|
}),
|
|
2036
1875
|
mutable: $shaclPropertyFromRdf({
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
focusResource: $resource,
|
|
1876
|
+
...options,
|
|
1877
|
+
focusResource: resource,
|
|
2040
1878
|
ignoreRdfType: true,
|
|
2041
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2042
1879
|
propertySchema: NodeShape.schema.properties.mutable,
|
|
2043
1880
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
|
|
2044
1881
|
}),
|
|
2045
1882
|
name: $shaclPropertyFromRdf({
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
focusResource: $resource,
|
|
1883
|
+
...options,
|
|
1884
|
+
focusResource: resource,
|
|
2049
1885
|
ignoreRdfType: true,
|
|
2050
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2051
1886
|
propertySchema: PropertyShape.schema.properties.name,
|
|
2052
1887
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
2053
1888
|
}),
|
|
2054
1889
|
node: $shaclPropertyFromRdf({
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
focusResource: $resource,
|
|
1890
|
+
...options,
|
|
1891
|
+
focusResource: resource,
|
|
2058
1892
|
ignoreRdfType: true,
|
|
2059
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2060
1893
|
propertySchema: NodeShape.schema.properties.node,
|
|
2061
1894
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
2062
1895
|
}),
|
|
2063
1896
|
nodeKind: $shaclPropertyFromRdf({
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
focusResource: $resource,
|
|
1897
|
+
...options,
|
|
1898
|
+
focusResource: resource,
|
|
2067
1899
|
ignoreRdfType: true,
|
|
2068
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2069
1900
|
propertySchema: NodeShape.schema.properties.nodeKind,
|
|
2070
1901
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
2071
1902
|
}),
|
|
2072
1903
|
not: $shaclPropertyFromRdf({
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
focusResource: $resource,
|
|
1904
|
+
...options,
|
|
1905
|
+
focusResource: resource,
|
|
2076
1906
|
ignoreRdfType: true,
|
|
2077
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2078
1907
|
propertySchema: NodeShape.schema.properties.not,
|
|
2079
1908
|
typeFromRdfResourceValues: $setFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
2080
1909
|
}),
|
|
2081
1910
|
or: $shaclPropertyFromRdf({
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
focusResource: $resource,
|
|
1911
|
+
...options,
|
|
1912
|
+
focusResource: resource,
|
|
2085
1913
|
ignoreRdfType: true,
|
|
2086
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2087
1914
|
propertySchema: NodeShape.schema.properties.or,
|
|
2088
1915
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
|
|
2089
1916
|
}),
|
|
2090
1917
|
order: $shaclPropertyFromRdf({
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
focusResource: $resource,
|
|
1918
|
+
...options,
|
|
1919
|
+
focusResource: resource,
|
|
2094
1920
|
ignoreRdfType: true,
|
|
2095
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2096
1921
|
propertySchema: PropertyShape.schema.properties.order,
|
|
2097
1922
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($floatFromRdfResourceValues)),
|
|
2098
1923
|
}),
|
|
2099
1924
|
path: $shaclPropertyFromRdf({
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
focusResource: $resource,
|
|
1925
|
+
...options,
|
|
1926
|
+
focusResource: resource,
|
|
2103
1927
|
ignoreRdfType: true,
|
|
2104
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2105
1928
|
propertySchema: PropertyShape.schema.properties.path,
|
|
2106
1929
|
typeFromRdfResourceValues: $PropertyPath.fromRdfResourceValues,
|
|
2107
1930
|
}),
|
|
2108
1931
|
pattern: $shaclPropertyFromRdf({
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
focusResource: $resource,
|
|
1932
|
+
...options,
|
|
1933
|
+
focusResource: resource,
|
|
2112
1934
|
ignoreRdfType: true,
|
|
2113
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2114
1935
|
propertySchema: NodeShape.schema.properties.pattern,
|
|
2115
1936
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
2116
1937
|
}),
|
|
2117
1938
|
qualifiedMaxCount: $shaclPropertyFromRdf({
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
focusResource: $resource,
|
|
1939
|
+
...options,
|
|
1940
|
+
focusResource: resource,
|
|
2121
1941
|
ignoreRdfType: true,
|
|
2122
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2123
1942
|
propertySchema: PropertyShape.schema.properties.qualifiedMaxCount,
|
|
2124
1943
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
|
|
2125
1944
|
}),
|
|
2126
1945
|
qualifiedMinCount: $shaclPropertyFromRdf({
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
focusResource: $resource,
|
|
1946
|
+
...options,
|
|
1947
|
+
focusResource: resource,
|
|
2130
1948
|
ignoreRdfType: true,
|
|
2131
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2132
1949
|
propertySchema: PropertyShape.schema.properties.qualifiedMinCount,
|
|
2133
1950
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
|
|
2134
1951
|
}),
|
|
2135
1952
|
qualifiedValueShape: $shaclPropertyFromRdf({
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
focusResource: $resource,
|
|
1953
|
+
...options,
|
|
1954
|
+
focusResource: resource,
|
|
2139
1955
|
ignoreRdfType: true,
|
|
2140
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2141
1956
|
propertySchema: PropertyShape.schema.properties.qualifiedValueShape,
|
|
2142
1957
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
2143
1958
|
}),
|
|
2144
1959
|
qualifiedValueShapesDisjoint: $shaclPropertyFromRdf({
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
focusResource: $resource,
|
|
1960
|
+
...options,
|
|
1961
|
+
focusResource: resource,
|
|
2148
1962
|
ignoreRdfType: true,
|
|
2149
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2150
1963
|
propertySchema: PropertyShape.schema.properties.qualifiedValueShapesDisjoint,
|
|
2151
1964
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
|
|
2152
1965
|
}),
|
|
2153
1966
|
resolve: $shaclPropertyFromRdf({
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
focusResource: $resource,
|
|
1967
|
+
...options,
|
|
1968
|
+
focusResource: resource,
|
|
2157
1969
|
ignoreRdfType: true,
|
|
2158
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2159
1970
|
propertySchema: PropertyShape.schema.properties.resolve,
|
|
2160
1971
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
2161
1972
|
}),
|
|
2162
1973
|
severity: $shaclPropertyFromRdf({
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
focusResource: $resource,
|
|
1974
|
+
...options,
|
|
1975
|
+
focusResource: resource,
|
|
2166
1976
|
ignoreRdfType: true,
|
|
2167
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2168
1977
|
propertySchema: NodeShape.schema.properties.severity,
|
|
2169
1978
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
2170
1979
|
}),
|
|
2171
1980
|
shaclmateName: $shaclPropertyFromRdf({
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
focusResource: $resource,
|
|
1981
|
+
...options,
|
|
1982
|
+
focusResource: resource,
|
|
2175
1983
|
ignoreRdfType: true,
|
|
2176
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2177
1984
|
propertySchema: NodeShape.schema.properties.shaclmateName,
|
|
2178
1985
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
2179
1986
|
}),
|
|
2180
1987
|
targetClasses: $shaclPropertyFromRdf({
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
focusResource: $resource,
|
|
1988
|
+
...options,
|
|
1989
|
+
focusResource: resource,
|
|
2184
1990
|
ignoreRdfType: true,
|
|
2185
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2186
1991
|
propertySchema: NodeShape.schema.properties.targetClasses,
|
|
2187
1992
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
2188
1993
|
}),
|
|
2189
1994
|
targetNodes: $shaclPropertyFromRdf({
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
focusResource: $resource,
|
|
1995
|
+
...options,
|
|
1996
|
+
focusResource: resource,
|
|
2193
1997
|
ignoreRdfType: true,
|
|
2194
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2195
1998
|
propertySchema: NodeShape.schema.properties.targetNodes,
|
|
2196
1999
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($termFromRdfResourceValues)),
|
|
2197
2000
|
}),
|
|
2198
2001
|
targetObjectsOf: $shaclPropertyFromRdf({
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
focusResource: $resource,
|
|
2002
|
+
...options,
|
|
2003
|
+
focusResource: resource,
|
|
2202
2004
|
ignoreRdfType: true,
|
|
2203
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2204
2005
|
propertySchema: NodeShape.schema.properties.targetObjectsOf,
|
|
2205
2006
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
2206
2007
|
}),
|
|
2207
2008
|
targetSubjectsOf: $shaclPropertyFromRdf({
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
focusResource: $resource,
|
|
2009
|
+
...options,
|
|
2010
|
+
focusResource: resource,
|
|
2211
2011
|
ignoreRdfType: true,
|
|
2212
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2213
2012
|
propertySchema: NodeShape.schema.properties.targetSubjectsOf,
|
|
2214
2013
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
2215
2014
|
}),
|
|
2216
2015
|
uniqueLang: $shaclPropertyFromRdf({
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
focusResource: $resource,
|
|
2016
|
+
...options,
|
|
2017
|
+
focusResource: resource,
|
|
2220
2018
|
ignoreRdfType: true,
|
|
2221
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2222
2019
|
propertySchema: PropertyShape.schema.properties.uniqueLang,
|
|
2223
2020
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
|
|
2224
2021
|
}),
|
|
2225
2022
|
xone: $shaclPropertyFromRdf({
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
focusResource: $resource,
|
|
2023
|
+
...options,
|
|
2024
|
+
focusResource: resource,
|
|
2229
2025
|
ignoreRdfType: true,
|
|
2230
|
-
preferredLanguages: _$options.preferredLanguages,
|
|
2231
2026
|
propertySchema: NodeShape.schema.properties.xone,
|
|
2232
2027
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
|
|
2233
2028
|
}),
|
|
@@ -2604,16 +2399,20 @@ export var PropertyShape;
|
|
|
2604
2399
|
severity: {
|
|
2605
2400
|
kind: "Shacl",
|
|
2606
2401
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#severity"),
|
|
2607
|
-
type
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2402
|
+
get type() {
|
|
2403
|
+
return {
|
|
2404
|
+
kind: "Option",
|
|
2405
|
+
get itemType() {
|
|
2406
|
+
return {
|
|
2407
|
+
kind: "Iri",
|
|
2408
|
+
in: [
|
|
2409
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
|
|
2410
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
|
|
2411
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
|
|
2412
|
+
],
|
|
2413
|
+
};
|
|
2414
|
+
},
|
|
2415
|
+
};
|
|
2617
2416
|
},
|
|
2618
2417
|
},
|
|
2619
2418
|
shaclmateName: {
|
|
@@ -2667,10 +2466,13 @@ export var PropertyShape;
|
|
|
2667
2466
|
},
|
|
2668
2467
|
},
|
|
2669
2468
|
},
|
|
2469
|
+
toRdfTypes: [
|
|
2470
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape"),
|
|
2471
|
+
],
|
|
2670
2472
|
};
|
|
2671
2473
|
PropertyShape._toRdfResource = (parameters) => {
|
|
2672
2474
|
if (!parameters.ignoreRdfType) {
|
|
2673
|
-
parameters.resource.add($RdfVocabularies.rdf.type,
|
|
2475
|
+
parameters.resource.add($RdfVocabularies.rdf.type, PropertyShape.schema.toRdfTypes, parameters.graph);
|
|
2674
2476
|
}
|
|
2675
2477
|
parameters.resource.add(NodeShape.schema.properties.and.path, parameters.object.and.toList().flatMap((value) => [
|
|
2676
2478
|
value.length > 0
|
|
@@ -2915,6 +2717,343 @@ export var PropertyShape;
|
|
|
2915
2717
|
.extract(),
|
|
2916
2718
|
});
|
|
2917
2719
|
})(PropertyShape || (PropertyShape = {}));
|
|
2720
|
+
export var ValidationReport;
|
|
2721
|
+
(function (ValidationReport) {
|
|
2722
|
+
ValidationReport.create = (parameters) => $sequenceRecord({
|
|
2723
|
+
$identifier: $convertToIdentifierProperty(parameters.$identifier),
|
|
2724
|
+
conforms: Either.of(parameters.conforms),
|
|
2725
|
+
results: $convertToScalarSet($identityConversionFunction, true)(parameters.results).chain((value) => $validateArray($identityValidationFunction, true)(ValidationReport.schema.properties.results.type, value)),
|
|
2726
|
+
shapesGraphWellFormed: $convertToMaybe($identityConversionFunction)(parameters.shapesGraphWellFormed).chain((value) => $validateMaybe($identityValidationFunction)(ValidationReport.schema.properties.shapesGraphWellFormed.type, value)),
|
|
2727
|
+
})
|
|
2728
|
+
.map((properties) => ({
|
|
2729
|
+
...properties,
|
|
2730
|
+
$type: "ValidationReport",
|
|
2731
|
+
}))
|
|
2732
|
+
.map((object) => $monkeyPatchObject(object, { $toString: ValidationReport.$toString }));
|
|
2733
|
+
function createUnsafe(parameters) {
|
|
2734
|
+
return ValidationReport.create(parameters).unsafeCoerce();
|
|
2735
|
+
}
|
|
2736
|
+
ValidationReport.createUnsafe = createUnsafe;
|
|
2737
|
+
ValidationReport._fromRdfResource = (resource, options) => (!options.ignoreRdfType
|
|
2738
|
+
? $ensureRdfResourceType(resource, [ValidationReport.schema.fromRdfType], { graph: options.graph })
|
|
2739
|
+
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
2740
|
+
$identifier: $identifierFromRdfResourceValues($rdfResourceIdentifierValues(resource), {
|
|
2741
|
+
...options,
|
|
2742
|
+
focusResource: resource,
|
|
2743
|
+
propertyPath: $RdfVocabularies.rdf.subject,
|
|
2744
|
+
schema: ValidationReport.schema.properties.$identifier.type,
|
|
2745
|
+
}).chain((values) => values.head()),
|
|
2746
|
+
conforms: $shaclPropertyFromRdf({
|
|
2747
|
+
...options,
|
|
2748
|
+
focusResource: resource,
|
|
2749
|
+
ignoreRdfType: true,
|
|
2750
|
+
propertySchema: ValidationReport.schema.properties.conforms,
|
|
2751
|
+
typeFromRdfResourceValues: ($booleanFromRdfResourceValues),
|
|
2752
|
+
}),
|
|
2753
|
+
results: $shaclPropertyFromRdf({
|
|
2754
|
+
...options,
|
|
2755
|
+
focusResource: resource,
|
|
2756
|
+
ignoreRdfType: true,
|
|
2757
|
+
propertySchema: ValidationReport.schema.properties.results,
|
|
2758
|
+
typeFromRdfResourceValues: $setFromRdfResourceValues(ValidationResult.fromRdfResourceValues),
|
|
2759
|
+
}),
|
|
2760
|
+
shapesGraphWellFormed: $shaclPropertyFromRdf({
|
|
2761
|
+
...options,
|
|
2762
|
+
focusResource: resource,
|
|
2763
|
+
ignoreRdfType: true,
|
|
2764
|
+
propertySchema: ValidationReport.schema.properties.shapesGraphWellFormed,
|
|
2765
|
+
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
|
|
2766
|
+
}),
|
|
2767
|
+
}).chain((properties) => ValidationReport.create(properties)));
|
|
2768
|
+
ValidationReport.fromRdfResource = $wrap_FromRdfResourceFunction(ValidationReport._fromRdfResource);
|
|
2769
|
+
ValidationReport.fromRdfResourceValues = (values, options) => values.chainMap((value) => value
|
|
2770
|
+
.toResource()
|
|
2771
|
+
.chain((resource) => ValidationReport.fromRdfResource(resource, options)));
|
|
2772
|
+
let Identifier;
|
|
2773
|
+
(function (Identifier) {
|
|
2774
|
+
Identifier.parse = $parseIdentifier;
|
|
2775
|
+
Identifier.stringify = NTriplesTerm.stringify;
|
|
2776
|
+
})(Identifier = ValidationReport.Identifier || (ValidationReport.Identifier = {}));
|
|
2777
|
+
function isValidationReport(object) {
|
|
2778
|
+
return object.$type === "ValidationReport";
|
|
2779
|
+
}
|
|
2780
|
+
ValidationReport.isValidationReport = isValidationReport;
|
|
2781
|
+
ValidationReport.schema = {
|
|
2782
|
+
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationReport"),
|
|
2783
|
+
properties: {
|
|
2784
|
+
$identifier: {
|
|
2785
|
+
kind: "Identifier",
|
|
2786
|
+
type: { kind: "Identifier" },
|
|
2787
|
+
},
|
|
2788
|
+
conforms: {
|
|
2789
|
+
kind: "Shacl",
|
|
2790
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#conforms"),
|
|
2791
|
+
type: { kind: "Boolean" },
|
|
2792
|
+
},
|
|
2793
|
+
results: {
|
|
2794
|
+
kind: "Shacl",
|
|
2795
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#result"),
|
|
2796
|
+
get type() {
|
|
2797
|
+
return {
|
|
2798
|
+
kind: "Set",
|
|
2799
|
+
get itemType() {
|
|
2800
|
+
return ValidationResult.schema;
|
|
2801
|
+
},
|
|
2802
|
+
};
|
|
2803
|
+
},
|
|
2804
|
+
},
|
|
2805
|
+
shapesGraphWellFormed: {
|
|
2806
|
+
kind: "Shacl",
|
|
2807
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#shapesGraphWellFormed"),
|
|
2808
|
+
type: {
|
|
2809
|
+
kind: "Option",
|
|
2810
|
+
itemType: { kind: "Boolean" },
|
|
2811
|
+
},
|
|
2812
|
+
},
|
|
2813
|
+
},
|
|
2814
|
+
toRdfTypes: [
|
|
2815
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationReport"),
|
|
2816
|
+
],
|
|
2817
|
+
};
|
|
2818
|
+
ValidationReport._toRdfResource = (parameters) => {
|
|
2819
|
+
if (!parameters.ignoreRdfType) {
|
|
2820
|
+
parameters.resource.add($RdfVocabularies.rdf.type, ValidationReport.schema.toRdfTypes, parameters.graph);
|
|
2821
|
+
}
|
|
2822
|
+
parameters.resource.add(ValidationReport.schema.properties.conforms.path, [
|
|
2823
|
+
$literalFactory.boolean(parameters.object.conforms, $RdfVocabularies.xsd.boolean),
|
|
2824
|
+
], parameters.graph);
|
|
2825
|
+
parameters.resource.add(ValidationReport.schema.properties.results.path, parameters.object.results.flatMap((item) => [
|
|
2826
|
+
ValidationResult.toRdfResource(item, {
|
|
2827
|
+
graph: parameters.graph,
|
|
2828
|
+
resourceSet: parameters.resourceSet,
|
|
2829
|
+
}).identifier,
|
|
2830
|
+
]), parameters.graph);
|
|
2831
|
+
parameters.resource.add(ValidationReport.schema.properties.shapesGraphWellFormed.path, parameters.object.shapesGraphWellFormed
|
|
2832
|
+
.toList()
|
|
2833
|
+
.flatMap((value) => [
|
|
2834
|
+
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
2835
|
+
]), parameters.graph);
|
|
2836
|
+
return parameters.resource;
|
|
2837
|
+
};
|
|
2838
|
+
ValidationReport.toRdfResource = $wrap_ToRdfResourceFunction(ValidationReport._toRdfResource);
|
|
2839
|
+
ValidationReport.$toString = (_validationReport) => `ValidationReport(${JSON.stringify(ValidationReport.toStringRecord(_validationReport))})`;
|
|
2840
|
+
ValidationReport.toStringRecord = (_validationReport) => $compactRecord({ $identifier: _validationReport.$identifier().toString() });
|
|
2841
|
+
})(ValidationReport || (ValidationReport = {}));
|
|
2842
|
+
export var ValidationResult;
|
|
2843
|
+
(function (ValidationResult) {
|
|
2844
|
+
ValidationResult.create = (parameters) => $sequenceRecord({
|
|
2845
|
+
$identifier: $convertToIdentifierProperty(parameters.$identifier),
|
|
2846
|
+
details: $convertToScalarSet($identityConversionFunction, true)(parameters.details).chain((value) => $validateArray($identityValidationFunction, true)(ValidationResult.schema.properties.details.type, value)),
|
|
2847
|
+
focusNode: Either.of(parameters.focusNode),
|
|
2848
|
+
message: $convertToMaybe($identityConversionFunction)(parameters.message).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.message.type, value)),
|
|
2849
|
+
path: $convertToMaybe($identityConversionFunction)(parameters.path).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.path.type, value)),
|
|
2850
|
+
severity: $convertToIri(parameters.severity),
|
|
2851
|
+
sourceConstraintComponent: $convertToIri(parameters.sourceConstraintComponent),
|
|
2852
|
+
sourceShape: $convertToMaybe($convertToIdentifier)(parameters.sourceShape).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.sourceShape.type, value)),
|
|
2853
|
+
value: $convertToMaybe($identityConversionFunction)(parameters.value).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.value.type, value)),
|
|
2854
|
+
})
|
|
2855
|
+
.map((properties) => ({
|
|
2856
|
+
...properties,
|
|
2857
|
+
$type: "ValidationResult",
|
|
2858
|
+
}))
|
|
2859
|
+
.map((object) => $monkeyPatchObject(object, { $toString: ValidationResult.$toString }));
|
|
2860
|
+
function createUnsafe(parameters) {
|
|
2861
|
+
return ValidationResult.create(parameters).unsafeCoerce();
|
|
2862
|
+
}
|
|
2863
|
+
ValidationResult.createUnsafe = createUnsafe;
|
|
2864
|
+
ValidationResult._fromRdfResource = (resource, options) => (!options.ignoreRdfType
|
|
2865
|
+
? $ensureRdfResourceType(resource, [ValidationResult.schema.fromRdfType], { graph: options.graph })
|
|
2866
|
+
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
2867
|
+
$identifier: $identifierFromRdfResourceValues($rdfResourceIdentifierValues(resource), {
|
|
2868
|
+
...options,
|
|
2869
|
+
focusResource: resource,
|
|
2870
|
+
propertyPath: $RdfVocabularies.rdf.subject,
|
|
2871
|
+
schema: ValidationResult.schema.properties.$identifier.type,
|
|
2872
|
+
}).chain((values) => values.head()),
|
|
2873
|
+
details: $shaclPropertyFromRdf({
|
|
2874
|
+
...options,
|
|
2875
|
+
focusResource: resource,
|
|
2876
|
+
ignoreRdfType: true,
|
|
2877
|
+
propertySchema: ValidationResult.schema.properties.details,
|
|
2878
|
+
typeFromRdfResourceValues: $setFromRdfResourceValues(($termFromRdfResourceValues)),
|
|
2879
|
+
}),
|
|
2880
|
+
focusNode: $shaclPropertyFromRdf({
|
|
2881
|
+
...options,
|
|
2882
|
+
focusResource: resource,
|
|
2883
|
+
ignoreRdfType: true,
|
|
2884
|
+
propertySchema: ValidationResult.schema.properties.focusNode,
|
|
2885
|
+
typeFromRdfResourceValues: ($termFromRdfResourceValues),
|
|
2886
|
+
}),
|
|
2887
|
+
message: $shaclPropertyFromRdf({
|
|
2888
|
+
...options,
|
|
2889
|
+
focusResource: resource,
|
|
2890
|
+
ignoreRdfType: true,
|
|
2891
|
+
propertySchema: ValidationResult.schema.properties.message,
|
|
2892
|
+
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
2893
|
+
}),
|
|
2894
|
+
path: $shaclPropertyFromRdf({
|
|
2895
|
+
...options,
|
|
2896
|
+
focusResource: resource,
|
|
2897
|
+
ignoreRdfType: true,
|
|
2898
|
+
propertySchema: ValidationResult.schema.properties.path,
|
|
2899
|
+
typeFromRdfResourceValues: $maybeFromRdfResourceValues($PropertyPath.fromRdfResourceValues),
|
|
2900
|
+
}),
|
|
2901
|
+
severity: $shaclPropertyFromRdf({
|
|
2902
|
+
...options,
|
|
2903
|
+
focusResource: resource,
|
|
2904
|
+
ignoreRdfType: true,
|
|
2905
|
+
propertySchema: ValidationResult.schema.properties.severity,
|
|
2906
|
+
typeFromRdfResourceValues: ($iriFromRdfResourceValues),
|
|
2907
|
+
}),
|
|
2908
|
+
sourceConstraintComponent: $shaclPropertyFromRdf({
|
|
2909
|
+
...options,
|
|
2910
|
+
focusResource: resource,
|
|
2911
|
+
ignoreRdfType: true,
|
|
2912
|
+
propertySchema: ValidationResult.schema.properties.sourceConstraintComponent,
|
|
2913
|
+
typeFromRdfResourceValues: ($iriFromRdfResourceValues),
|
|
2914
|
+
}),
|
|
2915
|
+
sourceShape: $shaclPropertyFromRdf({
|
|
2916
|
+
...options,
|
|
2917
|
+
focusResource: resource,
|
|
2918
|
+
ignoreRdfType: true,
|
|
2919
|
+
propertySchema: ValidationResult.schema.properties.sourceShape,
|
|
2920
|
+
typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
2921
|
+
}),
|
|
2922
|
+
value: $shaclPropertyFromRdf({
|
|
2923
|
+
...options,
|
|
2924
|
+
focusResource: resource,
|
|
2925
|
+
ignoreRdfType: true,
|
|
2926
|
+
propertySchema: ValidationResult.schema.properties.value,
|
|
2927
|
+
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($termFromRdfResourceValues)),
|
|
2928
|
+
}),
|
|
2929
|
+
}).chain((properties) => ValidationResult.create(properties)));
|
|
2930
|
+
ValidationResult.fromRdfResource = $wrap_FromRdfResourceFunction(ValidationResult._fromRdfResource);
|
|
2931
|
+
ValidationResult.fromRdfResourceValues = (values, options) => values.chainMap((value) => value
|
|
2932
|
+
.toResource()
|
|
2933
|
+
.chain((resource) => ValidationResult.fromRdfResource(resource, options)));
|
|
2934
|
+
let Identifier;
|
|
2935
|
+
(function (Identifier) {
|
|
2936
|
+
Identifier.parse = $parseIdentifier;
|
|
2937
|
+
Identifier.stringify = NTriplesTerm.stringify;
|
|
2938
|
+
})(Identifier = ValidationResult.Identifier || (ValidationResult.Identifier = {}));
|
|
2939
|
+
function isValidationResult(object) {
|
|
2940
|
+
return object.$type === "ValidationResult";
|
|
2941
|
+
}
|
|
2942
|
+
ValidationResult.isValidationResult = isValidationResult;
|
|
2943
|
+
ValidationResult.schema = {
|
|
2944
|
+
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationResult"),
|
|
2945
|
+
properties: {
|
|
2946
|
+
$identifier: {
|
|
2947
|
+
kind: "Identifier",
|
|
2948
|
+
type: { kind: "Identifier" },
|
|
2949
|
+
},
|
|
2950
|
+
details: {
|
|
2951
|
+
kind: "Shacl",
|
|
2952
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#detail"),
|
|
2953
|
+
type: {
|
|
2954
|
+
kind: "Set",
|
|
2955
|
+
itemType: {
|
|
2956
|
+
kind: "Term",
|
|
2957
|
+
types: ["BlankNode", "NamedNode", "Literal"],
|
|
2958
|
+
},
|
|
2959
|
+
},
|
|
2960
|
+
},
|
|
2961
|
+
focusNode: {
|
|
2962
|
+
kind: "Shacl",
|
|
2963
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#focusNode"),
|
|
2964
|
+
type: {
|
|
2965
|
+
kind: "Term",
|
|
2966
|
+
types: ["BlankNode", "NamedNode", "Literal"],
|
|
2967
|
+
},
|
|
2968
|
+
},
|
|
2969
|
+
message: {
|
|
2970
|
+
kind: "Shacl",
|
|
2971
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#resultMessage"),
|
|
2972
|
+
type: {
|
|
2973
|
+
kind: "Option",
|
|
2974
|
+
itemType: { kind: "String" },
|
|
2975
|
+
},
|
|
2976
|
+
},
|
|
2977
|
+
path: {
|
|
2978
|
+
kind: "Shacl",
|
|
2979
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#resultPath"),
|
|
2980
|
+
get type() {
|
|
2981
|
+
return {
|
|
2982
|
+
kind: "Option",
|
|
2983
|
+
get itemType() {
|
|
2984
|
+
return $PropertyPath.schema;
|
|
2985
|
+
},
|
|
2986
|
+
};
|
|
2987
|
+
},
|
|
2988
|
+
},
|
|
2989
|
+
severity: {
|
|
2990
|
+
kind: "Shacl",
|
|
2991
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#resultSeverity"),
|
|
2992
|
+
get type() {
|
|
2993
|
+
return {
|
|
2994
|
+
kind: "Iri",
|
|
2995
|
+
in: [
|
|
2996
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
|
|
2997
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
|
|
2998
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
|
|
2999
|
+
],
|
|
3000
|
+
};
|
|
3001
|
+
},
|
|
3002
|
+
},
|
|
3003
|
+
sourceConstraintComponent: {
|
|
3004
|
+
kind: "Shacl",
|
|
3005
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#sourceConstraintComponent"),
|
|
3006
|
+
type: { kind: "Iri" },
|
|
3007
|
+
},
|
|
3008
|
+
sourceShape: {
|
|
3009
|
+
kind: "Shacl",
|
|
3010
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#sourceShape"),
|
|
3011
|
+
type: {
|
|
3012
|
+
kind: "Option",
|
|
3013
|
+
itemType: { kind: "Identifier" },
|
|
3014
|
+
},
|
|
3015
|
+
},
|
|
3016
|
+
value: {
|
|
3017
|
+
kind: "Shacl",
|
|
3018
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#value"),
|
|
3019
|
+
type: {
|
|
3020
|
+
kind: "Option",
|
|
3021
|
+
itemType: {
|
|
3022
|
+
kind: "Term",
|
|
3023
|
+
types: ["BlankNode", "NamedNode", "Literal"],
|
|
3024
|
+
},
|
|
3025
|
+
},
|
|
3026
|
+
},
|
|
3027
|
+
},
|
|
3028
|
+
toRdfTypes: [
|
|
3029
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationResult"),
|
|
3030
|
+
],
|
|
3031
|
+
};
|
|
3032
|
+
ValidationResult._toRdfResource = (parameters) => {
|
|
3033
|
+
if (!parameters.ignoreRdfType) {
|
|
3034
|
+
parameters.resource.add($RdfVocabularies.rdf.type, ValidationResult.schema.toRdfTypes, parameters.graph);
|
|
3035
|
+
}
|
|
3036
|
+
parameters.resource.add(ValidationResult.schema.properties.details.path, parameters.object.details.flatMap((item) => [item]), parameters.graph);
|
|
3037
|
+
parameters.resource.add(ValidationResult.schema.properties.focusNode.path, [parameters.object.focusNode], parameters.graph);
|
|
3038
|
+
parameters.resource.add(ValidationResult.schema.properties.message.path, parameters.object.message
|
|
3039
|
+
.toList()
|
|
3040
|
+
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
3041
|
+
parameters.resource.add(ValidationResult.schema.properties.path.path, parameters.object.path.toList().flatMap((value) => [
|
|
3042
|
+
$PropertyPath.toRdfResource(value, {
|
|
3043
|
+
graph: parameters.graph,
|
|
3044
|
+
resourceSet: parameters.resourceSet,
|
|
3045
|
+
}).identifier,
|
|
3046
|
+
]), parameters.graph);
|
|
3047
|
+
parameters.resource.add(ValidationResult.schema.properties.severity.path, [parameters.object.severity], parameters.graph);
|
|
3048
|
+
parameters.resource.add(ValidationResult.schema.properties.sourceConstraintComponent.path, [parameters.object.sourceConstraintComponent], parameters.graph);
|
|
3049
|
+
parameters.resource.add(ValidationResult.schema.properties.sourceShape.path, parameters.object.sourceShape.toList(), parameters.graph);
|
|
3050
|
+
parameters.resource.add(ValidationResult.schema.properties.value.path, parameters.object.value.toList(), parameters.graph);
|
|
3051
|
+
return parameters.resource;
|
|
3052
|
+
};
|
|
3053
|
+
ValidationResult.toRdfResource = $wrap_ToRdfResourceFunction(ValidationResult._toRdfResource);
|
|
3054
|
+
ValidationResult.$toString = (_validationResult) => `ValidationResult(${JSON.stringify(ValidationResult.toStringRecord(_validationResult))})`;
|
|
3055
|
+
ValidationResult.toStringRecord = (_validationResult) => $compactRecord({ $identifier: _validationResult.$identifier().toString() });
|
|
3056
|
+
})(ValidationResult || (ValidationResult = {}));
|
|
2918
3057
|
export var Shape;
|
|
2919
3058
|
(function (Shape) {
|
|
2920
3059
|
Shape.$toString = (value) => {
|
|
@@ -3187,16 +3326,20 @@ export var Shape;
|
|
|
3187
3326
|
severity: {
|
|
3188
3327
|
kind: "Shacl",
|
|
3189
3328
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#severity"),
|
|
3190
|
-
type
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3329
|
+
get type() {
|
|
3330
|
+
return {
|
|
3331
|
+
kind: "Option",
|
|
3332
|
+
get itemType() {
|
|
3333
|
+
return {
|
|
3334
|
+
kind: "Iri",
|
|
3335
|
+
in: [
|
|
3336
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
|
|
3337
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
|
|
3338
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
|
|
3339
|
+
],
|
|
3340
|
+
};
|
|
3341
|
+
},
|
|
3342
|
+
};
|
|
3200
3343
|
},
|
|
3201
3344
|
},
|
|
3202
3345
|
shaclmateName: {
|
|
@@ -3287,6 +3430,12 @@ export var $Object;
|
|
|
3287
3430
|
if (PropertyShape.isPropertyShape(value)) {
|
|
3288
3431
|
return PropertyShape.$toString(value);
|
|
3289
3432
|
}
|
|
3433
|
+
if (ValidationReport.isValidationReport(value)) {
|
|
3434
|
+
return ValidationReport.$toString(value);
|
|
3435
|
+
}
|
|
3436
|
+
if (ValidationResult.isValidationResult(value)) {
|
|
3437
|
+
return ValidationResult.$toString(value);
|
|
3438
|
+
}
|
|
3290
3439
|
throw new Error("unable to serialize to string");
|
|
3291
3440
|
};
|
|
3292
3441
|
$Object.fromRdfResource = (resource, options) => NodeShape.fromRdfResource(resource, {
|
|
@@ -3304,6 +3453,14 @@ export var $Object;
|
|
|
3304
3453
|
.altLazy(() => PropertyShape.fromRdfResource(resource, {
|
|
3305
3454
|
...options,
|
|
3306
3455
|
ignoreRdfType: false,
|
|
3456
|
+
}))
|
|
3457
|
+
.altLazy(() => ValidationReport.fromRdfResource(resource, {
|
|
3458
|
+
...options,
|
|
3459
|
+
ignoreRdfType: false,
|
|
3460
|
+
}))
|
|
3461
|
+
.altLazy(() => ValidationResult.fromRdfResource(resource, {
|
|
3462
|
+
...options,
|
|
3463
|
+
ignoreRdfType: false,
|
|
3307
3464
|
}));
|
|
3308
3465
|
$Object.fromRdfResourceValues = ((values, options) => values.chainMap((value) => {
|
|
3309
3466
|
const valueAsValues = value.toValues();
|
|
@@ -3322,6 +3479,14 @@ export var $Object;
|
|
|
3322
3479
|
.altLazy(() => PropertyShape.fromRdfResourceValues(valueAsValues, {
|
|
3323
3480
|
...options,
|
|
3324
3481
|
schema: options.schema.members["PropertyShape"].type,
|
|
3482
|
+
}))
|
|
3483
|
+
.altLazy(() => ValidationReport.fromRdfResourceValues(valueAsValues, {
|
|
3484
|
+
...options,
|
|
3485
|
+
schema: options.schema.members["ValidationReport"].type,
|
|
3486
|
+
}))
|
|
3487
|
+
.altLazy(() => ValidationResult.fromRdfResourceValues(valueAsValues, {
|
|
3488
|
+
...options,
|
|
3489
|
+
schema: options.schema.members["ValidationResult"].type,
|
|
3325
3490
|
}))
|
|
3326
3491
|
.chain((values) => values.head());
|
|
3327
3492
|
}));
|
|
@@ -3343,25 +3508,16 @@ export var $Object;
|
|
|
3343
3508
|
discriminantValues: ["PropertyShape"],
|
|
3344
3509
|
type: PropertyShape.schema,
|
|
3345
3510
|
},
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
kind: "Shacl",
|
|
3350
|
-
path: dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#comment"),
|
|
3351
|
-
type: {
|
|
3352
|
-
kind: "Option",
|
|
3353
|
-
itemType: { kind: "String" },
|
|
3354
|
-
},
|
|
3511
|
+
ValidationReport: {
|
|
3512
|
+
discriminantValues: ["ValidationReport"],
|
|
3513
|
+
type: ValidationReport.schema,
|
|
3355
3514
|
},
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
type: {
|
|
3360
|
-
kind: "Option",
|
|
3361
|
-
itemType: { kind: "String" },
|
|
3362
|
-
},
|
|
3515
|
+
ValidationResult: {
|
|
3516
|
+
discriminantValues: ["ValidationResult"],
|
|
3517
|
+
type: ValidationResult.schema,
|
|
3363
3518
|
},
|
|
3364
3519
|
},
|
|
3520
|
+
properties: {},
|
|
3365
3521
|
};
|
|
3366
3522
|
$Object.toRdfResource = (object, options) => {
|
|
3367
3523
|
if (NodeShape.isNodeShape(object)) {
|
|
@@ -3376,6 +3532,12 @@ export var $Object;
|
|
|
3376
3532
|
if (PropertyShape.isPropertyShape(object)) {
|
|
3377
3533
|
return PropertyShape.toRdfResource(object, options);
|
|
3378
3534
|
}
|
|
3535
|
+
if (ValidationReport.isValidationReport(object)) {
|
|
3536
|
+
return ValidationReport.toRdfResource(object, options);
|
|
3537
|
+
}
|
|
3538
|
+
if (ValidationResult.isValidationResult(object)) {
|
|
3539
|
+
return ValidationResult.toRdfResource(object, options);
|
|
3540
|
+
}
|
|
3379
3541
|
throw new Error("unrecognized type");
|
|
3380
3542
|
};
|
|
3381
3543
|
$Object.toRdfResourceValues = ((value, _options) => {
|
|
@@ -3411,7 +3573,23 @@ export var $Object;
|
|
|
3411
3573
|
}).identifier,
|
|
3412
3574
|
];
|
|
3413
3575
|
}
|
|
3576
|
+
if (ValidationReport.isValidationReport(value)) {
|
|
3577
|
+
return [
|
|
3578
|
+
ValidationReport.toRdfResource(value, {
|
|
3579
|
+
graph: _options.graph,
|
|
3580
|
+
resourceSet: _options.resourceSet,
|
|
3581
|
+
}).identifier,
|
|
3582
|
+
];
|
|
3583
|
+
}
|
|
3584
|
+
if (ValidationResult.isValidationResult(value)) {
|
|
3585
|
+
return [
|
|
3586
|
+
ValidationResult.toRdfResource(value, {
|
|
3587
|
+
graph: _options.graph,
|
|
3588
|
+
resourceSet: _options.resourceSet,
|
|
3589
|
+
}).identifier,
|
|
3590
|
+
];
|
|
3591
|
+
}
|
|
3414
3592
|
throw new Error("unable to serialize to RDF");
|
|
3415
3593
|
});
|
|
3416
3594
|
})($Object || ($Object = {}));
|
|
3417
|
-
//# sourceMappingURL=
|
|
3595
|
+
//# sourceMappingURL=input.shaclmate.js.map
|