@shaclmate/compiler 4.0.71 → 4.0.73

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.
@@ -1,3 +1,5 @@
1
+ import type PrefixMap from "@rdfjs/prefix-map/PrefixMap.js";
2
+ import type { DatasetCore } from "@rdfjs/types";
1
3
  import { AbstractShapesGraph } from "@shaclmate/shacl-ast";
2
4
  import type { Either } from "purify-ts";
3
5
  import type { Logger } from "ts-log";
@@ -11,6 +13,11 @@ export declare class ShapesGraph extends AbstractShapesGraph<generated.NodeShape
11
13
  readonly PropertyGroup: typeof generated.PropertyGroup;
12
14
  readonly PropertyShape: typeof generated.PropertyShape;
13
15
  };
16
+ static fromDataset(dataset: DatasetCore, options?: {
17
+ ignoreUndefinedShapes?: boolean;
18
+ prefixMap?: PrefixMap;
19
+ }): Either<Error, ShapesGraph>;
20
+ static fromShapes(...objects: readonly (generated.NodeShape | generated.Ontology | generated.PropertyGroup | generated.PropertyShape)[]): ShapesGraph;
14
21
  /**
15
22
  * Compile the shapes graph using the given generator and return the generator's output.
16
23
  */
@@ -18,7 +25,6 @@ export declare class ShapesGraph extends AbstractShapesGraph<generated.NodeShape
18
25
  generator: Generator;
19
26
  logger: Logger;
20
27
  }): Either<Error, string>;
21
- static builder(): ShapesGraph.Builder;
22
28
  /**
23
29
  * Transform the shapes graph to an AST.
24
30
  */
@@ -26,19 +32,4 @@ export declare class ShapesGraph extends AbstractShapesGraph<generated.NodeShape
26
32
  logger: Logger;
27
33
  }): Either<Error, Ast>;
28
34
  }
29
- export declare namespace ShapesGraph {
30
- class Builder extends AbstractShapesGraph.AbstractBuilder<generated.NodeShape, generated.Ontology, generated.PropertyGroup, generated.PropertyShape> {
31
- protected readonly typeFunctions: {
32
- readonly NodeShape: typeof generated.NodeShape;
33
- readonly Ontology: typeof generated.Ontology;
34
- readonly PropertyGroup: typeof generated.PropertyGroup;
35
- readonly PropertyShape: typeof generated.PropertyShape;
36
- };
37
- build(): ShapesGraph;
38
- nodeShape(parameters?: Parameters<typeof generated.NodeShape.createUnsafe>[0]): generated.NodeShape;
39
- ontology(parameters?: Parameters<typeof generated.Ontology.createUnsafe>[0]): generated.Ontology;
40
- propertyGroup(parameters?: Parameters<typeof generated.PropertyGroup.createUnsafe>[0]): generated.PropertyGroup;
41
- propertyShape(parameters: Parameters<typeof generated.PropertyShape.createUnsafe>[0]): generated.PropertyShape;
42
- }
43
- }
44
35
  //# sourceMappingURL=ShapesGraph.d.ts.map
@@ -2,23 +2,20 @@ import { AbstractShapesGraph } from "@shaclmate/shacl-ast";
2
2
  import { Compiler } from "../Compiler.js";
3
3
  import { ShapesGraphToAstTransformer } from "../ShapesGraphToAstTransformer.js";
4
4
  import * as generated from "./input.shaclmate.js";
5
- const typeFunctions = {
6
- NodeShape: generated.NodeShape,
7
- Ontology: generated.Ontology,
8
- PropertyGroup: generated.PropertyGroup,
9
- PropertyShape: generated.PropertyShape,
10
- };
11
5
  export class ShapesGraph extends AbstractShapesGraph {
12
6
  typeFunctions = typeFunctions;
7
+ static fromDataset(dataset, options) {
8
+ return AbstractShapesGraph._fromDataset(dataset, options, new ShapesGraph());
9
+ }
10
+ static fromShapes(...objects) {
11
+ return AbstractShapesGraph._fromShapes(new ShapesGraph(), ...objects);
12
+ }
13
13
  /**
14
14
  * Compile the shapes graph using the given generator and return the generator's output.
15
15
  */
16
16
  compile(parameters) {
17
17
  return new Compiler(parameters).compile(this);
18
18
  }
19
- static builder() {
20
- return new ShapesGraph.Builder();
21
- }
22
19
  /**
23
20
  * Transform the shapes graph to an AST.
24
21
  */
@@ -29,38 +26,10 @@ export class ShapesGraph extends AbstractShapesGraph {
29
26
  }).transform();
30
27
  }
31
28
  }
32
- (function (ShapesGraph) {
33
- class Builder extends AbstractShapesGraph.AbstractBuilder {
34
- typeFunctions = typeFunctions;
35
- build() {
36
- return new ShapesGraph({
37
- nodeShapesByIdentifier: this.nodeShapesByIdentifier,
38
- ontologiesByIdentifier: this.ontologiesByIdentifier,
39
- propertyGroupsByIdentifier: this.propertyGroupsByIdentifier,
40
- propertyShapesByIdentifier: this.propertyShapesByIdentifier,
41
- });
42
- }
43
- nodeShape(parameters) {
44
- const nodeShape = generated.NodeShape.createUnsafe(parameters);
45
- this.add(nodeShape);
46
- return nodeShape;
47
- }
48
- ontology(parameters) {
49
- const ontology = generated.Ontology.createUnsafe(parameters);
50
- this.add(ontology);
51
- return ontology;
52
- }
53
- propertyGroup(parameters) {
54
- const propertyGroup = generated.PropertyGroup.createUnsafe(parameters);
55
- this.add(propertyGroup);
56
- return propertyGroup;
57
- }
58
- propertyShape(parameters) {
59
- const propertyShape = generated.PropertyShape.createUnsafe(parameters);
60
- this.add(propertyShape);
61
- return propertyShape;
62
- }
63
- }
64
- ShapesGraph.Builder = Builder;
65
- })(ShapesGraph || (ShapesGraph = {}));
29
+ const typeFunctions = {
30
+ NodeShape: generated.NodeShape,
31
+ Ontology: generated.Ontology,
32
+ PropertyGroup: generated.PropertyGroup,
33
+ PropertyShape: generated.PropertyShape,
34
+ };
66
35
  //# sourceMappingURL=ShapesGraph.js.map
@@ -1,5 +1,5 @@
1
1
  import type { BlankNode, Literal, NamedNode, Quad_Graph, Variable } from "@rdfjs/types";
2
- import { PropertyPath as RdfxResourcePropertyPath, Resource, ResourceSet } from "@rdfx/resource";
2
+ import { PropertyPath as RdfxResourcePropertyPath, Resource } from "@rdfx/resource";
3
3
  import { NTriplesTerm } from "@rdfx/string";
4
4
  import { Either, Maybe } from "purify-ts";
5
5
  type $_FromRdfResourceFunction<T> = (resource: Resource, options: {
@@ -8,52 +8,6 @@ type $_FromRdfResourceFunction<T> = (resource: Resource, options: {
8
8
  ignoreRdfType: boolean;
9
9
  preferredLanguages: readonly string[] | undefined;
10
10
  }) => Either<Error, T>;
11
- export type $_ToRdfResourceFunction<IdentifierT extends Resource.Identifier, ObjectT extends {
12
- $identifier: () => IdentifierT;
13
- }> = (parameters: {
14
- graph: Exclude<Quad_Graph, Variable> | undefined;
15
- ignoreRdfType: boolean;
16
- object: ObjectT;
17
- resource: Resource<IdentifierT>;
18
- resourceSet: ResourceSet;
19
- }) => void;
20
- export type $EqualsResult = Either<$EqualsResult.Unequal, true>;
21
- export declare namespace $EqualsResult {
22
- const Equal: $EqualsResult;
23
- function fromBooleanEqualsResult(left: any, right: any, equalsResult: boolean | $EqualsResult): $EqualsResult;
24
- type Unequal = {
25
- readonly left: {
26
- readonly array: readonly any[];
27
- readonly element: any;
28
- readonly elementIndex: number;
29
- };
30
- readonly right: {
31
- readonly array: readonly any[];
32
- readonly unequals: readonly Unequal[];
33
- };
34
- readonly type: "array-element";
35
- } | {
36
- readonly left: readonly any[];
37
- readonly right: readonly any[];
38
- readonly type: "array-length";
39
- } | {
40
- readonly left: any;
41
- readonly right: any;
42
- readonly type: "boolean";
43
- } | {
44
- readonly right: any;
45
- readonly type: "left-null";
46
- } | {
47
- readonly left: any;
48
- readonly right: any;
49
- readonly propertyName: string;
50
- readonly propertyValuesUnequal: Unequal;
51
- readonly type: "property";
52
- } | {
53
- readonly left: any;
54
- readonly type: "right-null";
55
- };
56
- }
57
11
  export type $FromRdfResourceFunction<T> = (resource: Resource, options?: {
58
12
  context?: unknown;
59
13
  graph?: Exclude<Quad_Graph, Variable>;
@@ -75,7 +29,6 @@ export declare namespace $PropertyPath {
75
29
  const fromRdfResourceValues: $FromRdfResourceValuesFunction<$PropertyPath, object>;
76
30
  const schema: Readonly<object>;
77
31
  type Schema = typeof schema;
78
- const toRdfResource: $ToRdfResourceFunction<$PropertyPath>;
79
32
  const $toString: typeof RdfxResourcePropertyPath.toString;
80
33
  }
81
34
  export interface $ShaclPropertySchema<TypeSchemaT> {
@@ -83,18 +36,6 @@ export interface $ShaclPropertySchema<TypeSchemaT> {
83
36
  readonly path: $PropertyPath;
84
37
  readonly type: TypeSchemaT;
85
38
  }
86
- export type $ToRdfResourceFunction<ObjectT, IdentifierT extends Resource.Identifier = Resource.Identifier> = (object: ObjectT, options?: {
87
- graph?: Exclude<Quad_Graph, Variable>;
88
- ignoreRdfType?: boolean;
89
- resourceSet?: ResourceSet;
90
- }) => Resource<IdentifierT>;
91
- export type $ToRdfResourceValuesFunction<ValueT, ReturnT extends BlankNode | Literal | NamedNode = BlankNode | Literal | NamedNode> = (value: ValueT, options: {
92
- graph?: Exclude<Quad_Graph, Variable>;
93
- ignoreRdfType?: boolean;
94
- propertyPath: $PropertyPath;
95
- resource: Resource;
96
- resourceSet: ResourceSet;
97
- }) => ReturnT[];
98
39
  export type NodeShape = {
99
40
  readonly $identifier: () => NodeShape.Identifier;
100
41
  readonly $type: "NodeShape";
@@ -146,6 +87,8 @@ export type NodeShape = {
146
87
  readonly xone: Maybe<readonly (BlankNode | NamedNode)[]>;
147
88
  };
148
89
  export declare namespace NodeShape {
90
+ const _fromRdfResource: $_FromRdfResourceFunction<NodeShape>;
91
+ const $toString: (_nodeShape: NodeShape) => string;
149
92
  const create: (parameters?: {
150
93
  readonly $identifier?: (() => NodeShape.Identifier) | BlankNode | NamedNode | string;
151
94
  readonly and?: readonly (BlankNode | NamedNode | string | undefined)[] | Maybe<readonly (BlankNode | NamedNode)[]>;
@@ -180,7 +123,7 @@ export declare namespace NodeShape {
180
123
  readonly pattern?: string | Maybe<string>;
181
124
  readonly properties?: BlankNode | NamedNode | string | readonly (BlankNode | NamedNode | string | undefined)[];
182
125
  readonly rdfType?: string | NamedNode | Maybe<NamedNode>;
183
- readonly severity?: ("http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation") | Severity | Maybe<Severity>;
126
+ readonly severity?: Severity["value"] | Severity | Maybe<Severity>;
184
127
  readonly shaclmateName?: string | Maybe<string>;
185
128
  readonly subClassOf?: string | NamedNode | readonly (string | NamedNode)[];
186
129
  readonly targetClasses?: string | NamedNode | readonly (string | NamedNode)[];
@@ -226,7 +169,7 @@ export declare namespace NodeShape {
226
169
  readonly pattern?: string | Maybe<string>;
227
170
  readonly properties?: BlankNode | NamedNode | string | readonly (BlankNode | NamedNode | string | undefined)[];
228
171
  readonly rdfType?: string | NamedNode | Maybe<NamedNode>;
229
- readonly severity?: ("http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation") | Severity | Maybe<Severity>;
172
+ readonly severity?: Severity["value"] | Severity | Maybe<Severity>;
230
173
  readonly shaclmateName?: string | Maybe<string>;
231
174
  readonly subClassOf?: string | NamedNode | readonly (string | NamedNode)[];
232
175
  readonly targetClasses?: string | NamedNode | readonly (string | NamedNode)[];
@@ -238,7 +181,6 @@ export declare namespace NodeShape {
238
181
  readonly types?: string | NamedNode | readonly (string | NamedNode)[];
239
182
  readonly xone?: readonly (BlankNode | NamedNode | string | undefined)[] | Maybe<readonly (BlankNode | NamedNode)[]>;
240
183
  }): NodeShape;
241
- const _fromRdfResource: $_FromRdfResourceFunction<NodeShape>;
242
184
  const fromRdfResource: $FromRdfResourceFunction<NodeShape>;
243
185
  const fromRdfResourceValues: $FromRdfResourceValuesFunction<NodeShape, NodeShape.Schema>;
244
186
  type Identifier = BlankNode | NamedNode;
@@ -606,7 +548,8 @@ export declare namespace NodeShape {
606
548
  kind: "Option";
607
549
  readonly itemType: {
608
550
  kind: "Iri";
609
- in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Warning"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Violation">)[];
551
+ in: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation">[];
552
+ inValues: readonly ["http://www.w3.org/ns/shacl#Info", "http://www.w3.org/ns/shacl#Warning", "http://www.w3.org/ns/shacl#Violation"];
610
553
  };
611
554
  };
612
555
  };
@@ -718,9 +661,6 @@ export declare namespace NodeShape {
718
661
  readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#NodeShape">];
719
662
  };
720
663
  type Schema = typeof schema;
721
- const _toRdfResource: $_ToRdfResourceFunction<NodeShape.Identifier, NodeShape>;
722
- const toRdfResource: $ToRdfResourceFunction<NodeShape, Identifier>;
723
- const $toString: (_nodeShape: NodeShape) => string;
724
664
  const toStringRecord: (_nodeShape: NodeShape) => Record<string, string>;
725
665
  }
726
666
  export type Ontology = {
@@ -730,6 +670,8 @@ export type Ontology = {
730
670
  readonly label: Maybe<string>;
731
671
  };
732
672
  export declare namespace Ontology {
673
+ const _fromRdfResource: $_FromRdfResourceFunction<Ontology>;
674
+ const $toString: (_ontology: Ontology) => string;
733
675
  const create: (parameters?: {
734
676
  readonly $identifier?: (() => Ontology.Identifier) | BlankNode | NamedNode | string;
735
677
  readonly comment?: string | Maybe<string>;
@@ -740,7 +682,6 @@ export declare namespace Ontology {
740
682
  readonly comment?: string | Maybe<string>;
741
683
  readonly label?: string | Maybe<string>;
742
684
  }): Ontology;
743
- const _fromRdfResource: $_FromRdfResourceFunction<Ontology>;
744
685
  const fromRdfResource: $FromRdfResourceFunction<Ontology>;
745
686
  const fromRdfResourceValues: $FromRdfResourceValuesFunction<Ontology, Ontology.Schema>;
746
687
  type Identifier = BlankNode | NamedNode;
@@ -786,9 +727,6 @@ export declare namespace Ontology {
786
727
  readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/2002/07/owl#Ontology">];
787
728
  };
788
729
  type Schema = typeof schema;
789
- const _toRdfResource: $_ToRdfResourceFunction<Ontology.Identifier, Ontology>;
790
- const toRdfResource: $ToRdfResourceFunction<Ontology, Identifier>;
791
- const $toString: (_ontology: Ontology) => string;
792
730
  const toStringRecord: (_ontology: Ontology) => Record<string, string>;
793
731
  }
794
732
  export type PropertyGroup = {
@@ -798,6 +736,8 @@ export type PropertyGroup = {
798
736
  readonly label: Maybe<string>;
799
737
  };
800
738
  export declare namespace PropertyGroup {
739
+ const _fromRdfResource: $_FromRdfResourceFunction<PropertyGroup>;
740
+ const $toString: (_propertyGroup: PropertyGroup) => string;
801
741
  const create: (parameters?: {
802
742
  readonly $identifier?: (() => PropertyGroup.Identifier) | BlankNode | NamedNode | string;
803
743
  readonly comment?: string | Maybe<string>;
@@ -808,7 +748,6 @@ export declare namespace PropertyGroup {
808
748
  readonly comment?: string | Maybe<string>;
809
749
  readonly label?: string | Maybe<string>;
810
750
  }): PropertyGroup;
811
- const _fromRdfResource: $_FromRdfResourceFunction<PropertyGroup>;
812
751
  const fromRdfResource: $FromRdfResourceFunction<PropertyGroup>;
813
752
  const fromRdfResourceValues: $FromRdfResourceValuesFunction<PropertyGroup, PropertyGroup.Schema>;
814
753
  type Identifier = BlankNode | NamedNode;
@@ -854,9 +793,6 @@ export declare namespace PropertyGroup {
854
793
  readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyGroup">];
855
794
  };
856
795
  type Schema = typeof schema;
857
- const _toRdfResource: $_ToRdfResourceFunction<PropertyGroup.Identifier, PropertyGroup>;
858
- const toRdfResource: $ToRdfResourceFunction<PropertyGroup, Identifier>;
859
- const $toString: (_propertyGroup: PropertyGroup) => string;
860
796
  const toStringRecord: (_propertyGroup: PropertyGroup) => Record<string, string>;
861
797
  }
862
798
  export type PropertyShape = {
@@ -921,6 +857,8 @@ export type PropertyShape = {
921
857
  readonly xone: Maybe<readonly (BlankNode | NamedNode)[]>;
922
858
  };
923
859
  export declare namespace PropertyShape {
860
+ const _fromRdfResource: $_FromRdfResourceFunction<PropertyShape>;
861
+ const $toString: (_propertyShape: PropertyShape) => string;
924
862
  const create: (parameters: {
925
863
  readonly $identifier?: (() => PropertyShape.Identifier) | BlankNode | NamedNode | string;
926
864
  readonly and?: readonly (BlankNode | NamedNode | string | undefined)[] | Maybe<readonly (BlankNode | NamedNode)[]>;
@@ -966,7 +904,7 @@ export declare namespace PropertyShape {
966
904
  readonly qualifiedValueShape?: BlankNode | NamedNode | string | Maybe<BlankNode | NamedNode>;
967
905
  readonly qualifiedValueShapesDisjoint?: boolean | Maybe<boolean>;
968
906
  readonly resolve?: BlankNode | NamedNode | string | Maybe<BlankNode | NamedNode>;
969
- readonly severity?: ("http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation") | Severity | Maybe<Severity>;
907
+ readonly severity?: Severity["value"] | Severity | Maybe<Severity>;
970
908
  readonly shaclmateName?: string | Maybe<string>;
971
909
  readonly targetClasses?: string | NamedNode | readonly (string | NamedNode)[];
972
910
  readonly targetNodes?: (NamedNode | Literal) | readonly (NamedNode | Literal)[];
@@ -1020,7 +958,7 @@ export declare namespace PropertyShape {
1020
958
  readonly qualifiedValueShape?: BlankNode | NamedNode | string | Maybe<BlankNode | NamedNode>;
1021
959
  readonly qualifiedValueShapesDisjoint?: boolean | Maybe<boolean>;
1022
960
  readonly resolve?: BlankNode | NamedNode | string | Maybe<BlankNode | NamedNode>;
1023
- readonly severity?: ("http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation") | Severity | Maybe<Severity>;
961
+ readonly severity?: Severity["value"] | Severity | Maybe<Severity>;
1024
962
  readonly shaclmateName?: string | Maybe<string>;
1025
963
  readonly targetClasses?: string | NamedNode | readonly (string | NamedNode)[];
1026
964
  readonly targetNodes?: (NamedNode | Literal) | readonly (NamedNode | Literal)[];
@@ -1029,7 +967,6 @@ export declare namespace PropertyShape {
1029
967
  readonly uniqueLang?: boolean | Maybe<boolean>;
1030
968
  readonly xone?: readonly (BlankNode | NamedNode | string | undefined)[] | Maybe<readonly (BlankNode | NamedNode)[]>;
1031
969
  }): PropertyShape;
1032
- const _fromRdfResource: $_FromRdfResourceFunction<PropertyShape>;
1033
970
  const fromRdfResource: $FromRdfResourceFunction<PropertyShape>;
1034
971
  const fromRdfResourceValues: $FromRdfResourceValuesFunction<PropertyShape, PropertyShape.Schema>;
1035
972
  type Identifier = BlankNode | NamedNode;
@@ -1501,7 +1438,8 @@ export declare namespace PropertyShape {
1501
1438
  kind: "Option";
1502
1439
  readonly itemType: {
1503
1440
  kind: "Iri";
1504
- in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Warning"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Violation">)[];
1441
+ in: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation">[];
1442
+ inValues: readonly ["http://www.w3.org/ns/shacl#Info", "http://www.w3.org/ns/shacl#Warning", "http://www.w3.org/ns/shacl#Violation"];
1505
1443
  };
1506
1444
  };
1507
1445
  };
@@ -1583,12 +1521,16 @@ export declare namespace PropertyShape {
1583
1521
  readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#PropertyShape">];
1584
1522
  };
1585
1523
  type Schema = typeof schema;
1586
- const _toRdfResource: $_ToRdfResourceFunction<PropertyShape.Identifier, PropertyShape>;
1587
- const toRdfResource: $ToRdfResourceFunction<PropertyShape, Identifier>;
1588
- const $toString: (_propertyShape: PropertyShape) => string;
1589
1524
  const toStringRecord: (_propertyShape: PropertyShape) => Record<string, string>;
1590
1525
  }
1591
- export type Severity = NamedNode<"http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation">;
1526
+ export type Severity = NamedNode<(typeof Severity.schema)["inValues"][number]>;
1527
+ export declare namespace Severity {
1528
+ const schema: {
1529
+ kind: "Iri";
1530
+ in: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation">[];
1531
+ inValues: readonly ["http://www.w3.org/ns/shacl#Info", "http://www.w3.org/ns/shacl#Warning", "http://www.w3.org/ns/shacl#Violation"];
1532
+ };
1533
+ }
1592
1534
  export type ValidationReport = {
1593
1535
  readonly $identifier: () => ValidationReport.Identifier;
1594
1536
  readonly $type: "ValidationReport";
@@ -1597,6 +1539,8 @@ export type ValidationReport = {
1597
1539
  readonly shapesGraphWellFormed: Maybe<boolean>;
1598
1540
  };
1599
1541
  export declare namespace ValidationReport {
1542
+ const _fromRdfResource: $_FromRdfResourceFunction<ValidationReport>;
1543
+ const $toString: (_validationReport: ValidationReport) => string;
1600
1544
  const create: (parameters: {
1601
1545
  readonly $identifier?: (() => ValidationReport.Identifier) | BlankNode | NamedNode | string;
1602
1546
  readonly conforms: boolean;
@@ -1609,7 +1553,6 @@ export declare namespace ValidationReport {
1609
1553
  readonly results?: ValidationResult | readonly ValidationResult[];
1610
1554
  readonly shapesGraphWellFormed?: boolean | Maybe<boolean>;
1611
1555
  }): ValidationReport;
1612
- const _fromRdfResource: $_FromRdfResourceFunction<ValidationReport>;
1613
1556
  const fromRdfResource: $FromRdfResourceFunction<ValidationReport>;
1614
1557
  const fromRdfResourceValues: $FromRdfResourceValuesFunction<ValidationReport, ValidationReport.Schema>;
1615
1558
  type Identifier = BlankNode | NamedNode;
@@ -1698,7 +1641,8 @@ export declare namespace ValidationReport {
1698
1641
  readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#resultSeverity">;
1699
1642
  readonly type: {
1700
1643
  kind: "Iri";
1701
- in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Warning"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Violation">)[];
1644
+ in: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation">[];
1645
+ inValues: readonly ["http://www.w3.org/ns/shacl#Info", "http://www.w3.org/ns/shacl#Warning", "http://www.w3.org/ns/shacl#Violation"];
1702
1646
  };
1703
1647
  };
1704
1648
  readonly sourceConstraintComponent: {
@@ -1748,9 +1692,6 @@ export declare namespace ValidationReport {
1748
1692
  readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationReport">];
1749
1693
  };
1750
1694
  type Schema = typeof schema;
1751
- const _toRdfResource: $_ToRdfResourceFunction<ValidationReport.Identifier, ValidationReport>;
1752
- const toRdfResource: $ToRdfResourceFunction<ValidationReport, Identifier>;
1753
- const $toString: (_validationReport: ValidationReport) => string;
1754
1695
  const toStringRecord: (_validationReport: ValidationReport) => Record<string, string>;
1755
1696
  }
1756
1697
  export type ValidationResult = {
@@ -1766,13 +1707,15 @@ export type ValidationResult = {
1766
1707
  readonly value: Maybe<BlankNode | NamedNode | Literal>;
1767
1708
  };
1768
1709
  export declare namespace ValidationResult {
1710
+ const _fromRdfResource: $_FromRdfResourceFunction<ValidationResult>;
1711
+ const $toString: (_validationResult: ValidationResult) => string;
1769
1712
  const create: (parameters: {
1770
1713
  readonly $identifier?: (() => ValidationResult.Identifier) | BlankNode | NamedNode | string;
1771
1714
  readonly details?: (BlankNode | NamedNode | Literal) | readonly (BlankNode | NamedNode | Literal)[];
1772
1715
  readonly focusNode: BlankNode | NamedNode | Literal;
1773
1716
  readonly message?: string | Maybe<string>;
1774
1717
  readonly path?: $PropertyPath | Maybe<$PropertyPath>;
1775
- readonly severity: ("http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation") | Severity;
1718
+ readonly severity: Severity["value"] | Severity;
1776
1719
  readonly sourceConstraintComponent: string | NamedNode;
1777
1720
  readonly sourceShape?: BlankNode | NamedNode | string | Maybe<BlankNode | NamedNode>;
1778
1721
  readonly value?: (BlankNode | NamedNode | Literal) | Maybe<BlankNode | NamedNode | Literal>;
@@ -1783,12 +1726,11 @@ export declare namespace ValidationResult {
1783
1726
  readonly focusNode: BlankNode | NamedNode | Literal;
1784
1727
  readonly message?: string | Maybe<string>;
1785
1728
  readonly path?: $PropertyPath | Maybe<$PropertyPath>;
1786
- readonly severity: ("http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation") | Severity;
1729
+ readonly severity: Severity["value"] | Severity;
1787
1730
  readonly sourceConstraintComponent: string | NamedNode;
1788
1731
  readonly sourceShape?: BlankNode | NamedNode | string | Maybe<BlankNode | NamedNode>;
1789
1732
  readonly value?: (BlankNode | NamedNode | Literal) | Maybe<BlankNode | NamedNode | Literal>;
1790
1733
  }): ValidationResult;
1791
- const _fromRdfResource: $_FromRdfResourceFunction<ValidationResult>;
1792
1734
  const fromRdfResource: $FromRdfResourceFunction<ValidationResult>;
1793
1735
  const fromRdfResourceValues: $FromRdfResourceValuesFunction<ValidationResult, ValidationResult.Schema>;
1794
1736
  type Identifier = BlankNode | NamedNode;
@@ -1852,7 +1794,8 @@ export declare namespace ValidationResult {
1852
1794
  readonly path: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#resultSeverity">;
1853
1795
  readonly type: {
1854
1796
  kind: "Iri";
1855
- in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Warning"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Violation">)[];
1797
+ in: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation">[];
1798
+ inValues: readonly ["http://www.w3.org/ns/shacl#Info", "http://www.w3.org/ns/shacl#Warning", "http://www.w3.org/ns/shacl#Violation"];
1856
1799
  };
1857
1800
  };
1858
1801
  readonly sourceConstraintComponent: {
@@ -1887,9 +1830,6 @@ export declare namespace ValidationResult {
1887
1830
  readonly toRdfTypes: readonly [import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#ValidationResult">];
1888
1831
  };
1889
1832
  type Schema = typeof schema;
1890
- const _toRdfResource: $_ToRdfResourceFunction<ValidationResult.Identifier, ValidationResult>;
1891
- const toRdfResource: $ToRdfResourceFunction<ValidationResult, Identifier>;
1892
- const $toString: (_validationResult: ValidationResult) => string;
1893
1833
  const toStringRecord: (_validationResult: ValidationResult) => Record<string, string>;
1894
1834
  }
1895
1835
  export type Shape = NodeShape | PropertyShape;
@@ -2267,7 +2207,8 @@ export declare namespace Shape {
2267
2207
  kind: "Option";
2268
2208
  readonly itemType: {
2269
2209
  kind: "Iri";
2270
- in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Warning"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Violation">)[];
2210
+ in: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation">[];
2211
+ inValues: readonly ["http://www.w3.org/ns/shacl#Info", "http://www.w3.org/ns/shacl#Warning", "http://www.w3.org/ns/shacl#Violation"];
2271
2212
  };
2272
2213
  };
2273
2214
  };
@@ -2844,7 +2785,8 @@ export declare namespace Shape {
2844
2785
  kind: "Option";
2845
2786
  readonly itemType: {
2846
2787
  kind: "Iri";
2847
- in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Warning"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Violation">)[];
2788
+ in: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation">[];
2789
+ inValues: readonly ["http://www.w3.org/ns/shacl#Info", "http://www.w3.org/ns/shacl#Warning", "http://www.w3.org/ns/shacl#Violation"];
2848
2790
  };
2849
2791
  };
2850
2792
  };
@@ -3201,7 +3143,8 @@ export declare namespace Shape {
3201
3143
  kind: "Option";
3202
3144
  readonly itemType: {
3203
3145
  kind: "Iri";
3204
- in: (import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Warning"> | import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Violation">)[];
3146
+ in: import("@rdfx/data-factory/dist/NamedNode.js").NamedNode<"http://www.w3.org/ns/shacl#Info" | "http://www.w3.org/ns/shacl#Warning" | "http://www.w3.org/ns/shacl#Violation">[];
3147
+ inValues: readonly ["http://www.w3.org/ns/shacl#Info", "http://www.w3.org/ns/shacl#Warning", "http://www.w3.org/ns/shacl#Violation"];
3205
3148
  };
3206
3149
  };
3207
3150
  };
@@ -3271,18 +3214,9 @@ export declare namespace Shape {
3271
3214
  };
3272
3215
  };
3273
3216
  };
3274
- const toRdfResource: $ToRdfResourceFunction<Shape>;
3275
- const toRdfResourceValues: (value: Shape, _options: {
3276
- graph?: Exclude<Quad_Graph, Variable>;
3277
- ignoreRdfType?: boolean;
3278
- propertyPath: $PropertyPath;
3279
- resource: Resource;
3280
- resourceSet: ResourceSet;
3281
- }) => (BlankNode | NamedNode)[];
3282
3217
  }
3283
3218
  export type $Object = NodeShape | Ontology | PropertyGroup | PropertyShape | ValidationReport | ValidationResult;
3284
3219
  export declare namespace $Object {
3285
- const toRdfResource: $ToRdfResourceFunction<$Object>;
3286
3220
  function $toString(object: $Object): string;
3287
3221
  }
3288
3222
  export {};