@shaclmate/compiler 2.0.13 → 2.0.14
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.d.ts +15 -0
- package/Compiler.js +20 -0
- package/ShapesGraphToAstTransformer.d.ts +18 -23
- package/ShapesGraphToAstTransformer.js +21 -447
- package/_ShapesGraphToAstTransformer/NodeShapeAstType.d.ts +3 -0
- package/_ShapesGraphToAstTransformer/NodeShapeAstType.js +2 -0
- package/_ShapesGraphToAstTransformer/index.d.ts +10 -0
- package/_ShapesGraphToAstTransformer/index.js +10 -0
- package/_ShapesGraphToAstTransformer/pickLiteral.d.ts +4 -0
- package/_ShapesGraphToAstTransformer/pickLiteral.js +18 -0
- package/_ShapesGraphToAstTransformer/propertyShapeNodeKinds.d.ts +4 -0
- package/_ShapesGraphToAstTransformer/propertyShapeNodeKinds.js +26 -0
- package/_ShapesGraphToAstTransformer/shapeAstName.d.ts +5 -0
- package/_ShapesGraphToAstTransformer/shapeAstName.js +28 -0
- package/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.d.ts +6 -0
- package/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.js +165 -0
- package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstCompositeType.d.ts +13 -0
- package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstCompositeType.js +198 -0
- package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstIdentifierType.d.ts +12 -0
- package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstIdentifierType.js +29 -0
- package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstLiteralType.d.ts +12 -0
- package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstLiteralType.js +43 -0
- package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.d.ts +6 -0
- package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.js +31 -0
- package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstTermType.d.ts +14 -0
- package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstTermType.js +21 -0
- package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstType.d.ts +16 -0
- package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstType.js +58 -0
- package/ast/Ast.d.ts +5 -0
- package/ast/CompositeType.d.ts +13 -0
- package/ast/CompositeType.js +2 -0
- package/ast/IdentifierType.d.ts +3 -6
- package/ast/IntersectionType.d.ts +2 -2
- package/ast/ListType.d.ts +53 -0
- package/ast/ListType.js +2 -0
- package/ast/LiteralType.d.ts +4 -3
- package/ast/Name.d.ts +1 -0
- package/ast/ObjectCompositeType.d.ts +22 -0
- package/ast/ObjectCompositeType.js +2 -0
- package/ast/ObjectIntersectionType.d.ts +8 -0
- package/ast/ObjectIntersectionType.js +2 -0
- package/ast/ObjectType.d.ts +91 -19
- package/ast/ObjectType.js +26 -1
- package/ast/ObjectUnionType.d.ts +19 -0
- package/ast/ObjectUnionType.js +2 -0
- package/ast/PlaceholderType.d.ts +7 -0
- package/ast/PlaceholderType.js +2 -0
- package/ast/SetType.d.ts +1 -1
- package/ast/TermType.d.ts +11 -0
- package/ast/TermType.js +2 -0
- package/ast/Type.d.ts +11 -3
- package/ast/UnionType.d.ts +3 -3
- package/ast/index.d.ts +6 -3
- package/ast/index.js +6 -3
- package/enums/MintingStrategy.d.ts +5 -0
- package/enums/MintingStrategy.js +2 -0
- package/enums/PropertyVisibility.d.ts +2 -0
- package/enums/PropertyVisibility.js +2 -0
- package/enums/TsFeature.d.ts +5 -0
- package/enums/TsFeature.js +16 -0
- package/enums/TsObjectDeclarationType.d.ts +5 -0
- package/enums/TsObjectDeclarationType.js +2 -0
- package/enums/index.d.ts +5 -0
- package/enums/index.js +5 -0
- package/generators/Generator.d.ts +5 -0
- package/generators/Generator.js +2 -0
- package/generators/index.d.ts +2 -2
- package/generators/index.js +2 -2
- package/generators/json/AstJsonGenerator.d.ts +4 -5
- package/generators/json/AstJsonGenerator.js +31 -22
- package/generators/ts/BooleanType.d.ts +7 -3
- package/generators/ts/BooleanType.js +58 -4
- package/generators/ts/DateTimeType.d.ts +17 -0
- package/generators/ts/DateTimeType.js +58 -0
- package/generators/ts/DeclaredType.d.ts +17 -0
- package/generators/ts/DeclaredType.js +10 -0
- package/generators/ts/IdentifierType.d.ts +7 -17
- package/generators/ts/IdentifierType.js +69 -60
- package/generators/ts/Import.d.ts +18 -0
- package/generators/ts/Import.js +59 -0
- package/generators/ts/ListType.d.ts +18 -8
- package/generators/ts/ListType.js +197 -43
- package/generators/ts/LiteralType.d.ts +13 -11
- package/generators/ts/LiteralType.js +36 -51
- package/generators/ts/NumberType.d.ts +7 -3
- package/generators/ts/NumberType.js +55 -4
- package/generators/ts/ObjectType.d.ts +47 -25
- package/generators/ts/ObjectType.js +222 -49
- package/generators/ts/ObjectUnionType.d.ts +58 -0
- package/generators/ts/ObjectUnionType.js +481 -0
- package/generators/ts/OptionType.d.ts +12 -4
- package/generators/ts/OptionType.js +65 -16
- package/generators/ts/PrimitiveType.d.ts +15 -5
- package/generators/ts/PrimitiveType.js +20 -29
- package/generators/ts/SetType.d.ts +12 -4
- package/generators/ts/SetType.js +103 -29
- package/generators/ts/StringType.d.ts +8 -3
- package/generators/ts/StringType.js +57 -3
- package/generators/ts/TermType.d.ts +52 -0
- package/generators/ts/TermType.js +234 -0
- package/generators/ts/TsGenerator.d.ts +4 -12
- package/generators/ts/TsGenerator.js +44 -100
- package/generators/ts/Type.d.ts +107 -46
- package/generators/ts/Type.js +78 -61
- package/generators/ts/TypeFactory.d.ts +4 -5
- package/generators/ts/TypeFactory.js +212 -89
- package/generators/ts/UnionType.d.ts +19 -6
- package/generators/ts/UnionType.js +230 -120
- package/generators/ts/_ObjectType/IdentifierProperty.d.ts +27 -7
- package/generators/ts/_ObjectType/IdentifierProperty.js +143 -31
- package/generators/ts/_ObjectType/Property.d.ts +125 -9
- package/generators/ts/_ObjectType/Property.js +25 -3
- package/generators/ts/_ObjectType/ShaclProperty.d.ts +23 -5
- package/generators/ts/_ObjectType/ShaclProperty.js +100 -26
- package/generators/ts/_ObjectType/TypeDiscriminatorProperty.d.ts +24 -6
- package/generators/ts/_ObjectType/TypeDiscriminatorProperty.js +75 -13
- package/generators/ts/_ObjectType/classDeclaration.d.ts +2 -1
- package/generators/ts/_ObjectType/classDeclaration.js +79 -111
- package/generators/ts/_ObjectType/createFunctionDeclaration.d.ts +5 -0
- package/generators/ts/_ObjectType/createFunctionDeclaration.js +60 -0
- package/generators/ts/_ObjectType/equalsFunctionDeclaration.d.ts +2 -1
- package/generators/ts/_ObjectType/equalsFunctionDeclaration.js +12 -20
- package/generators/ts/_ObjectType/equalsFunctionOrMethodDeclaration.d.ts +11 -0
- package/generators/ts/_ObjectType/equalsFunctionOrMethodDeclaration.js +70 -0
- package/generators/ts/_ObjectType/fromJsonFunctionDeclarations.d.ts +4 -0
- package/generators/ts/_ObjectType/fromJsonFunctionDeclarations.js +78 -0
- package/generators/ts/_ObjectType/fromRdfFunctionDeclarations.d.ts +4 -0
- package/generators/ts/_ObjectType/fromRdfFunctionDeclarations.js +91 -0
- package/generators/ts/_ObjectType/hashFunctionDeclaration.d.ts +3 -3
- package/generators/ts/_ObjectType/hashFunctionDeclaration.js +11 -55
- package/generators/ts/_ObjectType/hashFunctionOrMethodDeclaration.d.ts +11 -0
- package/generators/ts/_ObjectType/hashFunctionOrMethodDeclaration.js +64 -0
- package/generators/ts/_ObjectType/index.d.ts +8 -2
- package/generators/ts/_ObjectType/index.js +8 -2
- package/generators/ts/_ObjectType/interfaceDeclaration.d.ts +3 -2
- package/generators/ts/_ObjectType/interfaceDeclaration.js +11 -2
- package/generators/ts/_ObjectType/jsonSchemaFunctionDeclaration.d.ts +5 -0
- package/generators/ts/_ObjectType/jsonSchemaFunctionDeclaration.js +19 -0
- package/generators/ts/_ObjectType/jsonUiSchemaFunctionDeclaration.d.ts +5 -0
- package/generators/ts/_ObjectType/jsonUiSchemaFunctionDeclaration.js +31 -0
- package/generators/ts/_ObjectType/jsonZodSchemaFunctionDeclaration.d.ts +5 -0
- package/generators/ts/_ObjectType/jsonZodSchemaFunctionDeclaration.js +37 -0
- package/generators/ts/_ObjectType/rdfjsTermExpression.d.ts +6 -0
- package/generators/ts/{rdfjsTermExpression.js → _ObjectType/rdfjsTermExpression.js} +3 -1
- package/generators/ts/_ObjectType/sparqlFunctionDeclarations.d.ts +4 -0
- package/generators/ts/_ObjectType/sparqlFunctionDeclarations.js +101 -0
- package/generators/ts/_ObjectType/toJsonFunctionDeclaration.d.ts +5 -0
- package/generators/ts/_ObjectType/toJsonFunctionDeclaration.js +19 -0
- package/generators/ts/_ObjectType/toJsonFunctionOrMethodDeclaration.d.ts +10 -0
- package/generators/ts/_ObjectType/toJsonFunctionOrMethodDeclaration.js +59 -0
- package/generators/ts/_ObjectType/toJsonReturnType.d.ts +3 -0
- package/generators/ts/_ObjectType/toJsonReturnType.js +19 -0
- package/generators/ts/_ObjectType/toRdfFunctionDeclaration.d.ts +3 -2
- package/generators/ts/_ObjectType/toRdfFunctionDeclaration.js +11 -45
- package/generators/ts/_ObjectType/toRdfFunctionOrMethodDeclaration.d.ts +10 -0
- package/generators/ts/_ObjectType/toRdfFunctionOrMethodDeclaration.js +67 -0
- package/generators/ts/objectInitializer.d.ts +2 -0
- package/generators/ts/objectInitializer.js +14 -0
- package/generators/ts/tsComment.d.ts +5 -0
- package/generators/ts/tsComment.js +11 -0
- package/generators/ts/tsName.d.ts +1 -1
- package/generators/ts/tsName.js +1 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/input/NodeShape.d.ts +46 -0
- package/input/NodeShape.js +165 -0
- package/input/Ontology.d.ts +13 -0
- package/input/Ontology.js +30 -0
- package/input/PropertyShape.d.ts +15 -0
- package/input/PropertyShape.js +34 -0
- package/input/Shape.d.ts +4 -0
- package/input/Shape.js +2 -0
- package/input/ShapesGraph.d.ts +9 -0
- package/input/ShapesGraph.js +50 -0
- package/input/ancestorClassIris.d.ts +4 -0
- package/input/ancestorClassIris.js +21 -0
- package/input/descendantClassIris.d.ts +4 -0
- package/input/descendantClassIris.js +21 -0
- package/input/generated.d.ts +274 -0
- package/input/generated.js +1420 -0
- package/input/index.d.ts +7 -0
- package/input/index.js +7 -0
- package/input/tsFeatures.d.ts +10 -0
- package/input/tsFeatures.js +42 -0
- package/package.json +14 -8
- package/ast/MintingStrategy.d.ts +0 -8
- package/ast/MintingStrategy.js +0 -9
- package/generators/ts/Configuration.d.ts +0 -29
- package/generators/ts/Configuration.js +0 -40
- package/generators/ts/IntersectionType.d.ts +0 -14
- package/generators/ts/IntersectionType.js +0 -26
- package/generators/ts/RdfjsTermType.d.ts +0 -25
- package/generators/ts/RdfjsTermType.js +0 -46
- package/generators/ts/_ObjectType/fromRdfFunctionDeclaration.d.ts +0 -4
- package/generators/ts/_ObjectType/fromRdfFunctionDeclaration.js +0 -72
- package/generators/ts/_ObjectType/sparqlGraphPatternsClassDeclaration.d.ts +0 -4
- package/generators/ts/_ObjectType/sparqlGraphPatternsClassDeclaration.js +0 -46
- package/generators/ts/rdfjsTermExpression.d.ts +0 -5
- package/vocabularies/dashDataset.d.ts +0 -3
- package/vocabularies/dashDataset.js +0 -2370
- package/vocabularies/index.d.ts +0 -2
- package/vocabularies/index.js +0 -2
- package/vocabularies/shaclmate.d.ts +0 -15
- package/vocabularies/shaclmate.js +0 -6
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Ontology as OwlOntology } from "@shaclmate/shacl-ast";
|
|
2
|
+
import type { Maybe } from "purify-ts";
|
|
3
|
+
import type { TsFeature, TsObjectDeclarationType } from "../enums/index.js";
|
|
4
|
+
import type * as generated from "./generated.js";
|
|
5
|
+
export declare class Ontology extends OwlOntology {
|
|
6
|
+
private readonly generatedShaclmateOntology;
|
|
7
|
+
constructor(generatedShaclmateOntology: generated.ShaclmateOntology);
|
|
8
|
+
get tsDataFactoryVariable(): Maybe<string>;
|
|
9
|
+
get tsFeatures(): Maybe<Set<TsFeature>>;
|
|
10
|
+
get tsImports(): readonly string[];
|
|
11
|
+
get tsObjectDeclarationType(): Maybe<TsObjectDeclarationType>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=Ontology.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Ontology as OwlOntology } from "@shaclmate/shacl-ast";
|
|
2
|
+
import { tsFeatures } from "./tsFeatures.js";
|
|
3
|
+
export class Ontology extends OwlOntology {
|
|
4
|
+
constructor(generatedShaclmateOntology) {
|
|
5
|
+
super(generatedShaclmateOntology);
|
|
6
|
+
this.generatedShaclmateOntology = generatedShaclmateOntology;
|
|
7
|
+
}
|
|
8
|
+
get tsDataFactoryVariable() {
|
|
9
|
+
return this.generatedShaclmateOntology.tsDataFactoryVariable;
|
|
10
|
+
}
|
|
11
|
+
get tsFeatures() {
|
|
12
|
+
return tsFeatures(this.generatedShaclmateOntology);
|
|
13
|
+
}
|
|
14
|
+
get tsImports() {
|
|
15
|
+
return this.generatedShaclmateOntology.tsImports;
|
|
16
|
+
}
|
|
17
|
+
get tsObjectDeclarationType() {
|
|
18
|
+
return this.generatedShaclmateOntology.tsObjectDeclarationType.map((iri) => {
|
|
19
|
+
switch (iri.value) {
|
|
20
|
+
case "http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Class":
|
|
21
|
+
return "class";
|
|
22
|
+
case "http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Interface":
|
|
23
|
+
return "interface";
|
|
24
|
+
default:
|
|
25
|
+
throw new RangeError(iri.value);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=Ontology.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PropertyShape as ShaclCorePropertyShape } from "@shaclmate/shacl-ast";
|
|
2
|
+
import { Maybe } from "purify-ts";
|
|
3
|
+
import type { PropertyVisibility } from "../enums/index.js";
|
|
4
|
+
import type { Shape } from "./Shape.js";
|
|
5
|
+
import type * as generated from "./generated.js";
|
|
6
|
+
import type { NodeShape, Ontology, PropertyGroup, ShapesGraph } from "./index.js";
|
|
7
|
+
export declare class PropertyShape extends ShaclCorePropertyShape<NodeShape, Ontology, PropertyGroup, any, Shape> {
|
|
8
|
+
private readonly generatedShaclmatePropertyShape;
|
|
9
|
+
constructor(generatedShaclmatePropertyShape: generated.ShaclmatePropertyShape, shapesGraph: ShapesGraph);
|
|
10
|
+
get extern(): Maybe<boolean>;
|
|
11
|
+
get mutable(): Maybe<boolean>;
|
|
12
|
+
get shaclmateName(): Maybe<string>;
|
|
13
|
+
get visibility(): PropertyVisibility;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=PropertyShape.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PropertyShape as ShaclCorePropertyShape } from "@shaclmate/shacl-ast";
|
|
2
|
+
import { Maybe } from "purify-ts";
|
|
3
|
+
export class PropertyShape extends ShaclCorePropertyShape {
|
|
4
|
+
constructor(generatedShaclmatePropertyShape, shapesGraph) {
|
|
5
|
+
super({ ...generatedShaclmatePropertyShape, uniqueLang: Maybe.empty() }, shapesGraph);
|
|
6
|
+
this.generatedShaclmatePropertyShape = generatedShaclmatePropertyShape;
|
|
7
|
+
}
|
|
8
|
+
get extern() {
|
|
9
|
+
return this.generatedShaclmatePropertyShape.extern;
|
|
10
|
+
}
|
|
11
|
+
get mutable() {
|
|
12
|
+
return this.generatedShaclmatePropertyShape.mutable;
|
|
13
|
+
}
|
|
14
|
+
get shaclmateName() {
|
|
15
|
+
return this.generatedShaclmatePropertyShape.name;
|
|
16
|
+
}
|
|
17
|
+
get visibility() {
|
|
18
|
+
return this.generatedShaclmatePropertyShape.visibility
|
|
19
|
+
.map((iri) => {
|
|
20
|
+
switch (iri.value) {
|
|
21
|
+
case "http://minorg.github.io/shaclmate/ns#_Visibility_Private":
|
|
22
|
+
return "private";
|
|
23
|
+
case "http://minorg.github.io/shaclmate/ns#_Visibility_Protected":
|
|
24
|
+
return "protected";
|
|
25
|
+
case "http://minorg.github.io/shaclmate/ns#_Visibility_Public":
|
|
26
|
+
return "public";
|
|
27
|
+
default:
|
|
28
|
+
throw new RangeError(iri.value);
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
.orDefault("public");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=PropertyShape.js.map
|
package/input/Shape.d.ts
ADDED
package/input/Shape.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DatasetCore } from "@rdfjs/types";
|
|
2
|
+
import { RdfjsShapesGraph } from "@shaclmate/shacl-ast";
|
|
3
|
+
import { NodeShape, Ontology, PropertyGroup, PropertyShape, type Shape } from "./index.js";
|
|
4
|
+
export declare class ShapesGraph extends RdfjsShapesGraph<NodeShape, Ontology, PropertyGroup, PropertyShape, Shape> {
|
|
5
|
+
constructor({ dataset }: {
|
|
6
|
+
dataset: DatasetCore;
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ShapesGraph.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { RdfjsShapesGraph } from "@shaclmate/shacl-ast";
|
|
2
|
+
import { owl, rdf, rdfs } from "@tpluscode/rdf-ns-builders";
|
|
3
|
+
import { ancestorClassIris } from "./ancestorClassIris.js";
|
|
4
|
+
import { descendantClassIris } from "./descendantClassIris.js";
|
|
5
|
+
import * as generated from "./generated.js";
|
|
6
|
+
import { NodeShape, Ontology, PropertyGroup, PropertyShape, } from "./index.js";
|
|
7
|
+
export class ShapesGraph extends RdfjsShapesGraph {
|
|
8
|
+
constructor({ dataset }) {
|
|
9
|
+
super({
|
|
10
|
+
dataset,
|
|
11
|
+
factory: {
|
|
12
|
+
nodeShapeFromRdf({ resource, shapesGraph, }) {
|
|
13
|
+
return generated.ShaclmateNodeShape.fromRdf({
|
|
14
|
+
ignoreRdfType: true,
|
|
15
|
+
resource,
|
|
16
|
+
}).map((generatedShape) => new NodeShape({
|
|
17
|
+
ancestorClassIris: ancestorClassIris(resource, Number.MAX_SAFE_INTEGER),
|
|
18
|
+
childClassIris: descendantClassIris(resource, 1),
|
|
19
|
+
descendantClassIris: descendantClassIris(resource, Number.MAX_SAFE_INTEGER),
|
|
20
|
+
generatedShaclmateNodeShape: generatedShape,
|
|
21
|
+
isClass: resource.isInstanceOf(owl.Class) ||
|
|
22
|
+
resource.isInstanceOf(rdfs.Class),
|
|
23
|
+
isList: resource.isSubClassOf(rdf.List),
|
|
24
|
+
parentClassIris: ancestorClassIris(resource, 1),
|
|
25
|
+
shapesGraph,
|
|
26
|
+
}));
|
|
27
|
+
},
|
|
28
|
+
ontologyFromRdf({ resource, }) {
|
|
29
|
+
return generated.ShaclmateOntology.fromRdf({
|
|
30
|
+
ignoreRdfType: true,
|
|
31
|
+
resource,
|
|
32
|
+
}).map((generatedOntology) => new Ontology(generatedOntology));
|
|
33
|
+
},
|
|
34
|
+
propertyGroupFromRdf({ resource, }) {
|
|
35
|
+
return generated.ShaclCorePropertyGroup.fromRdf({
|
|
36
|
+
ignoreRdfType: true,
|
|
37
|
+
resource,
|
|
38
|
+
}).map((generatedPropertyGroup) => new PropertyGroup(generatedPropertyGroup));
|
|
39
|
+
},
|
|
40
|
+
propertyShapeFromRdf({ resource, shapesGraph, }) {
|
|
41
|
+
return generated.ShaclmatePropertyShape.fromRdf({
|
|
42
|
+
ignoreRdfType: true,
|
|
43
|
+
resource,
|
|
44
|
+
}).map((generatedShape) => new PropertyShape(generatedShape, shapesGraph));
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=ShapesGraph.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import TermSet from "@rdfjs/term-set";
|
|
2
|
+
import { rdfs } from "@tpluscode/rdf-ns-builders";
|
|
3
|
+
export function ancestorClassIris(classResource, maxDepth) {
|
|
4
|
+
const ancestorClassIris = new TermSet();
|
|
5
|
+
function ancestorClassIrisRecursive(classResource, depth) {
|
|
6
|
+
for (const parentClassValue of classResource.values(rdfs.subClassOf)) {
|
|
7
|
+
parentClassValue.toNamedResource().ifRight((parentClassResource) => {
|
|
8
|
+
if (ancestorClassIris.has(parentClassResource.identifier)) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
ancestorClassIris.add(parentClassResource.identifier);
|
|
12
|
+
if (depth < maxDepth) {
|
|
13
|
+
ancestorClassIrisRecursive(parentClassResource, depth + 1);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
ancestorClassIrisRecursive(classResource, 1);
|
|
19
|
+
return [...ancestorClassIris];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=ancestorClassIris.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import TermSet from "@rdfjs/term-set";
|
|
2
|
+
import { rdfs } from "@tpluscode/rdf-ns-builders";
|
|
3
|
+
export function descendantClassIris(classResource, maxDepth) {
|
|
4
|
+
const descendantClassIris = new TermSet();
|
|
5
|
+
function descendantClassIrisRecursive(classResource, depth) {
|
|
6
|
+
for (const childClassValue of classResource.valuesOf(rdfs.subClassOf)) {
|
|
7
|
+
childClassValue.toNamedResource().ifRight((childClassResource) => {
|
|
8
|
+
if (descendantClassIris.has(childClassResource.identifier)) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
descendantClassIris.add(childClassResource.identifier);
|
|
12
|
+
if (depth < maxDepth) {
|
|
13
|
+
descendantClassIrisRecursive(childClassResource, depth + 1);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
descendantClassIrisRecursive(classResource, 1);
|
|
19
|
+
return [...descendantClassIris];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=descendantClassIris.js.map
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import type * as rdfjs from "@rdfjs/types";
|
|
2
|
+
import { PropertyPath } from "@shaclmate/shacl-ast/PropertyPath.js";
|
|
3
|
+
import * as purify from "purify-ts";
|
|
4
|
+
import type * as purifyHelpers from "purify-ts-helpers";
|
|
5
|
+
import * as rdfjsResource from "rdfjs-resource";
|
|
6
|
+
export interface BaseShaclCoreShape {
|
|
7
|
+
readonly and: readonly (readonly (rdfjs.BlankNode | rdfjs.NamedNode)[])[];
|
|
8
|
+
readonly classes: readonly rdfjs.NamedNode[];
|
|
9
|
+
readonly comments: readonly rdfjs.Literal[];
|
|
10
|
+
readonly datatype: purify.Maybe<rdfjs.NamedNode>;
|
|
11
|
+
readonly deactivated: purify.Maybe<boolean>;
|
|
12
|
+
readonly flags: readonly string[];
|
|
13
|
+
readonly hasValues: readonly (rdfjs.BlankNode | rdfjs.NamedNode | rdfjs.Literal)[];
|
|
14
|
+
readonly identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
15
|
+
readonly in_: purify.Maybe<readonly (rdfjs.BlankNode | rdfjs.NamedNode | rdfjs.Literal)[]>;
|
|
16
|
+
readonly isDefinedBy: purify.Maybe<rdfjs.BlankNode | rdfjs.NamedNode>;
|
|
17
|
+
readonly labels: readonly rdfjs.Literal[];
|
|
18
|
+
readonly languageIn: purify.Maybe<readonly string[]>;
|
|
19
|
+
readonly maxCount: purify.Maybe<number>;
|
|
20
|
+
readonly maxExclusive: purify.Maybe<rdfjs.Literal>;
|
|
21
|
+
readonly maxInclusive: purify.Maybe<rdfjs.Literal>;
|
|
22
|
+
readonly maxLength: purify.Maybe<number>;
|
|
23
|
+
readonly minCount: purify.Maybe<number>;
|
|
24
|
+
readonly minExclusive: purify.Maybe<rdfjs.Literal>;
|
|
25
|
+
readonly minInclusive: purify.Maybe<rdfjs.Literal>;
|
|
26
|
+
readonly minLength: purify.Maybe<number>;
|
|
27
|
+
readonly nodeKind: purify.Maybe<rdfjs.NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
|
|
28
|
+
readonly nodes: readonly (rdfjs.BlankNode | rdfjs.NamedNode)[];
|
|
29
|
+
readonly not: readonly (rdfjs.BlankNode | rdfjs.NamedNode)[];
|
|
30
|
+
readonly or: readonly (readonly (rdfjs.BlankNode | rdfjs.NamedNode)[])[];
|
|
31
|
+
readonly patterns: readonly string[];
|
|
32
|
+
readonly type: "ShaclCoreNodeShape" | "ShaclCorePropertyShape" | "ShaclmateNodeShape" | "ShaclmatePropertyShape";
|
|
33
|
+
readonly xone: readonly (readonly (rdfjs.BlankNode | rdfjs.NamedNode)[])[];
|
|
34
|
+
}
|
|
35
|
+
export declare namespace BaseShaclCoreShape {
|
|
36
|
+
function propertiesFromRdf({ ignoreRdfType: _ignoreRdfType, languageIn: _languageIn, resource: _resource, ..._context }: {
|
|
37
|
+
[_index: string]: any;
|
|
38
|
+
ignoreRdfType?: boolean;
|
|
39
|
+
languageIn?: readonly string[];
|
|
40
|
+
resource: rdfjsResource.Resource;
|
|
41
|
+
}): purify.Either<rdfjsResource.Resource.ValueError, {
|
|
42
|
+
and: readonly (readonly (rdfjs.BlankNode | rdfjs.NamedNode)[])[];
|
|
43
|
+
classes: readonly rdfjs.NamedNode[];
|
|
44
|
+
comments: readonly rdfjs.Literal[];
|
|
45
|
+
datatype: purify.Maybe<rdfjs.NamedNode>;
|
|
46
|
+
deactivated: purify.Maybe<boolean>;
|
|
47
|
+
flags: readonly string[];
|
|
48
|
+
hasValues: readonly (rdfjs.BlankNode | rdfjs.NamedNode | rdfjs.Literal)[];
|
|
49
|
+
identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
50
|
+
in_: purify.Maybe<readonly (rdfjs.BlankNode | rdfjs.NamedNode | rdfjs.Literal)[]>;
|
|
51
|
+
isDefinedBy: purify.Maybe<rdfjs.BlankNode | rdfjs.NamedNode>;
|
|
52
|
+
labels: readonly rdfjs.Literal[];
|
|
53
|
+
languageIn: purify.Maybe<readonly string[]>;
|
|
54
|
+
maxCount: purify.Maybe<number>;
|
|
55
|
+
maxExclusive: purify.Maybe<rdfjs.Literal>;
|
|
56
|
+
maxInclusive: purify.Maybe<rdfjs.Literal>;
|
|
57
|
+
maxLength: purify.Maybe<number>;
|
|
58
|
+
minCount: purify.Maybe<number>;
|
|
59
|
+
minExclusive: purify.Maybe<rdfjs.Literal>;
|
|
60
|
+
minInclusive: purify.Maybe<rdfjs.Literal>;
|
|
61
|
+
minLength: purify.Maybe<number>;
|
|
62
|
+
nodeKind: purify.Maybe<rdfjs.NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
|
|
63
|
+
nodes: readonly (rdfjs.BlankNode | rdfjs.NamedNode)[];
|
|
64
|
+
not: readonly (rdfjs.BlankNode | rdfjs.NamedNode)[];
|
|
65
|
+
or: readonly (readonly (rdfjs.BlankNode | rdfjs.NamedNode)[])[];
|
|
66
|
+
patterns: readonly string[];
|
|
67
|
+
xone: readonly (readonly (rdfjs.BlankNode | rdfjs.NamedNode)[])[];
|
|
68
|
+
}>;
|
|
69
|
+
}
|
|
70
|
+
export interface ShaclCorePropertyShape extends BaseShaclCoreShape {
|
|
71
|
+
readonly defaultValue: purify.Maybe<rdfjs.BlankNode | rdfjs.NamedNode | rdfjs.Literal>;
|
|
72
|
+
readonly descriptions: readonly rdfjs.Literal[];
|
|
73
|
+
readonly groups: readonly (rdfjs.BlankNode | rdfjs.NamedNode)[];
|
|
74
|
+
readonly identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
75
|
+
readonly names: readonly rdfjs.Literal[];
|
|
76
|
+
readonly order: purify.Maybe<number>;
|
|
77
|
+
readonly path: PropertyPath;
|
|
78
|
+
readonly type: "ShaclCorePropertyShape" | "ShaclmatePropertyShape";
|
|
79
|
+
readonly uniqueLang: purify.Maybe<boolean>;
|
|
80
|
+
}
|
|
81
|
+
export declare namespace ShaclCorePropertyShape {
|
|
82
|
+
function propertiesFromRdf({ ignoreRdfType: _ignoreRdfType, languageIn: _languageIn, resource: _resource, ..._context }: {
|
|
83
|
+
[_index: string]: any;
|
|
84
|
+
ignoreRdfType?: boolean;
|
|
85
|
+
languageIn?: readonly string[];
|
|
86
|
+
resource: rdfjsResource.Resource;
|
|
87
|
+
}): purify.Either<rdfjsResource.Resource.ValueError, {
|
|
88
|
+
defaultValue: purify.Maybe<rdfjs.BlankNode | rdfjs.NamedNode | rdfjs.Literal>;
|
|
89
|
+
descriptions: readonly rdfjs.Literal[];
|
|
90
|
+
groups: readonly (rdfjs.BlankNode | rdfjs.NamedNode)[];
|
|
91
|
+
identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
92
|
+
names: readonly rdfjs.Literal[];
|
|
93
|
+
order: purify.Maybe<number>;
|
|
94
|
+
path: PropertyPath;
|
|
95
|
+
type: "ShaclCorePropertyShape" | "ShaclmatePropertyShape";
|
|
96
|
+
uniqueLang: purify.Maybe<boolean>;
|
|
97
|
+
} & purifyHelpers.Eithers.UnwrapR<ReturnType<typeof BaseShaclCoreShape.propertiesFromRdf>>>;
|
|
98
|
+
function fromRdf(parameters: Parameters<typeof ShaclCorePropertyShape.propertiesFromRdf>[0]): purify.Either<rdfjsResource.Resource.ValueError, ShaclCorePropertyShape>;
|
|
99
|
+
}
|
|
100
|
+
export interface ShaclmatePropertyShape extends ShaclCorePropertyShape {
|
|
101
|
+
readonly extern: purify.Maybe<boolean>;
|
|
102
|
+
readonly identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
103
|
+
readonly mutable: purify.Maybe<boolean>;
|
|
104
|
+
readonly name: purify.Maybe<string>;
|
|
105
|
+
readonly type: "ShaclmatePropertyShape";
|
|
106
|
+
readonly 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">>;
|
|
107
|
+
}
|
|
108
|
+
export declare namespace ShaclmatePropertyShape {
|
|
109
|
+
function propertiesFromRdf({ ignoreRdfType: _ignoreRdfType, languageIn: _languageIn, resource: _resource, ..._context }: {
|
|
110
|
+
[_index: string]: any;
|
|
111
|
+
ignoreRdfType?: boolean;
|
|
112
|
+
languageIn?: readonly string[];
|
|
113
|
+
resource: rdfjsResource.Resource;
|
|
114
|
+
}): purify.Either<rdfjsResource.Resource.ValueError, {
|
|
115
|
+
extern: purify.Maybe<boolean>;
|
|
116
|
+
identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
117
|
+
mutable: purify.Maybe<boolean>;
|
|
118
|
+
name: purify.Maybe<string>;
|
|
119
|
+
type: "ShaclmatePropertyShape";
|
|
120
|
+
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
|
+
} & purifyHelpers.Eithers.UnwrapR<ReturnType<typeof ShaclCorePropertyShape.propertiesFromRdf>>>;
|
|
122
|
+
function fromRdf(parameters: Parameters<typeof ShaclmatePropertyShape.propertiesFromRdf>[0]): purify.Either<rdfjsResource.Resource.ValueError, ShaclmatePropertyShape>;
|
|
123
|
+
}
|
|
124
|
+
export interface OwlOntology {
|
|
125
|
+
readonly identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
126
|
+
readonly labels: readonly rdfjs.Literal[];
|
|
127
|
+
readonly type: "OwlOntology" | "ShaclmateOntology";
|
|
128
|
+
}
|
|
129
|
+
export declare namespace OwlOntology {
|
|
130
|
+
function propertiesFromRdf({ ignoreRdfType: _ignoreRdfType, languageIn: _languageIn, resource: _resource, ..._context }: {
|
|
131
|
+
[_index: string]: any;
|
|
132
|
+
ignoreRdfType?: boolean;
|
|
133
|
+
languageIn?: readonly string[];
|
|
134
|
+
resource: rdfjsResource.Resource;
|
|
135
|
+
}): purify.Either<rdfjsResource.Resource.ValueError, {
|
|
136
|
+
identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
137
|
+
labels: readonly rdfjs.Literal[];
|
|
138
|
+
type: "OwlOntology" | "ShaclmateOntology";
|
|
139
|
+
}>;
|
|
140
|
+
function fromRdf(parameters: Parameters<typeof OwlOntology.propertiesFromRdf>[0]): purify.Either<rdfjsResource.Resource.ValueError, OwlOntology>;
|
|
141
|
+
}
|
|
142
|
+
export interface ShaclmateOntology extends OwlOntology {
|
|
143
|
+
readonly identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
144
|
+
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_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "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#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "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
|
+
readonly tsImports: readonly string[];
|
|
148
|
+
readonly tsObjectDeclarationType: purify.Maybe<rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Class" | "http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Interface">>;
|
|
149
|
+
readonly tsObjectIdentifierPropertyName: purify.Maybe<string>;
|
|
150
|
+
readonly tsObjectTypeDiscriminatorPropertyName: purify.Maybe<string>;
|
|
151
|
+
readonly type: "ShaclmateOntology";
|
|
152
|
+
}
|
|
153
|
+
export declare namespace ShaclmateOntology {
|
|
154
|
+
function propertiesFromRdf({ ignoreRdfType: _ignoreRdfType, languageIn: _languageIn, resource: _resource, ..._context }: {
|
|
155
|
+
[_index: string]: any;
|
|
156
|
+
ignoreRdfType?: boolean;
|
|
157
|
+
languageIn?: readonly string[];
|
|
158
|
+
resource: rdfjsResource.Resource;
|
|
159
|
+
}): purify.Either<rdfjsResource.Resource.ValueError, {
|
|
160
|
+
identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
161
|
+
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_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "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#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "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
|
+
tsImports: readonly string[];
|
|
165
|
+
tsObjectDeclarationType: purify.Maybe<rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Class" | "http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Interface">>;
|
|
166
|
+
tsObjectIdentifierPropertyName: purify.Maybe<string>;
|
|
167
|
+
tsObjectTypeDiscriminatorPropertyName: purify.Maybe<string>;
|
|
168
|
+
type: "ShaclmateOntology";
|
|
169
|
+
} & purifyHelpers.Eithers.UnwrapR<ReturnType<typeof OwlOntology.propertiesFromRdf>>>;
|
|
170
|
+
function fromRdf(parameters: Parameters<typeof ShaclmateOntology.propertiesFromRdf>[0]): purify.Either<rdfjsResource.Resource.ValueError, ShaclmateOntology>;
|
|
171
|
+
}
|
|
172
|
+
export interface ShaclCoreNodeShape extends BaseShaclCoreShape {
|
|
173
|
+
readonly closed: purify.Maybe<boolean>;
|
|
174
|
+
readonly identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
175
|
+
readonly ignoredProperties: purify.Maybe<readonly rdfjs.NamedNode[]>;
|
|
176
|
+
readonly properties: readonly (rdfjs.BlankNode | rdfjs.NamedNode)[];
|
|
177
|
+
readonly type: "ShaclCoreNodeShape" | "ShaclmateNodeShape";
|
|
178
|
+
}
|
|
179
|
+
export declare namespace ShaclCoreNodeShape {
|
|
180
|
+
function propertiesFromRdf({ ignoreRdfType: _ignoreRdfType, languageIn: _languageIn, resource: _resource, ..._context }: {
|
|
181
|
+
[_index: string]: any;
|
|
182
|
+
ignoreRdfType?: boolean;
|
|
183
|
+
languageIn?: readonly string[];
|
|
184
|
+
resource: rdfjsResource.Resource;
|
|
185
|
+
}): purify.Either<rdfjsResource.Resource.ValueError, {
|
|
186
|
+
closed: purify.Maybe<boolean>;
|
|
187
|
+
identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
188
|
+
ignoredProperties: purify.Maybe<readonly rdfjs.NamedNode[]>;
|
|
189
|
+
properties: readonly (rdfjs.BlankNode | rdfjs.NamedNode)[];
|
|
190
|
+
type: "ShaclCoreNodeShape" | "ShaclmateNodeShape";
|
|
191
|
+
} & purifyHelpers.Eithers.UnwrapR<ReturnType<typeof BaseShaclCoreShape.propertiesFromRdf>>>;
|
|
192
|
+
function fromRdf(parameters: Parameters<typeof ShaclCoreNodeShape.propertiesFromRdf>[0]): purify.Either<rdfjsResource.Resource.ValueError, ShaclCoreNodeShape>;
|
|
193
|
+
}
|
|
194
|
+
export interface ShaclmateNodeShape extends ShaclCoreNodeShape {
|
|
195
|
+
readonly abstract: purify.Maybe<boolean>;
|
|
196
|
+
readonly export_: purify.Maybe<boolean>;
|
|
197
|
+
readonly extern: purify.Maybe<boolean>;
|
|
198
|
+
readonly fromRdfType: purify.Maybe<rdfjs.NamedNode>;
|
|
199
|
+
readonly identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
200
|
+
readonly mintingStrategy: purify.Maybe<rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_MintingStrategy_SHA256" | "http://minorg.github.io/shaclmate/ns#_MintingStrategy_UUIDv4">>;
|
|
201
|
+
readonly mutable: purify.Maybe<boolean>;
|
|
202
|
+
readonly name: purify.Maybe<string>;
|
|
203
|
+
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_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "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#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "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
|
+
readonly tsImports: readonly string[];
|
|
207
|
+
readonly tsObjectDeclarationType: purify.Maybe<rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Class" | "http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Interface">>;
|
|
208
|
+
readonly tsObjectIdentifierPropertyName: purify.Maybe<string>;
|
|
209
|
+
readonly tsObjectTypeDiscriminatorPropertyName: purify.Maybe<string>;
|
|
210
|
+
readonly type: "ShaclmateNodeShape";
|
|
211
|
+
}
|
|
212
|
+
export declare namespace ShaclmateNodeShape {
|
|
213
|
+
function propertiesFromRdf({ ignoreRdfType: _ignoreRdfType, languageIn: _languageIn, resource: _resource, ..._context }: {
|
|
214
|
+
[_index: string]: any;
|
|
215
|
+
ignoreRdfType?: boolean;
|
|
216
|
+
languageIn?: readonly string[];
|
|
217
|
+
resource: rdfjsResource.Resource;
|
|
218
|
+
}): purify.Either<rdfjsResource.Resource.ValueError, {
|
|
219
|
+
abstract: purify.Maybe<boolean>;
|
|
220
|
+
export_: purify.Maybe<boolean>;
|
|
221
|
+
extern: purify.Maybe<boolean>;
|
|
222
|
+
fromRdfType: purify.Maybe<rdfjs.NamedNode>;
|
|
223
|
+
identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
224
|
+
mintingStrategy: purify.Maybe<rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_MintingStrategy_SHA256" | "http://minorg.github.io/shaclmate/ns#_MintingStrategy_UUIDv4">>;
|
|
225
|
+
mutable: purify.Maybe<boolean>;
|
|
226
|
+
name: purify.Maybe<string>;
|
|
227
|
+
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_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "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#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "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
|
+
tsImports: readonly string[];
|
|
231
|
+
tsObjectDeclarationType: purify.Maybe<rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Class" | "http://minorg.github.io/shaclmate/ns#_TsObjectDeclarationType_Interface">>;
|
|
232
|
+
tsObjectIdentifierPropertyName: purify.Maybe<string>;
|
|
233
|
+
tsObjectTypeDiscriminatorPropertyName: purify.Maybe<string>;
|
|
234
|
+
type: "ShaclmateNodeShape";
|
|
235
|
+
} & purifyHelpers.Eithers.UnwrapR<ReturnType<typeof ShaclCoreNodeShape.propertiesFromRdf>>>;
|
|
236
|
+
function fromRdf(parameters: Parameters<typeof ShaclmateNodeShape.propertiesFromRdf>[0]): purify.Either<rdfjsResource.Resource.ValueError, ShaclmateNodeShape>;
|
|
237
|
+
}
|
|
238
|
+
export interface ShaclCorePropertyGroup {
|
|
239
|
+
readonly comments: readonly rdfjs.Literal[];
|
|
240
|
+
readonly identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
241
|
+
readonly labels: readonly rdfjs.Literal[];
|
|
242
|
+
readonly type: "ShaclCorePropertyGroup";
|
|
243
|
+
}
|
|
244
|
+
export declare namespace ShaclCorePropertyGroup {
|
|
245
|
+
function propertiesFromRdf({ ignoreRdfType: _ignoreRdfType, languageIn: _languageIn, resource: _resource, ..._context }: {
|
|
246
|
+
[_index: string]: any;
|
|
247
|
+
ignoreRdfType?: boolean;
|
|
248
|
+
languageIn?: readonly string[];
|
|
249
|
+
resource: rdfjsResource.Resource;
|
|
250
|
+
}): purify.Either<rdfjsResource.Resource.ValueError, {
|
|
251
|
+
comments: readonly rdfjs.Literal[];
|
|
252
|
+
identifier: rdfjs.BlankNode | rdfjs.NamedNode;
|
|
253
|
+
labels: readonly rdfjs.Literal[];
|
|
254
|
+
type: "ShaclCorePropertyGroup";
|
|
255
|
+
}>;
|
|
256
|
+
function fromRdf(parameters: Parameters<typeof ShaclCorePropertyGroup.propertiesFromRdf>[0]): purify.Either<rdfjsResource.Resource.ValueError, ShaclCorePropertyGroup>;
|
|
257
|
+
}
|
|
258
|
+
export type ShaclCoreShape = ShaclCoreNodeShape | ShaclCorePropertyShape;
|
|
259
|
+
export declare namespace ShaclCoreShape {
|
|
260
|
+
function fromRdf(parameters: {
|
|
261
|
+
[_index: string]: any;
|
|
262
|
+
ignoreRdfType?: boolean;
|
|
263
|
+
resource: rdfjsResource.Resource;
|
|
264
|
+
}): purify.Either<rdfjsResource.Resource.ValueError, ShaclCoreShape>;
|
|
265
|
+
}
|
|
266
|
+
export type ShaclmateShape = ShaclmateNodeShape | ShaclCorePropertyShape;
|
|
267
|
+
export declare namespace ShaclmateShape {
|
|
268
|
+
function fromRdf(parameters: {
|
|
269
|
+
[_index: string]: any;
|
|
270
|
+
ignoreRdfType?: boolean;
|
|
271
|
+
resource: rdfjsResource.Resource;
|
|
272
|
+
}): purify.Either<rdfjsResource.Resource.ValueError, ShaclmateShape>;
|
|
273
|
+
}
|
|
274
|
+
//# sourceMappingURL=generated.d.ts.map
|