@shaclmate/shacl-ast 4.0.26 → 4.0.27

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.
@@ -114,8 +114,8 @@ export interface PropertyShape {
114
114
  readonly minInclusive: Maybe<Literal>;
115
115
  readonly minLength: Maybe<number>;
116
116
  readonly name: Maybe<string>;
117
+ readonly node: Maybe<BlankNode | NamedNode>;
117
118
  readonly nodeKind: Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
118
- readonly nodes: readonly (BlankNode | NamedNode)[];
119
119
  readonly not: readonly (BlankNode | NamedNode)[];
120
120
  readonly or: Maybe<readonly (BlankNode | NamedNode)[]>;
121
121
  readonly order: Maybe<number>;
@@ -150,8 +150,8 @@ export declare namespace PropertyShape {
150
150
  readonly minInclusive?: Maybe<Literal> | bigint | boolean | Date | number | string | Literal;
151
151
  readonly minLength?: Maybe<number> | number;
152
152
  readonly name?: Maybe<string> | string;
153
+ readonly node?: Maybe<BlankNode | NamedNode> | (BlankNode | NamedNode) | string;
153
154
  readonly nodeKind?: Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">> | NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal"> | "http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal";
154
- readonly nodes?: readonly (BlankNode | NamedNode)[] | readonly string[];
155
155
  readonly not?: readonly (BlankNode | NamedNode)[] | readonly string[];
156
156
  readonly or?: Maybe<readonly (BlankNode | NamedNode)[]> | readonly (BlankNode | NamedNode)[] | readonly string[];
157
157
  readonly order?: Maybe<number> | number;
@@ -191,8 +191,8 @@ export declare namespace PropertyShape {
191
191
  readonly minInclusive?: $MaybeFilter<$LiteralFilter>;
192
192
  readonly minLength?: $MaybeFilter<$NumericFilter<number>>;
193
193
  readonly name?: $MaybeFilter<$StringFilter>;
194
+ readonly node?: $MaybeFilter<$IdentifierFilter>;
194
195
  readonly nodeKind?: $MaybeFilter<$IriFilter>;
195
- readonly nodes?: $CollectionFilter<$IdentifierFilter>;
196
196
  readonly not?: $CollectionFilter<$IdentifierFilter>;
197
197
  readonly or?: $MaybeFilter<$CollectionFilter<$IdentifierFilter>>;
198
198
  readonly order?: $MaybeFilter<$NumericFilter<number>>;
@@ -231,8 +231,8 @@ export declare namespace PropertyShape {
231
231
  minInclusive: Maybe<Literal>;
232
232
  minLength: Maybe<number>;
233
233
  name: Maybe<string>;
234
+ node: Maybe<BlankNode | NamedNode>;
234
235
  nodeKind: Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
235
- nodes: readonly (BlankNode | NamedNode)[];
236
236
  not: readonly (BlankNode | NamedNode)[];
237
237
  or: Maybe<readonly (BlankNode | NamedNode)[]>;
238
238
  order: Maybe<number>;
@@ -495,26 +495,26 @@ export declare namespace PropertyShape {
495
495
  };
496
496
  readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#name">;
497
497
  };
498
- readonly nodeKind: {
498
+ readonly node: {
499
499
  readonly kind: "Shacl";
500
500
  readonly type: () => {
501
501
  kind: "Maybe";
502
502
  item: () => {
503
- kind: "Iri";
504
- in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
503
+ kind: "Identifier";
505
504
  };
506
505
  };
507
- readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
506
+ readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
508
507
  };
509
- readonly nodes: {
508
+ readonly nodeKind: {
510
509
  readonly kind: "Shacl";
511
510
  readonly type: () => {
512
- kind: "Set";
511
+ kind: "Maybe";
513
512
  item: () => {
514
- kind: "Identifier";
513
+ kind: "Iri";
514
+ in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
515
515
  };
516
516
  };
517
- readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
517
+ readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
518
518
  };
519
519
  readonly not: {
520
520
  readonly kind: "Shacl";
@@ -768,8 +768,8 @@ export interface NodeShape {
768
768
  readonly minExclusive: Maybe<Literal>;
769
769
  readonly minInclusive: Maybe<Literal>;
770
770
  readonly minLength: Maybe<number>;
771
+ readonly node: Maybe<BlankNode | NamedNode>;
771
772
  readonly nodeKind: Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
772
- readonly nodes: readonly (BlankNode | NamedNode)[];
773
773
  readonly not: readonly (BlankNode | NamedNode)[];
774
774
  readonly or: Maybe<readonly (BlankNode | NamedNode)[]>;
775
775
  readonly patterns: readonly string[];
@@ -802,8 +802,8 @@ export declare namespace NodeShape {
802
802
  readonly minExclusive?: Maybe<Literal> | bigint | boolean | Date | number | string | Literal;
803
803
  readonly minInclusive?: Maybe<Literal> | bigint | boolean | Date | number | string | Literal;
804
804
  readonly minLength?: Maybe<number> | number;
805
+ readonly node?: Maybe<BlankNode | NamedNode> | (BlankNode | NamedNode) | string;
805
806
  readonly nodeKind?: Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">> | NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal"> | "http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal";
806
- readonly nodes?: readonly (BlankNode | NamedNode)[] | readonly string[];
807
807
  readonly not?: readonly (BlankNode | NamedNode)[] | readonly string[];
808
808
  readonly or?: Maybe<readonly (BlankNode | NamedNode)[]> | readonly (BlankNode | NamedNode)[] | readonly string[];
809
809
  readonly patterns?: readonly string[];
@@ -841,8 +841,8 @@ export declare namespace NodeShape {
841
841
  readonly minExclusive?: $MaybeFilter<$LiteralFilter>;
842
842
  readonly minInclusive?: $MaybeFilter<$LiteralFilter>;
843
843
  readonly minLength?: $MaybeFilter<$NumericFilter<number>>;
844
+ readonly node?: $MaybeFilter<$IdentifierFilter>;
844
845
  readonly nodeKind?: $MaybeFilter<$IriFilter>;
845
- readonly nodes?: $CollectionFilter<$IdentifierFilter>;
846
846
  readonly not?: $CollectionFilter<$IdentifierFilter>;
847
847
  readonly or?: $MaybeFilter<$CollectionFilter<$IdentifierFilter>>;
848
848
  readonly patterns?: $CollectionFilter<$StringFilter>;
@@ -879,8 +879,8 @@ export declare namespace NodeShape {
879
879
  minExclusive: Maybe<Literal>;
880
880
  minInclusive: Maybe<Literal>;
881
881
  minLength: Maybe<number>;
882
+ node: Maybe<BlankNode | NamedNode>;
882
883
  nodeKind: Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
883
- nodes: readonly (BlankNode | NamedNode)[];
884
884
  not: readonly (BlankNode | NamedNode)[];
885
885
  or: Maybe<readonly (BlankNode | NamedNode)[]>;
886
886
  patterns: readonly string[];
@@ -1126,26 +1126,26 @@ export declare namespace NodeShape {
1126
1126
  };
1127
1127
  readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#minLength">;
1128
1128
  };
1129
- readonly nodeKind: {
1129
+ readonly node: {
1130
1130
  readonly kind: "Shacl";
1131
1131
  readonly type: () => {
1132
1132
  kind: "Maybe";
1133
1133
  item: () => {
1134
- kind: "Iri";
1135
- in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
1134
+ kind: "Identifier";
1136
1135
  };
1137
1136
  };
1138
- readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
1137
+ readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
1139
1138
  };
1140
- readonly nodes: {
1139
+ readonly nodeKind: {
1141
1140
  readonly kind: "Shacl";
1142
1141
  readonly type: () => {
1143
- kind: "Set";
1142
+ kind: "Maybe";
1144
1143
  item: () => {
1145
- kind: "Identifier";
1144
+ kind: "Iri";
1145
+ in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
1146
1146
  };
1147
1147
  };
1148
- readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
1148
+ readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
1149
1149
  };
1150
1150
  readonly not: {
1151
1151
  readonly kind: "Shacl";
@@ -1489,26 +1489,26 @@ export declare namespace Shape {
1489
1489
  };
1490
1490
  readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#minLength">;
1491
1491
  };
1492
- readonly nodeKind: {
1492
+ readonly node: {
1493
1493
  readonly kind: "Shacl";
1494
1494
  readonly type: () => {
1495
1495
  kind: "Maybe";
1496
1496
  item: () => {
1497
- kind: "Iri";
1498
- in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
1497
+ kind: "Identifier";
1499
1498
  };
1500
1499
  };
1501
- readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
1500
+ readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
1502
1501
  };
1503
- readonly nodes: {
1502
+ readonly nodeKind: {
1504
1503
  readonly kind: "Shacl";
1505
1504
  readonly type: () => {
1506
- kind: "Set";
1505
+ kind: "Maybe";
1507
1506
  item: () => {
1508
- kind: "Identifier";
1507
+ kind: "Iri";
1508
+ in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
1509
1509
  };
1510
1510
  };
1511
- readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
1511
+ readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
1512
1512
  };
1513
1513
  readonly not: {
1514
1514
  readonly kind: "Shacl";
@@ -1845,26 +1845,26 @@ export declare namespace Shape {
1845
1845
  };
1846
1846
  readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#name">;
1847
1847
  };
1848
- readonly nodeKind: {
1848
+ readonly node: {
1849
1849
  readonly kind: "Shacl";
1850
1850
  readonly type: () => {
1851
1851
  kind: "Maybe";
1852
1852
  item: () => {
1853
- kind: "Iri";
1854
- in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
1853
+ kind: "Identifier";
1855
1854
  };
1856
1855
  };
1857
- readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
1856
+ readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
1858
1857
  };
1859
- readonly nodes: {
1858
+ readonly nodeKind: {
1860
1859
  readonly kind: "Shacl";
1861
1860
  readonly type: () => {
1862
- kind: "Set";
1861
+ kind: "Maybe";
1863
1862
  item: () => {
1864
- kind: "Identifier";
1863
+ kind: "Iri";
1864
+ in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
1865
1865
  };
1866
1866
  };
1867
- readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
1867
+ readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
1868
1868
  };
1869
1869
  readonly not: {
1870
1870
  readonly kind: "Shacl";
@@ -2141,26 +2141,26 @@ export declare namespace Shape {
2141
2141
  };
2142
2142
  readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#minLength">;
2143
2143
  };
2144
- readonly nodeKind: {
2144
+ readonly node: {
2145
2145
  readonly kind: "Shacl";
2146
2146
  readonly type: () => {
2147
2147
  kind: "Maybe";
2148
2148
  item: () => {
2149
- kind: "Iri";
2150
- in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
2149
+ kind: "Identifier";
2151
2150
  };
2152
2151
  };
2153
- readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
2152
+ readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
2154
2153
  };
2155
- readonly nodes: {
2154
+ readonly nodeKind: {
2156
2155
  readonly kind: "Shacl";
2157
2156
  readonly type: () => {
2158
- kind: "Set";
2157
+ kind: "Maybe";
2159
2158
  item: () => {
2160
- kind: "Identifier";
2159
+ kind: "Iri";
2160
+ in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
2161
2161
  };
2162
2162
  };
2163
- readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
2163
+ readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
2164
2164
  };
2165
2165
  readonly not: {
2166
2166
  readonly kind: "Shacl";
@@ -2482,26 +2482,26 @@ export declare namespace $Object {
2482
2482
  };
2483
2483
  readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#minLength">;
2484
2484
  };
2485
- readonly nodeKind: {
2485
+ readonly node: {
2486
2486
  readonly kind: "Shacl";
2487
2487
  readonly type: () => {
2488
2488
  kind: "Maybe";
2489
2489
  item: () => {
2490
- kind: "Iri";
2491
- in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
2490
+ kind: "Identifier";
2492
2491
  };
2493
2492
  };
2494
- readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
2493
+ readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
2495
2494
  };
2496
- readonly nodes: {
2495
+ readonly nodeKind: {
2497
2496
  readonly kind: "Shacl";
2498
2497
  readonly type: () => {
2499
- kind: "Set";
2498
+ kind: "Maybe";
2500
2499
  item: () => {
2501
- kind: "Identifier";
2500
+ kind: "Iri";
2501
+ in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
2502
2502
  };
2503
2503
  };
2504
- readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
2504
+ readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
2505
2505
  };
2506
2506
  readonly not: {
2507
2507
  readonly kind: "Shacl";
@@ -2918,26 +2918,26 @@ export declare namespace $Object {
2918
2918
  };
2919
2919
  readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#name">;
2920
2920
  };
2921
- readonly nodeKind: {
2921
+ readonly node: {
2922
2922
  readonly kind: "Shacl";
2923
2923
  readonly type: () => {
2924
2924
  kind: "Maybe";
2925
2925
  item: () => {
2926
- kind: "Iri";
2927
- in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
2926
+ kind: "Identifier";
2928
2927
  };
2929
2928
  };
2930
- readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
2929
+ readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
2931
2930
  };
2932
- readonly nodes: {
2931
+ readonly nodeKind: {
2933
2932
  readonly kind: "Shacl";
2934
2933
  readonly type: () => {
2935
- kind: "Set";
2934
+ kind: "Maybe";
2936
2935
  item: () => {
2937
- kind: "Identifier";
2936
+ kind: "Iri";
2937
+ in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNode"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrIRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#BlankNodeOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRI"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#IRIOrLiteral"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Literal">)[];
2938
2938
  };
2939
2939
  };
2940
- readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
2940
+ readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
2941
2941
  };
2942
2942
  readonly not: {
2943
2943
  readonly kind: "Shacl";
@@ -3078,12 +3078,12 @@ export interface $ObjectSet {
3078
3078
  shapeCount(query?: Pick<$ObjectSet.Query<Shape.$Filter, Shape.$Identifier>, "filter">): Promise<Either<Error, number>>;
3079
3079
  shapeIdentifiers(query?: $ObjectSet.Query<Shape.$Filter, Shape.$Identifier>): Promise<Either<Error, readonly Shape.$Identifier[]>>;
3080
3080
  shapes(query?: $ObjectSet.Query<Shape.$Filter, Shape.$Identifier>): Promise<Either<Error, readonly Shape[]>>;
3081
- object(identifier: $Object.$Identifier, options?: {
3081
+ $object(identifier: $Object.$Identifier, options?: {
3082
3082
  preferredLanguages?: readonly string[];
3083
3083
  }): Promise<Either<Error, $Object>>;
3084
- objectCount(query?: Pick<$ObjectSet.Query<$Object.$Filter, $Object.$Identifier>, "filter">): Promise<Either<Error, number>>;
3085
- objectIdentifiers(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object.$Identifier[]>>;
3086
- objects(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object[]>>;
3084
+ $objectCount(query?: Pick<$ObjectSet.Query<$Object.$Filter, $Object.$Identifier>, "filter">): Promise<Either<Error, number>>;
3085
+ $objectIdentifiers(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object.$Identifier[]>>;
3086
+ $objects(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object[]>>;
3087
3087
  }
3088
3088
  export declare namespace $ObjectSet {
3089
3089
  interface Query<ObjectFilterT, ObjectIdentifierT extends BlankNode | NamedNode> {
@@ -3163,32 +3163,18 @@ export declare class $RdfjsDatasetObjectSet implements $ObjectSet {
3163
3163
  shapeIdentifiersSync(query?: $ObjectSet.Query<Shape.$Filter, Shape.$Identifier>): Either<Error, readonly Shape.$Identifier[]>;
3164
3164
  shapes(query?: $ObjectSet.Query<Shape.$Filter, Shape.$Identifier>): Promise<Either<Error, readonly Shape[]>>;
3165
3165
  shapesSync(query?: $ObjectSet.Query<Shape.$Filter, Shape.$Identifier>): Either<Error, readonly Shape[]>;
3166
- object(identifier: $Object.$Identifier, options?: {
3166
+ $object(identifier: $Object.$Identifier, options?: {
3167
3167
  preferredLanguages?: readonly string[];
3168
3168
  }): Promise<Either<Error, $Object>>;
3169
- objectSync(identifier: $Object.$Identifier, options?: {
3169
+ $objectSync(identifier: $Object.$Identifier, options?: {
3170
3170
  preferredLanguages?: readonly string[];
3171
3171
  }): Either<Error, $Object>;
3172
- objectCount(query?: Pick<$ObjectSet.Query<$Object.$Filter, $Object.$Identifier>, "filter">): Promise<Either<Error, number>>;
3173
- objectCountSync(query?: Pick<$ObjectSet.Query<$Object.$Filter, $Object.$Identifier>, "filter">): Either<Error, number>;
3174
- objectIdentifiers(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object.$Identifier[]>>;
3175
- objectIdentifiersSync(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Either<Error, readonly $Object.$Identifier[]>;
3176
- objects(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object[]>>;
3177
- objectsSync(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Either<Error, readonly $Object[]>;
3178
- protected $objectsSync<ObjectT extends {
3179
- readonly $identifier: () => ObjectIdentifierT;
3180
- }, ObjectFilterT, ObjectIdentifierT extends BlankNode | NamedNode>(namedObjectType: {
3181
- $filter: (filter: ObjectFilterT, value: ObjectT) => boolean;
3182
- $fromRdfResource: $FromRdfResourceFunction<ObjectT>;
3183
- $fromRdfTypes: readonly NamedNode[];
3184
- }, query?: $ObjectSet.Query<ObjectFilterT, ObjectIdentifierT>): Either<Error, readonly ObjectT[]>;
3185
- protected $objectUnionsSync<ObjectT extends {
3186
- readonly $identifier: () => ObjectIdentifierT;
3187
- }, ObjectFilterT, ObjectIdentifierT extends BlankNode | NamedNode>(namedObjectTypes: readonly {
3188
- $filter: (filter: ObjectFilterT, value: ObjectT) => boolean;
3189
- $fromRdfResource: $FromRdfResourceFunction<ObjectT>;
3190
- $fromRdfTypes: readonly NamedNode[];
3191
- }[], query?: $ObjectSet.Query<ObjectFilterT, ObjectIdentifierT>): Either<Error, readonly ObjectT[]>;
3172
+ $objectCount(query?: Pick<$ObjectSet.Query<$Object.$Filter, $Object.$Identifier>, "filter">): Promise<Either<Error, number>>;
3173
+ $objectCountSync(query?: Pick<$ObjectSet.Query<$Object.$Filter, $Object.$Identifier>, "filter">): Either<Error, number>;
3174
+ $objectIdentifiers(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object.$Identifier[]>>;
3175
+ $objectIdentifiersSync(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Either<Error, readonly $Object.$Identifier[]>;
3176
+ $objects(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object[]>>;
3177
+ $objectsSync(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Either<Error, readonly $Object[]>;
3192
3178
  }
3193
3179
  export {};
3194
3180
  //# sourceMappingURL=generated.d.ts.map
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
  }
@@ -672,6 +672,22 @@ export var PropertyShape;
672
672
  else {
673
673
  name = parameters.name;
674
674
  }
675
+ let node;
676
+ if (Maybe.isMaybe(parameters.node)) {
677
+ node = parameters.node;
678
+ }
679
+ else if (typeof parameters.node === "object") {
680
+ node = Maybe.of(parameters.node);
681
+ }
682
+ else if (typeof parameters.node === "string") {
683
+ node = Maybe.of(dataFactory.namedNode(parameters.node));
684
+ }
685
+ else if (parameters.node === undefined) {
686
+ node = Maybe.empty();
687
+ }
688
+ else {
689
+ node = parameters.node;
690
+ }
675
691
  let nodeKind;
676
692
  if (Maybe.isMaybe(parameters.nodeKind)) {
677
693
  nodeKind = parameters.nodeKind;
@@ -688,19 +704,6 @@ export var PropertyShape;
688
704
  else {
689
705
  nodeKind = parameters.nodeKind;
690
706
  }
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
707
  let not;
705
708
  if (parameters.not === undefined) {
706
709
  not = [];
@@ -809,8 +812,8 @@ export var PropertyShape;
809
812
  minInclusive,
810
813
  minLength,
811
814
  name,
815
+ node,
812
816
  nodeKind,
813
- nodes,
814
817
  not,
815
818
  or,
816
819
  order,
@@ -923,12 +926,12 @@ export var PropertyShape;
923
926
  !$filterMaybe($filterString)(filter.name, value.name)) {
924
927
  return false;
925
928
  }
926
- if (filter.nodeKind !== undefined &&
927
- !$filterMaybe($filterIri)(filter.nodeKind, value.nodeKind)) {
929
+ if (filter.node !== undefined &&
930
+ !$filterMaybe($filterIdentifier)(filter.node, value.node)) {
928
931
  return false;
929
932
  }
930
- if (filter.nodes !== undefined &&
931
- !$filterArray($filterIdentifier)(filter.nodes, value.nodes)) {
933
+ if (filter.nodeKind !== undefined &&
934
+ !$filterMaybe($filterIri)(filter.nodeKind, value.nodeKind)) {
932
935
  return false;
933
936
  }
934
937
  if (filter.not !== undefined &&
@@ -1441,6 +1444,26 @@ export var PropertyShape;
1441
1444
  value: Maybe.empty(),
1442
1445
  })),
1443
1446
  }).chain((name) => $shaclPropertyFromRdf({
1447
+ graph: _$options.graph,
1448
+ resource: $resource,
1449
+ propertySchema: PropertyShape.$schema
1450
+ .properties
1451
+ .node,
1452
+ typeFromRdf: (resourceValues) => resourceValues
1453
+ .chain((values) => values.chainMap((value) => value.toIdentifier()))
1454
+ .map((values) => values.length >
1455
+ 0
1456
+ ? values.map((value) => Maybe.of(value))
1457
+ : Resource.Values.fromValue({
1458
+ focusResource: $resource,
1459
+ propertyPath: PropertyShape
1460
+ .$schema
1461
+ .properties
1462
+ .node
1463
+ .path,
1464
+ value: Maybe.empty(),
1465
+ })),
1466
+ }).chain((node) => $shaclPropertyFromRdf({
1444
1467
  graph: _$options.graph,
1445
1468
  resource: $resource,
1446
1469
  propertySchema: PropertyShape.$schema
@@ -1468,24 +1491,6 @@ export var PropertyShape;
1468
1491
  value: Maybe.empty(),
1469
1492
  })),
1470
1493
  }).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
1494
  graph: _$options.graph,
1490
1495
  resource: $resource,
1491
1496
  propertySchema: PropertyShape.$schema
@@ -1671,8 +1676,8 @@ export var PropertyShape;
1671
1676
  minInclusive,
1672
1677
  minLength,
1673
1678
  name,
1679
+ node,
1674
1680
  nodeKind,
1675
- nodes,
1676
1681
  not,
1677
1682
  or,
1678
1683
  order,
@@ -1888,6 +1893,14 @@ export var PropertyShape;
1888
1893
  }),
1889
1894
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#name"),
1890
1895
  },
1896
+ node: {
1897
+ kind: "Shacl",
1898
+ type: () => ({
1899
+ kind: "Maybe",
1900
+ item: () => ({ kind: "Identifier" }),
1901
+ }),
1902
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
1903
+ },
1891
1904
  nodeKind: {
1892
1905
  kind: "Shacl",
1893
1906
  type: () => ({
@@ -1906,14 +1919,6 @@ export var PropertyShape;
1906
1919
  }),
1907
1920
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"),
1908
1921
  },
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
1922
  not: {
1918
1923
  kind: "Shacl",
1919
1924
  type: () => ({
@@ -2099,8 +2104,8 @@ export var PropertyShape;
2099
2104
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#name"), _propertyShape.name
2100
2105
  .toList()
2101
2106
  .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
2107
+ resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), _propertyShape.node.toList(), options?.graph);
2102
2108
  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
2109
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#not"), _propertyShape.not.flatMap((item) => [item]), options?.graph);
2105
2110
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#or"), _propertyShape.or.toList().flatMap((value) => [
2106
2111
  value.length > 0
@@ -3003,6 +3008,22 @@ export var NodeShape;
3003
3008
  else {
3004
3009
  minLength = parameters?.minLength;
3005
3010
  }
3011
+ let node;
3012
+ if (Maybe.isMaybe(parameters?.node)) {
3013
+ node = parameters?.node;
3014
+ }
3015
+ else if (typeof parameters?.node === "object") {
3016
+ node = Maybe.of(parameters?.node);
3017
+ }
3018
+ else if (typeof parameters?.node === "string") {
3019
+ node = Maybe.of(dataFactory.namedNode(parameters?.node));
3020
+ }
3021
+ else if (parameters?.node === undefined) {
3022
+ node = Maybe.empty();
3023
+ }
3024
+ else {
3025
+ node = parameters?.node;
3026
+ }
3006
3027
  let nodeKind;
3007
3028
  if (Maybe.isMaybe(parameters?.nodeKind)) {
3008
3029
  nodeKind = parameters?.nodeKind;
@@ -3019,19 +3040,6 @@ export var NodeShape;
3019
3040
  else {
3020
3041
  nodeKind = parameters?.nodeKind;
3021
3042
  }
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
3043
  let not;
3036
3044
  if (parameters?.not === undefined) {
3037
3045
  not = [];
@@ -3150,8 +3158,8 @@ export var NodeShape;
3150
3158
  minExclusive,
3151
3159
  minInclusive,
3152
3160
  minLength,
3161
+ node,
3153
3162
  nodeKind,
3154
- nodes,
3155
3163
  not,
3156
3164
  or,
3157
3165
  patterns,
@@ -3256,12 +3264,12 @@ export var NodeShape;
3256
3264
  !$filterMaybe(($filterNumeric))(filter.minLength, value.minLength)) {
3257
3265
  return false;
3258
3266
  }
3259
- if (filter.nodeKind !== undefined &&
3260
- !$filterMaybe($filterIri)(filter.nodeKind, value.nodeKind)) {
3267
+ if (filter.node !== undefined &&
3268
+ !$filterMaybe($filterIdentifier)(filter.node, value.node)) {
3261
3269
  return false;
3262
3270
  }
3263
- if (filter.nodes !== undefined &&
3264
- !$filterArray($filterIdentifier)(filter.nodes, value.nodes)) {
3271
+ if (filter.nodeKind !== undefined &&
3272
+ !$filterMaybe($filterIri)(filter.nodeKind, value.nodeKind)) {
3265
3273
  return false;
3266
3274
  }
3267
3275
  if (filter.not !== undefined &&
@@ -3725,6 +3733,24 @@ export var NodeShape;
3725
3733
  value: Maybe.empty(),
3726
3734
  })),
3727
3735
  }).chain((minLength) => $shaclPropertyFromRdf({
3736
+ graph: _$options.graph,
3737
+ resource: $resource,
3738
+ propertySchema: NodeShape.$schema.properties
3739
+ .node,
3740
+ typeFromRdf: (resourceValues) => resourceValues
3741
+ .chain((values) => values.chainMap((value) => value.toIdentifier()))
3742
+ .map((values) => values.length > 0
3743
+ ? values.map((value) => Maybe.of(value))
3744
+ : Resource.Values.fromValue({
3745
+ focusResource: $resource,
3746
+ propertyPath: PropertyShape
3747
+ .$schema
3748
+ .properties
3749
+ .node
3750
+ .path,
3751
+ value: Maybe.empty(),
3752
+ })),
3753
+ }).chain((node) => $shaclPropertyFromRdf({
3728
3754
  graph: _$options.graph,
3729
3755
  resource: $resource,
3730
3756
  propertySchema: NodeShape.$schema.properties
@@ -3738,7 +3764,8 @@ export var NodeShape;
3738
3764
  dataFactory.namedNode("http://www.w3.org/ns/shacl#IRIOrLiteral"),
3739
3765
  dataFactory.namedNode("http://www.w3.org/ns/shacl#Literal"),
3740
3766
  ])))
3741
- .map((values) => values.length > 0
3767
+ .map((values) => values.length >
3768
+ 0
3742
3769
  ? values.map((value) => Maybe.of(value))
3743
3770
  : Resource.Values.fromValue({
3744
3771
  focusResource: $resource,
@@ -3750,23 +3777,6 @@ export var NodeShape;
3750
3777
  value: Maybe.empty(),
3751
3778
  })),
3752
3779
  }).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
3780
  graph: _$options.graph,
3771
3781
  resource: $resource,
3772
3782
  propertySchema: NodeShape.$schema
@@ -3945,8 +3955,8 @@ export var NodeShape;
3945
3955
  minExclusive,
3946
3956
  minInclusive,
3947
3957
  minLength,
3958
+ node,
3948
3959
  nodeKind,
3949
- nodes,
3950
3960
  not,
3951
3961
  or,
3952
3962
  patterns,
@@ -4149,6 +4159,14 @@ export var NodeShape;
4149
4159
  }),
4150
4160
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"),
4151
4161
  },
4162
+ node: {
4163
+ kind: "Shacl",
4164
+ type: () => ({
4165
+ kind: "Maybe",
4166
+ item: () => ({ kind: "Identifier" }),
4167
+ }),
4168
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
4169
+ },
4152
4170
  nodeKind: {
4153
4171
  kind: "Shacl",
4154
4172
  type: () => ({
@@ -4167,14 +4185,6 @@ export var NodeShape;
4167
4185
  }),
4168
4186
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"),
4169
4187
  },
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
4188
  not: {
4179
4189
  kind: "Shacl",
4180
4190
  type: () => ({
@@ -4382,8 +4392,8 @@ export var NodeShape;
4382
4392
  .flatMap((value) => [
4383
4393
  $literalFactory.number(value, $RdfVocabularies.xsd.unsignedInt),
4384
4394
  ]), options?.graph);
4395
+ resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), _nodeShape.node.toList(), options?.graph);
4385
4396
  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
4397
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#not"), _nodeShape.not.flatMap((item) => [item]), options?.graph);
4388
4398
  resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#or"), _nodeShape.or.toList().flatMap((value) => [
4389
4399
  value.length > 0
@@ -4674,6 +4684,14 @@ export var Shape;
4674
4684
  }),
4675
4685
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"),
4676
4686
  },
4687
+ node: {
4688
+ kind: "Shacl",
4689
+ type: () => ({
4690
+ kind: "Maybe",
4691
+ item: () => ({ kind: "Identifier" }),
4692
+ }),
4693
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
4694
+ },
4677
4695
  nodeKind: {
4678
4696
  kind: "Shacl",
4679
4697
  type: () => ({
@@ -4692,14 +4710,6 @@ export var Shape;
4692
4710
  }),
4693
4711
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"),
4694
4712
  },
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
4713
  not: {
4704
4714
  kind: "Shacl",
4705
4715
  type: () => ({
@@ -5018,7 +5028,7 @@ export class $RdfjsDatasetObjectSet {
5018
5028
  return this.nodeShapesSync(query);
5019
5029
  }
5020
5030
  nodeShapesSync(query) {
5021
- return this.$objectsSync({
5031
+ return this.#objectsSync({
5022
5032
  $filter: NodeShape.$filter,
5023
5033
  $fromRdfResource: NodeShape.$fromRdfResource,
5024
5034
  $fromRdfTypes: [NodeShape.$fromRdfType],
@@ -5049,7 +5059,7 @@ export class $RdfjsDatasetObjectSet {
5049
5059
  return this.ontologiesSync(query);
5050
5060
  }
5051
5061
  ontologiesSync(query) {
5052
- return this.$objectsSync({
5062
+ return this.#objectsSync({
5053
5063
  $filter: Ontology.$filter,
5054
5064
  $fromRdfResource: Ontology.$fromRdfResource,
5055
5065
  $fromRdfTypes: [Ontology.$fromRdfType],
@@ -5080,7 +5090,7 @@ export class $RdfjsDatasetObjectSet {
5080
5090
  return this.propertyGroupsSync(query);
5081
5091
  }
5082
5092
  propertyGroupsSync(query) {
5083
- return this.$objectsSync({
5093
+ return this.#objectsSync({
5084
5094
  $filter: PropertyGroup.$filter,
5085
5095
  $fromRdfResource: PropertyGroup.$fromRdfResource,
5086
5096
  $fromRdfTypes: [PropertyGroup.$fromRdfType],
@@ -5111,7 +5121,7 @@ export class $RdfjsDatasetObjectSet {
5111
5121
  return this.propertyShapesSync(query);
5112
5122
  }
5113
5123
  propertyShapesSync(query) {
5114
- return this.$objectsSync({
5124
+ return this.#objectsSync({
5115
5125
  $filter: PropertyShape.$filter,
5116
5126
  $fromRdfResource: PropertyShape.$fromRdfResource,
5117
5127
  $fromRdfTypes: [PropertyShape.$fromRdfType],
@@ -5142,7 +5152,7 @@ export class $RdfjsDatasetObjectSet {
5142
5152
  return this.shapesSync(query);
5143
5153
  }
5144
5154
  shapesSync(query) {
5145
- return this.$objectUnionsSync([
5155
+ return this.#objectUnionsSync([
5146
5156
  {
5147
5157
  $filter: Shape.$filter,
5148
5158
  $fromRdfResource: NodeShape.$fromRdfResource,
@@ -5155,32 +5165,32 @@ export class $RdfjsDatasetObjectSet {
5155
5165
  },
5156
5166
  ], query);
5157
5167
  }
5158
- async object(identifier, options) {
5159
- return this.objectSync(identifier, options);
5168
+ async $object(identifier, options) {
5169
+ return this.$objectSync(identifier, options);
5160
5170
  }
5161
- objectSync(identifier, options) {
5162
- return this.objectsSync({
5171
+ $objectSync(identifier, options) {
5172
+ return this.$objectsSync({
5163
5173
  identifiers: [identifier],
5164
5174
  preferredLanguages: options?.preferredLanguages,
5165
5175
  }).map((objects) => objects[0]);
5166
5176
  }
5167
- async objectCount(query) {
5168
- return this.objectCountSync(query);
5177
+ async $objectCount(query) {
5178
+ return this.$objectCountSync(query);
5169
5179
  }
5170
- objectCountSync(query) {
5171
- return this.objectsSync(query).map((objects) => objects.length);
5180
+ $objectCountSync(query) {
5181
+ return this.$objectsSync(query).map((objects) => objects.length);
5172
5182
  }
5173
- async objectIdentifiers(query) {
5174
- return this.objectIdentifiersSync(query);
5183
+ async $objectIdentifiers(query) {
5184
+ return this.$objectIdentifiersSync(query);
5175
5185
  }
5176
- objectIdentifiersSync(query) {
5177
- return this.objectsSync(query).map((objects) => objects.map((object) => object.$identifier()));
5186
+ $objectIdentifiersSync(query) {
5187
+ return this.$objectsSync(query).map((objects) => objects.map((object) => object.$identifier()));
5178
5188
  }
5179
- async objects(query) {
5180
- return this.objectsSync(query);
5189
+ async $objects(query) {
5190
+ return this.$objectsSync(query);
5181
5191
  }
5182
- objectsSync(query) {
5183
- return this.$objectUnionsSync([
5192
+ $objectsSync(query) {
5193
+ return this.#objectUnionsSync([
5184
5194
  {
5185
5195
  $filter: $Object.$filter,
5186
5196
  $fromRdfResource: NodeShape.$fromRdfResource,
@@ -5203,7 +5213,7 @@ export class $RdfjsDatasetObjectSet {
5203
5213
  },
5204
5214
  ], query);
5205
5215
  }
5206
- $objectsSync(namedObjectType, query) {
5216
+ #objectsSync(namedObjectType, query) {
5207
5217
  const graph = query?.graph ?? this.$graph;
5208
5218
  const limit = query?.limit ?? Number.MAX_SAFE_INTEGER;
5209
5219
  if (limit <= 0) {
@@ -5296,7 +5306,7 @@ export class $RdfjsDatasetObjectSet {
5296
5306
  }
5297
5307
  return Right(objects);
5298
5308
  }
5299
- $objectUnionsSync(namedObjectTypes, query) {
5309
+ #objectUnionsSync(namedObjectTypes, query) {
5300
5310
  const graph = query?.graph ?? this.$graph;
5301
5311
  const limit = query?.limit ?? Number.MAX_SAFE_INTEGER;
5302
5312
  if (limit <= 0) {
package/package.json CHANGED
@@ -44,5 +44,5 @@
44
44
  },
45
45
  "type": "module",
46
46
  "types": "./dist/index.d.ts",
47
- "version": "4.0.26"
47
+ "version": "4.0.27"
48
48
  }