@shaclmate/compiler 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.
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.js +3 -7
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstObjectType.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstObjectType.js +6 -0
- package/dist/input/generated.d.ts +76 -90
- package/dist/input/generated.js +134 -124
- package/package.json +2 -2
|
@@ -11,13 +11,13 @@ import { transformShapeToAstType } from "./transformShapeToAstType.js";
|
|
|
11
11
|
export function transformShapeToAstCompoundType(shape, shapeStack) {
|
|
12
12
|
shapeStack.push(shape);
|
|
13
13
|
try {
|
|
14
|
-
return Eithers.
|
|
14
|
+
return Eithers.chain3(Either.sequence(shape.and
|
|
15
15
|
.orDefault([])
|
|
16
|
-
.map((shapeIdentifier) => this.shapesGraph.shape(shapeIdentifier))),
|
|
16
|
+
.map((shapeIdentifier) => this.shapesGraph.shape(shapeIdentifier))), shape.$type === "NodeShape"
|
|
17
17
|
? nodeShapeTsFeatures.call(this, shape)
|
|
18
18
|
: Either.of(new Set()), Either.sequence(shape.xone
|
|
19
19
|
.orDefault([])
|
|
20
|
-
.map((shapeIdentifier) => this.shapesGraph.shape(shapeIdentifier)))).chain(([andConstraintShapes,
|
|
20
|
+
.map((shapeIdentifier) => this.shapesGraph.shape(shapeIdentifier)))).chain(([andConstraintShapes, tsFeatures, xoneConstraintShapes]) => {
|
|
21
21
|
let compoundTypeKind;
|
|
22
22
|
// Distinguish constraints that take arbitrary shapes from those that only take node shapes
|
|
23
23
|
// With the latter we'll do special transformations.
|
|
@@ -26,10 +26,6 @@ export function transformShapeToAstCompoundType(shape, shapeStack) {
|
|
|
26
26
|
memberShapes = andConstraintShapes;
|
|
27
27
|
compoundTypeKind = "IntersectionType";
|
|
28
28
|
}
|
|
29
|
-
else if (nodeConstraintShapes.length > 0) {
|
|
30
|
-
memberShapes = nodeConstraintShapes;
|
|
31
|
-
compoundTypeKind = "IntersectionType";
|
|
32
|
-
}
|
|
33
29
|
else if (xoneConstraintShapes.length > 0) {
|
|
34
30
|
memberShapes = xoneConstraintShapes;
|
|
35
31
|
compoundTypeKind = "UnionType";
|
|
@@ -3,5 +3,5 @@ import * as ast from "../ast/index.js";
|
|
|
3
3
|
import type * as input from "../input/index.js";
|
|
4
4
|
import type { ShapesGraphToAstTransformer } from "../ShapesGraphToAstTransformer.js";
|
|
5
5
|
import { ShapeStack } from "./ShapeStack.js";
|
|
6
|
-
export declare function transformShapeToAstObjectType(this: ShapesGraphToAstTransformer, shape: input.Shape, shapeStack: ShapeStack): Either<Error, Maybe<ast.
|
|
6
|
+
export declare function transformShapeToAstObjectType(this: ShapesGraphToAstTransformer, shape: input.Shape, shapeStack: ShapeStack): Either<Error, Maybe<ast.Type>>;
|
|
7
7
|
//# sourceMappingURL=transformShapeToAstObjectType.d.ts.map
|
|
@@ -43,6 +43,12 @@ function isObjectTypePropertyRequired(property) {
|
|
|
43
43
|
export function transformShapeToAstObjectType(shape, shapeStack) {
|
|
44
44
|
shapeStack.push(shape);
|
|
45
45
|
try {
|
|
46
|
+
if (shape.node.isJust()) {
|
|
47
|
+
return this.shapesGraph
|
|
48
|
+
.nodeShape(shape.node.unsafeCoerce())
|
|
49
|
+
.chain((nodeShape) => transformShapeToAstType.call(this, nodeShape, shapeStack))
|
|
50
|
+
.map(Maybe.of);
|
|
51
|
+
}
|
|
46
52
|
if (shape.$type !== "NodeShape") {
|
|
47
53
|
return Either.of(Maybe.empty());
|
|
48
54
|
}
|
|
@@ -155,8 +155,8 @@ export interface PropertyShape {
|
|
|
155
155
|
readonly minLength: Maybe<number>;
|
|
156
156
|
readonly mutable: Maybe<boolean>;
|
|
157
157
|
readonly name: Maybe<string>;
|
|
158
|
+
readonly node: Maybe<BlankNode | NamedNode>;
|
|
158
159
|
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">>;
|
|
159
|
-
readonly nodes: readonly (BlankNode | NamedNode)[];
|
|
160
160
|
readonly not: readonly (BlankNode | NamedNode)[];
|
|
161
161
|
readonly or: Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
162
162
|
readonly order: Maybe<number>;
|
|
@@ -195,8 +195,8 @@ export declare namespace PropertyShape {
|
|
|
195
195
|
readonly minLength?: Maybe<number> | number;
|
|
196
196
|
readonly mutable?: Maybe<boolean> | boolean;
|
|
197
197
|
readonly name?: Maybe<string> | string;
|
|
198
|
+
readonly node?: Maybe<BlankNode | NamedNode> | (BlankNode | NamedNode) | string;
|
|
198
199
|
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";
|
|
199
|
-
readonly nodes?: readonly (BlankNode | NamedNode)[] | readonly string[];
|
|
200
200
|
readonly not?: readonly (BlankNode | NamedNode)[] | readonly string[];
|
|
201
201
|
readonly or?: Maybe<readonly (BlankNode | NamedNode)[]> | readonly (BlankNode | NamedNode)[] | readonly string[];
|
|
202
202
|
readonly order?: Maybe<number> | number;
|
|
@@ -240,8 +240,8 @@ export declare namespace PropertyShape {
|
|
|
240
240
|
readonly minLength?: $MaybeFilter<$NumericFilter<number>>;
|
|
241
241
|
readonly mutable?: $MaybeFilter<$BooleanFilter>;
|
|
242
242
|
readonly name?: $MaybeFilter<$StringFilter>;
|
|
243
|
+
readonly node?: $MaybeFilter<$IdentifierFilter>;
|
|
243
244
|
readonly nodeKind?: $MaybeFilter<$IriFilter>;
|
|
244
|
-
readonly nodes?: $CollectionFilter<$IdentifierFilter>;
|
|
245
245
|
readonly not?: $CollectionFilter<$IdentifierFilter>;
|
|
246
246
|
readonly or?: $MaybeFilter<$CollectionFilter<$IdentifierFilter>>;
|
|
247
247
|
readonly order?: $MaybeFilter<$NumericFilter<number>>;
|
|
@@ -284,8 +284,8 @@ export declare namespace PropertyShape {
|
|
|
284
284
|
minLength: Maybe<number>;
|
|
285
285
|
mutable: Maybe<boolean>;
|
|
286
286
|
name: Maybe<string>;
|
|
287
|
+
node: Maybe<BlankNode | NamedNode>;
|
|
287
288
|
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">>;
|
|
288
|
-
nodes: readonly (BlankNode | NamedNode)[];
|
|
289
289
|
not: readonly (BlankNode | NamedNode)[];
|
|
290
290
|
or: Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
291
291
|
order: Maybe<number>;
|
|
@@ -571,26 +571,26 @@ export declare namespace PropertyShape {
|
|
|
571
571
|
};
|
|
572
572
|
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#name">;
|
|
573
573
|
};
|
|
574
|
-
readonly
|
|
574
|
+
readonly node: {
|
|
575
575
|
readonly kind: "Shacl";
|
|
576
576
|
readonly type: () => {
|
|
577
577
|
kind: "Maybe";
|
|
578
578
|
item: () => {
|
|
579
|
-
kind: "
|
|
580
|
-
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">)[];
|
|
579
|
+
kind: "Identifier";
|
|
581
580
|
};
|
|
582
581
|
};
|
|
583
|
-
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#
|
|
582
|
+
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
|
|
584
583
|
};
|
|
585
|
-
readonly
|
|
584
|
+
readonly nodeKind: {
|
|
586
585
|
readonly kind: "Shacl";
|
|
587
586
|
readonly type: () => {
|
|
588
|
-
kind: "
|
|
587
|
+
kind: "Maybe";
|
|
589
588
|
item: () => {
|
|
590
|
-
kind: "
|
|
589
|
+
kind: "Iri";
|
|
590
|
+
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">)[];
|
|
591
591
|
};
|
|
592
592
|
};
|
|
593
|
-
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#
|
|
593
|
+
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
|
|
594
594
|
};
|
|
595
595
|
readonly not: {
|
|
596
596
|
readonly kind: "Shacl";
|
|
@@ -912,8 +912,8 @@ export interface NodeShape {
|
|
|
912
912
|
readonly minInclusive: Maybe<Literal>;
|
|
913
913
|
readonly minLength: Maybe<number>;
|
|
914
914
|
readonly mutable: Maybe<boolean>;
|
|
915
|
+
readonly node: Maybe<BlankNode | NamedNode>;
|
|
915
916
|
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">>;
|
|
916
|
-
readonly nodes: readonly (BlankNode | NamedNode)[];
|
|
917
917
|
readonly not: readonly (BlankNode | NamedNode)[];
|
|
918
918
|
readonly or: Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
919
919
|
readonly patterns: readonly string[];
|
|
@@ -956,8 +956,8 @@ export declare namespace NodeShape {
|
|
|
956
956
|
readonly minInclusive?: Maybe<Literal> | bigint | boolean | Date | number | string | Literal;
|
|
957
957
|
readonly minLength?: Maybe<number> | number;
|
|
958
958
|
readonly mutable?: Maybe<boolean> | boolean;
|
|
959
|
+
readonly node?: Maybe<BlankNode | NamedNode> | (BlankNode | NamedNode) | string;
|
|
959
960
|
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";
|
|
960
|
-
readonly nodes?: readonly (BlankNode | NamedNode)[] | readonly string[];
|
|
961
961
|
readonly not?: readonly (BlankNode | NamedNode)[] | readonly string[];
|
|
962
962
|
readonly or?: Maybe<readonly (BlankNode | NamedNode)[]> | readonly (BlankNode | NamedNode)[] | readonly string[];
|
|
963
963
|
readonly patterns?: readonly string[];
|
|
@@ -1005,8 +1005,8 @@ export declare namespace NodeShape {
|
|
|
1005
1005
|
readonly minInclusive?: $MaybeFilter<$LiteralFilter>;
|
|
1006
1006
|
readonly minLength?: $MaybeFilter<$NumericFilter<number>>;
|
|
1007
1007
|
readonly mutable?: $MaybeFilter<$BooleanFilter>;
|
|
1008
|
+
readonly node?: $MaybeFilter<$IdentifierFilter>;
|
|
1008
1009
|
readonly nodeKind?: $MaybeFilter<$IriFilter>;
|
|
1009
|
-
readonly nodes?: $CollectionFilter<$IdentifierFilter>;
|
|
1010
1010
|
readonly not?: $CollectionFilter<$IdentifierFilter>;
|
|
1011
1011
|
readonly or?: $MaybeFilter<$CollectionFilter<$IdentifierFilter>>;
|
|
1012
1012
|
readonly patterns?: $CollectionFilter<$StringFilter>;
|
|
@@ -1053,8 +1053,8 @@ export declare namespace NodeShape {
|
|
|
1053
1053
|
minInclusive: Maybe<Literal>;
|
|
1054
1054
|
minLength: Maybe<number>;
|
|
1055
1055
|
mutable: Maybe<boolean>;
|
|
1056
|
+
node: Maybe<BlankNode | NamedNode>;
|
|
1056
1057
|
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">>;
|
|
1057
|
-
nodes: readonly (BlankNode | NamedNode)[];
|
|
1058
1058
|
not: readonly (BlankNode | NamedNode)[];
|
|
1059
1059
|
or: Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
1060
1060
|
patterns: readonly string[];
|
|
@@ -1346,26 +1346,26 @@ export declare namespace NodeShape {
|
|
|
1346
1346
|
};
|
|
1347
1347
|
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://purl.org/shaclmate/ontology#mutable">;
|
|
1348
1348
|
};
|
|
1349
|
-
readonly
|
|
1349
|
+
readonly node: {
|
|
1350
1350
|
readonly kind: "Shacl";
|
|
1351
1351
|
readonly type: () => {
|
|
1352
1352
|
kind: "Maybe";
|
|
1353
1353
|
item: () => {
|
|
1354
|
-
kind: "
|
|
1355
|
-
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">)[];
|
|
1354
|
+
kind: "Identifier";
|
|
1356
1355
|
};
|
|
1357
1356
|
};
|
|
1358
|
-
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#
|
|
1357
|
+
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
|
|
1359
1358
|
};
|
|
1360
|
-
readonly
|
|
1359
|
+
readonly nodeKind: {
|
|
1361
1360
|
readonly kind: "Shacl";
|
|
1362
1361
|
readonly type: () => {
|
|
1363
|
-
kind: "
|
|
1362
|
+
kind: "Maybe";
|
|
1364
1363
|
item: () => {
|
|
1365
|
-
kind: "
|
|
1364
|
+
kind: "Iri";
|
|
1365
|
+
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">)[];
|
|
1366
1366
|
};
|
|
1367
1367
|
};
|
|
1368
|
-
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#
|
|
1368
|
+
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
|
|
1369
1369
|
};
|
|
1370
1370
|
readonly not: {
|
|
1371
1371
|
readonly kind: "Shacl";
|
|
@@ -1811,26 +1811,26 @@ export declare namespace Shape {
|
|
|
1811
1811
|
};
|
|
1812
1812
|
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://purl.org/shaclmate/ontology#mutable">;
|
|
1813
1813
|
};
|
|
1814
|
-
readonly
|
|
1814
|
+
readonly node: {
|
|
1815
1815
|
readonly kind: "Shacl";
|
|
1816
1816
|
readonly type: () => {
|
|
1817
1817
|
kind: "Maybe";
|
|
1818
1818
|
item: () => {
|
|
1819
|
-
kind: "
|
|
1820
|
-
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">)[];
|
|
1819
|
+
kind: "Identifier";
|
|
1821
1820
|
};
|
|
1822
1821
|
};
|
|
1823
|
-
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#
|
|
1822
|
+
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
|
|
1824
1823
|
};
|
|
1825
|
-
readonly
|
|
1824
|
+
readonly nodeKind: {
|
|
1826
1825
|
readonly kind: "Shacl";
|
|
1827
1826
|
readonly type: () => {
|
|
1828
|
-
kind: "
|
|
1827
|
+
kind: "Maybe";
|
|
1829
1828
|
item: () => {
|
|
1830
|
-
kind: "
|
|
1829
|
+
kind: "Iri";
|
|
1830
|
+
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">)[];
|
|
1831
1831
|
};
|
|
1832
1832
|
};
|
|
1833
|
-
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#
|
|
1833
|
+
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
|
|
1834
1834
|
};
|
|
1835
1835
|
readonly not: {
|
|
1836
1836
|
readonly kind: "Shacl";
|
|
@@ -2250,26 +2250,26 @@ export declare namespace Shape {
|
|
|
2250
2250
|
};
|
|
2251
2251
|
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#name">;
|
|
2252
2252
|
};
|
|
2253
|
-
readonly
|
|
2253
|
+
readonly node: {
|
|
2254
2254
|
readonly kind: "Shacl";
|
|
2255
2255
|
readonly type: () => {
|
|
2256
2256
|
kind: "Maybe";
|
|
2257
2257
|
item: () => {
|
|
2258
|
-
kind: "
|
|
2259
|
-
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">)[];
|
|
2258
|
+
kind: "Identifier";
|
|
2260
2259
|
};
|
|
2261
2260
|
};
|
|
2262
|
-
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#
|
|
2261
|
+
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
|
|
2263
2262
|
};
|
|
2264
|
-
readonly
|
|
2263
|
+
readonly nodeKind: {
|
|
2265
2264
|
readonly kind: "Shacl";
|
|
2266
2265
|
readonly type: () => {
|
|
2267
|
-
kind: "
|
|
2266
|
+
kind: "Maybe";
|
|
2268
2267
|
item: () => {
|
|
2269
|
-
kind: "
|
|
2268
|
+
kind: "Iri";
|
|
2269
|
+
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">)[];
|
|
2270
2270
|
};
|
|
2271
2271
|
};
|
|
2272
|
-
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#
|
|
2272
|
+
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
|
|
2273
2273
|
};
|
|
2274
2274
|
readonly not: {
|
|
2275
2275
|
readonly kind: "Shacl";
|
|
@@ -2576,26 +2576,26 @@ export declare namespace Shape {
|
|
|
2576
2576
|
};
|
|
2577
2577
|
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://purl.org/shaclmate/ontology#mutable">;
|
|
2578
2578
|
};
|
|
2579
|
-
readonly
|
|
2579
|
+
readonly node: {
|
|
2580
2580
|
readonly kind: "Shacl";
|
|
2581
2581
|
readonly type: () => {
|
|
2582
2582
|
kind: "Maybe";
|
|
2583
2583
|
item: () => {
|
|
2584
|
-
kind: "
|
|
2585
|
-
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">)[];
|
|
2584
|
+
kind: "Identifier";
|
|
2586
2585
|
};
|
|
2587
2586
|
};
|
|
2588
|
-
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#
|
|
2587
|
+
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
|
|
2589
2588
|
};
|
|
2590
|
-
readonly
|
|
2589
|
+
readonly nodeKind: {
|
|
2591
2590
|
readonly kind: "Shacl";
|
|
2592
2591
|
readonly type: () => {
|
|
2593
|
-
kind: "
|
|
2592
|
+
kind: "Maybe";
|
|
2594
2593
|
item: () => {
|
|
2595
|
-
kind: "
|
|
2594
|
+
kind: "Iri";
|
|
2595
|
+
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">)[];
|
|
2596
2596
|
};
|
|
2597
2597
|
};
|
|
2598
|
-
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#
|
|
2598
|
+
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
|
|
2599
2599
|
};
|
|
2600
2600
|
readonly not: {
|
|
2601
2601
|
readonly kind: "Shacl";
|
|
@@ -2967,26 +2967,26 @@ export declare namespace $Object {
|
|
|
2967
2967
|
};
|
|
2968
2968
|
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://purl.org/shaclmate/ontology#mutable">;
|
|
2969
2969
|
};
|
|
2970
|
-
readonly
|
|
2970
|
+
readonly node: {
|
|
2971
2971
|
readonly kind: "Shacl";
|
|
2972
2972
|
readonly type: () => {
|
|
2973
2973
|
kind: "Maybe";
|
|
2974
2974
|
item: () => {
|
|
2975
|
-
kind: "
|
|
2976
|
-
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">)[];
|
|
2975
|
+
kind: "Identifier";
|
|
2977
2976
|
};
|
|
2978
2977
|
};
|
|
2979
|
-
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#
|
|
2978
|
+
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
|
|
2980
2979
|
};
|
|
2981
|
-
readonly
|
|
2980
|
+
readonly nodeKind: {
|
|
2982
2981
|
readonly kind: "Shacl";
|
|
2983
2982
|
readonly type: () => {
|
|
2984
|
-
kind: "
|
|
2983
|
+
kind: "Maybe";
|
|
2985
2984
|
item: () => {
|
|
2986
|
-
kind: "
|
|
2985
|
+
kind: "Iri";
|
|
2986
|
+
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">)[];
|
|
2987
2987
|
};
|
|
2988
2988
|
};
|
|
2989
|
-
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#
|
|
2989
|
+
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
|
|
2990
2990
|
};
|
|
2991
2991
|
readonly not: {
|
|
2992
2992
|
readonly kind: "Shacl";
|
|
@@ -3518,26 +3518,26 @@ export declare namespace $Object {
|
|
|
3518
3518
|
};
|
|
3519
3519
|
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#name">;
|
|
3520
3520
|
};
|
|
3521
|
-
readonly
|
|
3521
|
+
readonly node: {
|
|
3522
3522
|
readonly kind: "Shacl";
|
|
3523
3523
|
readonly type: () => {
|
|
3524
3524
|
kind: "Maybe";
|
|
3525
3525
|
item: () => {
|
|
3526
|
-
kind: "
|
|
3527
|
-
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">)[];
|
|
3526
|
+
kind: "Identifier";
|
|
3528
3527
|
};
|
|
3529
3528
|
};
|
|
3530
|
-
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#
|
|
3529
|
+
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#node">;
|
|
3531
3530
|
};
|
|
3532
|
-
readonly
|
|
3531
|
+
readonly nodeKind: {
|
|
3533
3532
|
readonly kind: "Shacl";
|
|
3534
3533
|
readonly type: () => {
|
|
3535
|
-
kind: "
|
|
3534
|
+
kind: "Maybe";
|
|
3536
3535
|
item: () => {
|
|
3537
|
-
kind: "
|
|
3536
|
+
kind: "Iri";
|
|
3537
|
+
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">)[];
|
|
3538
3538
|
};
|
|
3539
3539
|
};
|
|
3540
|
-
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#
|
|
3540
|
+
readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#nodeKind">;
|
|
3541
3541
|
};
|
|
3542
3542
|
readonly not: {
|
|
3543
3543
|
readonly kind: "Shacl";
|
|
@@ -3698,12 +3698,12 @@ export interface $ObjectSet {
|
|
|
3698
3698
|
shapeCount(query?: Pick<$ObjectSet.Query<Shape.$Filter, Shape.$Identifier>, "filter">): Promise<Either<Error, number>>;
|
|
3699
3699
|
shapeIdentifiers(query?: $ObjectSet.Query<Shape.$Filter, Shape.$Identifier>): Promise<Either<Error, readonly Shape.$Identifier[]>>;
|
|
3700
3700
|
shapes(query?: $ObjectSet.Query<Shape.$Filter, Shape.$Identifier>): Promise<Either<Error, readonly Shape[]>>;
|
|
3701
|
-
object(identifier: $Object.$Identifier, options?: {
|
|
3701
|
+
$object(identifier: $Object.$Identifier, options?: {
|
|
3702
3702
|
preferredLanguages?: readonly string[];
|
|
3703
3703
|
}): Promise<Either<Error, $Object>>;
|
|
3704
|
-
objectCount(query?: Pick<$ObjectSet.Query<$Object.$Filter, $Object.$Identifier>, "filter">): Promise<Either<Error, number>>;
|
|
3705
|
-
objectIdentifiers(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object.$Identifier[]>>;
|
|
3706
|
-
objects(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object[]>>;
|
|
3704
|
+
$objectCount(query?: Pick<$ObjectSet.Query<$Object.$Filter, $Object.$Identifier>, "filter">): Promise<Either<Error, number>>;
|
|
3705
|
+
$objectIdentifiers(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object.$Identifier[]>>;
|
|
3706
|
+
$objects(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object[]>>;
|
|
3707
3707
|
}
|
|
3708
3708
|
export declare namespace $ObjectSet {
|
|
3709
3709
|
interface Query<ObjectFilterT, ObjectIdentifierT extends BlankNode | NamedNode> {
|
|
@@ -3783,32 +3783,18 @@ export declare class $RdfjsDatasetObjectSet implements $ObjectSet {
|
|
|
3783
3783
|
shapeIdentifiersSync(query?: $ObjectSet.Query<Shape.$Filter, Shape.$Identifier>): Either<Error, readonly Shape.$Identifier[]>;
|
|
3784
3784
|
shapes(query?: $ObjectSet.Query<Shape.$Filter, Shape.$Identifier>): Promise<Either<Error, readonly Shape[]>>;
|
|
3785
3785
|
shapesSync(query?: $ObjectSet.Query<Shape.$Filter, Shape.$Identifier>): Either<Error, readonly Shape[]>;
|
|
3786
|
-
object(identifier: $Object.$Identifier, options?: {
|
|
3786
|
+
$object(identifier: $Object.$Identifier, options?: {
|
|
3787
3787
|
preferredLanguages?: readonly string[];
|
|
3788
3788
|
}): Promise<Either<Error, $Object>>;
|
|
3789
|
-
objectSync(identifier: $Object.$Identifier, options?: {
|
|
3789
|
+
$objectSync(identifier: $Object.$Identifier, options?: {
|
|
3790
3790
|
preferredLanguages?: readonly string[];
|
|
3791
3791
|
}): Either<Error, $Object>;
|
|
3792
|
-
objectCount(query?: Pick<$ObjectSet.Query<$Object.$Filter, $Object.$Identifier>, "filter">): Promise<Either<Error, number>>;
|
|
3793
|
-
objectCountSync(query?: Pick<$ObjectSet.Query<$Object.$Filter, $Object.$Identifier>, "filter">): Either<Error, number>;
|
|
3794
|
-
objectIdentifiers(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object.$Identifier[]>>;
|
|
3795
|
-
objectIdentifiersSync(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Either<Error, readonly $Object.$Identifier[]>;
|
|
3796
|
-
objects(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object[]>>;
|
|
3797
|
-
objectsSync(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Either<Error, readonly $Object[]>;
|
|
3798
|
-
protected $objectsSync<ObjectT extends {
|
|
3799
|
-
readonly $identifier: () => ObjectIdentifierT;
|
|
3800
|
-
}, ObjectFilterT, ObjectIdentifierT extends BlankNode | NamedNode>(namedObjectType: {
|
|
3801
|
-
$filter: (filter: ObjectFilterT, value: ObjectT) => boolean;
|
|
3802
|
-
$fromRdfResource: $FromRdfResourceFunction<ObjectT>;
|
|
3803
|
-
$fromRdfTypes: readonly NamedNode[];
|
|
3804
|
-
}, query?: $ObjectSet.Query<ObjectFilterT, ObjectIdentifierT>): Either<Error, readonly ObjectT[]>;
|
|
3805
|
-
protected $objectUnionsSync<ObjectT extends {
|
|
3806
|
-
readonly $identifier: () => ObjectIdentifierT;
|
|
3807
|
-
}, ObjectFilterT, ObjectIdentifierT extends BlankNode | NamedNode>(namedObjectTypes: readonly {
|
|
3808
|
-
$filter: (filter: ObjectFilterT, value: ObjectT) => boolean;
|
|
3809
|
-
$fromRdfResource: $FromRdfResourceFunction<ObjectT>;
|
|
3810
|
-
$fromRdfTypes: readonly NamedNode[];
|
|
3811
|
-
}[], query?: $ObjectSet.Query<ObjectFilterT, ObjectIdentifierT>): Either<Error, readonly ObjectT[]>;
|
|
3792
|
+
$objectCount(query?: Pick<$ObjectSet.Query<$Object.$Filter, $Object.$Identifier>, "filter">): Promise<Either<Error, number>>;
|
|
3793
|
+
$objectCountSync(query?: Pick<$ObjectSet.Query<$Object.$Filter, $Object.$Identifier>, "filter">): Either<Error, number>;
|
|
3794
|
+
$objectIdentifiers(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object.$Identifier[]>>;
|
|
3795
|
+
$objectIdentifiersSync(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Either<Error, readonly $Object.$Identifier[]>;
|
|
3796
|
+
$objects(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Promise<Either<Error, readonly $Object[]>>;
|
|
3797
|
+
$objectsSync(query?: $ObjectSet.Query<$Object.$Filter, $Object.$Identifier>): Either<Error, readonly $Object[]>;
|
|
3812
3798
|
}
|
|
3813
3799
|
export {};
|
|
3814
3800
|
//# sourceMappingURL=generated.d.ts.map
|
package/dist/input/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
|
}
|
|
@@ -715,6 +715,22 @@ export var PropertyShape;
|
|
|
715
715
|
else {
|
|
716
716
|
name = parameters.name;
|
|
717
717
|
}
|
|
718
|
+
let node;
|
|
719
|
+
if (Maybe.isMaybe(parameters.node)) {
|
|
720
|
+
node = parameters.node;
|
|
721
|
+
}
|
|
722
|
+
else if (typeof parameters.node === "object") {
|
|
723
|
+
node = Maybe.of(parameters.node);
|
|
724
|
+
}
|
|
725
|
+
else if (typeof parameters.node === "string") {
|
|
726
|
+
node = Maybe.of(dataFactory.namedNode(parameters.node));
|
|
727
|
+
}
|
|
728
|
+
else if (parameters.node === undefined) {
|
|
729
|
+
node = Maybe.empty();
|
|
730
|
+
}
|
|
731
|
+
else {
|
|
732
|
+
node = parameters.node;
|
|
733
|
+
}
|
|
718
734
|
let nodeKind;
|
|
719
735
|
if (Maybe.isMaybe(parameters.nodeKind)) {
|
|
720
736
|
nodeKind = parameters.nodeKind;
|
|
@@ -731,19 +747,6 @@ export var PropertyShape;
|
|
|
731
747
|
else {
|
|
732
748
|
nodeKind = parameters.nodeKind;
|
|
733
749
|
}
|
|
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
750
|
let not;
|
|
748
751
|
if (parameters.not === undefined) {
|
|
749
752
|
not = [];
|
|
@@ -883,8 +886,8 @@ export var PropertyShape;
|
|
|
883
886
|
minLength,
|
|
884
887
|
mutable,
|
|
885
888
|
name,
|
|
889
|
+
node,
|
|
886
890
|
nodeKind,
|
|
887
|
-
nodes,
|
|
888
891
|
not,
|
|
889
892
|
or,
|
|
890
893
|
order,
|
|
@@ -1007,12 +1010,12 @@ export var PropertyShape;
|
|
|
1007
1010
|
!$filterMaybe($filterString)(filter.name, value.name)) {
|
|
1008
1011
|
return false;
|
|
1009
1012
|
}
|
|
1010
|
-
if (filter.
|
|
1011
|
-
!$filterMaybe($
|
|
1013
|
+
if (filter.node !== undefined &&
|
|
1014
|
+
!$filterMaybe($filterIdentifier)(filter.node, value.node)) {
|
|
1012
1015
|
return false;
|
|
1013
1016
|
}
|
|
1014
|
-
if (filter.
|
|
1015
|
-
!$
|
|
1017
|
+
if (filter.nodeKind !== undefined &&
|
|
1018
|
+
!$filterMaybe($filterIri)(filter.nodeKind, value.nodeKind)) {
|
|
1016
1019
|
return false;
|
|
1017
1020
|
}
|
|
1018
1021
|
if (filter.not !== undefined &&
|
|
@@ -1577,6 +1580,26 @@ export var PropertyShape;
|
|
|
1577
1580
|
value: Maybe.empty(),
|
|
1578
1581
|
})),
|
|
1579
1582
|
}).chain((name) => $shaclPropertyFromRdf({
|
|
1583
|
+
graph: _$options.graph,
|
|
1584
|
+
resource: $resource,
|
|
1585
|
+
propertySchema: PropertyShape.$schema
|
|
1586
|
+
.properties
|
|
1587
|
+
.node,
|
|
1588
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
1589
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
1590
|
+
.map((values) => values.length >
|
|
1591
|
+
0
|
|
1592
|
+
? values.map((value) => Maybe.of(value))
|
|
1593
|
+
: Resource.Values.fromValue({
|
|
1594
|
+
focusResource: $resource,
|
|
1595
|
+
propertyPath: PropertyShape
|
|
1596
|
+
.$schema
|
|
1597
|
+
.properties
|
|
1598
|
+
.node
|
|
1599
|
+
.path,
|
|
1600
|
+
value: Maybe.empty(),
|
|
1601
|
+
})),
|
|
1602
|
+
}).chain((node) => $shaclPropertyFromRdf({
|
|
1580
1603
|
graph: _$options.graph,
|
|
1581
1604
|
resource: $resource,
|
|
1582
1605
|
propertySchema: PropertyShape.$schema
|
|
@@ -1604,24 +1627,6 @@ export var PropertyShape;
|
|
|
1604
1627
|
value: Maybe.empty(),
|
|
1605
1628
|
})),
|
|
1606
1629
|
}).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
1630
|
graph: _$options.graph,
|
|
1626
1631
|
resource: $resource,
|
|
1627
1632
|
propertySchema: PropertyShape.$schema
|
|
@@ -1850,8 +1855,8 @@ export var PropertyShape;
|
|
|
1850
1855
|
minLength,
|
|
1851
1856
|
mutable,
|
|
1852
1857
|
name,
|
|
1858
|
+
node,
|
|
1853
1859
|
nodeKind,
|
|
1854
|
-
nodes,
|
|
1855
1860
|
not,
|
|
1856
1861
|
or,
|
|
1857
1862
|
order,
|
|
@@ -2086,6 +2091,14 @@ export var PropertyShape;
|
|
|
2086
2091
|
}),
|
|
2087
2092
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#name"),
|
|
2088
2093
|
},
|
|
2094
|
+
node: {
|
|
2095
|
+
kind: "Shacl",
|
|
2096
|
+
type: () => ({
|
|
2097
|
+
kind: "Maybe",
|
|
2098
|
+
item: () => ({ kind: "Identifier" }),
|
|
2099
|
+
}),
|
|
2100
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
|
|
2101
|
+
},
|
|
2089
2102
|
nodeKind: {
|
|
2090
2103
|
kind: "Shacl",
|
|
2091
2104
|
type: () => ({
|
|
@@ -2104,14 +2117,6 @@ export var PropertyShape;
|
|
|
2104
2117
|
}),
|
|
2105
2118
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"),
|
|
2106
2119
|
},
|
|
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
2120
|
not: {
|
|
2116
2121
|
kind: "Shacl",
|
|
2117
2122
|
type: () => ({
|
|
@@ -2323,8 +2328,8 @@ export var PropertyShape;
|
|
|
2323
2328
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#name"), _propertyShape.name
|
|
2324
2329
|
.toList()
|
|
2325
2330
|
.flatMap((value) => [$literalFactory.string(value)]), options?.graph);
|
|
2331
|
+
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), _propertyShape.node.toList(), options?.graph);
|
|
2326
2332
|
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
2333
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#not"), _propertyShape.not.flatMap((item) => [item]), options?.graph);
|
|
2329
2334
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#or"), _propertyShape.or.toList().flatMap((value) => [
|
|
2330
2335
|
value.length > 0
|
|
@@ -3468,6 +3473,22 @@ export var NodeShape;
|
|
|
3468
3473
|
else {
|
|
3469
3474
|
mutable = parameters?.mutable;
|
|
3470
3475
|
}
|
|
3476
|
+
let node;
|
|
3477
|
+
if (Maybe.isMaybe(parameters?.node)) {
|
|
3478
|
+
node = parameters?.node;
|
|
3479
|
+
}
|
|
3480
|
+
else if (typeof parameters?.node === "object") {
|
|
3481
|
+
node = Maybe.of(parameters?.node);
|
|
3482
|
+
}
|
|
3483
|
+
else if (typeof parameters?.node === "string") {
|
|
3484
|
+
node = Maybe.of(dataFactory.namedNode(parameters?.node));
|
|
3485
|
+
}
|
|
3486
|
+
else if (parameters?.node === undefined) {
|
|
3487
|
+
node = Maybe.empty();
|
|
3488
|
+
}
|
|
3489
|
+
else {
|
|
3490
|
+
node = parameters?.node;
|
|
3491
|
+
}
|
|
3471
3492
|
let nodeKind;
|
|
3472
3493
|
if (Maybe.isMaybe(parameters?.nodeKind)) {
|
|
3473
3494
|
nodeKind = parameters?.nodeKind;
|
|
@@ -3484,19 +3505,6 @@ export var NodeShape;
|
|
|
3484
3505
|
else {
|
|
3485
3506
|
nodeKind = parameters?.nodeKind;
|
|
3486
3507
|
}
|
|
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
3508
|
let not;
|
|
3501
3509
|
if (parameters?.not === undefined) {
|
|
3502
3510
|
not = [];
|
|
@@ -3697,8 +3705,8 @@ export var NodeShape;
|
|
|
3697
3705
|
minInclusive,
|
|
3698
3706
|
minLength,
|
|
3699
3707
|
mutable,
|
|
3708
|
+
node,
|
|
3700
3709
|
nodeKind,
|
|
3701
|
-
nodes,
|
|
3702
3710
|
not,
|
|
3703
3711
|
or,
|
|
3704
3712
|
patterns,
|
|
@@ -3825,12 +3833,12 @@ export var NodeShape;
|
|
|
3825
3833
|
!$filterMaybe($filterBoolean)(filter.mutable, value.mutable)) {
|
|
3826
3834
|
return false;
|
|
3827
3835
|
}
|
|
3828
|
-
if (filter.
|
|
3829
|
-
!$filterMaybe($
|
|
3836
|
+
if (filter.node !== undefined &&
|
|
3837
|
+
!$filterMaybe($filterIdentifier)(filter.node, value.node)) {
|
|
3830
3838
|
return false;
|
|
3831
3839
|
}
|
|
3832
|
-
if (filter.
|
|
3833
|
-
!$
|
|
3840
|
+
if (filter.nodeKind !== undefined &&
|
|
3841
|
+
!$filterMaybe($filterIri)(filter.nodeKind, value.nodeKind)) {
|
|
3834
3842
|
return false;
|
|
3835
3843
|
}
|
|
3836
3844
|
if (filter.not !== undefined &&
|
|
@@ -4406,6 +4414,26 @@ export var NodeShape;
|
|
|
4406
4414
|
value: Maybe.empty(),
|
|
4407
4415
|
})),
|
|
4408
4416
|
}).chain((mutable) => $shaclPropertyFromRdf({
|
|
4417
|
+
graph: _$options.graph,
|
|
4418
|
+
resource: $resource,
|
|
4419
|
+
propertySchema: NodeShape.$schema
|
|
4420
|
+
.properties
|
|
4421
|
+
.node,
|
|
4422
|
+
typeFromRdf: (resourceValues) => resourceValues
|
|
4423
|
+
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
4424
|
+
.map((values) => values.length >
|
|
4425
|
+
0
|
|
4426
|
+
? values.map((value) => Maybe.of(value))
|
|
4427
|
+
: Resource.Values.fromValue({
|
|
4428
|
+
focusResource: $resource,
|
|
4429
|
+
propertyPath: PropertyShape
|
|
4430
|
+
.$schema
|
|
4431
|
+
.properties
|
|
4432
|
+
.node
|
|
4433
|
+
.path,
|
|
4434
|
+
value: Maybe.empty(),
|
|
4435
|
+
})),
|
|
4436
|
+
}).chain((node) => $shaclPropertyFromRdf({
|
|
4409
4437
|
graph: _$options.graph,
|
|
4410
4438
|
resource: $resource,
|
|
4411
4439
|
propertySchema: NodeShape.$schema
|
|
@@ -4433,24 +4461,6 @@ export var NodeShape;
|
|
|
4433
4461
|
value: Maybe.empty(),
|
|
4434
4462
|
})),
|
|
4435
4463
|
}).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
4464
|
graph: _$options.graph,
|
|
4455
4465
|
resource: $resource,
|
|
4456
4466
|
propertySchema: NodeShape.$schema
|
|
@@ -4769,8 +4779,8 @@ export var NodeShape;
|
|
|
4769
4779
|
minInclusive,
|
|
4770
4780
|
minLength,
|
|
4771
4781
|
mutable,
|
|
4782
|
+
node,
|
|
4772
4783
|
nodeKind,
|
|
4773
|
-
nodes,
|
|
4774
4784
|
not,
|
|
4775
4785
|
or,
|
|
4776
4786
|
patterns,
|
|
@@ -5011,6 +5021,14 @@ export var NodeShape;
|
|
|
5011
5021
|
}),
|
|
5012
5022
|
path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#mutable"),
|
|
5013
5023
|
},
|
|
5024
|
+
node: {
|
|
5025
|
+
kind: "Shacl",
|
|
5026
|
+
type: () => ({
|
|
5027
|
+
kind: "Maybe",
|
|
5028
|
+
item: () => ({ kind: "Identifier" }),
|
|
5029
|
+
}),
|
|
5030
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
|
|
5031
|
+
},
|
|
5014
5032
|
nodeKind: {
|
|
5015
5033
|
kind: "Shacl",
|
|
5016
5034
|
type: () => ({
|
|
@@ -5029,14 +5047,6 @@ export var NodeShape;
|
|
|
5029
5047
|
}),
|
|
5030
5048
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"),
|
|
5031
5049
|
},
|
|
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
5050
|
not: {
|
|
5041
5051
|
kind: "Shacl",
|
|
5042
5052
|
type: () => ({
|
|
@@ -5334,8 +5344,8 @@ export var NodeShape;
|
|
|
5334
5344
|
.flatMap((value) => [
|
|
5335
5345
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
5336
5346
|
]), options?.graph);
|
|
5347
|
+
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), _nodeShape.node.toList(), options?.graph);
|
|
5337
5348
|
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
5349
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#not"), _nodeShape.not.flatMap((item) => [item]), options?.graph);
|
|
5340
5350
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#or"), _nodeShape.or.toList().flatMap((value) => [
|
|
5341
5351
|
value.length > 0
|
|
@@ -5645,6 +5655,14 @@ export var Shape;
|
|
|
5645
5655
|
}),
|
|
5646
5656
|
path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#mutable"),
|
|
5647
5657
|
},
|
|
5658
|
+
node: {
|
|
5659
|
+
kind: "Shacl",
|
|
5660
|
+
type: () => ({
|
|
5661
|
+
kind: "Maybe",
|
|
5662
|
+
item: () => ({ kind: "Identifier" }),
|
|
5663
|
+
}),
|
|
5664
|
+
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
|
|
5665
|
+
},
|
|
5648
5666
|
nodeKind: {
|
|
5649
5667
|
kind: "Shacl",
|
|
5650
5668
|
type: () => ({
|
|
@@ -5663,14 +5681,6 @@ export var Shape;
|
|
|
5663
5681
|
}),
|
|
5664
5682
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"),
|
|
5665
5683
|
},
|
|
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
5684
|
not: {
|
|
5675
5685
|
kind: "Shacl",
|
|
5676
5686
|
type: () => ({
|
|
@@ -5997,7 +6007,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
5997
6007
|
return this.nodeShapesSync(query);
|
|
5998
6008
|
}
|
|
5999
6009
|
nodeShapesSync(query) {
|
|
6000
|
-
return this
|
|
6010
|
+
return this.#objectsSync({
|
|
6001
6011
|
$filter: NodeShape.$filter,
|
|
6002
6012
|
$fromRdfResource: NodeShape.$fromRdfResource,
|
|
6003
6013
|
$fromRdfTypes: [NodeShape.$fromRdfType],
|
|
@@ -6028,7 +6038,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6028
6038
|
return this.ontologiesSync(query);
|
|
6029
6039
|
}
|
|
6030
6040
|
ontologiesSync(query) {
|
|
6031
|
-
return this
|
|
6041
|
+
return this.#objectsSync({
|
|
6032
6042
|
$filter: Ontology.$filter,
|
|
6033
6043
|
$fromRdfResource: Ontology.$fromRdfResource,
|
|
6034
6044
|
$fromRdfTypes: [Ontology.$fromRdfType],
|
|
@@ -6059,7 +6069,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6059
6069
|
return this.propertyGroupsSync(query);
|
|
6060
6070
|
}
|
|
6061
6071
|
propertyGroupsSync(query) {
|
|
6062
|
-
return this
|
|
6072
|
+
return this.#objectsSync({
|
|
6063
6073
|
$filter: PropertyGroup.$filter,
|
|
6064
6074
|
$fromRdfResource: PropertyGroup.$fromRdfResource,
|
|
6065
6075
|
$fromRdfTypes: [PropertyGroup.$fromRdfType],
|
|
@@ -6090,7 +6100,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6090
6100
|
return this.propertyShapesSync(query);
|
|
6091
6101
|
}
|
|
6092
6102
|
propertyShapesSync(query) {
|
|
6093
|
-
return this
|
|
6103
|
+
return this.#objectsSync({
|
|
6094
6104
|
$filter: PropertyShape.$filter,
|
|
6095
6105
|
$fromRdfResource: PropertyShape.$fromRdfResource,
|
|
6096
6106
|
$fromRdfTypes: [PropertyShape.$fromRdfType],
|
|
@@ -6121,7 +6131,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6121
6131
|
return this.shapesSync(query);
|
|
6122
6132
|
}
|
|
6123
6133
|
shapesSync(query) {
|
|
6124
|
-
return this
|
|
6134
|
+
return this.#objectUnionsSync([
|
|
6125
6135
|
{
|
|
6126
6136
|
$filter: Shape.$filter,
|
|
6127
6137
|
$fromRdfResource: NodeShape.$fromRdfResource,
|
|
@@ -6134,32 +6144,32 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6134
6144
|
},
|
|
6135
6145
|
], query);
|
|
6136
6146
|
}
|
|
6137
|
-
async object(identifier, options) {
|
|
6138
|
-
return this
|
|
6147
|
+
async $object(identifier, options) {
|
|
6148
|
+
return this.$objectSync(identifier, options);
|
|
6139
6149
|
}
|
|
6140
|
-
objectSync(identifier, options) {
|
|
6141
|
-
return this
|
|
6150
|
+
$objectSync(identifier, options) {
|
|
6151
|
+
return this.$objectsSync({
|
|
6142
6152
|
identifiers: [identifier],
|
|
6143
6153
|
preferredLanguages: options?.preferredLanguages,
|
|
6144
6154
|
}).map((objects) => objects[0]);
|
|
6145
6155
|
}
|
|
6146
|
-
async objectCount(query) {
|
|
6147
|
-
return this
|
|
6156
|
+
async $objectCount(query) {
|
|
6157
|
+
return this.$objectCountSync(query);
|
|
6148
6158
|
}
|
|
6149
|
-
objectCountSync(query) {
|
|
6150
|
-
return this
|
|
6159
|
+
$objectCountSync(query) {
|
|
6160
|
+
return this.$objectsSync(query).map((objects) => objects.length);
|
|
6151
6161
|
}
|
|
6152
|
-
async objectIdentifiers(query) {
|
|
6153
|
-
return this
|
|
6162
|
+
async $objectIdentifiers(query) {
|
|
6163
|
+
return this.$objectIdentifiersSync(query);
|
|
6154
6164
|
}
|
|
6155
|
-
objectIdentifiersSync(query) {
|
|
6156
|
-
return this
|
|
6165
|
+
$objectIdentifiersSync(query) {
|
|
6166
|
+
return this.$objectsSync(query).map((objects) => objects.map((object) => object.$identifier()));
|
|
6157
6167
|
}
|
|
6158
|
-
async objects(query) {
|
|
6159
|
-
return this
|
|
6168
|
+
async $objects(query) {
|
|
6169
|
+
return this.$objectsSync(query);
|
|
6160
6170
|
}
|
|
6161
|
-
objectsSync(query) {
|
|
6162
|
-
return this
|
|
6171
|
+
$objectsSync(query) {
|
|
6172
|
+
return this.#objectUnionsSync([
|
|
6163
6173
|
{
|
|
6164
6174
|
$filter: $Object.$filter,
|
|
6165
6175
|
$fromRdfResource: NodeShape.$fromRdfResource,
|
|
@@ -6182,7 +6192,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6182
6192
|
},
|
|
6183
6193
|
], query);
|
|
6184
6194
|
}
|
|
6185
|
-
|
|
6195
|
+
#objectsSync(namedObjectType, query) {
|
|
6186
6196
|
const graph = query?.graph ?? this.$graph;
|
|
6187
6197
|
const limit = query?.limit ?? Number.MAX_SAFE_INTEGER;
|
|
6188
6198
|
if (limit <= 0) {
|
|
@@ -6275,7 +6285,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6275
6285
|
}
|
|
6276
6286
|
return Right(objects);
|
|
6277
6287
|
}
|
|
6278
|
-
|
|
6288
|
+
#objectUnionsSync(namedObjectTypes, query) {
|
|
6279
6289
|
const graph = query?.graph ?? this.$graph;
|
|
6280
6290
|
const limit = query?.limit ?? Number.MAX_SAFE_INTEGER;
|
|
6281
6291
|
if (limit <= 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@shaclmate/shacl-ast": "4.0.
|
|
3
|
+
"@shaclmate/shacl-ast": "4.0.27",
|
|
4
4
|
"@rdfjs/dataset": "~2.0.2",
|
|
5
5
|
"@rdfjs/prefix-map": "~0.1.2",
|
|
6
6
|
"@rdfjs/term-map": "~2.0.2",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
},
|
|
69
69
|
"type": "module",
|
|
70
70
|
"types": "./dist/index.d.ts",
|
|
71
|
-
"version": "4.0.
|
|
71
|
+
"version": "4.0.27"
|
|
72
72
|
}
|