@shaclmate/compiler 2.0.23 → 3.0.0
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.d.ts +5 -5
- package/dist/ShapesGraphToAstTransformer.js +5 -5
- package/dist/_ShapesGraphToAstTransformer/InheritableShapeConstraints.d.ts +2 -0
- package/dist/_ShapesGraphToAstTransformer/InheritableShapeConstraints.js +2 -0
- package/dist/_ShapesGraphToAstTransformer/ShapeStack.d.ts +15 -0
- package/dist/_ShapesGraphToAstTransformer/ShapeStack.js +51 -0
- package/dist/_ShapesGraphToAstTransformer/index.d.ts +5 -5
- package/dist/_ShapesGraphToAstTransformer/index.js +5 -5
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.js +77 -29
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompositeType.d.ts +10 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompositeType.js +185 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstIdentifierType.d.ts +10 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstIdentifierType.js +32 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstLiteralType.d.ts +10 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstLiteralType.js +46 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.d.ts +12 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.js +24 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.d.ts +13 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.js +14 -0
- package/dist/ast/OptionType.d.ts +0 -2
- package/dist/ast/SetType.d.ts +1 -6
- package/dist/ast/index.d.ts +1 -0
- package/dist/ast/index.js +1 -0
- package/dist/generators/json/AstJsonGenerator.js +7 -1
- package/dist/generators/ts/BooleanType.d.ts +2 -1
- package/dist/generators/ts/BooleanType.js +9 -4
- package/dist/generators/ts/DateTimeType.d.ts +2 -1
- package/dist/generators/ts/DateTimeType.js +9 -4
- package/dist/generators/ts/IdentifierType.d.ts +1 -1
- package/dist/generators/ts/IdentifierType.js +20 -14
- package/dist/generators/ts/Import.d.ts +2 -1
- package/dist/generators/ts/Import.js +29 -24
- package/dist/generators/ts/ListType.js +16 -5
- package/dist/generators/ts/LiteralType.d.ts +5 -2
- package/dist/generators/ts/LiteralType.js +81 -15
- package/dist/generators/ts/NumberType.d.ts +2 -1
- package/dist/generators/ts/NumberType.js +9 -4
- package/dist/generators/ts/ObjectType.d.ts +3 -2
- package/dist/generators/ts/ObjectType.js +16 -6
- package/dist/generators/ts/ObjectUnionType.d.ts +2 -0
- package/dist/generators/ts/ObjectUnionType.js +21 -9
- package/dist/generators/ts/OptionType.d.ts +1 -1
- package/dist/generators/ts/OptionType.js +6 -4
- package/dist/generators/ts/PrimitiveType.d.ts +1 -1
- package/dist/generators/ts/PrimitiveType.js +6 -3
- package/dist/generators/ts/SetType.d.ts +4 -4
- package/dist/generators/ts/SetType.js +15 -12
- package/dist/generators/ts/SnippetDeclarations.d.ts +3 -2
- package/dist/generators/ts/SnippetDeclarations.js +41 -3
- package/dist/generators/ts/StringType.d.ts +2 -1
- package/dist/generators/ts/StringType.js +14 -7
- package/dist/generators/ts/TermType.d.ts +18 -19
- package/dist/generators/ts/TermType.js +55 -51
- package/dist/generators/ts/TsGenerator.js +24 -12
- package/dist/generators/ts/Type.d.ts +12 -3
- package/dist/generators/ts/Type.js +1 -0
- package/dist/generators/ts/TypeFactory.d.ts +8 -0
- package/dist/generators/ts/TypeFactory.js +114 -23
- package/dist/generators/ts/UnionType.js +1 -1
- package/dist/generators/ts/_ObjectType/EagerShaclProperty.js +3 -2
- package/dist/generators/ts/_ObjectType/IdentifierPrefixProperty.d.ts +1 -1
- package/dist/generators/ts/_ObjectType/IdentifierPrefixProperty.js +15 -1
- package/dist/generators/ts/_ObjectType/IdentifierProperty.d.ts +6 -6
- package/dist/generators/ts/_ObjectType/IdentifierProperty.js +59 -29
- package/dist/generators/ts/_ObjectType/LazyShaclProperty.d.ts +14 -1
- package/dist/generators/ts/_ObjectType/LazyShaclProperty.js +89 -11
- package/dist/generators/ts/_ObjectType/Property.d.ts +10 -4
- package/dist/generators/ts/_ObjectType/ShaclProperty.d.ts +1 -1
- package/dist/generators/ts/_ObjectType/ShaclProperty.js +14 -2
- package/dist/generators/ts/_ObjectType/TypeDiscriminatorProperty.d.ts +1 -1
- package/dist/generators/ts/_ObjectType/TypeDiscriminatorProperty.js +1 -1
- package/dist/generators/ts/_ObjectType/classDeclaration.js +16 -12
- package/dist/generators/ts/_ObjectType/createFunctionDeclaration.js +22 -10
- package/dist/generators/ts/_ObjectType/equalsFunctionOrMethodDeclaration.js +3 -1
- package/dist/generators/ts/_ObjectType/graphqlTypeVariableStatement.js +14 -2
- package/dist/generators/ts/_ObjectType/jsonFunctionDeclarations.js +1 -1
- package/dist/generators/ts/_ObjectType/rdfFunctionDeclarations.js +95 -84
- package/dist/generators/ts/_ObjectType/sparqlConstructQueryFunctionDeclaration.js +3 -3
- package/dist/generators/ts/_ObjectType/sparqlConstructQueryStringFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_ObjectType/sparqlFunctionDeclarations.js +35 -15
- package/dist/generators/ts/_ObjectType/toRdfFunctionOrMethodDeclaration.js +19 -12
- package/dist/generators/ts/forwardingObjectSetClassDeclaration.d.ts +8 -0
- package/dist/generators/ts/forwardingObjectSetClassDeclaration.js +29 -0
- package/dist/generators/ts/objectSetDeclarations.js +2 -0
- package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.js +26 -19
- package/dist/generators/ts/rdfjsTermExpression.js +3 -3
- package/dist/generators/ts/sparqlObjectSetClassDeclaration.js +6 -6
- package/dist/input/PropertyPath.d.ts +2 -3
- package/dist/input/PropertyPath.js +6 -8
- package/dist/input/ShapesGraph.js +4 -8
- package/dist/input/generated.d.ts +96 -54
- package/dist/input/generated.js +1350 -744
- package/package.json +5 -8
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstCompositeType.d.ts +0 -12
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstCompositeType.js +0 -193
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstIdentifierType.d.ts +0 -12
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstIdentifierType.js +0 -29
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstLiteralType.d.ts +0 -12
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstLiteralType.js +0 -43
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstTermType.d.ts +0 -14
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstTermType.js +0 -21
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstType.d.ts +0 -15
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstType.js +0 -60
|
@@ -17,7 +17,7 @@ export function sparqlObjectSetClassDeclaration({ objectTypes, objectUnionTypes,
|
|
|
17
17
|
constructObjectType: {
|
|
18
18
|
name: "objectType",
|
|
19
19
|
type: `{\
|
|
20
|
-
${syntheticNamePrefix}fromRdf: (
|
|
20
|
+
${syntheticNamePrefix}fromRdf: (resource: rdfjsResource.Resource, options: { objectSet: ${syntheticNamePrefix}ObjectSet }) => purify.Either<Error, ${typeParameters.ObjectT.name}>;
|
|
21
21
|
${syntheticNamePrefix}sparqlConstructQueryString: (parameters?: { subject?: sparqljs.Triple["subject"]; } & Omit<sparqljs.ConstructQuery, "prefixes" | "queryType" | "type"> & sparqljs.GeneratorOptions) => string;
|
|
22
22
|
${syntheticNamePrefix}sparqlWherePatterns: ${sparqlWherePatternsFunctionType};
|
|
23
23
|
}`,
|
|
@@ -248,13 +248,13 @@ try {
|
|
|
248
248
|
return purify.Left(e as Error);
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
const dataset
|
|
251
|
+
const dataset = datasetFactory.dataset(quads.concat());
|
|
252
252
|
const objects: ${typeParameters.ObjectT.name}[] = [];
|
|
253
253
|
for (const identifier of identifiers) {
|
|
254
|
-
const objectEither = objectType.${syntheticNamePrefix}fromRdf(
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
254
|
+
const objectEither = objectType.${syntheticNamePrefix}fromRdf(
|
|
255
|
+
new rdfjsResource.Resource<rdfjs.NamedNode>({ dataset, identifier: identifier as rdfjs.NamedNode }),
|
|
256
|
+
{ objectSet: this }
|
|
257
|
+
);
|
|
258
258
|
if (objectEither.isLeft()) {
|
|
259
259
|
return objectEither;
|
|
260
260
|
}
|
|
@@ -31,11 +31,10 @@ export interface ZeroOrOnePath {
|
|
|
31
31
|
}
|
|
32
32
|
export type PropertyPath = AlternativePath | InversePath | OneOrMorePath | PredicatePath | SequencePath | ZeroOrMorePath | ZeroOrOnePath;
|
|
33
33
|
export declare namespace PropertyPath {
|
|
34
|
-
function $fromRdf(
|
|
34
|
+
function $fromRdf(resource: Resource, _?: {
|
|
35
35
|
[_index: string]: any;
|
|
36
36
|
ignoreRdfType?: boolean;
|
|
37
|
-
|
|
38
|
-
resource: Resource;
|
|
37
|
+
preferredLanguages?: readonly string[];
|
|
39
38
|
}): Either<Error, PropertyPath>;
|
|
40
39
|
function $toRdf(_propertyPath: PropertyPath, _options?: any): Resource;
|
|
41
40
|
}
|
|
@@ -3,7 +3,7 @@ import { Either, Left } from "purify-ts";
|
|
|
3
3
|
import { Resource } from "rdfjs-resource";
|
|
4
4
|
export var PropertyPath;
|
|
5
5
|
(function (PropertyPath) {
|
|
6
|
-
function $fromRdf(
|
|
6
|
+
function $fromRdf(resource, _) {
|
|
7
7
|
// Predicate path
|
|
8
8
|
// sh:path ex:parent
|
|
9
9
|
if (resource.identifier.termType === "NamedNode") {
|
|
@@ -18,9 +18,7 @@ export var PropertyPath;
|
|
|
18
18
|
if (memberResource.isNothing()) {
|
|
19
19
|
return Left(new Error(`non-identifier in property path list ${Resource.Identifier.toString(listResource.identifier)}`));
|
|
20
20
|
}
|
|
21
|
-
const member = PropertyPath.$fromRdf(
|
|
22
|
-
resource: memberResource.unsafeCoerce(),
|
|
23
|
-
});
|
|
21
|
+
const member = PropertyPath.$fromRdf(memberResource.unsafeCoerce());
|
|
24
22
|
if (member.isLeft()) {
|
|
25
23
|
return member;
|
|
26
24
|
}
|
|
@@ -52,14 +50,14 @@ export var PropertyPath;
|
|
|
52
50
|
// Inverse path
|
|
53
51
|
// sh:path: [ sh:inversePath ex:parent ]
|
|
54
52
|
if (quad.predicate.equals(sh.inversePath)) {
|
|
55
|
-
return PropertyPath.$fromRdf(
|
|
53
|
+
return PropertyPath.$fromRdf(objectResource).map((path) => ({
|
|
56
54
|
kind: "InversePath",
|
|
57
55
|
path,
|
|
58
56
|
}));
|
|
59
57
|
}
|
|
60
58
|
// One or more path
|
|
61
59
|
if (quad.predicate.equals(sh.oneOrMorePath)) {
|
|
62
|
-
return PropertyPath.$fromRdf(
|
|
60
|
+
return PropertyPath.$fromRdf(objectResource).map((path) => ({
|
|
63
61
|
kind: "OneOrMorePath",
|
|
64
62
|
path,
|
|
65
63
|
}));
|
|
@@ -74,13 +72,13 @@ export var PropertyPath;
|
|
|
74
72
|
}
|
|
75
73
|
// Zero or more path
|
|
76
74
|
if (quad.predicate.equals(sh.zeroOrMorePath)) {
|
|
77
|
-
return PropertyPath.$fromRdf(
|
|
75
|
+
return PropertyPath.$fromRdf(objectResource).map((path) => ({
|
|
78
76
|
kind: "ZeroOrMorePath",
|
|
79
77
|
path,
|
|
80
78
|
}));
|
|
81
79
|
}
|
|
82
80
|
if (quad.predicate.equals(sh.zeroOrOnePath)) {
|
|
83
|
-
return PropertyPath.$fromRdf(
|
|
81
|
+
return PropertyPath.$fromRdf(objectResource).map((path) => ({
|
|
84
82
|
kind: "ZeroOrOnePath",
|
|
85
83
|
path,
|
|
86
84
|
}));
|
|
@@ -10,9 +10,8 @@ export class ShapesGraph extends RdfjsShapesGraph {
|
|
|
10
10
|
dataset,
|
|
11
11
|
factory: {
|
|
12
12
|
nodeShapeFromRdf({ resource, shapesGraph, }) {
|
|
13
|
-
return generated.ShaclmateNodeShape.$fromRdf({
|
|
13
|
+
return generated.ShaclmateNodeShape.$fromRdf(resource, {
|
|
14
14
|
ignoreRdfType: true,
|
|
15
|
-
resource,
|
|
16
15
|
}).map((generatedShape) => new NodeShape({
|
|
17
16
|
ancestorClassIris: ancestorClassIris(resource, Number.MAX_SAFE_INTEGER),
|
|
18
17
|
childClassIris: descendantClassIris(resource, 1),
|
|
@@ -26,21 +25,18 @@ export class ShapesGraph extends RdfjsShapesGraph {
|
|
|
26
25
|
}));
|
|
27
26
|
},
|
|
28
27
|
ontologyFromRdf({ resource, }) {
|
|
29
|
-
return generated.ShaclmateOntology.$fromRdf({
|
|
28
|
+
return generated.ShaclmateOntology.$fromRdf(resource, {
|
|
30
29
|
ignoreRdfType: true,
|
|
31
|
-
resource,
|
|
32
30
|
}).map((generatedOntology) => new Ontology(generatedOntology));
|
|
33
31
|
},
|
|
34
32
|
propertyGroupFromRdf({ resource, }) {
|
|
35
|
-
return generated.ShaclCorePropertyGroup.$fromRdf({
|
|
33
|
+
return generated.ShaclCorePropertyGroup.$fromRdf(resource, {
|
|
36
34
|
ignoreRdfType: true,
|
|
37
|
-
resource,
|
|
38
35
|
}).map((generatedPropertyGroup) => new PropertyGroup(generatedPropertyGroup));
|
|
39
36
|
},
|
|
40
37
|
propertyShapeFromRdf({ resource, shapesGraph, }) {
|
|
41
|
-
return generated.ShaclmatePropertyShape.$fromRdf({
|
|
38
|
+
return generated.ShaclmatePropertyShape.$fromRdf(resource, {
|
|
42
39
|
ignoreRdfType: true,
|
|
43
|
-
resource,
|
|
44
40
|
}).map((generatedShape) => new PropertyShape(generatedShape, shapesGraph));
|
|
45
41
|
},
|
|
46
42
|
},
|
|
@@ -57,11 +57,17 @@ export declare namespace BaseShaclCoreShapeStatic {
|
|
|
57
57
|
const // biome-ignore lint/suspicious/noShadowRestrictedNames:
|
|
58
58
|
toString: typeof rdfjsResource.Resource.Identifier.toString;
|
|
59
59
|
}
|
|
60
|
-
function $
|
|
60
|
+
function $fromRdf(resource: rdfjsResource.Resource, options?: {
|
|
61
61
|
[_index: string]: any;
|
|
62
62
|
ignoreRdfType?: boolean;
|
|
63
63
|
languageIn?: readonly string[];
|
|
64
64
|
objectSet?: $ObjectSet;
|
|
65
|
+
}): purify.Either<Error, BaseShaclCoreShape>;
|
|
66
|
+
function $propertiesFromRdf({ ignoreRdfType: $ignoreRdfType, languageIn: $languageIn, objectSet: $objectSet, resource: $resource, ...$context }: {
|
|
67
|
+
[_index: string]: any;
|
|
68
|
+
ignoreRdfType: boolean;
|
|
69
|
+
languageIn?: readonly string[];
|
|
70
|
+
objectSet: $ObjectSet;
|
|
65
71
|
resource: rdfjsResource.Resource;
|
|
66
72
|
}): purify.Either<Error, {
|
|
67
73
|
$identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
@@ -91,11 +97,10 @@ export declare namespace BaseShaclCoreShapeStatic {
|
|
|
91
97
|
patterns: readonly string[];
|
|
92
98
|
xone: readonly (readonly (rdfjs.BlankNode | rdfjs.NamedNode)[])[];
|
|
93
99
|
}>;
|
|
94
|
-
function $
|
|
95
|
-
function $toRdf(_baseShaclCoreShape: BaseShaclCoreShape, { mutateGraph, resourceSet, }: {
|
|
100
|
+
function $toRdf(_baseShaclCoreShape: BaseShaclCoreShape, options?: {
|
|
96
101
|
ignoreRdfType?: boolean;
|
|
97
102
|
mutateGraph?: rdfjsResource.MutableResource.MutateGraph;
|
|
98
|
-
resourceSet
|
|
103
|
+
resourceSet?: rdfjsResource.MutableResourceSet;
|
|
99
104
|
}): rdfjsResource.MutableResource;
|
|
100
105
|
const $properties: {
|
|
101
106
|
and: {
|
|
@@ -190,11 +195,17 @@ export declare namespace ShaclCorePropertyShapeStatic {
|
|
|
190
195
|
const $fromRdfType: rdfjs.NamedNode<string>;
|
|
191
196
|
type $Identifier = BaseShaclCoreShapeStatic.$Identifier;
|
|
192
197
|
const $Identifier: typeof BaseShaclCoreShapeStatic.$Identifier;
|
|
193
|
-
function $
|
|
198
|
+
function $fromRdf(resource: rdfjsResource.Resource, options?: {
|
|
194
199
|
[_index: string]: any;
|
|
195
200
|
ignoreRdfType?: boolean;
|
|
196
201
|
languageIn?: readonly string[];
|
|
197
202
|
objectSet?: $ObjectSet;
|
|
203
|
+
}): purify.Either<Error, ShaclCorePropertyShape>;
|
|
204
|
+
function $propertiesFromRdf({ ignoreRdfType: $ignoreRdfType, languageIn: $languageIn, objectSet: $objectSet, resource: $resource, ...$context }: {
|
|
205
|
+
[_index: string]: any;
|
|
206
|
+
ignoreRdfType: boolean;
|
|
207
|
+
languageIn?: readonly string[];
|
|
208
|
+
objectSet: $ObjectSet;
|
|
198
209
|
resource: rdfjsResource.Resource;
|
|
199
210
|
}): purify.Either<Error, {
|
|
200
211
|
$identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
@@ -207,11 +218,10 @@ export declare namespace ShaclCorePropertyShapeStatic {
|
|
|
207
218
|
path: PropertyPath;
|
|
208
219
|
uniqueLang: purify.Maybe<boolean>;
|
|
209
220
|
} & $UnwrapR<ReturnType<typeof BaseShaclCoreShapeStatic.$propertiesFromRdf>>>;
|
|
210
|
-
function $
|
|
211
|
-
function $toRdf(_shaclCorePropertyShape: ShaclCorePropertyShape, { ignoreRdfType, mutateGraph, resourceSet, }: {
|
|
221
|
+
function $toRdf(_shaclCorePropertyShape: ShaclCorePropertyShape, options?: {
|
|
212
222
|
ignoreRdfType?: boolean;
|
|
213
223
|
mutateGraph?: rdfjsResource.MutableResource.MutateGraph;
|
|
214
|
-
resourceSet
|
|
224
|
+
resourceSet?: rdfjsResource.MutableResourceSet;
|
|
215
225
|
}): rdfjsResource.MutableResource;
|
|
216
226
|
const $properties: {
|
|
217
227
|
defaultValue: {
|
|
@@ -326,11 +336,17 @@ export declare namespace ShaclmatePropertyShape {
|
|
|
326
336
|
const $fromRdfType: rdfjs.NamedNode<string>;
|
|
327
337
|
type $Identifier = ShaclCorePropertyShapeStatic.$Identifier;
|
|
328
338
|
const $Identifier: typeof BaseShaclCoreShapeStatic.$Identifier;
|
|
329
|
-
function $
|
|
339
|
+
function $fromRdf(resource: rdfjsResource.Resource, options?: {
|
|
330
340
|
[_index: string]: any;
|
|
331
341
|
ignoreRdfType?: boolean;
|
|
332
342
|
languageIn?: readonly string[];
|
|
333
343
|
objectSet?: $ObjectSet;
|
|
344
|
+
}): purify.Either<Error, ShaclmatePropertyShape>;
|
|
345
|
+
function $propertiesFromRdf({ ignoreRdfType: $ignoreRdfType, languageIn: $languageIn, objectSet: $objectSet, resource: $resource, ...$context }: {
|
|
346
|
+
[_index: string]: any;
|
|
347
|
+
ignoreRdfType: boolean;
|
|
348
|
+
languageIn?: readonly string[];
|
|
349
|
+
objectSet: $ObjectSet;
|
|
334
350
|
resource: rdfjsResource.Resource;
|
|
335
351
|
}): purify.Either<Error, {
|
|
336
352
|
$identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
@@ -342,11 +358,10 @@ export declare namespace ShaclmatePropertyShape {
|
|
|
342
358
|
visibility: purify.Maybe<rdfjs.NamedNode<"http://purl.org/shaclmate/ontology#_Visibility_Private" | "http://purl.org/shaclmate/ontology#_Visibility_Protected" | "http://purl.org/shaclmate/ontology#_Visibility_Public">>;
|
|
343
359
|
widen: purify.Maybe<boolean>;
|
|
344
360
|
} & $UnwrapR<ReturnType<typeof ShaclCorePropertyShapeStatic.$propertiesFromRdf>>>;
|
|
345
|
-
function $
|
|
346
|
-
function $toRdf(_shaclmatePropertyShape: ShaclmatePropertyShape, { ignoreRdfType, mutateGraph, resourceSet, }: {
|
|
361
|
+
function $toRdf(_shaclmatePropertyShape: ShaclmatePropertyShape, options?: {
|
|
347
362
|
ignoreRdfType?: boolean;
|
|
348
363
|
mutateGraph?: rdfjsResource.MutableResource.MutateGraph;
|
|
349
|
-
resourceSet
|
|
364
|
+
resourceSet?: rdfjsResource.MutableResourceSet;
|
|
350
365
|
}): rdfjsResource.MutableResource;
|
|
351
366
|
const $properties: {
|
|
352
367
|
lazy: {
|
|
@@ -478,22 +493,27 @@ export declare namespace OwlOntologyStatic {
|
|
|
478
493
|
const // biome-ignore lint/suspicious/noShadowRestrictedNames:
|
|
479
494
|
toString: typeof rdfjsResource.Resource.Identifier.toString;
|
|
480
495
|
}
|
|
481
|
-
function $
|
|
496
|
+
function $fromRdf(resource: rdfjsResource.Resource, options?: {
|
|
482
497
|
[_index: string]: any;
|
|
483
498
|
ignoreRdfType?: boolean;
|
|
484
499
|
languageIn?: readonly string[];
|
|
485
500
|
objectSet?: $ObjectSet;
|
|
501
|
+
}): purify.Either<Error, OwlOntology>;
|
|
502
|
+
function $propertiesFromRdf({ ignoreRdfType: $ignoreRdfType, languageIn: $languageIn, objectSet: $objectSet, resource: $resource, ...$context }: {
|
|
503
|
+
[_index: string]: any;
|
|
504
|
+
ignoreRdfType: boolean;
|
|
505
|
+
languageIn?: readonly string[];
|
|
506
|
+
objectSet: $ObjectSet;
|
|
486
507
|
resource: rdfjsResource.Resource;
|
|
487
508
|
}): purify.Either<Error, {
|
|
488
509
|
$identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
489
510
|
$type: "OwlOntology" | "ShaclmateOntology";
|
|
490
511
|
labels: readonly rdfjs.Literal[];
|
|
491
512
|
}>;
|
|
492
|
-
function $
|
|
493
|
-
function $toRdf(_owlOntology: OwlOntology, { ignoreRdfType, mutateGraph, resourceSet, }: {
|
|
513
|
+
function $toRdf(_owlOntology: OwlOntology, options?: {
|
|
494
514
|
ignoreRdfType?: boolean;
|
|
495
515
|
mutateGraph?: rdfjsResource.MutableResource.MutateGraph;
|
|
496
|
-
resourceSet
|
|
516
|
+
resourceSet?: rdfjsResource.MutableResourceSet;
|
|
497
517
|
}): rdfjsResource.MutableResource;
|
|
498
518
|
const $properties: {
|
|
499
519
|
labels: {
|
|
@@ -513,11 +533,17 @@ export declare namespace ShaclmateOntology {
|
|
|
513
533
|
const $fromRdfType: rdfjs.NamedNode<string>;
|
|
514
534
|
type $Identifier = OwlOntologyStatic.$Identifier;
|
|
515
535
|
const $Identifier: typeof OwlOntologyStatic.$Identifier;
|
|
516
|
-
function $
|
|
536
|
+
function $fromRdf(resource: rdfjsResource.Resource, options?: {
|
|
517
537
|
[_index: string]: any;
|
|
518
538
|
ignoreRdfType?: boolean;
|
|
519
539
|
languageIn?: readonly string[];
|
|
520
540
|
objectSet?: $ObjectSet;
|
|
541
|
+
}): purify.Either<Error, ShaclmateOntology>;
|
|
542
|
+
function $propertiesFromRdf({ ignoreRdfType: $ignoreRdfType, languageIn: $languageIn, objectSet: $objectSet, resource: $resource, ...$context }: {
|
|
543
|
+
[_index: string]: any;
|
|
544
|
+
ignoreRdfType: boolean;
|
|
545
|
+
languageIn?: readonly string[];
|
|
546
|
+
objectSet: $ObjectSet;
|
|
521
547
|
resource: rdfjsResource.Resource;
|
|
522
548
|
}): purify.Either<Error, {
|
|
523
549
|
$identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
@@ -527,11 +553,10 @@ export declare namespace ShaclmateOntology {
|
|
|
527
553
|
tsImports: readonly string[];
|
|
528
554
|
tsObjectDeclarationType: purify.Maybe<rdfjs.NamedNode<"http://purl.org/shaclmate/ontology#_TsObjectDeclarationType_Class" | "http://purl.org/shaclmate/ontology#_TsObjectDeclarationType_Interface">>;
|
|
529
555
|
} & $UnwrapR<ReturnType<typeof OwlOntologyStatic.$propertiesFromRdf>>>;
|
|
530
|
-
function $
|
|
531
|
-
function $toRdf(_shaclmateOntology: ShaclmateOntology, { ignoreRdfType, mutateGraph, resourceSet, }: {
|
|
556
|
+
function $toRdf(_shaclmateOntology: ShaclmateOntology, options?: {
|
|
532
557
|
ignoreRdfType?: boolean;
|
|
533
558
|
mutateGraph?: rdfjsResource.MutableResource.MutateGraph;
|
|
534
|
-
resourceSet
|
|
559
|
+
resourceSet?: rdfjsResource.MutableResourceSet;
|
|
535
560
|
}): rdfjsResource.MutableResource;
|
|
536
561
|
const $properties: {
|
|
537
562
|
tsFeatureExcludes: {
|
|
@@ -562,11 +587,17 @@ export declare namespace ShaclCoreNodeShapeStatic {
|
|
|
562
587
|
const $fromRdfType: rdfjs.NamedNode<string>;
|
|
563
588
|
type $Identifier = BaseShaclCoreShapeStatic.$Identifier;
|
|
564
589
|
const $Identifier: typeof BaseShaclCoreShapeStatic.$Identifier;
|
|
565
|
-
function $
|
|
590
|
+
function $fromRdf(resource: rdfjsResource.Resource, options?: {
|
|
566
591
|
[_index: string]: any;
|
|
567
592
|
ignoreRdfType?: boolean;
|
|
568
593
|
languageIn?: readonly string[];
|
|
569
594
|
objectSet?: $ObjectSet;
|
|
595
|
+
}): purify.Either<Error, ShaclCoreNodeShape>;
|
|
596
|
+
function $propertiesFromRdf({ ignoreRdfType: $ignoreRdfType, languageIn: $languageIn, objectSet: $objectSet, resource: $resource, ...$context }: {
|
|
597
|
+
[_index: string]: any;
|
|
598
|
+
ignoreRdfType: boolean;
|
|
599
|
+
languageIn?: readonly string[];
|
|
600
|
+
objectSet: $ObjectSet;
|
|
570
601
|
resource: rdfjsResource.Resource;
|
|
571
602
|
}): purify.Either<Error, {
|
|
572
603
|
$identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
@@ -575,11 +606,10 @@ export declare namespace ShaclCoreNodeShapeStatic {
|
|
|
575
606
|
ignoredProperties: purify.Maybe<readonly rdfjs.NamedNode[]>;
|
|
576
607
|
properties: readonly (rdfjs.BlankNode | rdfjs.NamedNode)[];
|
|
577
608
|
} & $UnwrapR<ReturnType<typeof BaseShaclCoreShapeStatic.$propertiesFromRdf>>>;
|
|
578
|
-
function $
|
|
579
|
-
function $toRdf(_shaclCoreNodeShape: ShaclCoreNodeShape, { ignoreRdfType, mutateGraph, resourceSet, }: {
|
|
609
|
+
function $toRdf(_shaclCoreNodeShape: ShaclCoreNodeShape, options?: {
|
|
580
610
|
ignoreRdfType?: boolean;
|
|
581
611
|
mutateGraph?: rdfjsResource.MutableResource.MutateGraph;
|
|
582
|
-
resourceSet
|
|
612
|
+
resourceSet?: rdfjsResource.MutableResourceSet;
|
|
583
613
|
}): rdfjsResource.MutableResource;
|
|
584
614
|
const $properties: {
|
|
585
615
|
closed: {
|
|
@@ -689,11 +719,17 @@ export declare namespace ShaclmateNodeShape {
|
|
|
689
719
|
const $fromRdfType: rdfjs.NamedNode<string>;
|
|
690
720
|
type $Identifier = ShaclCoreNodeShapeStatic.$Identifier;
|
|
691
721
|
const $Identifier: typeof BaseShaclCoreShapeStatic.$Identifier;
|
|
692
|
-
function $
|
|
722
|
+
function $fromRdf(resource: rdfjsResource.Resource, options?: {
|
|
693
723
|
[_index: string]: any;
|
|
694
724
|
ignoreRdfType?: boolean;
|
|
695
725
|
languageIn?: readonly string[];
|
|
696
726
|
objectSet?: $ObjectSet;
|
|
727
|
+
}): purify.Either<Error, ShaclmateNodeShape>;
|
|
728
|
+
function $propertiesFromRdf({ ignoreRdfType: $ignoreRdfType, languageIn: $languageIn, objectSet: $objectSet, resource: $resource, ...$context }: {
|
|
729
|
+
[_index: string]: any;
|
|
730
|
+
ignoreRdfType: boolean;
|
|
731
|
+
languageIn?: readonly string[];
|
|
732
|
+
objectSet: $ObjectSet;
|
|
697
733
|
resource: rdfjsResource.Resource;
|
|
698
734
|
}): purify.Either<Error, {
|
|
699
735
|
$identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
@@ -712,11 +748,10 @@ export declare namespace ShaclmateNodeShape {
|
|
|
712
748
|
tsImports: readonly string[];
|
|
713
749
|
tsObjectDeclarationType: purify.Maybe<rdfjs.NamedNode<"http://purl.org/shaclmate/ontology#_TsObjectDeclarationType_Class" | "http://purl.org/shaclmate/ontology#_TsObjectDeclarationType_Interface">>;
|
|
714
750
|
} & $UnwrapR<ReturnType<typeof ShaclCoreNodeShapeStatic.$propertiesFromRdf>>>;
|
|
715
|
-
function $
|
|
716
|
-
function $toRdf(_shaclmateNodeShape: ShaclmateNodeShape, { ignoreRdfType, mutateGraph, resourceSet, }: {
|
|
751
|
+
function $toRdf(_shaclmateNodeShape: ShaclmateNodeShape, options?: {
|
|
717
752
|
ignoreRdfType?: boolean;
|
|
718
753
|
mutateGraph?: rdfjsResource.MutableResource.MutateGraph;
|
|
719
|
-
resourceSet
|
|
754
|
+
resourceSet?: rdfjsResource.MutableResourceSet;
|
|
720
755
|
}): rdfjsResource.MutableResource;
|
|
721
756
|
const $properties: {
|
|
722
757
|
abstract: {
|
|
@@ -858,11 +893,17 @@ export declare namespace ShaclCorePropertyGroup {
|
|
|
858
893
|
const // biome-ignore lint/suspicious/noShadowRestrictedNames:
|
|
859
894
|
toString: typeof rdfjsResource.Resource.Identifier.toString;
|
|
860
895
|
}
|
|
861
|
-
function $
|
|
896
|
+
function $fromRdf(resource: rdfjsResource.Resource, options?: {
|
|
862
897
|
[_index: string]: any;
|
|
863
898
|
ignoreRdfType?: boolean;
|
|
864
899
|
languageIn?: readonly string[];
|
|
865
900
|
objectSet?: $ObjectSet;
|
|
901
|
+
}): purify.Either<Error, ShaclCorePropertyGroup>;
|
|
902
|
+
function $propertiesFromRdf({ ignoreRdfType: $ignoreRdfType, languageIn: $languageIn, objectSet: $objectSet, resource: $resource, ...$context }: {
|
|
903
|
+
[_index: string]: any;
|
|
904
|
+
ignoreRdfType: boolean;
|
|
905
|
+
languageIn?: readonly string[];
|
|
906
|
+
objectSet: $ObjectSet;
|
|
866
907
|
resource: rdfjsResource.Resource;
|
|
867
908
|
}): purify.Either<Error, {
|
|
868
909
|
$identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
@@ -870,11 +911,10 @@ export declare namespace ShaclCorePropertyGroup {
|
|
|
870
911
|
comments: readonly rdfjs.Literal[];
|
|
871
912
|
labels: readonly rdfjs.Literal[];
|
|
872
913
|
}>;
|
|
873
|
-
function $
|
|
874
|
-
function $toRdf(_shaclCorePropertyGroup: ShaclCorePropertyGroup, { ignoreRdfType, mutateGraph, resourceSet, }: {
|
|
914
|
+
function $toRdf(_shaclCorePropertyGroup: ShaclCorePropertyGroup, options?: {
|
|
875
915
|
ignoreRdfType?: boolean;
|
|
876
916
|
mutateGraph?: rdfjsResource.MutableResource.MutateGraph;
|
|
877
|
-
resourceSet
|
|
917
|
+
resourceSet?: rdfjsResource.MutableResourceSet;
|
|
878
918
|
}): rdfjsResource.MutableResource;
|
|
879
919
|
const $properties: {
|
|
880
920
|
comments: {
|
|
@@ -887,10 +927,11 @@ export declare namespace ShaclCorePropertyGroup {
|
|
|
887
927
|
}
|
|
888
928
|
export type ShaclCoreShape = ShaclCoreNodeShape | ShaclCorePropertyShape;
|
|
889
929
|
export declare namespace ShaclCoreShape {
|
|
890
|
-
function $fromRdf(
|
|
930
|
+
function $fromRdf(resource: rdfjsResource.Resource, options?: {
|
|
891
931
|
[_index: string]: any;
|
|
892
932
|
ignoreRdfType?: boolean;
|
|
893
|
-
|
|
933
|
+
languageIn?: readonly string[];
|
|
934
|
+
objectSet?: $ObjectSet;
|
|
894
935
|
}): purify.Either<Error, ShaclCoreShape>;
|
|
895
936
|
type $Identifier = rdfjs.BlankNode | rdfjs.NamedNode;
|
|
896
937
|
namespace $Identifier {
|
|
@@ -898,17 +939,18 @@ export declare namespace ShaclCoreShape {
|
|
|
898
939
|
const // biome-ignore lint/suspicious/noShadowRestrictedNames:
|
|
899
940
|
toString: typeof rdfjsResource.Resource.Identifier.toString;
|
|
900
941
|
}
|
|
901
|
-
function $toRdf(_shaclCoreShape: ShaclCoreShape, _parameters
|
|
902
|
-
mutateGraph
|
|
903
|
-
resourceSet
|
|
942
|
+
function $toRdf(_shaclCoreShape: ShaclCoreShape, _parameters?: {
|
|
943
|
+
mutateGraph?: rdfjsResource.MutableResource.MutateGraph;
|
|
944
|
+
resourceSet?: rdfjsResource.MutableResourceSet;
|
|
904
945
|
}): rdfjsResource.MutableResource;
|
|
905
946
|
}
|
|
906
947
|
export type ShaclmateShape = ShaclmateNodeShape | ShaclCorePropertyShape;
|
|
907
948
|
export declare namespace ShaclmateShape {
|
|
908
|
-
function $fromRdf(
|
|
949
|
+
function $fromRdf(resource: rdfjsResource.Resource, options?: {
|
|
909
950
|
[_index: string]: any;
|
|
910
951
|
ignoreRdfType?: boolean;
|
|
911
|
-
|
|
952
|
+
languageIn?: readonly string[];
|
|
953
|
+
objectSet?: $ObjectSet;
|
|
912
954
|
}): purify.Either<Error, ShaclmateShape>;
|
|
913
955
|
type $Identifier = rdfjs.BlankNode | rdfjs.NamedNode;
|
|
914
956
|
namespace $Identifier {
|
|
@@ -916,9 +958,9 @@ export declare namespace ShaclmateShape {
|
|
|
916
958
|
const // biome-ignore lint/suspicious/noShadowRestrictedNames:
|
|
917
959
|
toString: typeof rdfjsResource.Resource.Identifier.toString;
|
|
918
960
|
}
|
|
919
|
-
function $toRdf(_shaclmateShape: ShaclmateShape, _parameters
|
|
920
|
-
mutateGraph
|
|
921
|
-
resourceSet
|
|
961
|
+
function $toRdf(_shaclmateShape: ShaclmateShape, _parameters?: {
|
|
962
|
+
mutateGraph?: rdfjsResource.MutableResource.MutateGraph;
|
|
963
|
+
resourceSet?: rdfjsResource.MutableResourceSet;
|
|
922
964
|
}): rdfjsResource.MutableResource;
|
|
923
965
|
}
|
|
924
966
|
export interface $ObjectSet {
|
|
@@ -1054,48 +1096,48 @@ export declare class $RdfjsDatasetObjectSet implements $ObjectSet {
|
|
|
1054
1096
|
protected $objectIdentifiersSync<ObjectT extends {
|
|
1055
1097
|
readonly $identifier: ObjectIdentifierT;
|
|
1056
1098
|
}, ObjectIdentifierT extends rdfjs.BlankNode | rdfjs.NamedNode>(objectType: {
|
|
1057
|
-
$fromRdf: (
|
|
1058
|
-
|
|
1099
|
+
$fromRdf: (resource: rdfjsResource.Resource, options: {
|
|
1100
|
+
objectSet: $ObjectSet;
|
|
1059
1101
|
}) => purify.Either<Error, ObjectT>;
|
|
1060
1102
|
$fromRdfType?: rdfjs.NamedNode;
|
|
1061
1103
|
}, query?: $ObjectSet.Query<ObjectIdentifierT>): purify.Either<Error, readonly ObjectIdentifierT[]>;
|
|
1062
1104
|
protected $objectsSync<ObjectT extends {
|
|
1063
1105
|
readonly $identifier: ObjectIdentifierT;
|
|
1064
1106
|
}, ObjectIdentifierT extends rdfjs.BlankNode | rdfjs.NamedNode>(objectType: {
|
|
1065
|
-
$fromRdf: (
|
|
1066
|
-
|
|
1107
|
+
$fromRdf: (resource: rdfjsResource.Resource, options: {
|
|
1108
|
+
objectSet: $ObjectSet;
|
|
1067
1109
|
}) => purify.Either<Error, ObjectT>;
|
|
1068
1110
|
$fromRdfType?: rdfjs.NamedNode;
|
|
1069
1111
|
}, query?: $ObjectSet.Query<ObjectIdentifierT>): purify.Either<Error, readonly ObjectT[]>;
|
|
1070
1112
|
protected $objectsCountSync<ObjectT extends {
|
|
1071
1113
|
readonly $identifier: ObjectIdentifierT;
|
|
1072
1114
|
}, ObjectIdentifierT extends rdfjs.BlankNode | rdfjs.NamedNode>(objectType: {
|
|
1073
|
-
$fromRdf: (
|
|
1074
|
-
|
|
1115
|
+
$fromRdf: (resource: rdfjsResource.Resource, options: {
|
|
1116
|
+
objectSet: $ObjectSet;
|
|
1075
1117
|
}) => purify.Either<Error, ObjectT>;
|
|
1076
1118
|
$fromRdfType?: rdfjs.NamedNode;
|
|
1077
1119
|
}, query?: $ObjectSet.Query<ObjectIdentifierT>): purify.Either<Error, number>;
|
|
1078
1120
|
protected $objectUnionIdentifiersSync<ObjectT extends {
|
|
1079
1121
|
readonly $identifier: ObjectIdentifierT;
|
|
1080
1122
|
}, ObjectIdentifierT extends rdfjs.BlankNode | rdfjs.NamedNode>(objectTypes: readonly {
|
|
1081
|
-
$fromRdf: (
|
|
1082
|
-
|
|
1123
|
+
$fromRdf: (resource: rdfjsResource.Resource, options: {
|
|
1124
|
+
objectSet: $ObjectSet;
|
|
1083
1125
|
}) => purify.Either<Error, ObjectT>;
|
|
1084
1126
|
$fromRdfType?: rdfjs.NamedNode;
|
|
1085
1127
|
}[], query?: $ObjectSet.Query<ObjectIdentifierT>): purify.Either<Error, readonly ObjectIdentifierT[]>;
|
|
1086
1128
|
protected $objectUnionsSync<ObjectT extends {
|
|
1087
1129
|
readonly $identifier: ObjectIdentifierT;
|
|
1088
1130
|
}, ObjectIdentifierT extends rdfjs.BlankNode | rdfjs.NamedNode>(objectTypes: readonly {
|
|
1089
|
-
$fromRdf: (
|
|
1090
|
-
|
|
1131
|
+
$fromRdf: (resource: rdfjsResource.Resource, options: {
|
|
1132
|
+
objectSet: $ObjectSet;
|
|
1091
1133
|
}) => purify.Either<Error, ObjectT>;
|
|
1092
1134
|
$fromRdfType?: rdfjs.NamedNode;
|
|
1093
1135
|
}[], query?: $ObjectSet.Query<ObjectIdentifierT>): purify.Either<Error, readonly ObjectT[]>;
|
|
1094
1136
|
protected $objectUnionsCountSync<ObjectT extends {
|
|
1095
1137
|
readonly $identifier: ObjectIdentifierT;
|
|
1096
1138
|
}, ObjectIdentifierT extends rdfjs.BlankNode | rdfjs.NamedNode>(objectTypes: readonly {
|
|
1097
|
-
$fromRdf: (
|
|
1098
|
-
|
|
1139
|
+
$fromRdf: (resource: rdfjsResource.Resource, options: {
|
|
1140
|
+
objectSet: $ObjectSet;
|
|
1099
1141
|
}) => purify.Either<Error, ObjectT>;
|
|
1100
1142
|
$fromRdfType?: rdfjs.NamedNode;
|
|
1101
1143
|
}[], query?: $ObjectSet.Query<ObjectIdentifierT>): purify.Either<Error, number>;
|