@shaclmate/compiler 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.
@@ -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
  }
@@ -525,9 +525,12 @@ export var PropertyShape;
525
525
  if (Maybe.isMaybe(parameters.maxCount)) {
526
526
  maxCount = parameters.maxCount;
527
527
  }
528
- else if (typeof parameters.maxCount === "number") {
528
+ else if (typeof parameters.maxCount === "bigint") {
529
529
  maxCount = Maybe.of(parameters.maxCount);
530
530
  }
531
+ else if (typeof parameters.maxCount === "number") {
532
+ maxCount = Maybe.of(BigInt(parameters.maxCount));
533
+ }
531
534
  else if (parameters.maxCount === undefined) {
532
535
  maxCount = Maybe.empty();
533
536
  }
@@ -596,9 +599,12 @@ export var PropertyShape;
596
599
  if (Maybe.isMaybe(parameters.maxLength)) {
597
600
  maxLength = parameters.maxLength;
598
601
  }
599
- else if (typeof parameters.maxLength === "number") {
602
+ else if (typeof parameters.maxLength === "bigint") {
600
603
  maxLength = Maybe.of(parameters.maxLength);
601
604
  }
605
+ else if (typeof parameters.maxLength === "number") {
606
+ maxLength = Maybe.of(BigInt(parameters.maxLength));
607
+ }
602
608
  else if (parameters.maxLength === undefined) {
603
609
  maxLength = Maybe.empty();
604
610
  }
@@ -609,9 +615,12 @@ export var PropertyShape;
609
615
  if (Maybe.isMaybe(parameters.minCount)) {
610
616
  minCount = parameters.minCount;
611
617
  }
612
- else if (typeof parameters.minCount === "number") {
618
+ else if (typeof parameters.minCount === "bigint") {
613
619
  minCount = Maybe.of(parameters.minCount);
614
620
  }
621
+ else if (typeof parameters.minCount === "number") {
622
+ minCount = Maybe.of(BigInt(parameters.minCount));
623
+ }
615
624
  else if (parameters.minCount === undefined) {
616
625
  minCount = Maybe.empty();
617
626
  }
@@ -680,9 +689,12 @@ export var PropertyShape;
680
689
  if (Maybe.isMaybe(parameters.minLength)) {
681
690
  minLength = parameters.minLength;
682
691
  }
683
- else if (typeof parameters.minLength === "number") {
692
+ else if (typeof parameters.minLength === "bigint") {
684
693
  minLength = Maybe.of(parameters.minLength);
685
694
  }
695
+ else if (typeof parameters.minLength === "number") {
696
+ minLength = Maybe.of(BigInt(parameters.minLength));
697
+ }
686
698
  else if (parameters.minLength === undefined) {
687
699
  minLength = Maybe.empty();
688
700
  }
@@ -715,6 +727,22 @@ export var PropertyShape;
715
727
  else {
716
728
  name = parameters.name;
717
729
  }
730
+ let node;
731
+ if (Maybe.isMaybe(parameters.node)) {
732
+ node = parameters.node;
733
+ }
734
+ else if (typeof parameters.node === "object") {
735
+ node = Maybe.of(parameters.node);
736
+ }
737
+ else if (typeof parameters.node === "string") {
738
+ node = Maybe.of(dataFactory.namedNode(parameters.node));
739
+ }
740
+ else if (parameters.node === undefined) {
741
+ node = Maybe.empty();
742
+ }
743
+ else {
744
+ node = parameters.node;
745
+ }
718
746
  let nodeKind;
719
747
  if (Maybe.isMaybe(parameters.nodeKind)) {
720
748
  nodeKind = parameters.nodeKind;
@@ -731,19 +759,6 @@ export var PropertyShape;
731
759
  else {
732
760
  nodeKind = parameters.nodeKind;
733
761
  }
734
- let nodes;
735
- if (parameters.nodes === undefined) {
736
- nodes = [];
737
- }
738
- else if ($isReadonlyObjectArray(parameters.nodes)) {
739
- nodes = parameters.nodes;
740
- }
741
- else if ($isReadonlyStringArray(parameters.nodes)) {
742
- nodes = parameters.nodes.map((item) => dataFactory.namedNode(item));
743
- }
744
- else {
745
- nodes = parameters.nodes;
746
- }
747
762
  let not;
748
763
  if (parameters.not === undefined) {
749
764
  not = [];
@@ -883,8 +898,8 @@ export var PropertyShape;
883
898
  minLength,
884
899
  mutable,
885
900
  name,
901
+ node,
886
902
  nodeKind,
887
- nodes,
888
903
  not,
889
904
  or,
890
905
  order,
@@ -1007,12 +1022,12 @@ export var PropertyShape;
1007
1022
  !$filterMaybe($filterString)(filter.name, value.name)) {
1008
1023
  return false;
1009
1024
  }
1010
- if (filter.nodeKind !== undefined &&
1011
- !$filterMaybe($filterIri)(filter.nodeKind, value.nodeKind)) {
1025
+ if (filter.node !== undefined &&
1026
+ !$filterMaybe($filterIdentifier)(filter.node, value.node)) {
1012
1027
  return false;
1013
1028
  }
1014
- if (filter.nodes !== undefined &&
1015
- !$filterArray($filterIdentifier)(filter.nodes, value.nodes)) {
1029
+ if (filter.nodeKind !== undefined &&
1030
+ !$filterMaybe($filterIri)(filter.nodeKind, value.nodeKind)) {
1016
1031
  return false;
1017
1032
  }
1018
1033
  if (filter.not !== undefined &&
@@ -1395,7 +1410,7 @@ export var PropertyShape;
1395
1410
  resource: $resource,
1396
1411
  propertySchema: PropertyShape.$schema.properties.maxCount,
1397
1412
  typeFromRdf: (resourceValues) => resourceValues
1398
- .chain((values) => values.chainMap((value) => value.toInt()))
1413
+ .chain((values) => values.chainMap((value) => value.toBigInt()))
1399
1414
  .map((values) => values.length > 0
1400
1415
  ? values.map((value) => Maybe.of(value))
1401
1416
  : Resource.Values.fromValue({
@@ -1448,7 +1463,7 @@ export var PropertyShape;
1448
1463
  propertySchema: PropertyShape.$schema.properties
1449
1464
  .maxLength,
1450
1465
  typeFromRdf: (resourceValues) => resourceValues
1451
- .chain((values) => values.chainMap((value) => value.toInt()))
1466
+ .chain((values) => values.chainMap((value) => value.toBigInt()))
1452
1467
  .map((values) => values.length > 0
1453
1468
  ? values.map((value) => Maybe.of(value))
1454
1469
  : Resource.Values.fromValue({
@@ -1466,7 +1481,7 @@ export var PropertyShape;
1466
1481
  propertySchema: PropertyShape.$schema.properties
1467
1482
  .minCount,
1468
1483
  typeFromRdf: (resourceValues) => resourceValues
1469
- .chain((values) => values.chainMap((value) => value.toInt()))
1484
+ .chain((values) => values.chainMap((value) => value.toBigInt()))
1470
1485
  .map((values) => values.length > 0
1471
1486
  ? values.map((value) => Maybe.of(value))
1472
1487
  : Resource.Values.fromValue({
@@ -1522,7 +1537,7 @@ export var PropertyShape;
1522
1537
  propertySchema: PropertyShape.$schema.properties
1523
1538
  .minLength,
1524
1539
  typeFromRdf: (resourceValues) => resourceValues
1525
- .chain((values) => values.chainMap((value) => value.toInt()))
1540
+ .chain((values) => values.chainMap((value) => value.toBigInt()))
1526
1541
  .map((values) => values.length >
1527
1542
  0
1528
1543
  ? values.map((value) => Maybe.of(value))
@@ -1577,6 +1592,26 @@ export var PropertyShape;
1577
1592
  value: Maybe.empty(),
1578
1593
  })),
1579
1594
  }).chain((name) => $shaclPropertyFromRdf({
1595
+ graph: _$options.graph,
1596
+ resource: $resource,
1597
+ propertySchema: PropertyShape.$schema
1598
+ .properties
1599
+ .node,
1600
+ typeFromRdf: (resourceValues) => resourceValues
1601
+ .chain((values) => values.chainMap((value) => value.toIdentifier()))
1602
+ .map((values) => values.length >
1603
+ 0
1604
+ ? values.map((value) => Maybe.of(value))
1605
+ : Resource.Values.fromValue({
1606
+ focusResource: $resource,
1607
+ propertyPath: PropertyShape
1608
+ .$schema
1609
+ .properties
1610
+ .node
1611
+ .path,
1612
+ value: Maybe.empty(),
1613
+ })),
1614
+ }).chain((node) => $shaclPropertyFromRdf({
1580
1615
  graph: _$options.graph,
1581
1616
  resource: $resource,
1582
1617
  propertySchema: PropertyShape.$schema
@@ -1604,24 +1639,6 @@ export var PropertyShape;
1604
1639
  value: Maybe.empty(),
1605
1640
  })),
1606
1641
  }).chain((nodeKind) => $shaclPropertyFromRdf({
1607
- graph: _$options.graph,
1608
- resource: $resource,
1609
- propertySchema: PropertyShape.$schema
1610
- .properties
1611
- .nodes,
1612
- typeFromRdf: (resourceValues) => resourceValues
1613
- .chain((values) => values.chainMap((value) => value.toIdentifier()))
1614
- .map((values) => values.toArray())
1615
- .map((valuesArray) => Resource.Values.fromValue({
1616
- focusResource: $resource,
1617
- propertyPath: PropertyShape
1618
- .$schema
1619
- .properties
1620
- .nodes
1621
- .path,
1622
- value: valuesArray,
1623
- })),
1624
- }).chain((nodes) => $shaclPropertyFromRdf({
1625
1642
  graph: _$options.graph,
1626
1643
  resource: $resource,
1627
1644
  propertySchema: PropertyShape.$schema
@@ -1850,8 +1867,8 @@ export var PropertyShape;
1850
1867
  minLength,
1851
1868
  mutable,
1852
1869
  name,
1870
+ node,
1853
1871
  nodeKind,
1854
- nodes,
1855
1872
  not,
1856
1873
  or,
1857
1874
  order,
@@ -2010,7 +2027,7 @@ export var PropertyShape;
2010
2027
  kind: "Shacl",
2011
2028
  type: () => ({
2012
2029
  kind: "Maybe",
2013
- item: () => ({ kind: "Int" }),
2030
+ item: () => ({ kind: "BigInt" }),
2014
2031
  }),
2015
2032
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"),
2016
2033
  },
@@ -2034,7 +2051,7 @@ export var PropertyShape;
2034
2051
  kind: "Shacl",
2035
2052
  type: () => ({
2036
2053
  kind: "Maybe",
2037
- item: () => ({ kind: "Int" }),
2054
+ item: () => ({ kind: "BigInt" }),
2038
2055
  }),
2039
2056
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"),
2040
2057
  },
@@ -2042,7 +2059,7 @@ export var PropertyShape;
2042
2059
  kind: "Shacl",
2043
2060
  type: () => ({
2044
2061
  kind: "Maybe",
2045
- item: () => ({ kind: "Int" }),
2062
+ item: () => ({ kind: "BigInt" }),
2046
2063
  }),
2047
2064
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"),
2048
2065
  },
@@ -2066,7 +2083,7 @@ export var PropertyShape;
2066
2083
  kind: "Shacl",
2067
2084
  type: () => ({
2068
2085
  kind: "Maybe",
2069
- item: () => ({ kind: "Int" }),
2086
+ item: () => ({ kind: "BigInt" }),
2070
2087
  }),
2071
2088
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"),
2072
2089
  },
@@ -2086,6 +2103,14 @@ export var PropertyShape;
2086
2103
  }),
2087
2104
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#name"),
2088
2105
  },
2106
+ node: {
2107
+ kind: "Shacl",
2108
+ type: () => ({
2109
+ kind: "Maybe",
2110
+ item: () => ({ kind: "Identifier" }),
2111
+ }),
2112
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
2113
+ },
2089
2114
  nodeKind: {
2090
2115
  kind: "Shacl",
2091
2116
  type: () => ({
@@ -2104,14 +2129,6 @@ export var PropertyShape;
2104
2129
  }),
2105
2130
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"),
2106
2131
  },
2107
- nodes: {
2108
- kind: "Shacl",
2109
- type: () => ({
2110
- kind: "Set",
2111
- item: () => ({ kind: "Identifier" }),
2112
- }),
2113
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
2114
- },
2115
2132
  not: {
2116
2133
  kind: "Shacl",
2117
2134
  type: () => ({
@@ -2294,26 +2311,26 @@ export var PropertyShape;
2294
2311
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"), _propertyShape.maxCount
2295
2312
  .toList()
2296
2313
  .flatMap((value) => [
2297
- $literalFactory.number(value, $RdfVocabularies.xsd.unsignedInt),
2314
+ $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
2298
2315
  ]), options?.graph);
2299
2316
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxExclusive"), _propertyShape.maxExclusive.toList(), options?.graph);
2300
2317
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxInclusive"), _propertyShape.maxInclusive.toList(), options?.graph);
2301
2318
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"), _propertyShape.maxLength
2302
2319
  .toList()
2303
2320
  .flatMap((value) => [
2304
- $literalFactory.number(value, $RdfVocabularies.xsd.unsignedInt),
2321
+ $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
2305
2322
  ]), options?.graph);
2306
2323
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"), _propertyShape.minCount
2307
2324
  .toList()
2308
2325
  .flatMap((value) => [
2309
- $literalFactory.number(value, $RdfVocabularies.xsd.unsignedInt),
2326
+ $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
2310
2327
  ]), options?.graph);
2311
2328
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minExclusive"), _propertyShape.minExclusive.toList(), options?.graph);
2312
2329
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minInclusive"), _propertyShape.minInclusive.toList(), options?.graph);
2313
2330
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"), _propertyShape.minLength
2314
2331
  .toList()
2315
2332
  .flatMap((value) => [
2316
- $literalFactory.number(value, $RdfVocabularies.xsd.unsignedInt),
2333
+ $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
2317
2334
  ]), options?.graph);
2318
2335
  resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#mutable"), _propertyShape.mutable
2319
2336
  .toList()
@@ -2323,8 +2340,8 @@ export var PropertyShape;
2323
2340
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#name"), _propertyShape.name
2324
2341
  .toList()
2325
2342
  .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
2343
+ resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), _propertyShape.node.toList(), options?.graph);
2326
2344
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"), _propertyShape.nodeKind.toList(), options?.graph);
2327
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), _propertyShape.nodes.flatMap((item) => [item]), options?.graph);
2328
2345
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#not"), _propertyShape.not.flatMap((item) => [item]), options?.graph);
2329
2346
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#or"), _propertyShape.or.toList().flatMap((value) => [
2330
2347
  value.length > 0
@@ -3291,9 +3308,12 @@ export var NodeShape;
3291
3308
  if (Maybe.isMaybe(parameters?.maxCount)) {
3292
3309
  maxCount = parameters?.maxCount;
3293
3310
  }
3294
- else if (typeof parameters?.maxCount === "number") {
3311
+ else if (typeof parameters?.maxCount === "bigint") {
3295
3312
  maxCount = Maybe.of(parameters?.maxCount);
3296
3313
  }
3314
+ else if (typeof parameters?.maxCount === "number") {
3315
+ maxCount = Maybe.of(BigInt(parameters?.maxCount));
3316
+ }
3297
3317
  else if (parameters?.maxCount === undefined) {
3298
3318
  maxCount = Maybe.empty();
3299
3319
  }
@@ -3362,9 +3382,12 @@ export var NodeShape;
3362
3382
  if (Maybe.isMaybe(parameters?.maxLength)) {
3363
3383
  maxLength = parameters?.maxLength;
3364
3384
  }
3365
- else if (typeof parameters?.maxLength === "number") {
3385
+ else if (typeof parameters?.maxLength === "bigint") {
3366
3386
  maxLength = Maybe.of(parameters?.maxLength);
3367
3387
  }
3388
+ else if (typeof parameters?.maxLength === "number") {
3389
+ maxLength = Maybe.of(BigInt(parameters?.maxLength));
3390
+ }
3368
3391
  else if (parameters?.maxLength === undefined) {
3369
3392
  maxLength = Maybe.empty();
3370
3393
  }
@@ -3375,9 +3398,12 @@ export var NodeShape;
3375
3398
  if (Maybe.isMaybe(parameters?.minCount)) {
3376
3399
  minCount = parameters?.minCount;
3377
3400
  }
3378
- else if (typeof parameters?.minCount === "number") {
3401
+ else if (typeof parameters?.minCount === "bigint") {
3379
3402
  minCount = Maybe.of(parameters?.minCount);
3380
3403
  }
3404
+ else if (typeof parameters?.minCount === "number") {
3405
+ minCount = Maybe.of(BigInt(parameters?.minCount));
3406
+ }
3381
3407
  else if (parameters?.minCount === undefined) {
3382
3408
  minCount = Maybe.empty();
3383
3409
  }
@@ -3446,9 +3472,12 @@ export var NodeShape;
3446
3472
  if (Maybe.isMaybe(parameters?.minLength)) {
3447
3473
  minLength = parameters?.minLength;
3448
3474
  }
3449
- else if (typeof parameters?.minLength === "number") {
3475
+ else if (typeof parameters?.minLength === "bigint") {
3450
3476
  minLength = Maybe.of(parameters?.minLength);
3451
3477
  }
3478
+ else if (typeof parameters?.minLength === "number") {
3479
+ minLength = Maybe.of(BigInt(parameters?.minLength));
3480
+ }
3452
3481
  else if (parameters?.minLength === undefined) {
3453
3482
  minLength = Maybe.empty();
3454
3483
  }
@@ -3468,6 +3497,22 @@ export var NodeShape;
3468
3497
  else {
3469
3498
  mutable = parameters?.mutable;
3470
3499
  }
3500
+ let node;
3501
+ if (Maybe.isMaybe(parameters?.node)) {
3502
+ node = parameters?.node;
3503
+ }
3504
+ else if (typeof parameters?.node === "object") {
3505
+ node = Maybe.of(parameters?.node);
3506
+ }
3507
+ else if (typeof parameters?.node === "string") {
3508
+ node = Maybe.of(dataFactory.namedNode(parameters?.node));
3509
+ }
3510
+ else if (parameters?.node === undefined) {
3511
+ node = Maybe.empty();
3512
+ }
3513
+ else {
3514
+ node = parameters?.node;
3515
+ }
3471
3516
  let nodeKind;
3472
3517
  if (Maybe.isMaybe(parameters?.nodeKind)) {
3473
3518
  nodeKind = parameters?.nodeKind;
@@ -3484,19 +3529,6 @@ export var NodeShape;
3484
3529
  else {
3485
3530
  nodeKind = parameters?.nodeKind;
3486
3531
  }
3487
- let nodes;
3488
- if (parameters?.nodes === undefined) {
3489
- nodes = [];
3490
- }
3491
- else if ($isReadonlyObjectArray(parameters?.nodes)) {
3492
- nodes = parameters?.nodes;
3493
- }
3494
- else if ($isReadonlyStringArray(parameters?.nodes)) {
3495
- nodes = parameters?.nodes.map((item) => dataFactory.namedNode(item));
3496
- }
3497
- else {
3498
- nodes = parameters?.nodes;
3499
- }
3500
3532
  let not;
3501
3533
  if (parameters?.not === undefined) {
3502
3534
  not = [];
@@ -3697,8 +3729,8 @@ export var NodeShape;
3697
3729
  minInclusive,
3698
3730
  minLength,
3699
3731
  mutable,
3732
+ node,
3700
3733
  nodeKind,
3701
- nodes,
3702
3734
  not,
3703
3735
  or,
3704
3736
  patterns,
@@ -3825,12 +3857,12 @@ export var NodeShape;
3825
3857
  !$filterMaybe($filterBoolean)(filter.mutable, value.mutable)) {
3826
3858
  return false;
3827
3859
  }
3828
- if (filter.nodeKind !== undefined &&
3829
- !$filterMaybe($filterIri)(filter.nodeKind, value.nodeKind)) {
3860
+ if (filter.node !== undefined &&
3861
+ !$filterMaybe($filterIdentifier)(filter.node, value.node)) {
3830
3862
  return false;
3831
3863
  }
3832
- if (filter.nodes !== undefined &&
3833
- !$filterArray($filterIdentifier)(filter.nodes, value.nodes)) {
3864
+ if (filter.nodeKind !== undefined &&
3865
+ !$filterMaybe($filterIri)(filter.nodeKind, value.nodeKind)) {
3834
3866
  return false;
3835
3867
  }
3836
3868
  if (filter.not !== undefined &&
@@ -4241,7 +4273,7 @@ export var NodeShape;
4241
4273
  resource: $resource,
4242
4274
  propertySchema: NodeShape.$schema.properties.maxCount,
4243
4275
  typeFromRdf: (resourceValues) => resourceValues
4244
- .chain((values) => values.chainMap((value) => value.toInt()))
4276
+ .chain((values) => values.chainMap((value) => value.toBigInt()))
4245
4277
  .map((values) => values.length > 0
4246
4278
  ? values.map((value) => Maybe.of(value))
4247
4279
  : Resource.Values.fromValue({
@@ -4296,7 +4328,7 @@ export var NodeShape;
4296
4328
  propertySchema: NodeShape.$schema.properties
4297
4329
  .maxLength,
4298
4330
  typeFromRdf: (resourceValues) => resourceValues
4299
- .chain((values) => values.chainMap((value) => value.toInt()))
4331
+ .chain((values) => values.chainMap((value) => value.toBigInt()))
4300
4332
  .map((values) => values.length > 0
4301
4333
  ? values.map((value) => Maybe.of(value))
4302
4334
  : Resource.Values.fromValue({
@@ -4314,7 +4346,7 @@ export var NodeShape;
4314
4346
  propertySchema: NodeShape.$schema.properties
4315
4347
  .minCount,
4316
4348
  typeFromRdf: (resourceValues) => resourceValues
4317
- .chain((values) => values.chainMap((value) => value.toInt()))
4349
+ .chain((values) => values.chainMap((value) => value.toBigInt()))
4318
4350
  .map((values) => values.length > 0
4319
4351
  ? values.map((value) => Maybe.of(value))
4320
4352
  : Resource.Values.fromValue({
@@ -4372,7 +4404,7 @@ export var NodeShape;
4372
4404
  .properties
4373
4405
  .minLength,
4374
4406
  typeFromRdf: (resourceValues) => resourceValues
4375
- .chain((values) => values.chainMap((value) => value.toInt()))
4407
+ .chain((values) => values.chainMap((value) => value.toBigInt()))
4376
4408
  .map((values) => values.length >
4377
4409
  0
4378
4410
  ? values.map((value) => Maybe.of(value))
@@ -4406,6 +4438,26 @@ export var NodeShape;
4406
4438
  value: Maybe.empty(),
4407
4439
  })),
4408
4440
  }).chain((mutable) => $shaclPropertyFromRdf({
4441
+ graph: _$options.graph,
4442
+ resource: $resource,
4443
+ propertySchema: NodeShape.$schema
4444
+ .properties
4445
+ .node,
4446
+ typeFromRdf: (resourceValues) => resourceValues
4447
+ .chain((values) => values.chainMap((value) => value.toIdentifier()))
4448
+ .map((values) => values.length >
4449
+ 0
4450
+ ? values.map((value) => Maybe.of(value))
4451
+ : Resource.Values.fromValue({
4452
+ focusResource: $resource,
4453
+ propertyPath: PropertyShape
4454
+ .$schema
4455
+ .properties
4456
+ .node
4457
+ .path,
4458
+ value: Maybe.empty(),
4459
+ })),
4460
+ }).chain((node) => $shaclPropertyFromRdf({
4409
4461
  graph: _$options.graph,
4410
4462
  resource: $resource,
4411
4463
  propertySchema: NodeShape.$schema
@@ -4433,24 +4485,6 @@ export var NodeShape;
4433
4485
  value: Maybe.empty(),
4434
4486
  })),
4435
4487
  }).chain((nodeKind) => $shaclPropertyFromRdf({
4436
- graph: _$options.graph,
4437
- resource: $resource,
4438
- propertySchema: NodeShape.$schema
4439
- .properties
4440
- .nodes,
4441
- typeFromRdf: (resourceValues) => resourceValues
4442
- .chain((values) => values.chainMap((value) => value.toIdentifier()))
4443
- .map((values) => values.toArray())
4444
- .map((valuesArray) => Resource.Values.fromValue({
4445
- focusResource: $resource,
4446
- propertyPath: PropertyShape
4447
- .$schema
4448
- .properties
4449
- .nodes
4450
- .path,
4451
- value: valuesArray,
4452
- })),
4453
- }).chain((nodes) => $shaclPropertyFromRdf({
4454
4488
  graph: _$options.graph,
4455
4489
  resource: $resource,
4456
4490
  propertySchema: NodeShape.$schema
@@ -4769,8 +4803,8 @@ export var NodeShape;
4769
4803
  minInclusive,
4770
4804
  minLength,
4771
4805
  mutable,
4806
+ node,
4772
4807
  nodeKind,
4773
- nodes,
4774
4808
  not,
4775
4809
  or,
4776
4810
  patterns,
@@ -4943,7 +4977,7 @@ export var NodeShape;
4943
4977
  kind: "Shacl",
4944
4978
  type: () => ({
4945
4979
  kind: "Maybe",
4946
- item: () => ({ kind: "Int" }),
4980
+ item: () => ({ kind: "BigInt" }),
4947
4981
  }),
4948
4982
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"),
4949
4983
  },
@@ -4967,7 +5001,7 @@ export var NodeShape;
4967
5001
  kind: "Shacl",
4968
5002
  type: () => ({
4969
5003
  kind: "Maybe",
4970
- item: () => ({ kind: "Int" }),
5004
+ item: () => ({ kind: "BigInt" }),
4971
5005
  }),
4972
5006
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"),
4973
5007
  },
@@ -4975,7 +5009,7 @@ export var NodeShape;
4975
5009
  kind: "Shacl",
4976
5010
  type: () => ({
4977
5011
  kind: "Maybe",
4978
- item: () => ({ kind: "Int" }),
5012
+ item: () => ({ kind: "BigInt" }),
4979
5013
  }),
4980
5014
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"),
4981
5015
  },
@@ -4999,7 +5033,7 @@ export var NodeShape;
4999
5033
  kind: "Shacl",
5000
5034
  type: () => ({
5001
5035
  kind: "Maybe",
5002
- item: () => ({ kind: "Int" }),
5036
+ item: () => ({ kind: "BigInt" }),
5003
5037
  }),
5004
5038
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"),
5005
5039
  },
@@ -5011,6 +5045,14 @@ export var NodeShape;
5011
5045
  }),
5012
5046
  path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#mutable"),
5013
5047
  },
5048
+ node: {
5049
+ kind: "Shacl",
5050
+ type: () => ({
5051
+ kind: "Maybe",
5052
+ item: () => ({ kind: "Identifier" }),
5053
+ }),
5054
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
5055
+ },
5014
5056
  nodeKind: {
5015
5057
  kind: "Shacl",
5016
5058
  type: () => ({
@@ -5029,14 +5071,6 @@ export var NodeShape;
5029
5071
  }),
5030
5072
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"),
5031
5073
  },
5032
- nodes: {
5033
- kind: "Shacl",
5034
- type: () => ({
5035
- kind: "Set",
5036
- item: () => ({ kind: "Identifier" }),
5037
- }),
5038
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
5039
- },
5040
5074
  not: {
5041
5075
  kind: "Shacl",
5042
5076
  type: () => ({
@@ -5308,34 +5342,34 @@ export var NodeShape;
5308
5342
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"), _nodeShape.maxCount
5309
5343
  .toList()
5310
5344
  .flatMap((value) => [
5311
- $literalFactory.number(value, $RdfVocabularies.xsd.unsignedInt),
5345
+ $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
5312
5346
  ]), options?.graph);
5313
5347
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxExclusive"), _nodeShape.maxExclusive.toList(), options?.graph);
5314
5348
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxInclusive"), _nodeShape.maxInclusive.toList(), options?.graph);
5315
5349
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"), _nodeShape.maxLength
5316
5350
  .toList()
5317
5351
  .flatMap((value) => [
5318
- $literalFactory.number(value, $RdfVocabularies.xsd.unsignedInt),
5352
+ $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
5319
5353
  ]), options?.graph);
5320
5354
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"), _nodeShape.minCount
5321
5355
  .toList()
5322
5356
  .flatMap((value) => [
5323
- $literalFactory.number(value, $RdfVocabularies.xsd.unsignedInt),
5357
+ $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
5324
5358
  ]), options?.graph);
5325
5359
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minExclusive"), _nodeShape.minExclusive.toList(), options?.graph);
5326
5360
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minInclusive"), _nodeShape.minInclusive.toList(), options?.graph);
5327
5361
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"), _nodeShape.minLength
5328
5362
  .toList()
5329
5363
  .flatMap((value) => [
5330
- $literalFactory.number(value, $RdfVocabularies.xsd.unsignedInt),
5364
+ $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
5331
5365
  ]), options?.graph);
5332
5366
  resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#mutable"), _nodeShape.mutable
5333
5367
  .toList()
5334
5368
  .flatMap((value) => [
5335
5369
  $literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
5336
5370
  ]), options?.graph);
5371
+ resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), _nodeShape.node.toList(), options?.graph);
5337
5372
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"), _nodeShape.nodeKind.toList(), options?.graph);
5338
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), _nodeShape.nodes.flatMap((item) => [item]), options?.graph);
5339
5373
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#not"), _nodeShape.not.flatMap((item) => [item]), options?.graph);
5340
5374
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#or"), _nodeShape.or.toList().flatMap((value) => [
5341
5375
  value.length > 0
@@ -5577,7 +5611,7 @@ export var Shape;
5577
5611
  kind: "Shacl",
5578
5612
  type: () => ({
5579
5613
  kind: "Maybe",
5580
- item: () => ({ kind: "Int" }),
5614
+ item: () => ({ kind: "BigInt" }),
5581
5615
  }),
5582
5616
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"),
5583
5617
  },
@@ -5601,7 +5635,7 @@ export var Shape;
5601
5635
  kind: "Shacl",
5602
5636
  type: () => ({
5603
5637
  kind: "Maybe",
5604
- item: () => ({ kind: "Int" }),
5638
+ item: () => ({ kind: "BigInt" }),
5605
5639
  }),
5606
5640
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"),
5607
5641
  },
@@ -5609,7 +5643,7 @@ export var Shape;
5609
5643
  kind: "Shacl",
5610
5644
  type: () => ({
5611
5645
  kind: "Maybe",
5612
- item: () => ({ kind: "Int" }),
5646
+ item: () => ({ kind: "BigInt" }),
5613
5647
  }),
5614
5648
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"),
5615
5649
  },
@@ -5633,7 +5667,7 @@ export var Shape;
5633
5667
  kind: "Shacl",
5634
5668
  type: () => ({
5635
5669
  kind: "Maybe",
5636
- item: () => ({ kind: "Int" }),
5670
+ item: () => ({ kind: "BigInt" }),
5637
5671
  }),
5638
5672
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"),
5639
5673
  },
@@ -5645,6 +5679,14 @@ export var Shape;
5645
5679
  }),
5646
5680
  path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#mutable"),
5647
5681
  },
5682
+ node: {
5683
+ kind: "Shacl",
5684
+ type: () => ({
5685
+ kind: "Maybe",
5686
+ item: () => ({ kind: "Identifier" }),
5687
+ }),
5688
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
5689
+ },
5648
5690
  nodeKind: {
5649
5691
  kind: "Shacl",
5650
5692
  type: () => ({
@@ -5663,14 +5705,6 @@ export var Shape;
5663
5705
  }),
5664
5706
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"),
5665
5707
  },
5666
- nodes: {
5667
- kind: "Shacl",
5668
- type: () => ({
5669
- kind: "Set",
5670
- item: () => ({ kind: "Identifier" }),
5671
- }),
5672
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
5673
- },
5674
5708
  not: {
5675
5709
  kind: "Shacl",
5676
5710
  type: () => ({
@@ -5997,7 +6031,7 @@ export class $RdfjsDatasetObjectSet {
5997
6031
  return this.nodeShapesSync(query);
5998
6032
  }
5999
6033
  nodeShapesSync(query) {
6000
- return this.$objectsSync({
6034
+ return this.#objectsSync({
6001
6035
  $filter: NodeShape.$filter,
6002
6036
  $fromRdfResource: NodeShape.$fromRdfResource,
6003
6037
  $fromRdfTypes: [NodeShape.$fromRdfType],
@@ -6028,7 +6062,7 @@ export class $RdfjsDatasetObjectSet {
6028
6062
  return this.ontologiesSync(query);
6029
6063
  }
6030
6064
  ontologiesSync(query) {
6031
- return this.$objectsSync({
6065
+ return this.#objectsSync({
6032
6066
  $filter: Ontology.$filter,
6033
6067
  $fromRdfResource: Ontology.$fromRdfResource,
6034
6068
  $fromRdfTypes: [Ontology.$fromRdfType],
@@ -6059,7 +6093,7 @@ export class $RdfjsDatasetObjectSet {
6059
6093
  return this.propertyGroupsSync(query);
6060
6094
  }
6061
6095
  propertyGroupsSync(query) {
6062
- return this.$objectsSync({
6096
+ return this.#objectsSync({
6063
6097
  $filter: PropertyGroup.$filter,
6064
6098
  $fromRdfResource: PropertyGroup.$fromRdfResource,
6065
6099
  $fromRdfTypes: [PropertyGroup.$fromRdfType],
@@ -6090,7 +6124,7 @@ export class $RdfjsDatasetObjectSet {
6090
6124
  return this.propertyShapesSync(query);
6091
6125
  }
6092
6126
  propertyShapesSync(query) {
6093
- return this.$objectsSync({
6127
+ return this.#objectsSync({
6094
6128
  $filter: PropertyShape.$filter,
6095
6129
  $fromRdfResource: PropertyShape.$fromRdfResource,
6096
6130
  $fromRdfTypes: [PropertyShape.$fromRdfType],
@@ -6121,7 +6155,7 @@ export class $RdfjsDatasetObjectSet {
6121
6155
  return this.shapesSync(query);
6122
6156
  }
6123
6157
  shapesSync(query) {
6124
- return this.$objectUnionsSync([
6158
+ return this.#objectUnionsSync([
6125
6159
  {
6126
6160
  $filter: Shape.$filter,
6127
6161
  $fromRdfResource: NodeShape.$fromRdfResource,
@@ -6134,32 +6168,32 @@ export class $RdfjsDatasetObjectSet {
6134
6168
  },
6135
6169
  ], query);
6136
6170
  }
6137
- async object(identifier, options) {
6138
- return this.objectSync(identifier, options);
6171
+ async $object(identifier, options) {
6172
+ return this.$objectSync(identifier, options);
6139
6173
  }
6140
- objectSync(identifier, options) {
6141
- return this.objectsSync({
6174
+ $objectSync(identifier, options) {
6175
+ return this.$objectsSync({
6142
6176
  identifiers: [identifier],
6143
6177
  preferredLanguages: options?.preferredLanguages,
6144
6178
  }).map((objects) => objects[0]);
6145
6179
  }
6146
- async objectCount(query) {
6147
- return this.objectCountSync(query);
6180
+ async $objectCount(query) {
6181
+ return this.$objectCountSync(query);
6148
6182
  }
6149
- objectCountSync(query) {
6150
- return this.objectsSync(query).map((objects) => objects.length);
6183
+ $objectCountSync(query) {
6184
+ return this.$objectsSync(query).map((objects) => objects.length);
6151
6185
  }
6152
- async objectIdentifiers(query) {
6153
- return this.objectIdentifiersSync(query);
6186
+ async $objectIdentifiers(query) {
6187
+ return this.$objectIdentifiersSync(query);
6154
6188
  }
6155
- objectIdentifiersSync(query) {
6156
- return this.objectsSync(query).map((objects) => objects.map((object) => object.$identifier()));
6189
+ $objectIdentifiersSync(query) {
6190
+ return this.$objectsSync(query).map((objects) => objects.map((object) => object.$identifier()));
6157
6191
  }
6158
- async objects(query) {
6159
- return this.objectsSync(query);
6192
+ async $objects(query) {
6193
+ return this.$objectsSync(query);
6160
6194
  }
6161
- objectsSync(query) {
6162
- return this.$objectUnionsSync([
6195
+ $objectsSync(query) {
6196
+ return this.#objectUnionsSync([
6163
6197
  {
6164
6198
  $filter: $Object.$filter,
6165
6199
  $fromRdfResource: NodeShape.$fromRdfResource,
@@ -6182,7 +6216,7 @@ export class $RdfjsDatasetObjectSet {
6182
6216
  },
6183
6217
  ], query);
6184
6218
  }
6185
- $objectsSync(namedObjectType, query) {
6219
+ #objectsSync(namedObjectType, query) {
6186
6220
  const graph = query?.graph ?? this.$graph;
6187
6221
  const limit = query?.limit ?? Number.MAX_SAFE_INTEGER;
6188
6222
  if (limit <= 0) {
@@ -6275,7 +6309,7 @@ export class $RdfjsDatasetObjectSet {
6275
6309
  }
6276
6310
  return Right(objects);
6277
6311
  }
6278
- $objectUnionsSync(namedObjectTypes, query) {
6312
+ #objectUnionsSync(namedObjectTypes, query) {
6279
6313
  const graph = query?.graph ?? this.$graph;
6280
6314
  const limit = query?.limit ?? Number.MAX_SAFE_INTEGER;
6281
6315
  if (limit <= 0) {