@shaclmate/shacl-ast 4.0.42 → 4.0.44
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/generated.d.ts +519 -42
- package/dist/generated.js +493 -79
- package/package.json +1 -1
package/dist/generated.js
CHANGED
|
@@ -1002,16 +1002,20 @@ export var NodeShape;
|
|
|
1002
1002
|
severity: {
|
|
1003
1003
|
kind: "Shacl",
|
|
1004
1004
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#severity"),
|
|
1005
|
-
type
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1005
|
+
get type() {
|
|
1006
|
+
return {
|
|
1007
|
+
kind: "Option",
|
|
1008
|
+
get itemType() {
|
|
1009
|
+
return {
|
|
1010
|
+
kind: "Iri",
|
|
1011
|
+
in: [
|
|
1012
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
|
|
1013
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
|
|
1014
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
|
|
1015
|
+
],
|
|
1016
|
+
};
|
|
1017
|
+
},
|
|
1018
|
+
};
|
|
1015
1019
|
},
|
|
1016
1020
|
},
|
|
1017
1021
|
subClassOf: {
|
|
@@ -1296,7 +1300,7 @@ export var Ontology;
|
|
|
1296
1300
|
focusResource: $resource,
|
|
1297
1301
|
ignoreRdfType: true,
|
|
1298
1302
|
preferredLanguages: _$options.preferredLanguages,
|
|
1299
|
-
propertySchema:
|
|
1303
|
+
propertySchema: NodeShape.schema.properties.comment,
|
|
1300
1304
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1301
1305
|
}),
|
|
1302
1306
|
label: $shaclPropertyFromRdf({
|
|
@@ -1305,7 +1309,7 @@ export var Ontology;
|
|
|
1305
1309
|
focusResource: $resource,
|
|
1306
1310
|
ignoreRdfType: true,
|
|
1307
1311
|
preferredLanguages: _$options.preferredLanguages,
|
|
1308
|
-
propertySchema:
|
|
1312
|
+
propertySchema: NodeShape.schema.properties.label,
|
|
1309
1313
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1310
1314
|
}),
|
|
1311
1315
|
}).chain((properties) => Ontology.create(properties)));
|
|
@@ -1403,7 +1407,7 @@ export var PropertyGroup;
|
|
|
1403
1407
|
focusResource: $resource,
|
|
1404
1408
|
ignoreRdfType: true,
|
|
1405
1409
|
preferredLanguages: _$options.preferredLanguages,
|
|
1406
|
-
propertySchema:
|
|
1410
|
+
propertySchema: NodeShape.schema.properties.comment,
|
|
1407
1411
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1408
1412
|
}),
|
|
1409
1413
|
label: $shaclPropertyFromRdf({
|
|
@@ -1412,7 +1416,7 @@ export var PropertyGroup;
|
|
|
1412
1416
|
focusResource: $resource,
|
|
1413
1417
|
ignoreRdfType: true,
|
|
1414
1418
|
preferredLanguages: _$options.preferredLanguages,
|
|
1415
|
-
propertySchema:
|
|
1419
|
+
propertySchema: NodeShape.schema.properties.label,
|
|
1416
1420
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1417
1421
|
}),
|
|
1418
1422
|
}).chain((properties) => PropertyGroup.create(properties)));
|
|
@@ -1554,7 +1558,7 @@ export var PropertyShape;
|
|
|
1554
1558
|
focusResource: $resource,
|
|
1555
1559
|
ignoreRdfType: true,
|
|
1556
1560
|
preferredLanguages: _$options.preferredLanguages,
|
|
1557
|
-
propertySchema:
|
|
1561
|
+
propertySchema: NodeShape.schema.properties.and,
|
|
1558
1562
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
|
|
1559
1563
|
}),
|
|
1560
1564
|
classes: $shaclPropertyFromRdf({
|
|
@@ -1563,7 +1567,7 @@ export var PropertyShape;
|
|
|
1563
1567
|
focusResource: $resource,
|
|
1564
1568
|
ignoreRdfType: true,
|
|
1565
1569
|
preferredLanguages: _$options.preferredLanguages,
|
|
1566
|
-
propertySchema:
|
|
1570
|
+
propertySchema: NodeShape.schema.properties.classes,
|
|
1567
1571
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
1568
1572
|
}),
|
|
1569
1573
|
comment: $shaclPropertyFromRdf({
|
|
@@ -1572,7 +1576,7 @@ export var PropertyShape;
|
|
|
1572
1576
|
focusResource: $resource,
|
|
1573
1577
|
ignoreRdfType: true,
|
|
1574
1578
|
preferredLanguages: _$options.preferredLanguages,
|
|
1575
|
-
propertySchema:
|
|
1579
|
+
propertySchema: NodeShape.schema.properties.comment,
|
|
1576
1580
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1577
1581
|
}),
|
|
1578
1582
|
datatype: $shaclPropertyFromRdf({
|
|
@@ -1581,7 +1585,7 @@ export var PropertyShape;
|
|
|
1581
1585
|
focusResource: $resource,
|
|
1582
1586
|
ignoreRdfType: true,
|
|
1583
1587
|
preferredLanguages: _$options.preferredLanguages,
|
|
1584
|
-
propertySchema:
|
|
1588
|
+
propertySchema: NodeShape.schema.properties.datatype,
|
|
1585
1589
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
1586
1590
|
}),
|
|
1587
1591
|
deactivated: $shaclPropertyFromRdf({
|
|
@@ -1590,7 +1594,7 @@ export var PropertyShape;
|
|
|
1590
1594
|
focusResource: $resource,
|
|
1591
1595
|
ignoreRdfType: true,
|
|
1592
1596
|
preferredLanguages: _$options.preferredLanguages,
|
|
1593
|
-
propertySchema:
|
|
1597
|
+
propertySchema: NodeShape.schema.properties.deactivated,
|
|
1594
1598
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
|
|
1595
1599
|
}),
|
|
1596
1600
|
defaultValue: $shaclPropertyFromRdf({
|
|
@@ -1635,7 +1639,7 @@ export var PropertyShape;
|
|
|
1635
1639
|
focusResource: $resource,
|
|
1636
1640
|
ignoreRdfType: true,
|
|
1637
1641
|
preferredLanguages: _$options.preferredLanguages,
|
|
1638
|
-
propertySchema:
|
|
1642
|
+
propertySchema: NodeShape.schema.properties.flags,
|
|
1639
1643
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1640
1644
|
}),
|
|
1641
1645
|
groups: $shaclPropertyFromRdf({
|
|
@@ -1653,7 +1657,7 @@ export var PropertyShape;
|
|
|
1653
1657
|
focusResource: $resource,
|
|
1654
1658
|
ignoreRdfType: true,
|
|
1655
1659
|
preferredLanguages: _$options.preferredLanguages,
|
|
1656
|
-
propertySchema:
|
|
1660
|
+
propertySchema: NodeShape.schema.properties.hasValues,
|
|
1657
1661
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($termFromRdfResourceValues)),
|
|
1658
1662
|
}),
|
|
1659
1663
|
in_: $shaclPropertyFromRdf({
|
|
@@ -1662,7 +1666,7 @@ export var PropertyShape;
|
|
|
1662
1666
|
focusResource: $resource,
|
|
1663
1667
|
ignoreRdfType: true,
|
|
1664
1668
|
preferredLanguages: _$options.preferredLanguages,
|
|
1665
|
-
propertySchema:
|
|
1669
|
+
propertySchema: NodeShape.schema.properties.in_,
|
|
1666
1670
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues(($termFromRdfResourceValues))),
|
|
1667
1671
|
}),
|
|
1668
1672
|
isDefinedBy: $shaclPropertyFromRdf({
|
|
@@ -1671,7 +1675,7 @@ export var PropertyShape;
|
|
|
1671
1675
|
focusResource: $resource,
|
|
1672
1676
|
ignoreRdfType: true,
|
|
1673
1677
|
preferredLanguages: _$options.preferredLanguages,
|
|
1674
|
-
propertySchema:
|
|
1678
|
+
propertySchema: NodeShape.schema.properties.isDefinedBy,
|
|
1675
1679
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
1676
1680
|
}),
|
|
1677
1681
|
label: $shaclPropertyFromRdf({
|
|
@@ -1680,7 +1684,7 @@ export var PropertyShape;
|
|
|
1680
1684
|
focusResource: $resource,
|
|
1681
1685
|
ignoreRdfType: true,
|
|
1682
1686
|
preferredLanguages: _$options.preferredLanguages,
|
|
1683
|
-
propertySchema:
|
|
1687
|
+
propertySchema: NodeShape.schema.properties.label,
|
|
1684
1688
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1685
1689
|
}),
|
|
1686
1690
|
languageIn: $shaclPropertyFromRdf({
|
|
@@ -1689,7 +1693,7 @@ export var PropertyShape;
|
|
|
1689
1693
|
focusResource: $resource,
|
|
1690
1694
|
ignoreRdfType: true,
|
|
1691
1695
|
preferredLanguages: _$options.preferredLanguages,
|
|
1692
|
-
propertySchema:
|
|
1696
|
+
propertySchema: NodeShape.schema.properties.languageIn,
|
|
1693
1697
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues(($stringFromRdfResourceValues))),
|
|
1694
1698
|
}),
|
|
1695
1699
|
lessThan: $shaclPropertyFromRdf({
|
|
@@ -1725,7 +1729,7 @@ export var PropertyShape;
|
|
|
1725
1729
|
focusResource: $resource,
|
|
1726
1730
|
ignoreRdfType: true,
|
|
1727
1731
|
preferredLanguages: _$options.preferredLanguages,
|
|
1728
|
-
propertySchema:
|
|
1732
|
+
propertySchema: NodeShape.schema.properties.maxExclusive,
|
|
1729
1733
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
|
|
1730
1734
|
}),
|
|
1731
1735
|
maxInclusive: $shaclPropertyFromRdf({
|
|
@@ -1734,7 +1738,7 @@ export var PropertyShape;
|
|
|
1734
1738
|
focusResource: $resource,
|
|
1735
1739
|
ignoreRdfType: true,
|
|
1736
1740
|
preferredLanguages: _$options.preferredLanguages,
|
|
1737
|
-
propertySchema:
|
|
1741
|
+
propertySchema: NodeShape.schema.properties.maxInclusive,
|
|
1738
1742
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
|
|
1739
1743
|
}),
|
|
1740
1744
|
maxLength: $shaclPropertyFromRdf({
|
|
@@ -1743,7 +1747,7 @@ export var PropertyShape;
|
|
|
1743
1747
|
focusResource: $resource,
|
|
1744
1748
|
ignoreRdfType: true,
|
|
1745
1749
|
preferredLanguages: _$options.preferredLanguages,
|
|
1746
|
-
propertySchema:
|
|
1750
|
+
propertySchema: NodeShape.schema.properties.maxLength,
|
|
1747
1751
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
|
|
1748
1752
|
}),
|
|
1749
1753
|
message: $shaclPropertyFromRdf({
|
|
@@ -1752,7 +1756,7 @@ export var PropertyShape;
|
|
|
1752
1756
|
focusResource: $resource,
|
|
1753
1757
|
ignoreRdfType: true,
|
|
1754
1758
|
preferredLanguages: _$options.preferredLanguages,
|
|
1755
|
-
propertySchema:
|
|
1759
|
+
propertySchema: NodeShape.schema.properties.message,
|
|
1756
1760
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1757
1761
|
}),
|
|
1758
1762
|
minCount: $shaclPropertyFromRdf({
|
|
@@ -1770,7 +1774,7 @@ export var PropertyShape;
|
|
|
1770
1774
|
focusResource: $resource,
|
|
1771
1775
|
ignoreRdfType: true,
|
|
1772
1776
|
preferredLanguages: _$options.preferredLanguages,
|
|
1773
|
-
propertySchema:
|
|
1777
|
+
propertySchema: NodeShape.schema.properties.minExclusive,
|
|
1774
1778
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
|
|
1775
1779
|
}),
|
|
1776
1780
|
minInclusive: $shaclPropertyFromRdf({
|
|
@@ -1779,7 +1783,7 @@ export var PropertyShape;
|
|
|
1779
1783
|
focusResource: $resource,
|
|
1780
1784
|
ignoreRdfType: true,
|
|
1781
1785
|
preferredLanguages: _$options.preferredLanguages,
|
|
1782
|
-
propertySchema:
|
|
1786
|
+
propertySchema: NodeShape.schema.properties.minInclusive,
|
|
1783
1787
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
|
|
1784
1788
|
}),
|
|
1785
1789
|
minLength: $shaclPropertyFromRdf({
|
|
@@ -1788,7 +1792,7 @@ export var PropertyShape;
|
|
|
1788
1792
|
focusResource: $resource,
|
|
1789
1793
|
ignoreRdfType: true,
|
|
1790
1794
|
preferredLanguages: _$options.preferredLanguages,
|
|
1791
|
-
propertySchema:
|
|
1795
|
+
propertySchema: NodeShape.schema.properties.minLength,
|
|
1792
1796
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
|
|
1793
1797
|
}),
|
|
1794
1798
|
name: $shaclPropertyFromRdf({
|
|
@@ -1806,7 +1810,7 @@ export var PropertyShape;
|
|
|
1806
1810
|
focusResource: $resource,
|
|
1807
1811
|
ignoreRdfType: true,
|
|
1808
1812
|
preferredLanguages: _$options.preferredLanguages,
|
|
1809
|
-
propertySchema:
|
|
1813
|
+
propertySchema: NodeShape.schema.properties.node,
|
|
1810
1814
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
1811
1815
|
}),
|
|
1812
1816
|
nodeKind: $shaclPropertyFromRdf({
|
|
@@ -1815,7 +1819,7 @@ export var PropertyShape;
|
|
|
1815
1819
|
focusResource: $resource,
|
|
1816
1820
|
ignoreRdfType: true,
|
|
1817
1821
|
preferredLanguages: _$options.preferredLanguages,
|
|
1818
|
-
propertySchema:
|
|
1822
|
+
propertySchema: NodeShape.schema.properties.nodeKind,
|
|
1819
1823
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
1820
1824
|
}),
|
|
1821
1825
|
not: $shaclPropertyFromRdf({
|
|
@@ -1824,7 +1828,7 @@ export var PropertyShape;
|
|
|
1824
1828
|
focusResource: $resource,
|
|
1825
1829
|
ignoreRdfType: true,
|
|
1826
1830
|
preferredLanguages: _$options.preferredLanguages,
|
|
1827
|
-
propertySchema:
|
|
1831
|
+
propertySchema: NodeShape.schema.properties.not,
|
|
1828
1832
|
typeFromRdfResourceValues: $setFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
1829
1833
|
}),
|
|
1830
1834
|
or: $shaclPropertyFromRdf({
|
|
@@ -1833,7 +1837,7 @@ export var PropertyShape;
|
|
|
1833
1837
|
focusResource: $resource,
|
|
1834
1838
|
ignoreRdfType: true,
|
|
1835
1839
|
preferredLanguages: _$options.preferredLanguages,
|
|
1836
|
-
propertySchema:
|
|
1840
|
+
propertySchema: NodeShape.schema.properties.or,
|
|
1837
1841
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
|
|
1838
1842
|
}),
|
|
1839
1843
|
order: $shaclPropertyFromRdf({
|
|
@@ -1860,7 +1864,7 @@ export var PropertyShape;
|
|
|
1860
1864
|
focusResource: $resource,
|
|
1861
1865
|
ignoreRdfType: true,
|
|
1862
1866
|
preferredLanguages: _$options.preferredLanguages,
|
|
1863
|
-
propertySchema:
|
|
1867
|
+
propertySchema: NodeShape.schema.properties.pattern,
|
|
1864
1868
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
1865
1869
|
}),
|
|
1866
1870
|
qualifiedMaxCount: $shaclPropertyFromRdf({
|
|
@@ -1905,7 +1909,7 @@ export var PropertyShape;
|
|
|
1905
1909
|
focusResource: $resource,
|
|
1906
1910
|
ignoreRdfType: true,
|
|
1907
1911
|
preferredLanguages: _$options.preferredLanguages,
|
|
1908
|
-
propertySchema:
|
|
1912
|
+
propertySchema: NodeShape.schema.properties.severity,
|
|
1909
1913
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
1910
1914
|
}),
|
|
1911
1915
|
targetClasses: $shaclPropertyFromRdf({
|
|
@@ -1914,7 +1918,7 @@ export var PropertyShape;
|
|
|
1914
1918
|
focusResource: $resource,
|
|
1915
1919
|
ignoreRdfType: true,
|
|
1916
1920
|
preferredLanguages: _$options.preferredLanguages,
|
|
1917
|
-
propertySchema:
|
|
1921
|
+
propertySchema: NodeShape.schema.properties.targetClasses,
|
|
1918
1922
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
1919
1923
|
}),
|
|
1920
1924
|
targetNodes: $shaclPropertyFromRdf({
|
|
@@ -1923,7 +1927,7 @@ export var PropertyShape;
|
|
|
1923
1927
|
focusResource: $resource,
|
|
1924
1928
|
ignoreRdfType: true,
|
|
1925
1929
|
preferredLanguages: _$options.preferredLanguages,
|
|
1926
|
-
propertySchema:
|
|
1930
|
+
propertySchema: NodeShape.schema.properties.targetNodes,
|
|
1927
1931
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($termFromRdfResourceValues)),
|
|
1928
1932
|
}),
|
|
1929
1933
|
targetObjectsOf: $shaclPropertyFromRdf({
|
|
@@ -1932,7 +1936,7 @@ export var PropertyShape;
|
|
|
1932
1936
|
focusResource: $resource,
|
|
1933
1937
|
ignoreRdfType: true,
|
|
1934
1938
|
preferredLanguages: _$options.preferredLanguages,
|
|
1935
|
-
propertySchema:
|
|
1939
|
+
propertySchema: NodeShape.schema.properties.targetObjectsOf,
|
|
1936
1940
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
1937
1941
|
}),
|
|
1938
1942
|
targetSubjectsOf: $shaclPropertyFromRdf({
|
|
@@ -1941,7 +1945,7 @@ export var PropertyShape;
|
|
|
1941
1945
|
focusResource: $resource,
|
|
1942
1946
|
ignoreRdfType: true,
|
|
1943
1947
|
preferredLanguages: _$options.preferredLanguages,
|
|
1944
|
-
propertySchema:
|
|
1948
|
+
propertySchema: NodeShape.schema.properties.targetSubjectsOf,
|
|
1945
1949
|
typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
|
|
1946
1950
|
}),
|
|
1947
1951
|
uniqueLang: $shaclPropertyFromRdf({
|
|
@@ -1959,7 +1963,7 @@ export var PropertyShape;
|
|
|
1959
1963
|
focusResource: $resource,
|
|
1960
1964
|
ignoreRdfType: true,
|
|
1961
1965
|
preferredLanguages: _$options.preferredLanguages,
|
|
1962
|
-
propertySchema:
|
|
1966
|
+
propertySchema: NodeShape.schema.properties.xone,
|
|
1963
1967
|
typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
|
|
1964
1968
|
}),
|
|
1965
1969
|
}).chain((properties) => PropertyShape.create(properties)));
|
|
@@ -2301,16 +2305,20 @@ export var PropertyShape;
|
|
|
2301
2305
|
severity: {
|
|
2302
2306
|
kind: "Shacl",
|
|
2303
2307
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#severity"),
|
|
2304
|
-
type
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2308
|
+
get type() {
|
|
2309
|
+
return {
|
|
2310
|
+
kind: "Option",
|
|
2311
|
+
get itemType() {
|
|
2312
|
+
return {
|
|
2313
|
+
kind: "Iri",
|
|
2314
|
+
in: [
|
|
2315
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
|
|
2316
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
|
|
2317
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
|
|
2318
|
+
],
|
|
2319
|
+
};
|
|
2320
|
+
},
|
|
2321
|
+
};
|
|
2314
2322
|
},
|
|
2315
2323
|
},
|
|
2316
2324
|
targetClasses: {
|
|
@@ -2582,6 +2590,373 @@ export var PropertyShape;
|
|
|
2582
2590
|
path: $PropertyPath.$toString(_propertyShape.path),
|
|
2583
2591
|
});
|
|
2584
2592
|
})(PropertyShape || (PropertyShape = {}));
|
|
2593
|
+
export var ValidationReport;
|
|
2594
|
+
(function (ValidationReport) {
|
|
2595
|
+
ValidationReport.create = (parameters) => $sequenceRecord({
|
|
2596
|
+
$identifier: $convertToIdentifierProperty(parameters.$identifier),
|
|
2597
|
+
conforms: Either.of(parameters.conforms),
|
|
2598
|
+
results: $convertToScalarSet($identityConversionFunction, true)(parameters.results).chain((value) => $validateArray($identityValidationFunction, true)(ValidationReport.schema.properties.results.type, value)),
|
|
2599
|
+
shapesGraphWellFormed: $convertToMaybe($identityConversionFunction)(parameters.shapesGraphWellFormed).chain((value) => $validateMaybe($identityValidationFunction)(ValidationReport.schema.properties.shapesGraphWellFormed.type, value)),
|
|
2600
|
+
})
|
|
2601
|
+
.map((properties) => ({
|
|
2602
|
+
...properties,
|
|
2603
|
+
$type: "ValidationReport",
|
|
2604
|
+
}))
|
|
2605
|
+
.map((object) => $monkeyPatchObject(object, { $toString: ValidationReport.$toString }));
|
|
2606
|
+
function createUnsafe(parameters) {
|
|
2607
|
+
return ValidationReport.create(parameters).unsafeCoerce();
|
|
2608
|
+
}
|
|
2609
|
+
ValidationReport.createUnsafe = createUnsafe;
|
|
2610
|
+
ValidationReport._fromRdfResource = ($resource, _$options) => (!_$options.ignoreRdfType
|
|
2611
|
+
? $ensureRdfResourceType($resource, [ValidationReport.schema.fromRdfType], { graph: _$options.graph })
|
|
2612
|
+
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
2613
|
+
$identifier: $identifierFromRdfResourceValues(new Resource.Value({
|
|
2614
|
+
dataFactory: dataFactory,
|
|
2615
|
+
focusResource: $resource,
|
|
2616
|
+
propertyPath: $RdfVocabularies.rdf.subject,
|
|
2617
|
+
term: $resource.identifier,
|
|
2618
|
+
}).toValues(), {
|
|
2619
|
+
context: _$options.context,
|
|
2620
|
+
graph: _$options.graph,
|
|
2621
|
+
focusResource: $resource,
|
|
2622
|
+
preferredLanguages: _$options.preferredLanguages,
|
|
2623
|
+
propertyPath: $RdfVocabularies.rdf.subject,
|
|
2624
|
+
schema: ValidationReport.schema.properties.$identifier.type,
|
|
2625
|
+
}).chain((values) => values.head()),
|
|
2626
|
+
conforms: $shaclPropertyFromRdf({
|
|
2627
|
+
context: _$options.context,
|
|
2628
|
+
graph: _$options.graph,
|
|
2629
|
+
focusResource: $resource,
|
|
2630
|
+
ignoreRdfType: true,
|
|
2631
|
+
preferredLanguages: _$options.preferredLanguages,
|
|
2632
|
+
propertySchema: ValidationReport.schema.properties.conforms,
|
|
2633
|
+
typeFromRdfResourceValues: ($booleanFromRdfResourceValues),
|
|
2634
|
+
}),
|
|
2635
|
+
results: $shaclPropertyFromRdf({
|
|
2636
|
+
context: _$options.context,
|
|
2637
|
+
graph: _$options.graph,
|
|
2638
|
+
focusResource: $resource,
|
|
2639
|
+
ignoreRdfType: true,
|
|
2640
|
+
preferredLanguages: _$options.preferredLanguages,
|
|
2641
|
+
propertySchema: ValidationReport.schema.properties.results,
|
|
2642
|
+
typeFromRdfResourceValues: $setFromRdfResourceValues(ValidationResult.fromRdfResourceValues),
|
|
2643
|
+
}),
|
|
2644
|
+
shapesGraphWellFormed: $shaclPropertyFromRdf({
|
|
2645
|
+
context: _$options.context,
|
|
2646
|
+
graph: _$options.graph,
|
|
2647
|
+
focusResource: $resource,
|
|
2648
|
+
ignoreRdfType: true,
|
|
2649
|
+
preferredLanguages: _$options.preferredLanguages,
|
|
2650
|
+
propertySchema: ValidationReport.schema.properties.shapesGraphWellFormed,
|
|
2651
|
+
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
|
|
2652
|
+
}),
|
|
2653
|
+
}).chain((properties) => ValidationReport.create(properties)));
|
|
2654
|
+
ValidationReport.fromRdfResource = $wrap_FromRdfResourceFunction(ValidationReport._fromRdfResource);
|
|
2655
|
+
ValidationReport.fromRdfResourceValues = (values, options) => values.chainMap((value) => value
|
|
2656
|
+
.toResource()
|
|
2657
|
+
.chain((resource) => ValidationReport.fromRdfResource(resource, options)));
|
|
2658
|
+
let Identifier;
|
|
2659
|
+
(function (Identifier) {
|
|
2660
|
+
Identifier.parse = $parseIdentifier;
|
|
2661
|
+
Identifier.stringify = NTriplesTerm.stringify;
|
|
2662
|
+
})(Identifier = ValidationReport.Identifier || (ValidationReport.Identifier = {}));
|
|
2663
|
+
function isValidationReport(object) {
|
|
2664
|
+
return object.$type === "ValidationReport";
|
|
2665
|
+
}
|
|
2666
|
+
ValidationReport.isValidationReport = isValidationReport;
|
|
2667
|
+
ValidationReport.schema = {
|
|
2668
|
+
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationReport"),
|
|
2669
|
+
properties: {
|
|
2670
|
+
$identifier: {
|
|
2671
|
+
kind: "Identifier",
|
|
2672
|
+
type: { kind: "Identifier" },
|
|
2673
|
+
},
|
|
2674
|
+
conforms: {
|
|
2675
|
+
kind: "Shacl",
|
|
2676
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#conforms"),
|
|
2677
|
+
type: { kind: "Boolean" },
|
|
2678
|
+
},
|
|
2679
|
+
results: {
|
|
2680
|
+
kind: "Shacl",
|
|
2681
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#result"),
|
|
2682
|
+
get type() {
|
|
2683
|
+
return {
|
|
2684
|
+
kind: "Set",
|
|
2685
|
+
get itemType() {
|
|
2686
|
+
return ValidationResult.schema;
|
|
2687
|
+
},
|
|
2688
|
+
};
|
|
2689
|
+
},
|
|
2690
|
+
},
|
|
2691
|
+
shapesGraphWellFormed: {
|
|
2692
|
+
kind: "Shacl",
|
|
2693
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#shapesGraphWellFormed"),
|
|
2694
|
+
type: {
|
|
2695
|
+
kind: "Option",
|
|
2696
|
+
itemType: { kind: "Boolean" },
|
|
2697
|
+
},
|
|
2698
|
+
},
|
|
2699
|
+
},
|
|
2700
|
+
};
|
|
2701
|
+
ValidationReport._toRdfResource = (parameters) => {
|
|
2702
|
+
if (!parameters.ignoreRdfType) {
|
|
2703
|
+
parameters.resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationReport"), parameters.graph);
|
|
2704
|
+
}
|
|
2705
|
+
parameters.resource.add(ValidationReport.schema.properties.conforms.path, [
|
|
2706
|
+
$literalFactory.boolean(parameters.object.conforms, $RdfVocabularies.xsd.boolean),
|
|
2707
|
+
], parameters.graph);
|
|
2708
|
+
parameters.resource.add(ValidationReport.schema.properties.results.path, parameters.object.results.flatMap((item) => [
|
|
2709
|
+
ValidationResult.toRdfResource(item, {
|
|
2710
|
+
graph: parameters.graph,
|
|
2711
|
+
resourceSet: parameters.resourceSet,
|
|
2712
|
+
}).identifier,
|
|
2713
|
+
]), parameters.graph);
|
|
2714
|
+
parameters.resource.add(ValidationReport.schema.properties.shapesGraphWellFormed.path, parameters.object.shapesGraphWellFormed
|
|
2715
|
+
.toList()
|
|
2716
|
+
.flatMap((value) => [
|
|
2717
|
+
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
2718
|
+
]), parameters.graph);
|
|
2719
|
+
return parameters.resource;
|
|
2720
|
+
};
|
|
2721
|
+
ValidationReport.toRdfResource = $wrap_ToRdfResourceFunction(ValidationReport._toRdfResource);
|
|
2722
|
+
ValidationReport.$toString = (_validationReport) => `ValidationReport(${JSON.stringify(ValidationReport.toStringRecord(_validationReport))})`;
|
|
2723
|
+
ValidationReport.toStringRecord = (_validationReport) => $compactRecord({ $identifier: _validationReport.$identifier().toString() });
|
|
2724
|
+
})(ValidationReport || (ValidationReport = {}));
|
|
2725
|
+
export var ValidationResult;
|
|
2726
|
+
(function (ValidationResult) {
|
|
2727
|
+
ValidationResult.create = (parameters) => $sequenceRecord({
|
|
2728
|
+
$identifier: $convertToIdentifierProperty(parameters.$identifier),
|
|
2729
|
+
details: $convertToScalarSet($identityConversionFunction, true)(parameters.details).chain((value) => $validateArray($identityValidationFunction, true)(ValidationResult.schema.properties.details.type, value)),
|
|
2730
|
+
focusNode: Either.of(parameters.focusNode),
|
|
2731
|
+
message: $convertToMaybe($identityConversionFunction)(parameters.message).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.message.type, value)),
|
|
2732
|
+
path: $convertToMaybe($identityConversionFunction)(parameters.path).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.path.type, value)),
|
|
2733
|
+
severity: $convertToIri(parameters.severity),
|
|
2734
|
+
sourceConstraintComponent: $convertToIri(parameters.sourceConstraintComponent),
|
|
2735
|
+
sourceShape: $convertToMaybe($convertToIdentifier)(parameters.sourceShape).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.sourceShape.type, value)),
|
|
2736
|
+
value: $convertToMaybe($identityConversionFunction)(parameters.value).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.value.type, value)),
|
|
2737
|
+
})
|
|
2738
|
+
.map((properties) => ({
|
|
2739
|
+
...properties,
|
|
2740
|
+
$type: "ValidationResult",
|
|
2741
|
+
}))
|
|
2742
|
+
.map((object) => $monkeyPatchObject(object, { $toString: ValidationResult.$toString }));
|
|
2743
|
+
function createUnsafe(parameters) {
|
|
2744
|
+
return ValidationResult.create(parameters).unsafeCoerce();
|
|
2745
|
+
}
|
|
2746
|
+
ValidationResult.createUnsafe = createUnsafe;
|
|
2747
|
+
ValidationResult._fromRdfResource = ($resource, _$options) => (!_$options.ignoreRdfType
|
|
2748
|
+
? $ensureRdfResourceType($resource, [ValidationResult.schema.fromRdfType], { graph: _$options.graph })
|
|
2749
|
+
: Right(true)).chain((_rdfTypeCheck) => $sequenceRecord({
|
|
2750
|
+
$identifier: $identifierFromRdfResourceValues(new Resource.Value({
|
|
2751
|
+
dataFactory: dataFactory,
|
|
2752
|
+
focusResource: $resource,
|
|
2753
|
+
propertyPath: $RdfVocabularies.rdf.subject,
|
|
2754
|
+
term: $resource.identifier,
|
|
2755
|
+
}).toValues(), {
|
|
2756
|
+
context: _$options.context,
|
|
2757
|
+
graph: _$options.graph,
|
|
2758
|
+
focusResource: $resource,
|
|
2759
|
+
preferredLanguages: _$options.preferredLanguages,
|
|
2760
|
+
propertyPath: $RdfVocabularies.rdf.subject,
|
|
2761
|
+
schema: ValidationResult.schema.properties.$identifier.type,
|
|
2762
|
+
}).chain((values) => values.head()),
|
|
2763
|
+
details: $shaclPropertyFromRdf({
|
|
2764
|
+
context: _$options.context,
|
|
2765
|
+
graph: _$options.graph,
|
|
2766
|
+
focusResource: $resource,
|
|
2767
|
+
ignoreRdfType: true,
|
|
2768
|
+
preferredLanguages: _$options.preferredLanguages,
|
|
2769
|
+
propertySchema: ValidationResult.schema.properties.details,
|
|
2770
|
+
typeFromRdfResourceValues: $setFromRdfResourceValues(($termFromRdfResourceValues)),
|
|
2771
|
+
}),
|
|
2772
|
+
focusNode: $shaclPropertyFromRdf({
|
|
2773
|
+
context: _$options.context,
|
|
2774
|
+
graph: _$options.graph,
|
|
2775
|
+
focusResource: $resource,
|
|
2776
|
+
ignoreRdfType: true,
|
|
2777
|
+
preferredLanguages: _$options.preferredLanguages,
|
|
2778
|
+
propertySchema: ValidationResult.schema.properties.focusNode,
|
|
2779
|
+
typeFromRdfResourceValues: ($termFromRdfResourceValues),
|
|
2780
|
+
}),
|
|
2781
|
+
message: $shaclPropertyFromRdf({
|
|
2782
|
+
context: _$options.context,
|
|
2783
|
+
graph: _$options.graph,
|
|
2784
|
+
focusResource: $resource,
|
|
2785
|
+
ignoreRdfType: true,
|
|
2786
|
+
preferredLanguages: _$options.preferredLanguages,
|
|
2787
|
+
propertySchema: ValidationResult.schema.properties.message,
|
|
2788
|
+
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
|
|
2789
|
+
}),
|
|
2790
|
+
path: $shaclPropertyFromRdf({
|
|
2791
|
+
context: _$options.context,
|
|
2792
|
+
graph: _$options.graph,
|
|
2793
|
+
focusResource: $resource,
|
|
2794
|
+
ignoreRdfType: true,
|
|
2795
|
+
preferredLanguages: _$options.preferredLanguages,
|
|
2796
|
+
propertySchema: ValidationResult.schema.properties.path,
|
|
2797
|
+
typeFromRdfResourceValues: $maybeFromRdfResourceValues($PropertyPath.fromRdfResourceValues),
|
|
2798
|
+
}),
|
|
2799
|
+
severity: $shaclPropertyFromRdf({
|
|
2800
|
+
context: _$options.context,
|
|
2801
|
+
graph: _$options.graph,
|
|
2802
|
+
focusResource: $resource,
|
|
2803
|
+
ignoreRdfType: true,
|
|
2804
|
+
preferredLanguages: _$options.preferredLanguages,
|
|
2805
|
+
propertySchema: ValidationResult.schema.properties.severity,
|
|
2806
|
+
typeFromRdfResourceValues: ($iriFromRdfResourceValues),
|
|
2807
|
+
}),
|
|
2808
|
+
sourceConstraintComponent: $shaclPropertyFromRdf({
|
|
2809
|
+
context: _$options.context,
|
|
2810
|
+
graph: _$options.graph,
|
|
2811
|
+
focusResource: $resource,
|
|
2812
|
+
ignoreRdfType: true,
|
|
2813
|
+
preferredLanguages: _$options.preferredLanguages,
|
|
2814
|
+
propertySchema: ValidationResult.schema.properties.sourceConstraintComponent,
|
|
2815
|
+
typeFromRdfResourceValues: ($iriFromRdfResourceValues),
|
|
2816
|
+
}),
|
|
2817
|
+
sourceShape: $shaclPropertyFromRdf({
|
|
2818
|
+
context: _$options.context,
|
|
2819
|
+
graph: _$options.graph,
|
|
2820
|
+
focusResource: $resource,
|
|
2821
|
+
ignoreRdfType: true,
|
|
2822
|
+
preferredLanguages: _$options.preferredLanguages,
|
|
2823
|
+
propertySchema: ValidationResult.schema.properties.sourceShape,
|
|
2824
|
+
typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
|
|
2825
|
+
}),
|
|
2826
|
+
value: $shaclPropertyFromRdf({
|
|
2827
|
+
context: _$options.context,
|
|
2828
|
+
graph: _$options.graph,
|
|
2829
|
+
focusResource: $resource,
|
|
2830
|
+
ignoreRdfType: true,
|
|
2831
|
+
preferredLanguages: _$options.preferredLanguages,
|
|
2832
|
+
propertySchema: ValidationResult.schema.properties.value,
|
|
2833
|
+
typeFromRdfResourceValues: $maybeFromRdfResourceValues(($termFromRdfResourceValues)),
|
|
2834
|
+
}),
|
|
2835
|
+
}).chain((properties) => ValidationResult.create(properties)));
|
|
2836
|
+
ValidationResult.fromRdfResource = $wrap_FromRdfResourceFunction(ValidationResult._fromRdfResource);
|
|
2837
|
+
ValidationResult.fromRdfResourceValues = (values, options) => values.chainMap((value) => value
|
|
2838
|
+
.toResource()
|
|
2839
|
+
.chain((resource) => ValidationResult.fromRdfResource(resource, options)));
|
|
2840
|
+
let Identifier;
|
|
2841
|
+
(function (Identifier) {
|
|
2842
|
+
Identifier.parse = $parseIdentifier;
|
|
2843
|
+
Identifier.stringify = NTriplesTerm.stringify;
|
|
2844
|
+
})(Identifier = ValidationResult.Identifier || (ValidationResult.Identifier = {}));
|
|
2845
|
+
function isValidationResult(object) {
|
|
2846
|
+
return object.$type === "ValidationResult";
|
|
2847
|
+
}
|
|
2848
|
+
ValidationResult.isValidationResult = isValidationResult;
|
|
2849
|
+
ValidationResult.schema = {
|
|
2850
|
+
fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationResult"),
|
|
2851
|
+
properties: {
|
|
2852
|
+
$identifier: {
|
|
2853
|
+
kind: "Identifier",
|
|
2854
|
+
type: { kind: "Identifier" },
|
|
2855
|
+
},
|
|
2856
|
+
details: {
|
|
2857
|
+
kind: "Shacl",
|
|
2858
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#detail"),
|
|
2859
|
+
type: {
|
|
2860
|
+
kind: "Set",
|
|
2861
|
+
itemType: {
|
|
2862
|
+
kind: "Term",
|
|
2863
|
+
types: ["BlankNode", "NamedNode", "Literal"],
|
|
2864
|
+
},
|
|
2865
|
+
},
|
|
2866
|
+
},
|
|
2867
|
+
focusNode: {
|
|
2868
|
+
kind: "Shacl",
|
|
2869
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#focusNode"),
|
|
2870
|
+
type: {
|
|
2871
|
+
kind: "Term",
|
|
2872
|
+
types: ["BlankNode", "NamedNode", "Literal"],
|
|
2873
|
+
},
|
|
2874
|
+
},
|
|
2875
|
+
message: {
|
|
2876
|
+
kind: "Shacl",
|
|
2877
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#resultMessage"),
|
|
2878
|
+
type: {
|
|
2879
|
+
kind: "Option",
|
|
2880
|
+
itemType: { kind: "String" },
|
|
2881
|
+
},
|
|
2882
|
+
},
|
|
2883
|
+
path: {
|
|
2884
|
+
kind: "Shacl",
|
|
2885
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#resultPath"),
|
|
2886
|
+
get type() {
|
|
2887
|
+
return {
|
|
2888
|
+
kind: "Option",
|
|
2889
|
+
get itemType() {
|
|
2890
|
+
return $PropertyPath.schema;
|
|
2891
|
+
},
|
|
2892
|
+
};
|
|
2893
|
+
},
|
|
2894
|
+
},
|
|
2895
|
+
severity: {
|
|
2896
|
+
kind: "Shacl",
|
|
2897
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#resultSeverity"),
|
|
2898
|
+
get type() {
|
|
2899
|
+
return {
|
|
2900
|
+
kind: "Iri",
|
|
2901
|
+
in: [
|
|
2902
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
|
|
2903
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
|
|
2904
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
|
|
2905
|
+
],
|
|
2906
|
+
};
|
|
2907
|
+
},
|
|
2908
|
+
},
|
|
2909
|
+
sourceConstraintComponent: {
|
|
2910
|
+
kind: "Shacl",
|
|
2911
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#sourceConstraintComponent"),
|
|
2912
|
+
type: { kind: "Iri" },
|
|
2913
|
+
},
|
|
2914
|
+
sourceShape: {
|
|
2915
|
+
kind: "Shacl",
|
|
2916
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#sourceShape"),
|
|
2917
|
+
type: {
|
|
2918
|
+
kind: "Option",
|
|
2919
|
+
itemType: { kind: "Identifier" },
|
|
2920
|
+
},
|
|
2921
|
+
},
|
|
2922
|
+
value: {
|
|
2923
|
+
kind: "Shacl",
|
|
2924
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#value"),
|
|
2925
|
+
type: {
|
|
2926
|
+
kind: "Option",
|
|
2927
|
+
itemType: {
|
|
2928
|
+
kind: "Term",
|
|
2929
|
+
types: ["BlankNode", "NamedNode", "Literal"],
|
|
2930
|
+
},
|
|
2931
|
+
},
|
|
2932
|
+
},
|
|
2933
|
+
},
|
|
2934
|
+
};
|
|
2935
|
+
ValidationResult._toRdfResource = (parameters) => {
|
|
2936
|
+
if (!parameters.ignoreRdfType) {
|
|
2937
|
+
parameters.resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#ValidationResult"), parameters.graph);
|
|
2938
|
+
}
|
|
2939
|
+
parameters.resource.add(ValidationResult.schema.properties.details.path, parameters.object.details.flatMap((item) => [item]), parameters.graph);
|
|
2940
|
+
parameters.resource.add(ValidationResult.schema.properties.focusNode.path, [parameters.object.focusNode], parameters.graph);
|
|
2941
|
+
parameters.resource.add(ValidationResult.schema.properties.message.path, parameters.object.message
|
|
2942
|
+
.toList()
|
|
2943
|
+
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
2944
|
+
parameters.resource.add(ValidationResult.schema.properties.path.path, parameters.object.path.toList().flatMap((value) => [
|
|
2945
|
+
$PropertyPath.toRdfResource(value, {
|
|
2946
|
+
graph: parameters.graph,
|
|
2947
|
+
resourceSet: parameters.resourceSet,
|
|
2948
|
+
}).identifier,
|
|
2949
|
+
]), parameters.graph);
|
|
2950
|
+
parameters.resource.add(ValidationResult.schema.properties.severity.path, [parameters.object.severity], parameters.graph);
|
|
2951
|
+
parameters.resource.add(ValidationResult.schema.properties.sourceConstraintComponent.path, [parameters.object.sourceConstraintComponent], parameters.graph);
|
|
2952
|
+
parameters.resource.add(ValidationResult.schema.properties.sourceShape.path, parameters.object.sourceShape.toList(), parameters.graph);
|
|
2953
|
+
parameters.resource.add(ValidationResult.schema.properties.value.path, parameters.object.value.toList(), parameters.graph);
|
|
2954
|
+
return parameters.resource;
|
|
2955
|
+
};
|
|
2956
|
+
ValidationResult.toRdfResource = $wrap_ToRdfResourceFunction(ValidationResult._toRdfResource);
|
|
2957
|
+
ValidationResult.$toString = (_validationResult) => `ValidationResult(${JSON.stringify(ValidationResult.toStringRecord(_validationResult))})`;
|
|
2958
|
+
ValidationResult.toStringRecord = (_validationResult) => $compactRecord({ $identifier: _validationResult.$identifier().toString() });
|
|
2959
|
+
})(ValidationResult || (ValidationResult = {}));
|
|
2585
2960
|
export var Shape;
|
|
2586
2961
|
(function (Shape) {
|
|
2587
2962
|
Shape.$toString = (value) => {
|
|
@@ -2837,16 +3212,20 @@ export var Shape;
|
|
|
2837
3212
|
severity: {
|
|
2838
3213
|
kind: "Shacl",
|
|
2839
3214
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#severity"),
|
|
2840
|
-
type
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
3215
|
+
get type() {
|
|
3216
|
+
return {
|
|
3217
|
+
kind: "Option",
|
|
3218
|
+
get itemType() {
|
|
3219
|
+
return {
|
|
3220
|
+
kind: "Iri",
|
|
3221
|
+
in: [
|
|
3222
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
|
|
3223
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
|
|
3224
|
+
dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
|
|
3225
|
+
],
|
|
3226
|
+
};
|
|
3227
|
+
},
|
|
3228
|
+
};
|
|
2850
3229
|
},
|
|
2851
3230
|
},
|
|
2852
3231
|
targetClasses: {
|
|
@@ -2929,6 +3308,12 @@ export var $Object;
|
|
|
2929
3308
|
if (PropertyShape.isPropertyShape(value)) {
|
|
2930
3309
|
return PropertyShape.$toString(value);
|
|
2931
3310
|
}
|
|
3311
|
+
if (ValidationReport.isValidationReport(value)) {
|
|
3312
|
+
return ValidationReport.$toString(value);
|
|
3313
|
+
}
|
|
3314
|
+
if (ValidationResult.isValidationResult(value)) {
|
|
3315
|
+
return ValidationResult.$toString(value);
|
|
3316
|
+
}
|
|
2932
3317
|
throw new Error("unable to serialize to string");
|
|
2933
3318
|
};
|
|
2934
3319
|
$Object.fromRdfResource = (resource, options) => NodeShape.fromRdfResource(resource, {
|
|
@@ -2946,6 +3331,14 @@ export var $Object;
|
|
|
2946
3331
|
.altLazy(() => PropertyShape.fromRdfResource(resource, {
|
|
2947
3332
|
...options,
|
|
2948
3333
|
ignoreRdfType: false,
|
|
3334
|
+
}))
|
|
3335
|
+
.altLazy(() => ValidationReport.fromRdfResource(resource, {
|
|
3336
|
+
...options,
|
|
3337
|
+
ignoreRdfType: false,
|
|
3338
|
+
}))
|
|
3339
|
+
.altLazy(() => ValidationResult.fromRdfResource(resource, {
|
|
3340
|
+
...options,
|
|
3341
|
+
ignoreRdfType: false,
|
|
2949
3342
|
}));
|
|
2950
3343
|
$Object.fromRdfResourceValues = ((values, options) => values.chainMap((value) => {
|
|
2951
3344
|
const valueAsValues = value.toValues();
|
|
@@ -2964,6 +3357,14 @@ export var $Object;
|
|
|
2964
3357
|
.altLazy(() => PropertyShape.fromRdfResourceValues(valueAsValues, {
|
|
2965
3358
|
...options,
|
|
2966
3359
|
schema: options.schema.members["PropertyShape"].type,
|
|
3360
|
+
}))
|
|
3361
|
+
.altLazy(() => ValidationReport.fromRdfResourceValues(valueAsValues, {
|
|
3362
|
+
...options,
|
|
3363
|
+
schema: options.schema.members["ValidationReport"].type,
|
|
3364
|
+
}))
|
|
3365
|
+
.altLazy(() => ValidationResult.fromRdfResourceValues(valueAsValues, {
|
|
3366
|
+
...options,
|
|
3367
|
+
schema: options.schema.members["ValidationResult"].type,
|
|
2967
3368
|
}))
|
|
2968
3369
|
.chain((values) => values.head());
|
|
2969
3370
|
}));
|
|
@@ -2985,25 +3386,16 @@ export var $Object;
|
|
|
2985
3386
|
discriminantValues: ["PropertyShape"],
|
|
2986
3387
|
type: PropertyShape.schema,
|
|
2987
3388
|
},
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
kind: "Shacl",
|
|
2992
|
-
path: dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#comment"),
|
|
2993
|
-
type: {
|
|
2994
|
-
kind: "Option",
|
|
2995
|
-
itemType: { kind: "String" },
|
|
2996
|
-
},
|
|
3389
|
+
ValidationReport: {
|
|
3390
|
+
discriminantValues: ["ValidationReport"],
|
|
3391
|
+
type: ValidationReport.schema,
|
|
2997
3392
|
},
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
type: {
|
|
3002
|
-
kind: "Option",
|
|
3003
|
-
itemType: { kind: "String" },
|
|
3004
|
-
},
|
|
3393
|
+
ValidationResult: {
|
|
3394
|
+
discriminantValues: ["ValidationResult"],
|
|
3395
|
+
type: ValidationResult.schema,
|
|
3005
3396
|
},
|
|
3006
3397
|
},
|
|
3398
|
+
properties: {},
|
|
3007
3399
|
};
|
|
3008
3400
|
$Object.toRdfResource = (object, options) => {
|
|
3009
3401
|
if (NodeShape.isNodeShape(object)) {
|
|
@@ -3018,6 +3410,12 @@ export var $Object;
|
|
|
3018
3410
|
if (PropertyShape.isPropertyShape(object)) {
|
|
3019
3411
|
return PropertyShape.toRdfResource(object, options);
|
|
3020
3412
|
}
|
|
3413
|
+
if (ValidationReport.isValidationReport(object)) {
|
|
3414
|
+
return ValidationReport.toRdfResource(object, options);
|
|
3415
|
+
}
|
|
3416
|
+
if (ValidationResult.isValidationResult(object)) {
|
|
3417
|
+
return ValidationResult.toRdfResource(object, options);
|
|
3418
|
+
}
|
|
3021
3419
|
throw new Error("unrecognized type");
|
|
3022
3420
|
};
|
|
3023
3421
|
$Object.toRdfResourceValues = ((value, _options) => {
|
|
@@ -3053,6 +3451,22 @@ export var $Object;
|
|
|
3053
3451
|
}).identifier,
|
|
3054
3452
|
];
|
|
3055
3453
|
}
|
|
3454
|
+
if (ValidationReport.isValidationReport(value)) {
|
|
3455
|
+
return [
|
|
3456
|
+
ValidationReport.toRdfResource(value, {
|
|
3457
|
+
graph: _options.graph,
|
|
3458
|
+
resourceSet: _options.resourceSet,
|
|
3459
|
+
}).identifier,
|
|
3460
|
+
];
|
|
3461
|
+
}
|
|
3462
|
+
if (ValidationResult.isValidationResult(value)) {
|
|
3463
|
+
return [
|
|
3464
|
+
ValidationResult.toRdfResource(value, {
|
|
3465
|
+
graph: _options.graph,
|
|
3466
|
+
resourceSet: _options.resourceSet,
|
|
3467
|
+
}).identifier,
|
|
3468
|
+
];
|
|
3469
|
+
}
|
|
3056
3470
|
throw new Error("unable to serialize to RDF");
|
|
3057
3471
|
});
|
|
3058
3472
|
})($Object || ($Object = {}));
|