@shaclmate/compiler 4.0.90 → 4.0.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generators/ts/ObjectType.d.ts +7 -6
- package/dist/generators/ts/ObjectType.js +19 -18
- package/dist/generators/ts/TypeFactory.js +12 -2
- package/dist/generators/ts/_ObjectType/ObjectType_AbstractProperty.d.ts +39 -21
- package/dist/generators/ts/_ObjectType/ObjectType_AbstractProperty.js +1 -13
- package/dist/generators/ts/_ObjectType/ObjectType_DiscriminantProperty.d.ts +14 -22
- package/dist/generators/ts/_ObjectType/ObjectType_DiscriminantProperty.js +27 -29
- package/dist/generators/ts/_ObjectType/ObjectType_IdentifierProperty.d.ts +19 -14
- package/dist/generators/ts/_ObjectType/ObjectType_IdentifierProperty.js +24 -12
- package/dist/generators/ts/_ObjectType/ObjectType_Property.d.ts +2 -1
- package/dist/generators/ts/_ObjectType/ObjectType_RdfTypeProperty.d.ts +37 -0
- package/dist/generators/ts/_ObjectType/ObjectType_RdfTypeProperty.js +118 -0
- package/dist/generators/ts/_ObjectType/ObjectType_ShaclProperty.d.ts +21 -17
- package/dist/generators/ts/_ObjectType/ObjectType_ShaclProperty.js +26 -8
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionExpression.js +6 -9
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionExpression.js +11 -2
- package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlConstructTriplesFunctionExpression.js +1 -12
- package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlWherePatternsFunctionExpression.js +8 -46
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionExpression.js +7 -3
- package/dist/generators/ts/_ObjectType/ObjectType_schemaExpression.js +1 -7
- package/dist/generators/ts/_ObjectType/ObjectType_schemaTypeExpression.js +0 -3
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionExpression.js +1 -3
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionExpression.js +1 -8
- package/dist/input/input.shaclmate.d.ts +45 -18
- package/dist/input/input.shaclmate.js +54 -32
- package/package.json +4 -2
|
@@ -196,7 +196,6 @@ export declare namespace NodeShape {
|
|
|
196
196
|
}
|
|
197
197
|
const isNodeShape: (object: $Object) => object is NodeShape;
|
|
198
198
|
const schema: {
|
|
199
|
-
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#NodeShape">;
|
|
200
199
|
readonly properties: {
|
|
201
200
|
readonly $identifier: {
|
|
202
201
|
readonly kind: "Identifier";
|
|
@@ -204,6 +203,11 @@ export declare namespace NodeShape {
|
|
|
204
203
|
readonly kind: "Identifier";
|
|
205
204
|
};
|
|
206
205
|
};
|
|
206
|
+
readonly $rdfType: {
|
|
207
|
+
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#NodeShape">;
|
|
208
|
+
readonly kind: "RdfType";
|
|
209
|
+
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#NodeShape">];
|
|
210
|
+
};
|
|
207
211
|
readonly $type: {
|
|
208
212
|
readonly kind: "Discriminant";
|
|
209
213
|
readonly value: "NodeShape";
|
|
@@ -664,7 +668,6 @@ export declare namespace NodeShape {
|
|
|
664
668
|
};
|
|
665
669
|
};
|
|
666
670
|
};
|
|
667
|
-
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#NodeShape">];
|
|
668
671
|
};
|
|
669
672
|
type Schema = typeof schema;
|
|
670
673
|
const toStringRecord: (_nodeShape: NodeShape) => Record<string, string>;
|
|
@@ -699,7 +702,6 @@ export declare namespace Ontology {
|
|
|
699
702
|
}
|
|
700
703
|
const isOntology: (object: $Object) => object is Ontology;
|
|
701
704
|
const schema: {
|
|
702
|
-
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2002/07/owl#Ontology">;
|
|
703
705
|
readonly properties: {
|
|
704
706
|
readonly $identifier: {
|
|
705
707
|
readonly kind: "Identifier";
|
|
@@ -707,6 +709,11 @@ export declare namespace Ontology {
|
|
|
707
709
|
readonly kind: "Identifier";
|
|
708
710
|
};
|
|
709
711
|
};
|
|
712
|
+
readonly $rdfType: {
|
|
713
|
+
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2002/07/owl#Ontology">;
|
|
714
|
+
readonly kind: "RdfType";
|
|
715
|
+
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2002/07/owl#Ontology">];
|
|
716
|
+
};
|
|
710
717
|
readonly $type: {
|
|
711
718
|
readonly kind: "Discriminant";
|
|
712
719
|
readonly value: "Ontology";
|
|
@@ -732,7 +739,6 @@ export declare namespace Ontology {
|
|
|
732
739
|
};
|
|
733
740
|
};
|
|
734
741
|
};
|
|
735
|
-
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2002/07/owl#Ontology">];
|
|
736
742
|
};
|
|
737
743
|
type Schema = typeof schema;
|
|
738
744
|
const toStringRecord: (_ontology: Ontology) => Record<string, string>;
|
|
@@ -767,7 +773,6 @@ export declare namespace PropertyGroup {
|
|
|
767
773
|
}
|
|
768
774
|
const isPropertyGroup: (object: $Object) => object is PropertyGroup;
|
|
769
775
|
const schema: {
|
|
770
|
-
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyGroup">;
|
|
771
776
|
readonly properties: {
|
|
772
777
|
readonly $identifier: {
|
|
773
778
|
readonly kind: "Identifier";
|
|
@@ -775,6 +780,11 @@ export declare namespace PropertyGroup {
|
|
|
775
780
|
readonly kind: "Identifier";
|
|
776
781
|
};
|
|
777
782
|
};
|
|
783
|
+
readonly $rdfType: {
|
|
784
|
+
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyGroup">;
|
|
785
|
+
readonly kind: "RdfType";
|
|
786
|
+
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyGroup">];
|
|
787
|
+
};
|
|
778
788
|
readonly $type: {
|
|
779
789
|
readonly kind: "Discriminant";
|
|
780
790
|
readonly value: "PropertyGroup";
|
|
@@ -800,7 +810,6 @@ export declare namespace PropertyGroup {
|
|
|
800
810
|
};
|
|
801
811
|
};
|
|
802
812
|
};
|
|
803
|
-
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyGroup">];
|
|
804
813
|
};
|
|
805
814
|
type Schema = typeof schema;
|
|
806
815
|
const toStringRecord: (_propertyGroup: PropertyGroup) => Record<string, string>;
|
|
@@ -988,7 +997,6 @@ export declare namespace PropertyShape {
|
|
|
988
997
|
}
|
|
989
998
|
const isPropertyShape: (object: $Object) => object is PropertyShape;
|
|
990
999
|
const schema: {
|
|
991
|
-
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyShape">;
|
|
992
1000
|
readonly properties: {
|
|
993
1001
|
readonly $identifier: {
|
|
994
1002
|
readonly kind: "Identifier";
|
|
@@ -996,6 +1004,11 @@ export declare namespace PropertyShape {
|
|
|
996
1004
|
readonly kind: "Identifier";
|
|
997
1005
|
};
|
|
998
1006
|
};
|
|
1007
|
+
readonly $rdfType: {
|
|
1008
|
+
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyShape">;
|
|
1009
|
+
readonly kind: "RdfType";
|
|
1010
|
+
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyShape">];
|
|
1011
|
+
};
|
|
999
1012
|
readonly $type: {
|
|
1000
1013
|
readonly kind: "Discriminant";
|
|
1001
1014
|
readonly value: "PropertyShape";
|
|
@@ -1530,7 +1543,6 @@ export declare namespace PropertyShape {
|
|
|
1530
1543
|
};
|
|
1531
1544
|
};
|
|
1532
1545
|
};
|
|
1533
|
-
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyShape">];
|
|
1534
1546
|
};
|
|
1535
1547
|
type Schema = typeof schema;
|
|
1536
1548
|
const toStringRecord: (_propertyShape: PropertyShape) => Record<string, string>;
|
|
@@ -1576,7 +1588,6 @@ export declare namespace ValidationReport {
|
|
|
1576
1588
|
}
|
|
1577
1589
|
const isValidationReport: (object: $Object) => object is ValidationReport;
|
|
1578
1590
|
const schema: {
|
|
1579
|
-
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationReport">;
|
|
1580
1591
|
readonly properties: {
|
|
1581
1592
|
readonly $identifier: {
|
|
1582
1593
|
readonly kind: "Identifier";
|
|
@@ -1584,6 +1595,11 @@ export declare namespace ValidationReport {
|
|
|
1584
1595
|
readonly kind: "Identifier";
|
|
1585
1596
|
};
|
|
1586
1597
|
};
|
|
1598
|
+
readonly $rdfType: {
|
|
1599
|
+
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationReport">;
|
|
1600
|
+
readonly kind: "RdfType";
|
|
1601
|
+
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationReport">];
|
|
1602
|
+
};
|
|
1587
1603
|
readonly $type: {
|
|
1588
1604
|
readonly kind: "Discriminant";
|
|
1589
1605
|
readonly value: "ValidationReport";
|
|
@@ -1601,7 +1617,6 @@ export declare namespace ValidationReport {
|
|
|
1601
1617
|
readonly type: {
|
|
1602
1618
|
kind: "Set";
|
|
1603
1619
|
readonly itemType: {
|
|
1604
|
-
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationResult">;
|
|
1605
1620
|
readonly properties: {
|
|
1606
1621
|
readonly $identifier: {
|
|
1607
1622
|
readonly kind: "Identifier";
|
|
@@ -1609,6 +1624,11 @@ export declare namespace ValidationReport {
|
|
|
1609
1624
|
readonly kind: "Identifier";
|
|
1610
1625
|
};
|
|
1611
1626
|
};
|
|
1627
|
+
readonly $rdfType: {
|
|
1628
|
+
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationResult">;
|
|
1629
|
+
readonly kind: "RdfType";
|
|
1630
|
+
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationResult">];
|
|
1631
|
+
};
|
|
1612
1632
|
readonly $type: {
|
|
1613
1633
|
readonly kind: "Discriminant";
|
|
1614
1634
|
readonly value: "ValidationResult";
|
|
@@ -1688,7 +1708,6 @@ export declare namespace ValidationReport {
|
|
|
1688
1708
|
};
|
|
1689
1709
|
};
|
|
1690
1710
|
};
|
|
1691
|
-
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationResult">];
|
|
1692
1711
|
};
|
|
1693
1712
|
};
|
|
1694
1713
|
};
|
|
@@ -1703,7 +1722,6 @@ export declare namespace ValidationReport {
|
|
|
1703
1722
|
};
|
|
1704
1723
|
};
|
|
1705
1724
|
};
|
|
1706
|
-
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationReport">];
|
|
1707
1725
|
};
|
|
1708
1726
|
type Schema = typeof schema;
|
|
1709
1727
|
const toStringRecord: (_validationReport: ValidationReport) => Record<string, string>;
|
|
@@ -1756,7 +1774,6 @@ export declare namespace ValidationResult {
|
|
|
1756
1774
|
}
|
|
1757
1775
|
const isValidationResult: (object: $Object) => object is ValidationResult;
|
|
1758
1776
|
const schema: {
|
|
1759
|
-
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationResult">;
|
|
1760
1777
|
readonly properties: {
|
|
1761
1778
|
readonly $identifier: {
|
|
1762
1779
|
readonly kind: "Identifier";
|
|
@@ -1764,6 +1781,11 @@ export declare namespace ValidationResult {
|
|
|
1764
1781
|
readonly kind: "Identifier";
|
|
1765
1782
|
};
|
|
1766
1783
|
};
|
|
1784
|
+
readonly $rdfType: {
|
|
1785
|
+
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationResult">;
|
|
1786
|
+
readonly kind: "RdfType";
|
|
1787
|
+
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationResult">];
|
|
1788
|
+
};
|
|
1767
1789
|
readonly $type: {
|
|
1768
1790
|
readonly kind: "Discriminant";
|
|
1769
1791
|
readonly value: "ValidationResult";
|
|
@@ -1843,7 +1865,6 @@ export declare namespace ValidationResult {
|
|
|
1843
1865
|
};
|
|
1844
1866
|
};
|
|
1845
1867
|
};
|
|
1846
|
-
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationResult">];
|
|
1847
1868
|
};
|
|
1848
1869
|
type Schema = typeof schema;
|
|
1849
1870
|
const toStringRecord: (_validationResult: ValidationResult) => Record<string, string>;
|
|
@@ -1865,7 +1886,6 @@ export declare namespace Shape {
|
|
|
1865
1886
|
readonly NodeShape: {
|
|
1866
1887
|
readonly discriminantValues: readonly ["NodeShape"];
|
|
1867
1888
|
readonly type: {
|
|
1868
|
-
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#NodeShape">;
|
|
1869
1889
|
readonly properties: {
|
|
1870
1890
|
readonly $identifier: {
|
|
1871
1891
|
readonly kind: "Identifier";
|
|
@@ -1873,6 +1893,11 @@ export declare namespace Shape {
|
|
|
1873
1893
|
readonly kind: "Identifier";
|
|
1874
1894
|
};
|
|
1875
1895
|
};
|
|
1896
|
+
readonly $rdfType: {
|
|
1897
|
+
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#NodeShape">;
|
|
1898
|
+
readonly kind: "RdfType";
|
|
1899
|
+
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#NodeShape">];
|
|
1900
|
+
};
|
|
1876
1901
|
readonly $type: {
|
|
1877
1902
|
readonly kind: "Discriminant";
|
|
1878
1903
|
readonly value: "NodeShape";
|
|
@@ -2333,13 +2358,11 @@ export declare namespace Shape {
|
|
|
2333
2358
|
};
|
|
2334
2359
|
};
|
|
2335
2360
|
};
|
|
2336
|
-
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#NodeShape">];
|
|
2337
2361
|
};
|
|
2338
2362
|
};
|
|
2339
2363
|
readonly PropertyShape: {
|
|
2340
2364
|
readonly discriminantValues: readonly ["PropertyShape"];
|
|
2341
2365
|
readonly type: {
|
|
2342
|
-
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyShape">;
|
|
2343
2366
|
readonly properties: {
|
|
2344
2367
|
readonly $identifier: {
|
|
2345
2368
|
readonly kind: "Identifier";
|
|
@@ -2347,6 +2370,11 @@ export declare namespace Shape {
|
|
|
2347
2370
|
readonly kind: "Identifier";
|
|
2348
2371
|
};
|
|
2349
2372
|
};
|
|
2373
|
+
readonly $rdfType: {
|
|
2374
|
+
readonly fromRdfType: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyShape">;
|
|
2375
|
+
readonly kind: "RdfType";
|
|
2376
|
+
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyShape">];
|
|
2377
|
+
};
|
|
2350
2378
|
readonly $type: {
|
|
2351
2379
|
readonly kind: "Discriminant";
|
|
2352
2380
|
readonly value: "PropertyShape";
|
|
@@ -2881,7 +2909,6 @@ export declare namespace Shape {
|
|
|
2881
2909
|
};
|
|
2882
2910
|
};
|
|
2883
2911
|
};
|
|
2884
|
-
readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyShape">];
|
|
2885
2912
|
};
|
|
2886
2913
|
};
|
|
2887
2914
|
};
|
|
@@ -402,9 +402,7 @@ function $wrap_FromRdfResourceFunction(_fromRdfResourceFunction) {
|
|
|
402
402
|
export var NodeShape;
|
|
403
403
|
(function (NodeShape) {
|
|
404
404
|
NodeShape._fromRdfResource = (resource, options) => (!options.ignoreRdfType
|
|
405
|
-
? $ensureRdfResourceType(resource, [NodeShape.schema.fromRdfType], {
|
|
406
|
-
graph: options.graph,
|
|
407
|
-
})
|
|
405
|
+
? $ensureRdfResourceType(resource, [NodeShape.schema.properties.$rdfType.fromRdfType], { graph: options.graph })
|
|
408
406
|
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
409
407
|
$identifier: $identifierFromRdfResourceValues($rdfResourceIdentifierValues(resource), {
|
|
410
408
|
...options,
|
|
@@ -778,12 +776,18 @@ export var NodeShape;
|
|
|
778
776
|
})(Identifier = NodeShape.Identifier || (NodeShape.Identifier = {}));
|
|
779
777
|
NodeShape.isNodeShape = (object) => object.$type === "NodeShape";
|
|
780
778
|
NodeShape.schema = {
|
|
781
|
-
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape"),
|
|
782
779
|
properties: {
|
|
783
780
|
$identifier: {
|
|
784
781
|
kind: "Identifier",
|
|
785
782
|
type: { kind: "Identifier" },
|
|
786
783
|
},
|
|
784
|
+
$rdfType: {
|
|
785
|
+
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape"),
|
|
786
|
+
kind: "RdfType",
|
|
787
|
+
toRdfTypes: [
|
|
788
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape"),
|
|
789
|
+
],
|
|
790
|
+
},
|
|
787
791
|
$type: { kind: "Discriminant", value: "NodeShape" },
|
|
788
792
|
and: {
|
|
789
793
|
kind: "Shacl",
|
|
@@ -1133,7 +1137,6 @@ export var NodeShape;
|
|
|
1133
1137
|
},
|
|
1134
1138
|
},
|
|
1135
1139
|
},
|
|
1136
|
-
toRdfTypes: [dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape")],
|
|
1137
1140
|
};
|
|
1138
1141
|
NodeShape.toStringRecord = (_nodeShape) => $compactRecord({
|
|
1139
1142
|
$identifier: _nodeShape.$identifier().toString(),
|
|
@@ -1146,9 +1149,7 @@ export var NodeShape;
|
|
|
1146
1149
|
export var Ontology;
|
|
1147
1150
|
(function (Ontology) {
|
|
1148
1151
|
Ontology._fromRdfResource = (resource, options) => (!options.ignoreRdfType
|
|
1149
|
-
? $ensureRdfResourceType(resource, [Ontology.schema.fromRdfType], {
|
|
1150
|
-
graph: options.graph,
|
|
1151
|
-
})
|
|
1152
|
+
? $ensureRdfResourceType(resource, [Ontology.schema.properties.$rdfType.fromRdfType], { graph: options.graph })
|
|
1152
1153
|
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
1153
1154
|
$identifier: $identifierFromRdfResourceValues($rdfResourceIdentifierValues(resource), {
|
|
1154
1155
|
...options,
|
|
@@ -1194,12 +1195,18 @@ export var Ontology;
|
|
|
1194
1195
|
})(Identifier = Ontology.Identifier || (Ontology.Identifier = {}));
|
|
1195
1196
|
Ontology.isOntology = (object) => object.$type === "Ontology";
|
|
1196
1197
|
Ontology.schema = {
|
|
1197
|
-
fromRdfType: dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology"),
|
|
1198
1198
|
properties: {
|
|
1199
1199
|
$identifier: {
|
|
1200
1200
|
kind: "Identifier",
|
|
1201
1201
|
type: { kind: "Identifier" },
|
|
1202
1202
|
},
|
|
1203
|
+
$rdfType: {
|
|
1204
|
+
fromRdfType: dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology"),
|
|
1205
|
+
kind: "RdfType",
|
|
1206
|
+
toRdfTypes: [
|
|
1207
|
+
dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology"),
|
|
1208
|
+
],
|
|
1209
|
+
},
|
|
1203
1210
|
$type: { kind: "Discriminant", value: "Ontology" },
|
|
1204
1211
|
comment: {
|
|
1205
1212
|
kind: "Shacl",
|
|
@@ -1218,9 +1225,6 @@ export var Ontology;
|
|
|
1218
1225
|
},
|
|
1219
1226
|
},
|
|
1220
1227
|
},
|
|
1221
|
-
toRdfTypes: [
|
|
1222
|
-
dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology"),
|
|
1223
|
-
],
|
|
1224
1228
|
};
|
|
1225
1229
|
Ontology.toStringRecord = (_ontology) => $compactRecord({
|
|
1226
1230
|
$identifier: _ontology.$identifier().toString(),
|
|
@@ -1230,7 +1234,7 @@ export var Ontology;
|
|
|
1230
1234
|
export var PropertyGroup;
|
|
1231
1235
|
(function (PropertyGroup) {
|
|
1232
1236
|
PropertyGroup._fromRdfResource = (resource, options) => (!options.ignoreRdfType
|
|
1233
|
-
? $ensureRdfResourceType(resource, [PropertyGroup.schema.fromRdfType], {
|
|
1237
|
+
? $ensureRdfResourceType(resource, [PropertyGroup.schema.properties.$rdfType.fromRdfType], {
|
|
1234
1238
|
graph: options.graph,
|
|
1235
1239
|
})
|
|
1236
1240
|
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
@@ -1278,12 +1282,18 @@ export var PropertyGroup;
|
|
|
1278
1282
|
})(Identifier = PropertyGroup.Identifier || (PropertyGroup.Identifier = {}));
|
|
1279
1283
|
PropertyGroup.isPropertyGroup = (object) => object.$type === "PropertyGroup";
|
|
1280
1284
|
PropertyGroup.schema = {
|
|
1281
|
-
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"),
|
|
1282
1285
|
properties: {
|
|
1283
1286
|
$identifier: {
|
|
1284
1287
|
kind: "Identifier",
|
|
1285
1288
|
type: { kind: "Identifier" },
|
|
1286
1289
|
},
|
|
1290
|
+
$rdfType: {
|
|
1291
|
+
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"),
|
|
1292
|
+
kind: "RdfType",
|
|
1293
|
+
toRdfTypes: [
|
|
1294
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"),
|
|
1295
|
+
],
|
|
1296
|
+
},
|
|
1287
1297
|
$type: { kind: "Discriminant", value: "PropertyGroup" },
|
|
1288
1298
|
comment: {
|
|
1289
1299
|
kind: "Shacl",
|
|
@@ -1302,9 +1312,6 @@ export var PropertyGroup;
|
|
|
1302
1312
|
},
|
|
1303
1313
|
},
|
|
1304
1314
|
},
|
|
1305
|
-
toRdfTypes: [
|
|
1306
|
-
dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"),
|
|
1307
|
-
],
|
|
1308
1315
|
};
|
|
1309
1316
|
PropertyGroup.toStringRecord = (_propertyGroup) => $compactRecord({
|
|
1310
1317
|
$identifier: _propertyGroup.$identifier().toString(),
|
|
@@ -1314,7 +1321,7 @@ export var PropertyGroup;
|
|
|
1314
1321
|
export var PropertyShape;
|
|
1315
1322
|
(function (PropertyShape) {
|
|
1316
1323
|
PropertyShape._fromRdfResource = (resource, options) => (!options.ignoreRdfType
|
|
1317
|
-
? $ensureRdfResourceType(resource, [PropertyShape.schema.fromRdfType], {
|
|
1324
|
+
? $ensureRdfResourceType(resource, [PropertyShape.schema.properties.$rdfType.fromRdfType], {
|
|
1318
1325
|
graph: options.graph,
|
|
1319
1326
|
})
|
|
1320
1327
|
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
@@ -1754,12 +1761,18 @@ export var PropertyShape;
|
|
|
1754
1761
|
})(Identifier = PropertyShape.Identifier || (PropertyShape.Identifier = {}));
|
|
1755
1762
|
PropertyShape.isPropertyShape = (object) => object.$type === "PropertyShape";
|
|
1756
1763
|
PropertyShape.schema = {
|
|
1757
|
-
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape"),
|
|
1758
1764
|
properties: {
|
|
1759
1765
|
$identifier: {
|
|
1760
1766
|
kind: "Identifier",
|
|
1761
1767
|
type: { kind: "Identifier" },
|
|
1762
1768
|
},
|
|
1769
|
+
$rdfType: {
|
|
1770
|
+
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape"),
|
|
1771
|
+
kind: "RdfType",
|
|
1772
|
+
toRdfTypes: [
|
|
1773
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape"),
|
|
1774
|
+
],
|
|
1775
|
+
},
|
|
1763
1776
|
$type: { kind: "Discriminant", value: "PropertyShape" },
|
|
1764
1777
|
and: {
|
|
1765
1778
|
kind: "Shacl",
|
|
@@ -2173,9 +2186,6 @@ export var PropertyShape;
|
|
|
2173
2186
|
},
|
|
2174
2187
|
},
|
|
2175
2188
|
},
|
|
2176
|
-
toRdfTypes: [
|
|
2177
|
-
dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape"),
|
|
2178
|
-
],
|
|
2179
2189
|
};
|
|
2180
2190
|
PropertyShape.toStringRecord = (_propertyShape) => $compactRecord({
|
|
2181
2191
|
$identifier: _propertyShape.$identifier().toString(),
|
|
@@ -2203,7 +2213,9 @@ export var Severity;
|
|
|
2203
2213
|
export var ValidationReport;
|
|
2204
2214
|
(function (ValidationReport) {
|
|
2205
2215
|
ValidationReport._fromRdfResource = (resource, options) => (!options.ignoreRdfType
|
|
2206
|
-
? $ensureRdfResourceType(resource, [ValidationReport.schema.fromRdfType], {
|
|
2216
|
+
? $ensureRdfResourceType(resource, [ValidationReport.schema.properties.$rdfType.fromRdfType], {
|
|
2217
|
+
graph: options.graph,
|
|
2218
|
+
})
|
|
2207
2219
|
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
2208
2220
|
$identifier: $identifierFromRdfResourceValues($rdfResourceIdentifierValues(resource), {
|
|
2209
2221
|
...options,
|
|
@@ -2260,12 +2272,18 @@ export var ValidationReport;
|
|
|
2260
2272
|
})(Identifier = ValidationReport.Identifier || (ValidationReport.Identifier = {}));
|
|
2261
2273
|
ValidationReport.isValidationReport = (object) => object.$type === "ValidationReport";
|
|
2262
2274
|
ValidationReport.schema = {
|
|
2263
|
-
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationReport"),
|
|
2264
2275
|
properties: {
|
|
2265
2276
|
$identifier: {
|
|
2266
2277
|
kind: "Identifier",
|
|
2267
2278
|
type: { kind: "Identifier" },
|
|
2268
2279
|
},
|
|
2280
|
+
$rdfType: {
|
|
2281
|
+
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationReport"),
|
|
2282
|
+
kind: "RdfType",
|
|
2283
|
+
toRdfTypes: [
|
|
2284
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationReport"),
|
|
2285
|
+
],
|
|
2286
|
+
},
|
|
2269
2287
|
$type: { kind: "Discriminant", value: "ValidationReport" },
|
|
2270
2288
|
conforms: {
|
|
2271
2289
|
kind: "Shacl",
|
|
@@ -2293,16 +2311,15 @@ export var ValidationReport;
|
|
|
2293
2311
|
},
|
|
2294
2312
|
},
|
|
2295
2313
|
},
|
|
2296
|
-
toRdfTypes: [
|
|
2297
|
-
dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationReport"),
|
|
2298
|
-
],
|
|
2299
2314
|
};
|
|
2300
2315
|
ValidationReport.toStringRecord = (_validationReport) => $compactRecord({ $identifier: _validationReport.$identifier().toString() });
|
|
2301
2316
|
})(ValidationReport || (ValidationReport = {}));
|
|
2302
2317
|
export var ValidationResult;
|
|
2303
2318
|
(function (ValidationResult) {
|
|
2304
2319
|
ValidationResult._fromRdfResource = (resource, options) => (!options.ignoreRdfType
|
|
2305
|
-
? $ensureRdfResourceType(resource, [ValidationResult.schema.fromRdfType], {
|
|
2320
|
+
? $ensureRdfResourceType(resource, [ValidationResult.schema.properties.$rdfType.fromRdfType], {
|
|
2321
|
+
graph: options.graph,
|
|
2322
|
+
})
|
|
2306
2323
|
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
2307
2324
|
$identifier: $identifierFromRdfResourceValues($rdfResourceIdentifierValues(resource), {
|
|
2308
2325
|
...options,
|
|
@@ -2399,12 +2416,18 @@ export var ValidationResult;
|
|
|
2399
2416
|
})(Identifier = ValidationResult.Identifier || (ValidationResult.Identifier = {}));
|
|
2400
2417
|
ValidationResult.isValidationResult = (object) => object.$type === "ValidationResult";
|
|
2401
2418
|
ValidationResult.schema = {
|
|
2402
|
-
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationResult"),
|
|
2403
2419
|
properties: {
|
|
2404
2420
|
$identifier: {
|
|
2405
2421
|
kind: "Identifier",
|
|
2406
2422
|
type: { kind: "Identifier" },
|
|
2407
2423
|
},
|
|
2424
|
+
$rdfType: {
|
|
2425
|
+
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationResult"),
|
|
2426
|
+
kind: "RdfType",
|
|
2427
|
+
toRdfTypes: [
|
|
2428
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationResult"),
|
|
2429
|
+
],
|
|
2430
|
+
},
|
|
2408
2431
|
$type: { kind: "Discriminant", value: "ValidationResult" },
|
|
2409
2432
|
details: {
|
|
2410
2433
|
kind: "Shacl",
|
|
@@ -2477,9 +2500,6 @@ export var ValidationResult;
|
|
|
2477
2500
|
},
|
|
2478
2501
|
},
|
|
2479
2502
|
},
|
|
2480
|
-
toRdfTypes: [
|
|
2481
|
-
dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationResult"),
|
|
2482
|
-
],
|
|
2483
2503
|
};
|
|
2484
2504
|
ValidationResult.toStringRecord = (_validationResult) => $compactRecord({ $identifier: _validationResult.$identifier().toString() });
|
|
2485
2505
|
})(ValidationResult || (ValidationResult = {}));
|
|
@@ -2505,10 +2525,12 @@ export var Shape;
|
|
|
2505
2525
|
const valueAsValues = value.toValues();
|
|
2506
2526
|
return NodeShape.fromRdfResourceValues(valueAsValues, {
|
|
2507
2527
|
...options,
|
|
2528
|
+
ignoreRdfType: false,
|
|
2508
2529
|
schema: options.schema.members["NodeShape"].type,
|
|
2509
2530
|
})
|
|
2510
2531
|
.altLazy(() => PropertyShape.fromRdfResourceValues(valueAsValues, {
|
|
2511
2532
|
...options,
|
|
2533
|
+
ignoreRdfType: false,
|
|
2512
2534
|
schema: options.schema.members["PropertyShape"].type,
|
|
2513
2535
|
}))
|
|
2514
2536
|
.chain((values) => values.head());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@shaclmate/shacl-ast": "4.0.
|
|
3
|
+
"@shaclmate/shacl-ast": "4.0.91",
|
|
4
4
|
"@rdfjs/types": "~2.0.1",
|
|
5
5
|
"@rdfx/collection": "0.0.57",
|
|
6
6
|
"@rdfx/data-factory": "0.0.57",
|
|
@@ -295,6 +295,8 @@
|
|
|
295
295
|
"dist/generators/ts/_ObjectType/ObjectType_IdentifierProperty.js",
|
|
296
296
|
"dist/generators/ts/_ObjectType/ObjectType_Property.d.ts",
|
|
297
297
|
"dist/generators/ts/_ObjectType/ObjectType_Property.js",
|
|
298
|
+
"dist/generators/ts/_ObjectType/ObjectType_RdfTypeProperty.d.ts",
|
|
299
|
+
"dist/generators/ts/_ObjectType/ObjectType_RdfTypeProperty.js",
|
|
298
300
|
"dist/generators/ts/_ObjectType/ObjectType_ShaclProperty.d.ts",
|
|
299
301
|
"dist/generators/ts/_ObjectType/ObjectType_ShaclProperty.js",
|
|
300
302
|
"dist/generators/ts/_ObjectType/ObjectType_createFunctionExpression.d.ts",
|
|
@@ -733,5 +735,5 @@
|
|
|
733
735
|
},
|
|
734
736
|
"type": "module",
|
|
735
737
|
"types": "./dist/index.d.ts",
|
|
736
|
-
"version": "4.0.
|
|
738
|
+
"version": "4.0.91"
|
|
737
739
|
}
|