@shaclmate/compiler 2.0.15 → 2.0.17
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/{Compiler.js → dist/Compiler.js} +2 -0
- package/{ShapesGraphToAstTransformer.js → dist/ShapesGraphToAstTransformer.js} +13 -11
- package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/transformNodeShapeToAstType.js +8 -4
- package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/transformPropertyShapeToAstCompositeType.js +2 -2
- package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/transformPropertyShapeToAstType.js +2 -0
- package/{ast → dist/ast}/ListType.d.ts +2 -2
- package/{ast → dist/ast}/ObjectType.d.ts +18 -12
- package/dist/ast/SetType.d.ts +23 -0
- package/dist/enums/IdentifierMintingStrategy.d.ts +5 -0
- package/dist/enums/IdentifierMintingStrategy.js +2 -0
- package/{enums → dist/enums}/index.d.ts +1 -1
- package/{enums → dist/enums}/index.js +1 -1
- package/{generators → dist/generators}/index.d.ts +1 -0
- package/{generators → dist/generators}/index.js +1 -0
- package/{generators → dist/generators}/json/AstJsonGenerator.js +5 -1
- package/{generators → dist/generators}/ts/BooleanType.js +1 -4
- package/{generators → dist/generators}/ts/DateTimeType.d.ts +4 -1
- package/{generators → dist/generators}/ts/DateTimeType.js +11 -10
- package/dist/generators/ts/DateType.d.ts +9 -0
- package/dist/generators/ts/DateType.js +11 -0
- package/{generators → dist/generators}/ts/DeclaredType.js +3 -0
- package/{generators → dist/generators}/ts/IdentifierType.d.ts +2 -0
- package/{generators → dist/generators}/ts/IdentifierType.js +11 -3
- package/{generators → dist/generators}/ts/ListType.d.ts +6 -5
- package/{generators → dist/generators}/ts/ListType.js +28 -14
- package/{generators → dist/generators}/ts/LiteralType.js +1 -0
- package/{generators → dist/generators}/ts/NumberType.js +1 -4
- package/{generators → dist/generators}/ts/ObjectType.d.ts +4 -4
- package/{generators → dist/generators}/ts/ObjectType.js +17 -3
- package/{generators → dist/generators}/ts/ObjectUnionType.js +13 -8
- package/{generators → dist/generators}/ts/OptionType.js +5 -2
- package/{generators → dist/generators}/ts/PrimitiveType.js +3 -1
- package/{generators → dist/generators}/ts/SetType.d.ts +3 -1
- package/{generators → dist/generators}/ts/SetType.js +16 -10
- package/{generators → dist/generators}/ts/StringType.js +1 -4
- package/{generators → dist/generators}/ts/TermType.js +9 -5
- package/{generators → dist/generators}/ts/Type.js +1 -0
- package/{generators → dist/generators}/ts/TypeFactory.js +12 -9
- package/{generators → dist/generators}/ts/UnionType.js +3 -1
- package/{generators → dist/generators}/ts/_ObjectType/IdentifierProperty.d.ts +5 -5
- package/{generators → dist/generators}/ts/_ObjectType/IdentifierProperty.js +91 -21
- package/{generators → dist/generators}/ts/_ObjectType/Property.js +14 -0
- package/{generators → dist/generators}/ts/_ObjectType/ShaclProperty.js +5 -0
- package/{generators → dist/generators}/ts/_ObjectType/TypeDiscriminatorProperty.js +7 -2
- package/dist/generators/ts/_ObjectType/fromRdfTypeVariableStatement.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/fromRdfTypeVariableStatement.js +25 -0
- package/{generators → dist/generators}/ts/_ObjectType/index.d.ts +1 -0
- package/{generators → dist/generators}/ts/_ObjectType/index.js +1 -0
- package/{generators → dist/generators}/ts/_ObjectType/toRdfFunctionOrMethodDeclaration.js +3 -3
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/{input → dist/input}/NodeShape.d.ts +2 -2
- package/{input → dist/input}/NodeShape.js +11 -4
- package/{input → dist/input}/Ontology.js +1 -0
- package/{input → dist/input}/PropertyShape.js +1 -0
- package/{input → dist/input}/generated.d.ts +19 -12
- package/{input → dist/input}/generated.js +51 -22
- package/dist/input/tsFeatures.d.ts +10 -0
- package/{input → dist/input}/tsFeatures.js +4 -0
- package/package.json +28 -24
- package/ast/SetType.d.ts +0 -12
- package/enums/MintingStrategy.d.ts +0 -5
- package/enums/MintingStrategy.js +0 -2
- package/index.d.ts +0 -2
- package/index.js +0 -2
- package/input/tsFeatures.d.ts +0 -10
- /package/{Compiler.d.ts → dist/Compiler.d.ts} +0 -0
- /package/{ShapesGraphToAstTransformer.d.ts → dist/ShapesGraphToAstTransformer.d.ts} +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/NodeShapeAstType.d.ts +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/NodeShapeAstType.js +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/index.d.ts +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/index.js +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/pickLiteral.d.ts +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/pickLiteral.js +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/propertyShapeNodeKinds.d.ts +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/propertyShapeNodeKinds.js +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/shapeAstName.d.ts +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/shapeAstName.js +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/transformNodeShapeToAstType.d.ts +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/transformPropertyShapeToAstCompositeType.d.ts +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/transformPropertyShapeToAstIdentifierType.d.ts +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/transformPropertyShapeToAstIdentifierType.js +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/transformPropertyShapeToAstLiteralType.d.ts +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/transformPropertyShapeToAstLiteralType.js +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/transformPropertyShapeToAstObjectTypeProperty.d.ts +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/transformPropertyShapeToAstObjectTypeProperty.js +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/transformPropertyShapeToAstTermType.d.ts +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/transformPropertyShapeToAstTermType.js +0 -0
- /package/{_ShapesGraphToAstTransformer → dist/_ShapesGraphToAstTransformer}/transformPropertyShapeToAstType.d.ts +0 -0
- /package/{ast → dist/ast}/Ast.d.ts +0 -0
- /package/{ast → dist/ast}/Ast.js +0 -0
- /package/{ast → dist/ast}/CompositeType.d.ts +0 -0
- /package/{ast → dist/ast}/CompositeType.js +0 -0
- /package/{ast → dist/ast}/IdentifierType.d.ts +0 -0
- /package/{ast → dist/ast}/IdentifierType.js +0 -0
- /package/{ast → dist/ast}/IntersectionType.d.ts +0 -0
- /package/{ast → dist/ast}/IntersectionType.js +0 -0
- /package/{ast → dist/ast}/ListType.js +0 -0
- /package/{ast → dist/ast}/LiteralType.d.ts +0 -0
- /package/{ast → dist/ast}/LiteralType.js +0 -0
- /package/{ast → dist/ast}/Name.d.ts +0 -0
- /package/{ast → dist/ast}/Name.js +0 -0
- /package/{ast → dist/ast}/ObjectCompositeType.d.ts +0 -0
- /package/{ast → dist/ast}/ObjectCompositeType.js +0 -0
- /package/{ast → dist/ast}/ObjectIntersectionType.d.ts +0 -0
- /package/{ast → dist/ast}/ObjectIntersectionType.js +0 -0
- /package/{ast → dist/ast}/ObjectType.js +0 -0
- /package/{ast → dist/ast}/ObjectUnionType.d.ts +0 -0
- /package/{ast → dist/ast}/ObjectUnionType.js +0 -0
- /package/{ast → dist/ast}/OptionType.d.ts +0 -0
- /package/{ast → dist/ast}/OptionType.js +0 -0
- /package/{ast → dist/ast}/PlaceholderType.d.ts +0 -0
- /package/{ast → dist/ast}/PlaceholderType.js +0 -0
- /package/{ast → dist/ast}/SetType.js +0 -0
- /package/{ast → dist/ast}/TermType.d.ts +0 -0
- /package/{ast → dist/ast}/TermType.js +0 -0
- /package/{ast → dist/ast}/Type.d.ts +0 -0
- /package/{ast → dist/ast}/Type.js +0 -0
- /package/{ast → dist/ast}/UnionType.d.ts +0 -0
- /package/{ast → dist/ast}/UnionType.js +0 -0
- /package/{ast → dist/ast}/index.d.ts +0 -0
- /package/{ast → dist/ast}/index.js +0 -0
- /package/{enums → dist/enums}/PropertyVisibility.d.ts +0 -0
- /package/{enums → dist/enums}/PropertyVisibility.js +0 -0
- /package/{enums → dist/enums}/TsFeature.d.ts +0 -0
- /package/{enums → dist/enums}/TsFeature.js +0 -0
- /package/{enums → dist/enums}/TsObjectDeclarationType.d.ts +0 -0
- /package/{enums → dist/enums}/TsObjectDeclarationType.js +0 -0
- /package/{generators → dist/generators}/Generator.d.ts +0 -0
- /package/{generators → dist/generators}/Generator.js +0 -0
- /package/{generators → dist/generators}/json/AstJsonGenerator.d.ts +0 -0
- /package/{generators → dist/generators}/json/index.d.ts +0 -0
- /package/{generators → dist/generators}/json/index.js +0 -0
- /package/{generators → dist/generators}/ts/BooleanType.d.ts +0 -0
- /package/{generators → dist/generators}/ts/DeclaredType.d.ts +0 -0
- /package/{generators → dist/generators}/ts/Import.d.ts +0 -0
- /package/{generators → dist/generators}/ts/Import.js +0 -0
- /package/{generators → dist/generators}/ts/LiteralType.d.ts +0 -0
- /package/{generators → dist/generators}/ts/NumberType.d.ts +0 -0
- /package/{generators → dist/generators}/ts/ObjectUnionType.d.ts +0 -0
- /package/{generators → dist/generators}/ts/OptionType.d.ts +0 -0
- /package/{generators → dist/generators}/ts/PrimitiveType.d.ts +0 -0
- /package/{generators → dist/generators}/ts/SnippetDeclarations.d.ts +0 -0
- /package/{generators → dist/generators}/ts/SnippetDeclarations.js +0 -0
- /package/{generators → dist/generators}/ts/StringType.d.ts +0 -0
- /package/{generators → dist/generators}/ts/TermType.d.ts +0 -0
- /package/{generators → dist/generators}/ts/TsGenerator.d.ts +0 -0
- /package/{generators → dist/generators}/ts/TsGenerator.js +0 -0
- /package/{generators → dist/generators}/ts/Type.d.ts +0 -0
- /package/{generators → dist/generators}/ts/TypeFactory.d.ts +0 -0
- /package/{generators → dist/generators}/ts/UnionType.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/Property.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/ShaclProperty.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/TypeDiscriminatorProperty.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/classDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/classDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/createFunctionDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/createFunctionDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/equalsFunctionDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/equalsFunctionDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/equalsFunctionOrMethodDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/equalsFunctionOrMethodDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/fromJsonFunctionDeclarations.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/fromJsonFunctionDeclarations.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/fromRdfFunctionDeclarations.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/fromRdfFunctionDeclarations.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/hashFunctionDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/hashFunctionDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/hashFunctionOrMethodDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/hashFunctionOrMethodDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/interfaceDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/interfaceDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/jsonSchemaFunctionDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/jsonSchemaFunctionDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/jsonUiSchemaFunctionDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/jsonUiSchemaFunctionDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/jsonZodSchemaFunctionDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/jsonZodSchemaFunctionDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/rdfjsTermExpression.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/rdfjsTermExpression.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/sparqlConstructQueryFunctionDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/sparqlConstructQueryFunctionDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/sparqlConstructQueryStringFunctionDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/sparqlConstructQueryStringFunctionDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/sparqlFunctionDeclarations.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/sparqlFunctionDeclarations.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/toJsonFunctionDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/toJsonFunctionDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/toJsonFunctionOrMethodDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/toJsonFunctionOrMethodDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/toJsonReturnType.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/toJsonReturnType.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/toRdfFunctionDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/toRdfFunctionDeclaration.js +0 -0
- /package/{generators → dist/generators}/ts/_ObjectType/toRdfFunctionOrMethodDeclaration.d.ts +0 -0
- /package/{generators → dist/generators}/ts/index.d.ts +0 -0
- /package/{generators → dist/generators}/ts/index.js +0 -0
- /package/{generators → dist/generators}/ts/objectInitializer.d.ts +0 -0
- /package/{generators → dist/generators}/ts/objectInitializer.js +0 -0
- /package/{generators → dist/generators}/ts/stringToValidTsIdentifier.d.ts +0 -0
- /package/{generators → dist/generators}/ts/stringToValidTsIdentifier.js +0 -0
- /package/{generators → dist/generators}/ts/tsComment.d.ts +0 -0
- /package/{generators → dist/generators}/ts/tsComment.js +0 -0
- /package/{generators → dist/generators}/ts/tsName.d.ts +0 -0
- /package/{generators → dist/generators}/ts/tsName.js +0 -0
- /package/{input → dist/input}/Ontology.d.ts +0 -0
- /package/{input → dist/input}/PropertyShape.d.ts +0 -0
- /package/{input → dist/input}/Shape.d.ts +0 -0
- /package/{input → dist/input}/Shape.js +0 -0
- /package/{input → dist/input}/ShapesGraph.d.ts +0 -0
- /package/{input → dist/input}/ShapesGraph.js +0 -0
- /package/{input → dist/input}/ancestorClassIris.d.ts +0 -0
- /package/{input → dist/input}/ancestorClassIris.js +0 -0
- /package/{input → dist/input}/descendantClassIris.d.ts +0 -0
- /package/{input → dist/input}/descendantClassIris.js +0 -0
- /package/{input → dist/input}/index.d.ts +0 -0
- /package/{input → dist/input}/index.js +0 -0
- /package/{logger.d.ts → dist/logger.d.ts} +0 -0
- /package/{logger.js → dist/logger.js} +0 -0
|
@@ -10,6 +10,11 @@ import { Memoize } from "typescript-memoize";
|
|
|
10
10
|
import { tsComment } from "../tsComment.js";
|
|
11
11
|
import { Property } from "./Property.js";
|
|
12
12
|
export class ShaclProperty extends Property {
|
|
13
|
+
mutable;
|
|
14
|
+
comment;
|
|
15
|
+
description;
|
|
16
|
+
label;
|
|
17
|
+
path;
|
|
13
18
|
constructor({ comment, description, label, mutable, path, ...superParameters }) {
|
|
14
19
|
super(superParameters);
|
|
15
20
|
this.comment = comment;
|
|
@@ -10,10 +10,13 @@ import { Memoize } from "typescript-memoize";
|
|
|
10
10
|
import { SnippetDeclarations } from "../SnippetDeclarations.js";
|
|
11
11
|
import { Property } from "./Property.js";
|
|
12
12
|
export class TypeDiscriminatorProperty extends Property {
|
|
13
|
+
equalsFunction = "strictEquals";
|
|
14
|
+
mutable = false;
|
|
15
|
+
value;
|
|
16
|
+
abstract;
|
|
17
|
+
override;
|
|
13
18
|
constructor({ abstract, override, type, value, ...superParameters }) {
|
|
14
19
|
super({ ...superParameters, type });
|
|
15
|
-
this.equalsFunction = "strictEquals";
|
|
16
|
-
this.mutable = false;
|
|
17
20
|
invariant(this.visibility === "public");
|
|
18
21
|
this.abstract = abstract;
|
|
19
22
|
this.override = override;
|
|
@@ -106,6 +109,8 @@ export class TypeDiscriminatorProperty extends Property {
|
|
|
106
109
|
}
|
|
107
110
|
(function (TypeDiscriminatorProperty) {
|
|
108
111
|
class Type {
|
|
112
|
+
mutable;
|
|
113
|
+
values;
|
|
109
114
|
constructor({ mutable, values, }) {
|
|
110
115
|
this.mutable = mutable;
|
|
111
116
|
this.values = values;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Maybe } from "purify-ts";
|
|
2
|
+
import { type VariableStatementStructure } from "ts-morph";
|
|
3
|
+
import type { ObjectType } from "../ObjectType.js";
|
|
4
|
+
export declare function fromRdfTypeVariableDeclaration(this: ObjectType): Maybe<VariableStatementStructure>;
|
|
5
|
+
//# sourceMappingURL=fromRdfTypeVariableStatement.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Maybe } from "purify-ts";
|
|
2
|
+
import { StructureKind } from "ts-morph";
|
|
3
|
+
export function fromRdfTypeVariableDeclaration() {
|
|
4
|
+
if (!this.features.has("fromRdf")) {
|
|
5
|
+
return Maybe.empty();
|
|
6
|
+
}
|
|
7
|
+
if (this.extern) {
|
|
8
|
+
return Maybe.empty();
|
|
9
|
+
}
|
|
10
|
+
if (this.fromRdfType.isNothing()) {
|
|
11
|
+
return Maybe.empty();
|
|
12
|
+
}
|
|
13
|
+
return Maybe.of({
|
|
14
|
+
kind: StructureKind.VariableStatement,
|
|
15
|
+
declarations: [
|
|
16
|
+
{
|
|
17
|
+
name: "fromRdfType",
|
|
18
|
+
initializer: this.rdfjsTermExpression(this.fromRdfType.unsafeCoerce()),
|
|
19
|
+
type: "rdfjs.NamedNode<string>",
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
isExported: true,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=fromRdfTypeVariableStatement.js.map
|
|
@@ -3,6 +3,7 @@ export * from "./createFunctionDeclaration.js";
|
|
|
3
3
|
export * from "./equalsFunctionDeclaration.js";
|
|
4
4
|
export * from "./fromJsonFunctionDeclarations.js";
|
|
5
5
|
export * from "./fromRdfFunctionDeclarations.js";
|
|
6
|
+
export * from "./fromRdfTypeVariableStatement.js";
|
|
6
7
|
export * from "./hashFunctionDeclaration.js";
|
|
7
8
|
export * from "./IdentifierProperty.js";
|
|
8
9
|
export * from "./interfaceDeclaration.js";
|
|
@@ -3,6 +3,7 @@ export * from "./createFunctionDeclaration.js";
|
|
|
3
3
|
export * from "./equalsFunctionDeclaration.js";
|
|
4
4
|
export * from "./fromJsonFunctionDeclarations.js";
|
|
5
5
|
export * from "./fromRdfFunctionDeclarations.js";
|
|
6
|
+
export * from "./fromRdfTypeVariableStatement.js";
|
|
6
7
|
export * from "./hashFunctionDeclaration.js";
|
|
7
8
|
export * from "./IdentifierProperty.js";
|
|
8
9
|
export * from "./interfaceDeclaration.js";
|
|
@@ -28,10 +28,10 @@ export function toRdfFunctionOrMethodDeclaration() {
|
|
|
28
28
|
usedIgnoreRdfTypeVariable = !this.parentObjectTypes[0].abstract;
|
|
29
29
|
}
|
|
30
30
|
else if (this.identifierType.isNamedNodeKind) {
|
|
31
|
-
statements.push(`const ${variables.resource} = ${variables.resourceSet}.mutableNamedResource(
|
|
31
|
+
statements.push(`const ${variables.resource} = ${variables.resourceSet}.mutableNamedResource(${this.thisVariable}.${this.identifierProperty.name}, { ${variables.mutateGraph} });`);
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
|
-
statements.push(`const ${variables.resource} = ${variables.resourceSet}.mutableResource(
|
|
34
|
+
statements.push(`const ${variables.resource} = ${variables.resourceSet}.mutableResource(${this.thisVariable}.${this.identifierProperty.name}, { ${variables.mutateGraph} });`);
|
|
35
35
|
}
|
|
36
36
|
if (this.toRdfTypes.length > 0) {
|
|
37
37
|
statements.push(`if (!${variables.ignoreRdfType}) { ${this.toRdfTypes.map((toRdfType) => `${variables.resource}.add(${variables.resource}.dataFactory.namedNode("${rdf.type.value}"), ${variables.resource}.dataFactory.namedNode("${toRdfType.value}"));`).join(" ")} }`);
|
|
@@ -55,7 +55,7 @@ export function toRdfFunctionOrMethodDeclaration() {
|
|
|
55
55
|
}
|
|
56
56
|
parameters.push({
|
|
57
57
|
name: `{ ${usedIgnoreRdfTypeVariable ? `${variables.ignoreRdfType}, ` : ""}${variables.mutateGraph}, ${variables.resourceSet} }`,
|
|
58
|
-
type: `{ ${variables.ignoreRdfType}?: boolean; ${variables.mutateGraph}
|
|
58
|
+
type: `{ ${variables.ignoreRdfType}?: boolean; ${variables.mutateGraph}?: rdfjsResource.MutableResource.MutateGraph, ${variables.resourceSet}: rdfjsResource.MutableResourceSet }`,
|
|
59
59
|
});
|
|
60
60
|
return Maybe.of({
|
|
61
61
|
name: "toRdf",
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NamedNode } from "@rdfjs/types";
|
|
2
2
|
import { NodeShape as ShaclCoreNodeShape } from "@shaclmate/shacl-ast";
|
|
3
3
|
import { Maybe } from "purify-ts";
|
|
4
|
-
import type {
|
|
4
|
+
import type { IdentifierMintingStrategy, TsFeature, TsObjectDeclarationType } from "../enums/index.js";
|
|
5
5
|
import type { Shape } from "./Shape.js";
|
|
6
6
|
import type * as generated from "./generated.js";
|
|
7
7
|
import type { Ontology, PropertyGroup, PropertyShape, ShapesGraph } from "./index.js";
|
|
@@ -30,7 +30,7 @@ export declare class NodeShape extends ShaclCoreNodeShape<any, Ontology, Propert
|
|
|
30
30
|
get export(): Maybe<boolean>;
|
|
31
31
|
get extern(): Maybe<boolean>;
|
|
32
32
|
get fromRdfType(): Maybe<NamedNode>;
|
|
33
|
-
get
|
|
33
|
+
get identifierMintingStrategy(): Maybe<IdentifierMintingStrategy>;
|
|
34
34
|
get mutable(): Maybe<boolean>;
|
|
35
35
|
get nodeKinds(): Set<"BlankNode" | "NamedNode">;
|
|
36
36
|
get parentNodeShapes(): readonly NodeShape[];
|
|
@@ -2,6 +2,13 @@ import { NodeShape as ShaclCoreNodeShape } from "@shaclmate/shacl-ast";
|
|
|
2
2
|
import { Maybe } from "purify-ts";
|
|
3
3
|
import { tsFeatures } from "./tsFeatures.js";
|
|
4
4
|
export class NodeShape extends ShaclCoreNodeShape {
|
|
5
|
+
isClass;
|
|
6
|
+
isList;
|
|
7
|
+
ancestorClassIris;
|
|
8
|
+
childClassIris;
|
|
9
|
+
descendantClassIris;
|
|
10
|
+
generatedShaclmateNodeShape;
|
|
11
|
+
parentClassIris;
|
|
5
12
|
constructor({ ancestorClassIris, childClassIris, descendantClassIris, generatedShaclmateNodeShape, isClass, isList, parentClassIris, shapesGraph, }) {
|
|
6
13
|
super(generatedShaclmateNodeShape, shapesGraph);
|
|
7
14
|
this.ancestorClassIris = ancestorClassIris;
|
|
@@ -51,7 +58,7 @@ export class NodeShape extends ShaclCoreNodeShape {
|
|
|
51
58
|
}
|
|
52
59
|
return Maybe.empty();
|
|
53
60
|
}
|
|
54
|
-
get
|
|
61
|
+
get identifierMintingStrategy() {
|
|
55
62
|
const thisMintingStrategy = this._mintingStrategy;
|
|
56
63
|
if (thisMintingStrategy.isNothing()) {
|
|
57
64
|
for (const ancestorNodeShape of this.ancestorNodeShapes) {
|
|
@@ -150,11 +157,11 @@ export class NodeShape extends ShaclCoreNodeShape {
|
|
|
150
157
|
.tsObjectTypeDiscriminatorPropertyName;
|
|
151
158
|
}
|
|
152
159
|
get _mintingStrategy() {
|
|
153
|
-
return this.generatedShaclmateNodeShape.
|
|
160
|
+
return this.generatedShaclmateNodeShape.identifierMintingStrategy.map((iri) => {
|
|
154
161
|
switch (iri.value) {
|
|
155
|
-
case "http://minorg.github.io/shaclmate/ns#
|
|
162
|
+
case "http://minorg.github.io/shaclmate/ns#_IdentifierMintingStrategy_SHA256":
|
|
156
163
|
return "sha256";
|
|
157
|
-
case "http://minorg.github.io/shaclmate/ns#
|
|
164
|
+
case "http://minorg.github.io/shaclmate/ns#_IdentifierMintingStrategy_UUIDv4":
|
|
158
165
|
return "uuidv4";
|
|
159
166
|
default:
|
|
160
167
|
throw new RangeError(iri.value);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Ontology as OwlOntology } from "@shaclmate/shacl-ast";
|
|
2
2
|
import { tsFeatures } from "./tsFeatures.js";
|
|
3
3
|
export class Ontology extends OwlOntology {
|
|
4
|
+
generatedShaclmateOntology;
|
|
4
5
|
constructor(generatedShaclmateOntology) {
|
|
5
6
|
super(generatedShaclmateOntology);
|
|
6
7
|
this.generatedShaclmateOntology = generatedShaclmateOntology;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PropertyShape as ShaclCorePropertyShape } from "@shaclmate/shacl-ast";
|
|
2
2
|
import { Maybe } from "purify-ts";
|
|
3
3
|
export class PropertyShape extends ShaclCorePropertyShape {
|
|
4
|
+
generatedShaclmatePropertyShape;
|
|
4
5
|
constructor(generatedShaclmatePropertyShape, shapesGraph) {
|
|
5
6
|
super({ ...generatedShaclmatePropertyShape, uniqueLang: Maybe.empty() }, shapesGraph);
|
|
6
7
|
this.generatedShaclmatePropertyShape = generatedShaclmatePropertyShape;
|
|
@@ -96,6 +96,7 @@ export declare namespace ShaclCorePropertyShape {
|
|
|
96
96
|
uniqueLang: purify.Maybe<boolean>;
|
|
97
97
|
} & UnwrapR<ReturnType<typeof BaseShaclCoreShape.propertiesFromRdf>>>;
|
|
98
98
|
function fromRdf(parameters: Parameters<typeof ShaclCorePropertyShape.propertiesFromRdf>[0]): purify.Either<rdfjsResource.Resource.ValueError, ShaclCorePropertyShape>;
|
|
99
|
+
const fromRdfType: rdfjs.NamedNode<string>;
|
|
99
100
|
}
|
|
100
101
|
export interface ShaclmatePropertyShape extends ShaclCorePropertyShape {
|
|
101
102
|
readonly extern: purify.Maybe<boolean>;
|
|
@@ -120,6 +121,7 @@ export declare namespace ShaclmatePropertyShape {
|
|
|
120
121
|
visibility: purify.Maybe<rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_Visibility_Private" | "http://minorg.github.io/shaclmate/ns#_Visibility_Protected" | "http://minorg.github.io/shaclmate/ns#_Visibility_Public">>;
|
|
121
122
|
} & UnwrapR<ReturnType<typeof ShaclCorePropertyShape.propertiesFromRdf>>>;
|
|
122
123
|
function fromRdf(parameters: Parameters<typeof ShaclmatePropertyShape.propertiesFromRdf>[0]): purify.Either<rdfjsResource.Resource.ValueError, ShaclmatePropertyShape>;
|
|
124
|
+
const fromRdfType: rdfjs.NamedNode<string>;
|
|
123
125
|
}
|
|
124
126
|
export interface OwlOntology {
|
|
125
127
|
readonly identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
@@ -138,12 +140,13 @@ export declare namespace OwlOntology {
|
|
|
138
140
|
type: "OwlOntology" | "ShaclmateOntology";
|
|
139
141
|
}>;
|
|
140
142
|
function fromRdf(parameters: Parameters<typeof OwlOntology.propertiesFromRdf>[0]): purify.Either<rdfjsResource.Resource.ValueError, OwlOntology>;
|
|
143
|
+
const fromRdfType: rdfjs.NamedNode<string>;
|
|
141
144
|
}
|
|
142
145
|
export interface ShaclmateOntology extends OwlOntology {
|
|
143
146
|
readonly identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
144
147
|
readonly tsDataFactoryVariable: purify.Maybe<string>;
|
|
145
|
-
readonly tsFeatureExcludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">[];
|
|
146
|
-
readonly tsFeatureIncludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#
|
|
148
|
+
readonly tsFeatureExcludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">[];
|
|
149
|
+
readonly tsFeatureIncludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">[];
|
|
147
150
|
readonly tsImports: readonly string[];
|
|
148
151
|
readonly tsObjectDeclarationType: purify.Maybe<rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Class" | "http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Interface">>;
|
|
149
152
|
readonly tsObjectIdentifierPropertyName: purify.Maybe<string>;
|
|
@@ -159,8 +162,8 @@ export declare namespace ShaclmateOntology {
|
|
|
159
162
|
}): purify.Either<rdfjsResource.Resource.ValueError, {
|
|
160
163
|
identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
161
164
|
tsDataFactoryVariable: purify.Maybe<string>;
|
|
162
|
-
tsFeatureExcludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">[];
|
|
163
|
-
tsFeatureIncludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#
|
|
165
|
+
tsFeatureExcludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">[];
|
|
166
|
+
tsFeatureIncludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">[];
|
|
164
167
|
tsImports: readonly string[];
|
|
165
168
|
tsObjectDeclarationType: purify.Maybe<rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Class" | "http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Interface">>;
|
|
166
169
|
tsObjectIdentifierPropertyName: purify.Maybe<string>;
|
|
@@ -168,6 +171,7 @@ export declare namespace ShaclmateOntology {
|
|
|
168
171
|
type: "ShaclmateOntology";
|
|
169
172
|
} & UnwrapR<ReturnType<typeof OwlOntology.propertiesFromRdf>>>;
|
|
170
173
|
function fromRdf(parameters: Parameters<typeof ShaclmateOntology.propertiesFromRdf>[0]): purify.Either<rdfjsResource.Resource.ValueError, ShaclmateOntology>;
|
|
174
|
+
const fromRdfType: rdfjs.NamedNode<string>;
|
|
171
175
|
}
|
|
172
176
|
export interface ShaclCoreNodeShape extends BaseShaclCoreShape {
|
|
173
177
|
readonly closed: purify.Maybe<boolean>;
|
|
@@ -190,6 +194,7 @@ export declare namespace ShaclCoreNodeShape {
|
|
|
190
194
|
type: "ShaclCoreNodeShape" | "ShaclmateNodeShape";
|
|
191
195
|
} & UnwrapR<ReturnType<typeof BaseShaclCoreShape.propertiesFromRdf>>>;
|
|
192
196
|
function fromRdf(parameters: Parameters<typeof ShaclCoreNodeShape.propertiesFromRdf>[0]): purify.Either<rdfjsResource.Resource.ValueError, ShaclCoreNodeShape>;
|
|
197
|
+
const fromRdfType: rdfjs.NamedNode<string>;
|
|
193
198
|
}
|
|
194
199
|
export interface ShaclmateNodeShape extends ShaclCoreNodeShape {
|
|
195
200
|
readonly abstract: purify.Maybe<boolean>;
|
|
@@ -197,12 +202,12 @@ export interface ShaclmateNodeShape extends ShaclCoreNodeShape {
|
|
|
197
202
|
readonly extern: purify.Maybe<boolean>;
|
|
198
203
|
readonly fromRdfType: purify.Maybe<rdfjs.NamedNode>;
|
|
199
204
|
readonly identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
200
|
-
readonly
|
|
205
|
+
readonly identifierMintingStrategy: purify.Maybe<rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_IdentifierMintingStrategy_SHA256" | "http://minorg.github.io/shaclmate/ns#_IdentifierMintingStrategy_UUIDv4">>;
|
|
201
206
|
readonly mutable: purify.Maybe<boolean>;
|
|
202
207
|
readonly name: purify.Maybe<string>;
|
|
203
208
|
readonly toRdfTypes: readonly rdfjs.NamedNode[];
|
|
204
|
-
readonly tsFeatureExcludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">[];
|
|
205
|
-
readonly tsFeatureIncludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#
|
|
209
|
+
readonly tsFeatureExcludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">[];
|
|
210
|
+
readonly tsFeatureIncludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">[];
|
|
206
211
|
readonly tsImports: readonly string[];
|
|
207
212
|
readonly tsObjectDeclarationType: purify.Maybe<rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Class" | "http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Interface">>;
|
|
208
213
|
readonly tsObjectIdentifierPropertyName: purify.Maybe<string>;
|
|
@@ -221,12 +226,12 @@ export declare namespace ShaclmateNodeShape {
|
|
|
221
226
|
extern: purify.Maybe<boolean>;
|
|
222
227
|
fromRdfType: purify.Maybe<rdfjs.NamedNode>;
|
|
223
228
|
identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
224
|
-
|
|
229
|
+
identifierMintingStrategy: purify.Maybe<rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_IdentifierMintingStrategy_SHA256" | "http://minorg.github.io/shaclmate/ns#_IdentifierMintingStrategy_UUIDv4">>;
|
|
225
230
|
mutable: purify.Maybe<boolean>;
|
|
226
231
|
name: purify.Maybe<string>;
|
|
227
232
|
toRdfTypes: readonly rdfjs.NamedNode[];
|
|
228
|
-
tsFeatureExcludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">[];
|
|
229
|
-
tsFeatureIncludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#
|
|
233
|
+
tsFeatureExcludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">[];
|
|
234
|
+
tsFeatureIncludes: readonly rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">[];
|
|
230
235
|
tsImports: readonly string[];
|
|
231
236
|
tsObjectDeclarationType: purify.Maybe<rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Class" | "http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Interface">>;
|
|
232
237
|
tsObjectIdentifierPropertyName: purify.Maybe<string>;
|
|
@@ -234,6 +239,7 @@ export declare namespace ShaclmateNodeShape {
|
|
|
234
239
|
type: "ShaclmateNodeShape";
|
|
235
240
|
} & UnwrapR<ReturnType<typeof ShaclCoreNodeShape.propertiesFromRdf>>>;
|
|
236
241
|
function fromRdf(parameters: Parameters<typeof ShaclmateNodeShape.propertiesFromRdf>[0]): purify.Either<rdfjsResource.Resource.ValueError, ShaclmateNodeShape>;
|
|
242
|
+
const fromRdfType: rdfjs.NamedNode<string>;
|
|
237
243
|
}
|
|
238
244
|
export interface ShaclCorePropertyGroup {
|
|
239
245
|
readonly comments: readonly rdfjs.Literal[];
|
|
@@ -254,10 +260,11 @@ export declare namespace ShaclCorePropertyGroup {
|
|
|
254
260
|
type: "ShaclCorePropertyGroup";
|
|
255
261
|
}>;
|
|
256
262
|
function fromRdf(parameters: Parameters<typeof ShaclCorePropertyGroup.propertiesFromRdf>[0]): purify.Either<rdfjsResource.Resource.ValueError, ShaclCorePropertyGroup>;
|
|
263
|
+
const fromRdfType: rdfjs.NamedNode<string>;
|
|
257
264
|
}
|
|
258
265
|
export type ShaclCoreShape = ShaclCoreNodeShape | ShaclCorePropertyShape;
|
|
259
266
|
export declare namespace ShaclCoreShape {
|
|
260
|
-
function fromRdf(
|
|
267
|
+
function fromRdf({ ignoreRdfType, resource, ...context }: {
|
|
261
268
|
[_index: string]: any;
|
|
262
269
|
ignoreRdfType?: boolean;
|
|
263
270
|
resource: rdfjsResource.Resource;
|
|
@@ -265,7 +272,7 @@ export declare namespace ShaclCoreShape {
|
|
|
265
272
|
}
|
|
266
273
|
export type ShaclmateShape = ShaclmateNodeShape | ShaclCorePropertyShape;
|
|
267
274
|
export declare namespace ShaclmateShape {
|
|
268
|
-
function fromRdf(
|
|
275
|
+
function fromRdf({ ignoreRdfType, resource, ...context }: {
|
|
269
276
|
[_index: string]: any;
|
|
270
277
|
ignoreRdfType?: boolean;
|
|
271
278
|
resource: rdfjsResource.Resource;
|
|
@@ -625,6 +625,7 @@ export var ShaclCorePropertyShape;
|
|
|
625
625
|
return ShaclCorePropertyShape.propertiesFromRdf(parameters);
|
|
626
626
|
}
|
|
627
627
|
ShaclCorePropertyShape.fromRdf = fromRdf;
|
|
628
|
+
ShaclCorePropertyShape.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape");
|
|
628
629
|
})(ShaclCorePropertyShape || (ShaclCorePropertyShape = {}));
|
|
629
630
|
export var ShaclmatePropertyShape;
|
|
630
631
|
(function (ShaclmatePropertyShape) {
|
|
@@ -718,6 +719,7 @@ export var ShaclmatePropertyShape;
|
|
|
718
719
|
return ShaclmatePropertyShape.propertiesFromRdf(parameters);
|
|
719
720
|
}
|
|
720
721
|
ShaclmatePropertyShape.fromRdf = fromRdf;
|
|
722
|
+
ShaclmatePropertyShape.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape");
|
|
721
723
|
})(ShaclmatePropertyShape || (ShaclmatePropertyShape = {}));
|
|
722
724
|
export var OwlOntology;
|
|
723
725
|
(function (OwlOntology) {
|
|
@@ -766,6 +768,7 @@ export var OwlOntology;
|
|
|
766
768
|
return OwlOntology.propertiesFromRdf(parameters);
|
|
767
769
|
}
|
|
768
770
|
OwlOntology.fromRdf = fromRdf;
|
|
771
|
+
OwlOntology.fromRdfType = dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology");
|
|
769
772
|
})(OwlOntology || (OwlOntology = {}));
|
|
770
773
|
export var ShaclmateOntology;
|
|
771
774
|
(function (ShaclmateOntology) {
|
|
@@ -808,6 +811,8 @@ export var ShaclmateOntology;
|
|
|
808
811
|
.head()
|
|
809
812
|
.chain((_value) => _value.toIri().chain((iri) => {
|
|
810
813
|
switch (iri.value) {
|
|
814
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_All":
|
|
815
|
+
return purify.Either.of(iri);
|
|
811
816
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Create":
|
|
812
817
|
return purify.Either.of(iri);
|
|
813
818
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals":
|
|
@@ -824,6 +829,8 @@ export var ShaclmateOntology;
|
|
|
824
829
|
return purify.Either.of(iri);
|
|
825
830
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema":
|
|
826
831
|
return purify.Either.of(iri);
|
|
832
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_None":
|
|
833
|
+
return purify.Either.of(iri);
|
|
827
834
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf":
|
|
828
835
|
return purify.Either.of(iri);
|
|
829
836
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql":
|
|
@@ -835,7 +842,7 @@ export var ShaclmateOntology;
|
|
|
835
842
|
default:
|
|
836
843
|
return purify.Left(new rdfjsResource.Resource.MistypedValueError({
|
|
837
844
|
actualValue: iri,
|
|
838
|
-
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">',
|
|
845
|
+
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">',
|
|
839
846
|
focusResource: _resource,
|
|
840
847
|
predicate: dataFactory.namedNode("http://minorg.github.io/shaclmate/ns#tsFeatureExclude"),
|
|
841
848
|
}));
|
|
@@ -856,6 +863,8 @@ export var ShaclmateOntology;
|
|
|
856
863
|
.head()
|
|
857
864
|
.chain((_value) => _value.toIri().chain((iri) => {
|
|
858
865
|
switch (iri.value) {
|
|
866
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_All":
|
|
867
|
+
return purify.Either.of(iri);
|
|
859
868
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Create":
|
|
860
869
|
return purify.Either.of(iri);
|
|
861
870
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals":
|
|
@@ -864,14 +873,16 @@ export var ShaclmateOntology;
|
|
|
864
873
|
return purify.Either.of(iri);
|
|
865
874
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf":
|
|
866
875
|
return purify.Either.of(iri);
|
|
867
|
-
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Json":
|
|
868
|
-
return purify.Either.of(iri);
|
|
869
876
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash":
|
|
870
877
|
return purify.Either.of(iri);
|
|
878
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Json":
|
|
879
|
+
return purify.Either.of(iri);
|
|
871
880
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema":
|
|
872
881
|
return purify.Either.of(iri);
|
|
873
882
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema":
|
|
874
883
|
return purify.Either.of(iri);
|
|
884
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_None":
|
|
885
|
+
return purify.Either.of(iri);
|
|
875
886
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf":
|
|
876
887
|
return purify.Either.of(iri);
|
|
877
888
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql":
|
|
@@ -883,7 +894,7 @@ export var ShaclmateOntology;
|
|
|
883
894
|
default:
|
|
884
895
|
return purify.Left(new rdfjsResource.Resource.MistypedValueError({
|
|
885
896
|
actualValue: iri,
|
|
886
|
-
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#
|
|
897
|
+
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">',
|
|
887
898
|
focusResource: _resource,
|
|
888
899
|
predicate: dataFactory.namedNode("http://minorg.github.io/shaclmate/ns#tsFeatureInclude"),
|
|
889
900
|
}));
|
|
@@ -970,6 +981,7 @@ export var ShaclmateOntology;
|
|
|
970
981
|
return ShaclmateOntology.propertiesFromRdf(parameters);
|
|
971
982
|
}
|
|
972
983
|
ShaclmateOntology.fromRdf = fromRdf;
|
|
984
|
+
ShaclmateOntology.fromRdfType = dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology");
|
|
973
985
|
})(ShaclmateOntology || (ShaclmateOntology = {}));
|
|
974
986
|
export var ShaclCoreNodeShape;
|
|
975
987
|
(function (ShaclCoreNodeShape) {
|
|
@@ -1052,6 +1064,7 @@ export var ShaclCoreNodeShape;
|
|
|
1052
1064
|
return ShaclCoreNodeShape.propertiesFromRdf(parameters);
|
|
1053
1065
|
}
|
|
1054
1066
|
ShaclCoreNodeShape.fromRdf = fromRdf;
|
|
1067
|
+
ShaclCoreNodeShape.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape");
|
|
1055
1068
|
})(ShaclCoreNodeShape || (ShaclCoreNodeShape = {}));
|
|
1056
1069
|
export var ShaclmateNodeShape;
|
|
1057
1070
|
(function (ShaclmateNodeShape) {
|
|
@@ -1113,29 +1126,29 @@ export var ShaclmateNodeShape;
|
|
|
1113
1126
|
}
|
|
1114
1127
|
const fromRdfType = _fromRdfTypeEither.unsafeCoerce();
|
|
1115
1128
|
const identifier = _resource.identifier;
|
|
1116
|
-
const
|
|
1117
|
-
.values(dataFactory.namedNode("http://minorg.github.io/shaclmate/ns#
|
|
1129
|
+
const _identifierMintingStrategyEither = purify.Either.of(_resource
|
|
1130
|
+
.values(dataFactory.namedNode("http://minorg.github.io/shaclmate/ns#identifierMintingStrategy"), { unique: true })
|
|
1118
1131
|
.head()
|
|
1119
1132
|
.chain((_value) => _value.toIri().chain((iri) => {
|
|
1120
1133
|
switch (iri.value) {
|
|
1121
|
-
case "http://minorg.github.io/shaclmate/ns#
|
|
1134
|
+
case "http://minorg.github.io/shaclmate/ns#_IdentifierMintingStrategy_SHA256":
|
|
1122
1135
|
return purify.Either.of(iri);
|
|
1123
|
-
case "http://minorg.github.io/shaclmate/ns#
|
|
1136
|
+
case "http://minorg.github.io/shaclmate/ns#_IdentifierMintingStrategy_UUIDv4":
|
|
1124
1137
|
return purify.Either.of(iri);
|
|
1125
1138
|
default:
|
|
1126
1139
|
return purify.Left(new rdfjsResource.Resource.MistypedValueError({
|
|
1127
1140
|
actualValue: iri,
|
|
1128
|
-
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#
|
|
1141
|
+
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_IdentifierMintingStrategy_SHA256" | "http://minorg.github.io/shaclmate/ns#_IdentifierMintingStrategy_UUIDv4">',
|
|
1129
1142
|
focusResource: _resource,
|
|
1130
|
-
predicate: dataFactory.namedNode("http://minorg.github.io/shaclmate/ns#
|
|
1143
|
+
predicate: dataFactory.namedNode("http://minorg.github.io/shaclmate/ns#identifierMintingStrategy"),
|
|
1131
1144
|
}));
|
|
1132
1145
|
}
|
|
1133
1146
|
}))
|
|
1134
1147
|
.toMaybe());
|
|
1135
|
-
if (
|
|
1136
|
-
return
|
|
1148
|
+
if (_identifierMintingStrategyEither.isLeft()) {
|
|
1149
|
+
return _identifierMintingStrategyEither;
|
|
1137
1150
|
}
|
|
1138
|
-
const
|
|
1151
|
+
const identifierMintingStrategy = _identifierMintingStrategyEither.unsafeCoerce();
|
|
1139
1152
|
const _mutableEither = purify.Either.of(_resource
|
|
1140
1153
|
.values(dataFactory.namedNode("http://minorg.github.io/shaclmate/ns#mutable"), { unique: true })
|
|
1141
1154
|
.head()
|
|
@@ -1176,6 +1189,8 @@ export var ShaclmateNodeShape;
|
|
|
1176
1189
|
.head()
|
|
1177
1190
|
.chain((_value) => _value.toIri().chain((iri) => {
|
|
1178
1191
|
switch (iri.value) {
|
|
1192
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_All":
|
|
1193
|
+
return purify.Either.of(iri);
|
|
1179
1194
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Create":
|
|
1180
1195
|
return purify.Either.of(iri);
|
|
1181
1196
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals":
|
|
@@ -1192,6 +1207,8 @@ export var ShaclmateNodeShape;
|
|
|
1192
1207
|
return purify.Either.of(iri);
|
|
1193
1208
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema":
|
|
1194
1209
|
return purify.Either.of(iri);
|
|
1210
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_None":
|
|
1211
|
+
return purify.Either.of(iri);
|
|
1195
1212
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf":
|
|
1196
1213
|
return purify.Either.of(iri);
|
|
1197
1214
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql":
|
|
@@ -1203,7 +1220,7 @@ export var ShaclmateNodeShape;
|
|
|
1203
1220
|
default:
|
|
1204
1221
|
return purify.Left(new rdfjsResource.Resource.MistypedValueError({
|
|
1205
1222
|
actualValue: iri,
|
|
1206
|
-
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">',
|
|
1223
|
+
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">',
|
|
1207
1224
|
focusResource: _resource,
|
|
1208
1225
|
predicate: dataFactory.namedNode("http://minorg.github.io/shaclmate/ns#tsFeatureExclude"),
|
|
1209
1226
|
}));
|
|
@@ -1224,6 +1241,8 @@ export var ShaclmateNodeShape;
|
|
|
1224
1241
|
.head()
|
|
1225
1242
|
.chain((_value) => _value.toIri().chain((iri) => {
|
|
1226
1243
|
switch (iri.value) {
|
|
1244
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_All":
|
|
1245
|
+
return purify.Either.of(iri);
|
|
1227
1246
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Create":
|
|
1228
1247
|
return purify.Either.of(iri);
|
|
1229
1248
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals":
|
|
@@ -1232,14 +1251,16 @@ export var ShaclmateNodeShape;
|
|
|
1232
1251
|
return purify.Either.of(iri);
|
|
1233
1252
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf":
|
|
1234
1253
|
return purify.Either.of(iri);
|
|
1235
|
-
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Json":
|
|
1236
|
-
return purify.Either.of(iri);
|
|
1237
1254
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash":
|
|
1238
1255
|
return purify.Either.of(iri);
|
|
1256
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Json":
|
|
1257
|
+
return purify.Either.of(iri);
|
|
1239
1258
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema":
|
|
1240
1259
|
return purify.Either.of(iri);
|
|
1241
1260
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema":
|
|
1242
1261
|
return purify.Either.of(iri);
|
|
1262
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_None":
|
|
1263
|
+
return purify.Either.of(iri);
|
|
1243
1264
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf":
|
|
1244
1265
|
return purify.Either.of(iri);
|
|
1245
1266
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql":
|
|
@@ -1251,7 +1272,7 @@ export var ShaclmateNodeShape;
|
|
|
1251
1272
|
default:
|
|
1252
1273
|
return purify.Left(new rdfjsResource.Resource.MistypedValueError({
|
|
1253
1274
|
actualValue: iri,
|
|
1254
|
-
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#
|
|
1275
|
+
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">',
|
|
1255
1276
|
focusResource: _resource,
|
|
1256
1277
|
predicate: dataFactory.namedNode("http://minorg.github.io/shaclmate/ns#tsFeatureInclude"),
|
|
1257
1278
|
}));
|
|
@@ -1327,7 +1348,7 @@ export var ShaclmateNodeShape;
|
|
|
1327
1348
|
extern,
|
|
1328
1349
|
fromRdfType,
|
|
1329
1350
|
identifier,
|
|
1330
|
-
|
|
1351
|
+
identifierMintingStrategy,
|
|
1331
1352
|
mutable,
|
|
1332
1353
|
name,
|
|
1333
1354
|
toRdfTypes,
|
|
@@ -1345,6 +1366,7 @@ export var ShaclmateNodeShape;
|
|
|
1345
1366
|
return ShaclmateNodeShape.propertiesFromRdf(parameters);
|
|
1346
1367
|
}
|
|
1347
1368
|
ShaclmateNodeShape.fromRdf = fromRdf;
|
|
1369
|
+
ShaclmateNodeShape.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape");
|
|
1348
1370
|
})(ShaclmateNodeShape || (ShaclmateNodeShape = {}));
|
|
1349
1371
|
export var ShaclCorePropertyGroup;
|
|
1350
1372
|
(function (ShaclCorePropertyGroup) {
|
|
@@ -1418,18 +1440,25 @@ export var ShaclCorePropertyGroup;
|
|
|
1418
1440
|
return ShaclCorePropertyGroup.propertiesFromRdf(parameters);
|
|
1419
1441
|
}
|
|
1420
1442
|
ShaclCorePropertyGroup.fromRdf = fromRdf;
|
|
1443
|
+
ShaclCorePropertyGroup.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup");
|
|
1421
1444
|
})(ShaclCorePropertyGroup || (ShaclCorePropertyGroup = {}));
|
|
1422
1445
|
export var ShaclCoreShape;
|
|
1423
1446
|
(function (ShaclCoreShape) {
|
|
1424
|
-
function fromRdf(
|
|
1425
|
-
return ShaclCoreNodeShape.fromRdf(
|
|
1447
|
+
function fromRdf({ ignoreRdfType, resource, ...context }) {
|
|
1448
|
+
return ShaclCoreNodeShape.fromRdf({ ...context, resource }).altLazy(() => ShaclCorePropertyShape.fromRdf({
|
|
1449
|
+
...context,
|
|
1450
|
+
resource,
|
|
1451
|
+
}));
|
|
1426
1452
|
}
|
|
1427
1453
|
ShaclCoreShape.fromRdf = fromRdf;
|
|
1428
1454
|
})(ShaclCoreShape || (ShaclCoreShape = {}));
|
|
1429
1455
|
export var ShaclmateShape;
|
|
1430
1456
|
(function (ShaclmateShape) {
|
|
1431
|
-
function fromRdf(
|
|
1432
|
-
return ShaclmateNodeShape.fromRdf(
|
|
1457
|
+
function fromRdf({ ignoreRdfType, resource, ...context }) {
|
|
1458
|
+
return ShaclmateNodeShape.fromRdf({ ...context, resource }).altLazy(() => ShaclCorePropertyShape.fromRdf({
|
|
1459
|
+
...context,
|
|
1460
|
+
resource,
|
|
1461
|
+
}));
|
|
1433
1462
|
}
|
|
1434
1463
|
ShaclmateShape.fromRdf = fromRdf;
|
|
1435
1464
|
})(ShaclmateShape || (ShaclmateShape = {}));
|