@shaclmate/shacl-ast 4.0.26 → 4.0.28
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 +136 -150
- package/dist/generated.js +194 -160
- package/package.json +1 -1
package/dist/generated.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Either, Left, Maybe, Right } from "purify-ts";
|
|
|
8
8
|
* Remove undefined values from a record.
|
|
9
9
|
*/
|
|
10
10
|
function $compactRecord(record) {
|
|
11
|
-
return Object.entries(record).reduce((definedProperties, [propertyName, propertyValue]) => {
|
|
11
|
+
return globalThis.Object.entries(record).reduce((definedProperties, [propertyName, propertyValue]) => {
|
|
12
12
|
if (propertyValue !== undefined) {
|
|
13
13
|
definedProperties[propertyName] = propertyValue;
|
|
14
14
|
}
|
|
@@ -495,9 +495,12 @@ export var PropertyShape;
|
|
|
495
495
|
if (Maybe.isMaybe(parameters.maxCount)) {
|
|
496
496
|
maxCount = parameters.maxCount;
|
|
497
497
|
}
|
|
498
|
-
else if (typeof parameters.maxCount === "
|
|
498
|
+
else if (typeof parameters.maxCount === "bigint") {
|
|
499
499
|
maxCount = Maybe.of(parameters.maxCount);
|
|
500
500
|
}
|
|
501
|
+
else if (typeof parameters.maxCount === "number") {
|
|
502
|
+
maxCount = Maybe.of(BigInt(parameters.maxCount));
|
|
503
|
+
}
|
|
501
504
|
else if (parameters.maxCount === undefined) {
|
|
502
505
|
maxCount = Maybe.empty();
|
|
503
506
|
}
|
|
@@ -566,9 +569,12 @@ export var PropertyShape;
|
|
|
566
569
|
if (Maybe.isMaybe(parameters.maxLength)) {
|
|
567
570
|
maxLength = parameters.maxLength;
|
|
568
571
|
}
|
|
569
|
-
else if (typeof parameters.maxLength === "
|
|
572
|
+
else if (typeof parameters.maxLength === "bigint") {
|
|
570
573
|
maxLength = Maybe.of(parameters.maxLength);
|
|
571
574
|
}
|
|
575
|
+
else if (typeof parameters.maxLength === "number") {
|
|
576
|
+
maxLength = Maybe.of(BigInt(parameters.maxLength));
|
|
577
|
+
}
|
|
572
578
|
else if (parameters.maxLength === undefined) {
|
|
573
579
|
maxLength = Maybe.empty();
|
|
574
580
|
}
|
|
@@ -579,9 +585,12 @@ export var PropertyShape;
|
|
|
579
585
|
if (Maybe.isMaybe(parameters.minCount)) {
|
|
580
586
|
minCount = parameters.minCount;
|
|
581
587
|
}
|
|
582
|
-
else if (typeof parameters.minCount === "
|
|
588
|
+
else if (typeof parameters.minCount === "bigint") {
|
|
583
589
|
minCount = Maybe.of(parameters.minCount);
|
|
584
590
|
}
|
|
591
|
+
else if (typeof parameters.minCount === "number") {
|
|
592
|
+
minCount = Maybe.of(BigInt(parameters.minCount));
|
|
593
|
+
}
|
|
585
594
|
else if (parameters.minCount === undefined) {
|
|
586
595
|
minCount = Maybe.empty();
|
|
587
596
|
}
|
|
@@ -650,9 +659,12 @@ export var PropertyShape;
|
|
|
650
659
|
if (Maybe.isMaybe(parameters.minLength)) {
|
|
651
660
|
minLength = parameters.minLength;
|
|
652
661
|
}
|
|
653
|
-
else if (typeof parameters.minLength === "
|
|
662
|
+
else if (typeof parameters.minLength === "bigint") {
|
|
654
663
|
minLength = Maybe.of(parameters.minLength);
|
|
655
664
|
}
|
|
665
|
+
else if (typeof parameters.minLength === "number") {
|
|
666
|
+
minLength = Maybe.of(BigInt(parameters.minLength));
|
|
667
|
+
}
|
|
656
668
|
else if (parameters.minLength === undefined) {
|
|
657
669
|
minLength = Maybe.empty();
|
|
658
670
|
}
|
|
@@ -672,6 +684,22 @@ export var PropertyShape;
|
|
|
672
684
|
else {
|
|
673
685
|
name = parameters.name;
|
|
674
686
|
}
|
|
687
|
+
let node;
|
|
688
|
+
if (Maybe.isMaybe(parameters.node)) {
|
|
689
|
+
node = parameters.node;
|
|
690
|
+
}
|
|
691
|
+
else if (typeof parameters.node === "object") {
|
|
692
|
+
node = Maybe.of(parameters.node);
|
|
693
|
+
}
|
|
694
|
+
else if (typeof parameters.node === "string") {
|
|
695
|
+
node = Maybe.of(dataFactory.namedNode(parameters.node));
|
|
696
|
+
}
|
|
697
|
+
else if (parameters.node === undefined) {
|
|
698
|
+
node = Maybe.empty();
|
|
699
|
+
}
|
|
700
|
+
else {
|
|
701
|
+
node = parameters.node;
|
|
702
|
+
}
|
|
675
703
|
let nodeKind;
|
|
676
704
|
if (Maybe.isMaybe(parameters.nodeKind)) {
|
|
677
705
|
nodeKind = parameters.nodeKind;
|
|
@@ -688,19 +716,6 @@ export var PropertyShape;
|
|
|
688
716
|
else {
|
|
689
717
|
nodeKind = parameters.nodeKind;
|
|
690
718
|
}
|
|
691
|
-
let nodes;
|
|
692
|
-
if (parameters.nodes === undefined) {
|
|
693
|
-
nodes = [];
|
|
694
|
-
}
|
|
695
|
-
else if ($isReadonlyObjectArray(parameters.nodes)) {
|
|
696
|
-
nodes = parameters.nodes;
|
|
697
|
-
}
|
|
698
|
-
else if ($isReadonlyStringArray(parameters.nodes)) {
|
|
699
|
-
nodes = parameters.nodes.map((item) => dataFactory.namedNode(item));
|
|
700
|
-
}
|
|
701
|
-
else {
|
|
702
|
-
nodes = parameters.nodes;
|
|
703
|
-
}
|
|
704
719
|
let not;
|
|
705
720
|
if (parameters.not === undefined) {
|
|
706
721
|
not = [];
|
|
@@ -809,8 +824,8 @@ export var PropertyShape;
|
|
|
809
824
|
minInclusive,
|
|
810
825
|
minLength,
|
|
811
826
|
name,
|
|
827
|
+
node,
|
|
812
828
|
nodeKind,
|
|
813
|
-
nodes,
|
|
814
829
|
not,
|
|
815
830
|
or,
|
|
816
831
|
order,
|
|
@@ -923,12 +938,12 @@ export var PropertyShape;
|
|
|
923
938
|
!$filterMaybe($filterString)(filter.name, value.name)) {
|
|
924
939
|
return false;
|
|
925
940
|
}
|
|
926
|
-
if (filter.
|
|
927
|
-
!$filterMaybe($
|
|
941
|
+
if (filter.node !== undefined &&
|
|
942
|
+
!$filterMaybe($filterIdentifier)(filter.node, value.node)) {
|
|
928
943
|
return false;
|
|
929
944
|
}
|
|
930
|
-
if (filter.
|
|
931
|
-
!$
|
|
945
|
+
if (filter.nodeKind !== undefined &&
|
|
946
|
+
!$filterMaybe($filterIri)(filter.nodeKind, value.nodeKind)) {
|
|
932
947
|
return false;
|
|
933
948
|
}
|
|
934
949
|
if (filter.not !== undefined &&
|
|
@@ -1287,7 +1302,7 @@ export var PropertyShape;
|
|
|
1287
1302
|
resource: $resource,
|
|
1288
1303
|
propertySchema: PropertyShape.$schema.properties.maxCount,
|
|
1289
1304
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1290
|
-
.chain((values) => values.chainMap((value) => value.
|
|
1305
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
1291
1306
|
.map((values) => values.length > 0
|
|
1292
1307
|
? values.map((value) => Maybe.of(value))
|
|
1293
1308
|
: Resource.Values.fromValue({
|
|
@@ -1336,7 +1351,7 @@ export var PropertyShape;
|
|
|
1336
1351
|
resource: $resource,
|
|
1337
1352
|
propertySchema: PropertyShape.$schema.properties.maxLength,
|
|
1338
1353
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1339
|
-
.chain((values) => values.chainMap((value) => value.
|
|
1354
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
1340
1355
|
.map((values) => values.length > 0
|
|
1341
1356
|
? values.map((value) => Maybe.of(value))
|
|
1342
1357
|
: Resource.Values.fromValue({
|
|
@@ -1352,7 +1367,7 @@ export var PropertyShape;
|
|
|
1352
1367
|
resource: $resource,
|
|
1353
1368
|
propertySchema: PropertyShape.$schema.properties.minCount,
|
|
1354
1369
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1355
|
-
.chain((values) => values.chainMap((value) => value.
|
|
1370
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
1356
1371
|
.map((values) => values.length > 0
|
|
1357
1372
|
? values.map((value) => Maybe.of(value))
|
|
1358
1373
|
: Resource.Values.fromValue({
|
|
@@ -1408,7 +1423,7 @@ export var PropertyShape;
|
|
|
1408
1423
|
propertySchema: PropertyShape.$schema.properties
|
|
1409
1424
|
.minLength,
|
|
1410
1425
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1411
|
-
.chain((values) => values.chainMap((value) => value.
|
|
1426
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
1412
1427
|
.map((values) => values.length > 0
|
|
1413
1428
|
? values.map((value) => Maybe.of(value))
|
|
1414
1429
|
: Resource.Values.fromValue({
|
|
@@ -1441,6 +1456,26 @@ export var PropertyShape;
|
|
|
1441
1456
|
value: Maybe.empty(),
|
|
1442
1457
|
})),
|
|
1443
1458
|
}).chain((name) => $shaclPropertyFromRdf({
|
|
1459
|
+
graph: _$options.graph,
|
|
1460
|
+
resource: $resource,
|
|
1461
|
+
propertySchema: PropertyShape.$schema
|
|
1462
|
+
.properties
|
|
1463
|
+
.node,
|
|
1464
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1465
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
1466
|
+
.map((values) => values.length >
|
|
1467
|
+
0
|
|
1468
|
+
? values.map((value) => Maybe.of(value))
|
|
1469
|
+
: Resource.Values.fromValue({
|
|
1470
|
+
focusResource: $resource,
|
|
1471
|
+
propertyPath: PropertyShape
|
|
1472
|
+
.$schema
|
|
1473
|
+
.properties
|
|
1474
|
+
.node
|
|
1475
|
+
.path,
|
|
1476
|
+
value: Maybe.empty(),
|
|
1477
|
+
})),
|
|
1478
|
+
}).chain((node) => $shaclPropertyFromRdf({
|
|
1444
1479
|
graph: _$options.graph,
|
|
1445
1480
|
resource: $resource,
|
|
1446
1481
|
propertySchema: PropertyShape.$schema
|
|
@@ -1468,24 +1503,6 @@ export var PropertyShape;
|
|
|
1468
1503
|
value: Maybe.empty(),
|
|
1469
1504
|
})),
|
|
1470
1505
|
}).chain((nodeKind) => $shaclPropertyFromRdf({
|
|
1471
|
-
graph: _$options.graph,
|
|
1472
|
-
resource: $resource,
|
|
1473
|
-
propertySchema: PropertyShape.$schema
|
|
1474
|
-
.properties
|
|
1475
|
-
.nodes,
|
|
1476
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1477
|
-
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
1478
|
-
.map((values) => values.toArray())
|
|
1479
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
1480
|
-
focusResource: $resource,
|
|
1481
|
-
propertyPath: PropertyShape
|
|
1482
|
-
.$schema
|
|
1483
|
-
.properties
|
|
1484
|
-
.nodes
|
|
1485
|
-
.path,
|
|
1486
|
-
value: valuesArray,
|
|
1487
|
-
})),
|
|
1488
|
-
}).chain((nodes) => $shaclPropertyFromRdf({
|
|
1489
1506
|
graph: _$options.graph,
|
|
1490
1507
|
resource: $resource,
|
|
1491
1508
|
propertySchema: PropertyShape.$schema
|
|
@@ -1671,8 +1688,8 @@ export var PropertyShape;
|
|
|
1671
1688
|
minInclusive,
|
|
1672
1689
|
minLength,
|
|
1673
1690
|
name,
|
|
1691
|
+
node,
|
|
1674
1692
|
nodeKind,
|
|
1675
|
-
nodes,
|
|
1676
1693
|
not,
|
|
1677
1694
|
or,
|
|
1678
1695
|
order,
|
|
@@ -1820,7 +1837,7 @@ export var PropertyShape;
|
|
|
1820
1837
|
kind: "Shacl",
|
|
1821
1838
|
type: () => ({
|
|
1822
1839
|
kind: "Maybe",
|
|
1823
|
-
item: () => ({ kind: "
|
|
1840
|
+
item: () => ({ kind: "BigInt" }),
|
|
1824
1841
|
}),
|
|
1825
1842
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"),
|
|
1826
1843
|
},
|
|
@@ -1844,7 +1861,7 @@ export var PropertyShape;
|
|
|
1844
1861
|
kind: "Shacl",
|
|
1845
1862
|
type: () => ({
|
|
1846
1863
|
kind: "Maybe",
|
|
1847
|
-
item: () => ({ kind: "
|
|
1864
|
+
item: () => ({ kind: "BigInt" }),
|
|
1848
1865
|
}),
|
|
1849
1866
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"),
|
|
1850
1867
|
},
|
|
@@ -1852,7 +1869,7 @@ export var PropertyShape;
|
|
|
1852
1869
|
kind: "Shacl",
|
|
1853
1870
|
type: () => ({
|
|
1854
1871
|
kind: "Maybe",
|
|
1855
|
-
item: () => ({ kind: "
|
|
1872
|
+
item: () => ({ kind: "BigInt" }),
|
|
1856
1873
|
}),
|
|
1857
1874
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"),
|
|
1858
1875
|
},
|
|
@@ -1876,7 +1893,7 @@ export var PropertyShape;
|
|
|
1876
1893
|
kind: "Shacl",
|
|
1877
1894
|
type: () => ({
|
|
1878
1895
|
kind: "Maybe",
|
|
1879
|
-
item: () => ({ kind: "
|
|
1896
|
+
item: () => ({ kind: "BigInt" }),
|
|
1880
1897
|
}),
|
|
1881
1898
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"),
|
|
1882
1899
|
},
|
|
@@ -1888,6 +1905,14 @@ export var PropertyShape;
|
|
|
1888
1905
|
}),
|
|
1889
1906
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#name"),
|
|
1890
1907
|
},
|
|
1908
|
+
node: {
|
|
1909
|
+
kind: "Shacl",
|
|
1910
|
+
type: () => ({
|
|
1911
|
+
kind: "Maybe",
|
|
1912
|
+
item: () => ({ kind: "Identifier" }),
|
|
1913
|
+
}),
|
|
1914
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
|
|
1915
|
+
},
|
|
1891
1916
|
nodeKind: {
|
|
1892
1917
|
kind: "Shacl",
|
|
1893
1918
|
type: () => ({
|
|
@@ -1906,14 +1931,6 @@ export var PropertyShape;
|
|
|
1906
1931
|
}),
|
|
1907
1932
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"),
|
|
1908
1933
|
},
|
|
1909
|
-
nodes: {
|
|
1910
|
-
kind: "Shacl",
|
|
1911
|
-
type: () => ({
|
|
1912
|
-
kind: "Set",
|
|
1913
|
-
item: () => ({ kind: "Identifier" }),
|
|
1914
|
-
}),
|
|
1915
|
-
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
|
|
1916
|
-
},
|
|
1917
1934
|
not: {
|
|
1918
1935
|
kind: "Shacl",
|
|
1919
1936
|
type: () => ({
|
|
@@ -2075,32 +2092,32 @@ export var PropertyShape;
|
|
|
2075
2092
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"), _propertyShape.maxCount
|
|
2076
2093
|
.toList()
|
|
2077
2094
|
.flatMap((value) => [
|
|
2078
|
-
$literalFactory.
|
|
2095
|
+
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
2079
2096
|
]), options?.graph);
|
|
2080
2097
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxExclusive"), _propertyShape.maxExclusive.toList(), options?.graph);
|
|
2081
2098
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxInclusive"), _propertyShape.maxInclusive.toList(), options?.graph);
|
|
2082
2099
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"), _propertyShape.maxLength
|
|
2083
2100
|
.toList()
|
|
2084
2101
|
.flatMap((value) => [
|
|
2085
|
-
$literalFactory.
|
|
2102
|
+
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
2086
2103
|
]), options?.graph);
|
|
2087
2104
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"), _propertyShape.minCount
|
|
2088
2105
|
.toList()
|
|
2089
2106
|
.flatMap((value) => [
|
|
2090
|
-
$literalFactory.
|
|
2107
|
+
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
2091
2108
|
]), options?.graph);
|
|
2092
2109
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minExclusive"), _propertyShape.minExclusive.toList(), options?.graph);
|
|
2093
2110
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minInclusive"), _propertyShape.minInclusive.toList(), options?.graph);
|
|
2094
2111
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"), _propertyShape.minLength
|
|
2095
2112
|
.toList()
|
|
2096
2113
|
.flatMap((value) => [
|
|
2097
|
-
$literalFactory.
|
|
2114
|
+
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
2098
2115
|
]), options?.graph);
|
|
2099
2116
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#name"), _propertyShape.name
|
|
2100
2117
|
.toList()
|
|
2101
2118
|
.flatMap((value) => [$literalFactory.string(value)]), options?.graph);
|
|
2119
|
+
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), _propertyShape.node.toList(), options?.graph);
|
|
2102
2120
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"), _propertyShape.nodeKind.toList(), options?.graph);
|
|
2103
|
-
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), _propertyShape.nodes.flatMap((item) => [item]), options?.graph);
|
|
2104
2121
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#not"), _propertyShape.not.flatMap((item) => [item]), options?.graph);
|
|
2105
2122
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#or"), _propertyShape.or.toList().flatMap((value) => [
|
|
2106
2123
|
value.length > 0
|
|
@@ -2839,9 +2856,12 @@ export var NodeShape;
|
|
|
2839
2856
|
if (Maybe.isMaybe(parameters?.maxCount)) {
|
|
2840
2857
|
maxCount = parameters?.maxCount;
|
|
2841
2858
|
}
|
|
2842
|
-
else if (typeof parameters?.maxCount === "
|
|
2859
|
+
else if (typeof parameters?.maxCount === "bigint") {
|
|
2843
2860
|
maxCount = Maybe.of(parameters?.maxCount);
|
|
2844
2861
|
}
|
|
2862
|
+
else if (typeof parameters?.maxCount === "number") {
|
|
2863
|
+
maxCount = Maybe.of(BigInt(parameters?.maxCount));
|
|
2864
|
+
}
|
|
2845
2865
|
else if (parameters?.maxCount === undefined) {
|
|
2846
2866
|
maxCount = Maybe.empty();
|
|
2847
2867
|
}
|
|
@@ -2910,9 +2930,12 @@ export var NodeShape;
|
|
|
2910
2930
|
if (Maybe.isMaybe(parameters?.maxLength)) {
|
|
2911
2931
|
maxLength = parameters?.maxLength;
|
|
2912
2932
|
}
|
|
2913
|
-
else if (typeof parameters?.maxLength === "
|
|
2933
|
+
else if (typeof parameters?.maxLength === "bigint") {
|
|
2914
2934
|
maxLength = Maybe.of(parameters?.maxLength);
|
|
2915
2935
|
}
|
|
2936
|
+
else if (typeof parameters?.maxLength === "number") {
|
|
2937
|
+
maxLength = Maybe.of(BigInt(parameters?.maxLength));
|
|
2938
|
+
}
|
|
2916
2939
|
else if (parameters?.maxLength === undefined) {
|
|
2917
2940
|
maxLength = Maybe.empty();
|
|
2918
2941
|
}
|
|
@@ -2923,9 +2946,12 @@ export var NodeShape;
|
|
|
2923
2946
|
if (Maybe.isMaybe(parameters?.minCount)) {
|
|
2924
2947
|
minCount = parameters?.minCount;
|
|
2925
2948
|
}
|
|
2926
|
-
else if (typeof parameters?.minCount === "
|
|
2949
|
+
else if (typeof parameters?.minCount === "bigint") {
|
|
2927
2950
|
minCount = Maybe.of(parameters?.minCount);
|
|
2928
2951
|
}
|
|
2952
|
+
else if (typeof parameters?.minCount === "number") {
|
|
2953
|
+
minCount = Maybe.of(BigInt(parameters?.minCount));
|
|
2954
|
+
}
|
|
2929
2955
|
else if (parameters?.minCount === undefined) {
|
|
2930
2956
|
minCount = Maybe.empty();
|
|
2931
2957
|
}
|
|
@@ -2994,15 +3020,34 @@ export var NodeShape;
|
|
|
2994
3020
|
if (Maybe.isMaybe(parameters?.minLength)) {
|
|
2995
3021
|
minLength = parameters?.minLength;
|
|
2996
3022
|
}
|
|
2997
|
-
else if (typeof parameters?.minLength === "
|
|
3023
|
+
else if (typeof parameters?.minLength === "bigint") {
|
|
2998
3024
|
minLength = Maybe.of(parameters?.minLength);
|
|
2999
3025
|
}
|
|
3026
|
+
else if (typeof parameters?.minLength === "number") {
|
|
3027
|
+
minLength = Maybe.of(BigInt(parameters?.minLength));
|
|
3028
|
+
}
|
|
3000
3029
|
else if (parameters?.minLength === undefined) {
|
|
3001
3030
|
minLength = Maybe.empty();
|
|
3002
3031
|
}
|
|
3003
3032
|
else {
|
|
3004
3033
|
minLength = parameters?.minLength;
|
|
3005
3034
|
}
|
|
3035
|
+
let node;
|
|
3036
|
+
if (Maybe.isMaybe(parameters?.node)) {
|
|
3037
|
+
node = parameters?.node;
|
|
3038
|
+
}
|
|
3039
|
+
else if (typeof parameters?.node === "object") {
|
|
3040
|
+
node = Maybe.of(parameters?.node);
|
|
3041
|
+
}
|
|
3042
|
+
else if (typeof parameters?.node === "string") {
|
|
3043
|
+
node = Maybe.of(dataFactory.namedNode(parameters?.node));
|
|
3044
|
+
}
|
|
3045
|
+
else if (parameters?.node === undefined) {
|
|
3046
|
+
node = Maybe.empty();
|
|
3047
|
+
}
|
|
3048
|
+
else {
|
|
3049
|
+
node = parameters?.node;
|
|
3050
|
+
}
|
|
3006
3051
|
let nodeKind;
|
|
3007
3052
|
if (Maybe.isMaybe(parameters?.nodeKind)) {
|
|
3008
3053
|
nodeKind = parameters?.nodeKind;
|
|
@@ -3019,19 +3064,6 @@ export var NodeShape;
|
|
|
3019
3064
|
else {
|
|
3020
3065
|
nodeKind = parameters?.nodeKind;
|
|
3021
3066
|
}
|
|
3022
|
-
let nodes;
|
|
3023
|
-
if (parameters?.nodes === undefined) {
|
|
3024
|
-
nodes = [];
|
|
3025
|
-
}
|
|
3026
|
-
else if ($isReadonlyObjectArray(parameters?.nodes)) {
|
|
3027
|
-
nodes = parameters?.nodes;
|
|
3028
|
-
}
|
|
3029
|
-
else if ($isReadonlyStringArray(parameters?.nodes)) {
|
|
3030
|
-
nodes = parameters?.nodes.map((item) => dataFactory.namedNode(item));
|
|
3031
|
-
}
|
|
3032
|
-
else {
|
|
3033
|
-
nodes = parameters?.nodes;
|
|
3034
|
-
}
|
|
3035
3067
|
let not;
|
|
3036
3068
|
if (parameters?.not === undefined) {
|
|
3037
3069
|
not = [];
|
|
@@ -3150,8 +3182,8 @@ export var NodeShape;
|
|
|
3150
3182
|
minExclusive,
|
|
3151
3183
|
minInclusive,
|
|
3152
3184
|
minLength,
|
|
3185
|
+
node,
|
|
3153
3186
|
nodeKind,
|
|
3154
|
-
nodes,
|
|
3155
3187
|
not,
|
|
3156
3188
|
or,
|
|
3157
3189
|
patterns,
|
|
@@ -3256,12 +3288,12 @@ export var NodeShape;
|
|
|
3256
3288
|
!$filterMaybe(($filterNumeric))(filter.minLength, value.minLength)) {
|
|
3257
3289
|
return false;
|
|
3258
3290
|
}
|
|
3259
|
-
if (filter.
|
|
3260
|
-
!$filterMaybe($
|
|
3291
|
+
if (filter.node !== undefined &&
|
|
3292
|
+
!$filterMaybe($filterIdentifier)(filter.node, value.node)) {
|
|
3261
3293
|
return false;
|
|
3262
3294
|
}
|
|
3263
|
-
if (filter.
|
|
3264
|
-
!$
|
|
3295
|
+
if (filter.nodeKind !== undefined &&
|
|
3296
|
+
!$filterMaybe($filterIri)(filter.nodeKind, value.nodeKind)) {
|
|
3265
3297
|
return false;
|
|
3266
3298
|
}
|
|
3267
3299
|
if (filter.not !== undefined &&
|
|
@@ -3594,7 +3626,7 @@ export var NodeShape;
|
|
|
3594
3626
|
resource: $resource,
|
|
3595
3627
|
propertySchema: NodeShape.$schema.properties.maxCount,
|
|
3596
3628
|
typeFromRdf: (resourceValues) => resourceValues
|
|
3597
|
-
.chain((values) => values.chainMap((value) => value.
|
|
3629
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
3598
3630
|
.map((values) => values.length > 0
|
|
3599
3631
|
? values.map((value) => Maybe.of(value))
|
|
3600
3632
|
: Resource.Values.fromValue({
|
|
@@ -3641,7 +3673,7 @@ export var NodeShape;
|
|
|
3641
3673
|
resource: $resource,
|
|
3642
3674
|
propertySchema: NodeShape.$schema.properties.maxLength,
|
|
3643
3675
|
typeFromRdf: (resourceValues) => resourceValues
|
|
3644
|
-
.chain((values) => values.chainMap((value) => value.
|
|
3676
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
3645
3677
|
.map((values) => values.length > 0
|
|
3646
3678
|
? values.map((value) => Maybe.of(value))
|
|
3647
3679
|
: Resource.Values.fromValue({
|
|
@@ -3657,7 +3689,7 @@ export var NodeShape;
|
|
|
3657
3689
|
resource: $resource,
|
|
3658
3690
|
propertySchema: NodeShape.$schema.properties.minCount,
|
|
3659
3691
|
typeFromRdf: (resourceValues) => resourceValues
|
|
3660
|
-
.chain((values) => values.chainMap((value) => value.
|
|
3692
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
3661
3693
|
.map((values) => values.length > 0
|
|
3662
3694
|
? values.map((value) => Maybe.of(value))
|
|
3663
3695
|
: Resource.Values.fromValue({
|
|
@@ -3712,7 +3744,7 @@ export var NodeShape;
|
|
|
3712
3744
|
propertySchema: NodeShape.$schema.properties
|
|
3713
3745
|
.minLength,
|
|
3714
3746
|
typeFromRdf: (resourceValues) => resourceValues
|
|
3715
|
-
.chain((values) => values.chainMap((value) => value.
|
|
3747
|
+
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
3716
3748
|
.map((values) => values.length > 0
|
|
3717
3749
|
? values.map((value) => Maybe.of(value))
|
|
3718
3750
|
: Resource.Values.fromValue({
|
|
@@ -3725,6 +3757,24 @@ export var NodeShape;
|
|
|
3725
3757
|
value: Maybe.empty(),
|
|
3726
3758
|
})),
|
|
3727
3759
|
}).chain((minLength) => $shaclPropertyFromRdf({
|
|
3760
|
+
graph: _$options.graph,
|
|
3761
|
+
resource: $resource,
|
|
3762
|
+
propertySchema: NodeShape.$schema.properties
|
|
3763
|
+
.node,
|
|
3764
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
3765
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
3766
|
+
.map((values) => values.length > 0
|
|
3767
|
+
? values.map((value) => Maybe.of(value))
|
|
3768
|
+
: Resource.Values.fromValue({
|
|
3769
|
+
focusResource: $resource,
|
|
3770
|
+
propertyPath: PropertyShape
|
|
3771
|
+
.$schema
|
|
3772
|
+
.properties
|
|
3773
|
+
.node
|
|
3774
|
+
.path,
|
|
3775
|
+
value: Maybe.empty(),
|
|
3776
|
+
})),
|
|
3777
|
+
}).chain((node) => $shaclPropertyFromRdf({
|
|
3728
3778
|
graph: _$options.graph,
|
|
3729
3779
|
resource: $resource,
|
|
3730
3780
|
propertySchema: NodeShape.$schema.properties
|
|
@@ -3738,7 +3788,8 @@ export var NodeShape;
|
|
|
3738
3788
|
dataFactory.namedNode("http://www.w3.org/ns/shacl#IRIOrLiteral"),
|
|
3739
3789
|
dataFactory.namedNode("http://www.w3.org/ns/shacl#Literal"),
|
|
3740
3790
|
])))
|
|
3741
|
-
.map((values) => values.length >
|
|
3791
|
+
.map((values) => values.length >
|
|
3792
|
+
0
|
|
3742
3793
|
? values.map((value) => Maybe.of(value))
|
|
3743
3794
|
: Resource.Values.fromValue({
|
|
3744
3795
|
focusResource: $resource,
|
|
@@ -3750,23 +3801,6 @@ export var NodeShape;
|
|
|
3750
3801
|
value: Maybe.empty(),
|
|
3751
3802
|
})),
|
|
3752
3803
|
}).chain((nodeKind) => $shaclPropertyFromRdf({
|
|
3753
|
-
graph: _$options.graph,
|
|
3754
|
-
resource: $resource,
|
|
3755
|
-
propertySchema: NodeShape.$schema.properties
|
|
3756
|
-
.nodes,
|
|
3757
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
3758
|
-
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
3759
|
-
.map((values) => values.toArray())
|
|
3760
|
-
.map((valuesArray) => Resource.Values.fromValue({
|
|
3761
|
-
focusResource: $resource,
|
|
3762
|
-
propertyPath: PropertyShape
|
|
3763
|
-
.$schema
|
|
3764
|
-
.properties
|
|
3765
|
-
.nodes
|
|
3766
|
-
.path,
|
|
3767
|
-
value: valuesArray,
|
|
3768
|
-
})),
|
|
3769
|
-
}).chain((nodes) => $shaclPropertyFromRdf({
|
|
3770
3804
|
graph: _$options.graph,
|
|
3771
3805
|
resource: $resource,
|
|
3772
3806
|
propertySchema: NodeShape.$schema
|
|
@@ -3945,8 +3979,8 @@ export var NodeShape;
|
|
|
3945
3979
|
minExclusive,
|
|
3946
3980
|
minInclusive,
|
|
3947
3981
|
minLength,
|
|
3982
|
+
node,
|
|
3948
3983
|
nodeKind,
|
|
3949
|
-
nodes,
|
|
3950
3984
|
not,
|
|
3951
3985
|
or,
|
|
3952
3986
|
patterns,
|
|
@@ -4089,7 +4123,7 @@ export var NodeShape;
|
|
|
4089
4123
|
kind: "Shacl",
|
|
4090
4124
|
type: () => ({
|
|
4091
4125
|
kind: "Maybe",
|
|
4092
|
-
item: () => ({ kind: "
|
|
4126
|
+
item: () => ({ kind: "BigInt" }),
|
|
4093
4127
|
}),
|
|
4094
4128
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"),
|
|
4095
4129
|
},
|
|
@@ -4113,7 +4147,7 @@ export var NodeShape;
|
|
|
4113
4147
|
kind: "Shacl",
|
|
4114
4148
|
type: () => ({
|
|
4115
4149
|
kind: "Maybe",
|
|
4116
|
-
item: () => ({ kind: "
|
|
4150
|
+
item: () => ({ kind: "BigInt" }),
|
|
4117
4151
|
}),
|
|
4118
4152
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"),
|
|
4119
4153
|
},
|
|
@@ -4121,7 +4155,7 @@ export var NodeShape;
|
|
|
4121
4155
|
kind: "Shacl",
|
|
4122
4156
|
type: () => ({
|
|
4123
4157
|
kind: "Maybe",
|
|
4124
|
-
item: () => ({ kind: "
|
|
4158
|
+
item: () => ({ kind: "BigInt" }),
|
|
4125
4159
|
}),
|
|
4126
4160
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"),
|
|
4127
4161
|
},
|
|
@@ -4145,10 +4179,18 @@ export var NodeShape;
|
|
|
4145
4179
|
kind: "Shacl",
|
|
4146
4180
|
type: () => ({
|
|
4147
4181
|
kind: "Maybe",
|
|
4148
|
-
item: () => ({ kind: "
|
|
4182
|
+
item: () => ({ kind: "BigInt" }),
|
|
4149
4183
|
}),
|
|
4150
4184
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"),
|
|
4151
4185
|
},
|
|
4186
|
+
node: {
|
|
4187
|
+
kind: "Shacl",
|
|
4188
|
+
type: () => ({
|
|
4189
|
+
kind: "Maybe",
|
|
4190
|
+
item: () => ({ kind: "Identifier" }),
|
|
4191
|
+
}),
|
|
4192
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
|
|
4193
|
+
},
|
|
4152
4194
|
nodeKind: {
|
|
4153
4195
|
kind: "Shacl",
|
|
4154
4196
|
type: () => ({
|
|
@@ -4167,14 +4209,6 @@ export var NodeShape;
|
|
|
4167
4209
|
}),
|
|
4168
4210
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"),
|
|
4169
4211
|
},
|
|
4170
|
-
nodes: {
|
|
4171
|
-
kind: "Shacl",
|
|
4172
|
-
type: () => ({
|
|
4173
|
-
kind: "Set",
|
|
4174
|
-
item: () => ({ kind: "Identifier" }),
|
|
4175
|
-
}),
|
|
4176
|
-
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
|
|
4177
|
-
},
|
|
4178
4212
|
not: {
|
|
4179
4213
|
kind: "Shacl",
|
|
4180
4214
|
type: () => ({
|
|
@@ -4361,29 +4395,29 @@ export var NodeShape;
|
|
|
4361
4395
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"), _nodeShape.maxCount
|
|
4362
4396
|
.toList()
|
|
4363
4397
|
.flatMap((value) => [
|
|
4364
|
-
$literalFactory.
|
|
4398
|
+
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
4365
4399
|
]), options?.graph);
|
|
4366
4400
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxExclusive"), _nodeShape.maxExclusive.toList(), options?.graph);
|
|
4367
4401
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxInclusive"), _nodeShape.maxInclusive.toList(), options?.graph);
|
|
4368
4402
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"), _nodeShape.maxLength
|
|
4369
4403
|
.toList()
|
|
4370
4404
|
.flatMap((value) => [
|
|
4371
|
-
$literalFactory.
|
|
4405
|
+
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
4372
4406
|
]), options?.graph);
|
|
4373
4407
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"), _nodeShape.minCount
|
|
4374
4408
|
.toList()
|
|
4375
4409
|
.flatMap((value) => [
|
|
4376
|
-
$literalFactory.
|
|
4410
|
+
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
4377
4411
|
]), options?.graph);
|
|
4378
4412
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minExclusive"), _nodeShape.minExclusive.toList(), options?.graph);
|
|
4379
4413
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minInclusive"), _nodeShape.minInclusive.toList(), options?.graph);
|
|
4380
4414
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"), _nodeShape.minLength
|
|
4381
4415
|
.toList()
|
|
4382
4416
|
.flatMap((value) => [
|
|
4383
|
-
$literalFactory.
|
|
4417
|
+
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
4384
4418
|
]), options?.graph);
|
|
4419
|
+
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), _nodeShape.node.toList(), options?.graph);
|
|
4385
4420
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"), _nodeShape.nodeKind.toList(), options?.graph);
|
|
4386
|
-
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), _nodeShape.nodes.flatMap((item) => [item]), options?.graph);
|
|
4387
4421
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#not"), _nodeShape.not.flatMap((item) => [item]), options?.graph);
|
|
4388
4422
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#or"), _nodeShape.or.toList().flatMap((value) => [
|
|
4389
4423
|
value.length > 0
|
|
@@ -4614,7 +4648,7 @@ export var Shape;
|
|
|
4614
4648
|
kind: "Shacl",
|
|
4615
4649
|
type: () => ({
|
|
4616
4650
|
kind: "Maybe",
|
|
4617
|
-
item: () => ({ kind: "
|
|
4651
|
+
item: () => ({ kind: "BigInt" }),
|
|
4618
4652
|
}),
|
|
4619
4653
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"),
|
|
4620
4654
|
},
|
|
@@ -4638,7 +4672,7 @@ export var Shape;
|
|
|
4638
4672
|
kind: "Shacl",
|
|
4639
4673
|
type: () => ({
|
|
4640
4674
|
kind: "Maybe",
|
|
4641
|
-
item: () => ({ kind: "
|
|
4675
|
+
item: () => ({ kind: "BigInt" }),
|
|
4642
4676
|
}),
|
|
4643
4677
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"),
|
|
4644
4678
|
},
|
|
@@ -4646,7 +4680,7 @@ export var Shape;
|
|
|
4646
4680
|
kind: "Shacl",
|
|
4647
4681
|
type: () => ({
|
|
4648
4682
|
kind: "Maybe",
|
|
4649
|
-
item: () => ({ kind: "
|
|
4683
|
+
item: () => ({ kind: "BigInt" }),
|
|
4650
4684
|
}),
|
|
4651
4685
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"),
|
|
4652
4686
|
},
|
|
@@ -4670,10 +4704,18 @@ export var Shape;
|
|
|
4670
4704
|
kind: "Shacl",
|
|
4671
4705
|
type: () => ({
|
|
4672
4706
|
kind: "Maybe",
|
|
4673
|
-
item: () => ({ kind: "
|
|
4707
|
+
item: () => ({ kind: "BigInt" }),
|
|
4674
4708
|
}),
|
|
4675
4709
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"),
|
|
4676
4710
|
},
|
|
4711
|
+
node: {
|
|
4712
|
+
kind: "Shacl",
|
|
4713
|
+
type: () => ({
|
|
4714
|
+
kind: "Maybe",
|
|
4715
|
+
item: () => ({ kind: "Identifier" }),
|
|
4716
|
+
}),
|
|
4717
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
|
|
4718
|
+
},
|
|
4677
4719
|
nodeKind: {
|
|
4678
4720
|
kind: "Shacl",
|
|
4679
4721
|
type: () => ({
|
|
@@ -4692,14 +4734,6 @@ export var Shape;
|
|
|
4692
4734
|
}),
|
|
4693
4735
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"),
|
|
4694
4736
|
},
|
|
4695
|
-
nodes: {
|
|
4696
|
-
kind: "Shacl",
|
|
4697
|
-
type: () => ({
|
|
4698
|
-
kind: "Set",
|
|
4699
|
-
item: () => ({ kind: "Identifier" }),
|
|
4700
|
-
}),
|
|
4701
|
-
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
|
|
4702
|
-
},
|
|
4703
4737
|
not: {
|
|
4704
4738
|
kind: "Shacl",
|
|
4705
4739
|
type: () => ({
|
|
@@ -5018,7 +5052,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
5018
5052
|
return this.nodeShapesSync(query);
|
|
5019
5053
|
}
|
|
5020
5054
|
nodeShapesSync(query) {
|
|
5021
|
-
return this
|
|
5055
|
+
return this.#objectsSync({
|
|
5022
5056
|
$filter: NodeShape.$filter,
|
|
5023
5057
|
$fromRdfResource: NodeShape.$fromRdfResource,
|
|
5024
5058
|
$fromRdfTypes: [NodeShape.$fromRdfType],
|
|
@@ -5049,7 +5083,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
5049
5083
|
return this.ontologiesSync(query);
|
|
5050
5084
|
}
|
|
5051
5085
|
ontologiesSync(query) {
|
|
5052
|
-
return this
|
|
5086
|
+
return this.#objectsSync({
|
|
5053
5087
|
$filter: Ontology.$filter,
|
|
5054
5088
|
$fromRdfResource: Ontology.$fromRdfResource,
|
|
5055
5089
|
$fromRdfTypes: [Ontology.$fromRdfType],
|
|
@@ -5080,7 +5114,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
5080
5114
|
return this.propertyGroupsSync(query);
|
|
5081
5115
|
}
|
|
5082
5116
|
propertyGroupsSync(query) {
|
|
5083
|
-
return this
|
|
5117
|
+
return this.#objectsSync({
|
|
5084
5118
|
$filter: PropertyGroup.$filter,
|
|
5085
5119
|
$fromRdfResource: PropertyGroup.$fromRdfResource,
|
|
5086
5120
|
$fromRdfTypes: [PropertyGroup.$fromRdfType],
|
|
@@ -5111,7 +5145,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
5111
5145
|
return this.propertyShapesSync(query);
|
|
5112
5146
|
}
|
|
5113
5147
|
propertyShapesSync(query) {
|
|
5114
|
-
return this
|
|
5148
|
+
return this.#objectsSync({
|
|
5115
5149
|
$filter: PropertyShape.$filter,
|
|
5116
5150
|
$fromRdfResource: PropertyShape.$fromRdfResource,
|
|
5117
5151
|
$fromRdfTypes: [PropertyShape.$fromRdfType],
|
|
@@ -5142,7 +5176,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
5142
5176
|
return this.shapesSync(query);
|
|
5143
5177
|
}
|
|
5144
5178
|
shapesSync(query) {
|
|
5145
|
-
return this
|
|
5179
|
+
return this.#objectUnionsSync([
|
|
5146
5180
|
{
|
|
5147
5181
|
$filter: Shape.$filter,
|
|
5148
5182
|
$fromRdfResource: NodeShape.$fromRdfResource,
|
|
@@ -5155,32 +5189,32 @@ export class $RdfjsDatasetObjectSet {
|
|
|
5155
5189
|
},
|
|
5156
5190
|
], query);
|
|
5157
5191
|
}
|
|
5158
|
-
async object(identifier, options) {
|
|
5159
|
-
return this
|
|
5192
|
+
async $object(identifier, options) {
|
|
5193
|
+
return this.$objectSync(identifier, options);
|
|
5160
5194
|
}
|
|
5161
|
-
objectSync(identifier, options) {
|
|
5162
|
-
return this
|
|
5195
|
+
$objectSync(identifier, options) {
|
|
5196
|
+
return this.$objectsSync({
|
|
5163
5197
|
identifiers: [identifier],
|
|
5164
5198
|
preferredLanguages: options?.preferredLanguages,
|
|
5165
5199
|
}).map((objects) => objects[0]);
|
|
5166
5200
|
}
|
|
5167
|
-
async objectCount(query) {
|
|
5168
|
-
return this
|
|
5201
|
+
async $objectCount(query) {
|
|
5202
|
+
return this.$objectCountSync(query);
|
|
5169
5203
|
}
|
|
5170
|
-
objectCountSync(query) {
|
|
5171
|
-
return this
|
|
5204
|
+
$objectCountSync(query) {
|
|
5205
|
+
return this.$objectsSync(query).map((objects) => objects.length);
|
|
5172
5206
|
}
|
|
5173
|
-
async objectIdentifiers(query) {
|
|
5174
|
-
return this
|
|
5207
|
+
async $objectIdentifiers(query) {
|
|
5208
|
+
return this.$objectIdentifiersSync(query);
|
|
5175
5209
|
}
|
|
5176
|
-
objectIdentifiersSync(query) {
|
|
5177
|
-
return this
|
|
5210
|
+
$objectIdentifiersSync(query) {
|
|
5211
|
+
return this.$objectsSync(query).map((objects) => objects.map((object) => object.$identifier()));
|
|
5178
5212
|
}
|
|
5179
|
-
async objects(query) {
|
|
5180
|
-
return this
|
|
5213
|
+
async $objects(query) {
|
|
5214
|
+
return this.$objectsSync(query);
|
|
5181
5215
|
}
|
|
5182
|
-
objectsSync(query) {
|
|
5183
|
-
return this
|
|
5216
|
+
$objectsSync(query) {
|
|
5217
|
+
return this.#objectUnionsSync([
|
|
5184
5218
|
{
|
|
5185
5219
|
$filter: $Object.$filter,
|
|
5186
5220
|
$fromRdfResource: NodeShape.$fromRdfResource,
|
|
@@ -5203,7 +5237,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
5203
5237
|
},
|
|
5204
5238
|
], query);
|
|
5205
5239
|
}
|
|
5206
|
-
|
|
5240
|
+
#objectsSync(namedObjectType, query) {
|
|
5207
5241
|
const graph = query?.graph ?? this.$graph;
|
|
5208
5242
|
const limit = query?.limit ?? Number.MAX_SAFE_INTEGER;
|
|
5209
5243
|
if (limit <= 0) {
|
|
@@ -5296,7 +5330,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
5296
5330
|
}
|
|
5297
5331
|
return Right(objects);
|
|
5298
5332
|
}
|
|
5299
|
-
|
|
5333
|
+
#objectUnionsSync(namedObjectTypes, query) {
|
|
5300
5334
|
const graph = query?.graph ?? this.$graph;
|
|
5301
5335
|
const limit = query?.limit ?? Number.MAX_SAFE_INTEGER;
|
|
5302
5336
|
if (limit <= 0) {
|