@shaclmate/compiler 4.0.30 → 4.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generators/ts/AbstractTermType.js +2 -1
- package/dist/generators/ts/AbstractType.d.ts +1 -0
- package/dist/generators/ts/AbstractUnionType.d.ts +3 -0
- package/dist/generators/ts/AbstractUnionType.js +20 -9
- package/dist/generators/ts/ListType.js +1 -1
- package/dist/generators/ts/NamedObjectType.js +2 -3
- package/dist/generators/ts/NamedObjectUnionType.js +2 -2
- package/dist/generators/ts/Snippets.d.ts +5 -1
- package/dist/generators/ts/Snippets.js +35 -7
- package/dist/generators/ts/_NamedObjectType/AbstractProperty.d.ts +3 -3
- package/dist/generators/ts/_NamedObjectType/DiscriminantProperty.d.ts +2 -2
- package/dist/generators/ts/_NamedObjectType/DiscriminantProperty.js +15 -21
- package/dist/generators/ts/_NamedObjectType/IdentifierProperty.d.ts +1 -1
- package/dist/generators/ts/_NamedObjectType/IdentifierProperty.js +4 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromJsonFunctionDeclaration.js +22 -3
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceFunctionDeclaration.js +100 -7
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toRdfResourceFunctionDeclaration.js +14 -20
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toStringFunctionDeclarations.js +3 -3
- package/dist/generators/ts/_NamedObjectType/ShaclProperty.d.ts +1 -1
- package/dist/generators/ts/_NamedObjectType/ShaclProperty.js +4 -4
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.js +8 -2
- package/dist/generators/ts/_snippets/snippets__FromRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets__FromRdfResourceFunction.js +13 -0
- package/dist/generators/ts/_snippets/snippets__ToRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets__ToRdfResourceFunction.js +12 -0
- package/dist/generators/ts/_snippets/snippets_sequenceRecord.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_sequenceRecord.js +18 -0
- package/dist/generators/ts/_snippets/snippets_wrap_FromRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_wrap_FromRdfResourceFunction.js +10 -0
- package/dist/generators/ts/_snippets/snippets_wrap_ToRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_wrap_ToRdfResourceFunction.js +14 -0
- package/dist/input/generated.d.ts +34 -116
- package/dist/input/generated.js +1698 -2069
- package/package.json +2 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromJsonFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromJsonFunctionDeclaration.js +0 -38
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromRdfResourceFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromRdfResourceFunctionDeclaration.js +0 -98
- package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.js +0 -13
package/dist/generators/ts/_NamedObjectType/NamedObjectType_toRdfResourceFunctionDeclaration.js
CHANGED
|
@@ -1,45 +1,39 @@
|
|
|
1
1
|
import { rdf } from "@tpluscode/rdf-ns-builders";
|
|
2
2
|
import { Maybe } from "purify-ts";
|
|
3
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
4
3
|
import { code, joinCode } from "../ts-poet-wrapper.js";
|
|
5
4
|
export function NamedObjectType_toRdfResourceFunctionDeclaration() {
|
|
6
5
|
if (!this.features.has("rdf")) {
|
|
7
6
|
return Maybe.empty();
|
|
8
7
|
}
|
|
9
|
-
const statements =
|
|
10
|
-
code `const ${variables.resourceSet} = options?.${variables.resourceSet} ?? new ${this.reusables.imports.ResourceSet}({ dataFactory: ${this.reusables.imports.dataFactory}, dataset: ${this.reusables.imports.datasetFactory}.dataset() });`,
|
|
11
|
-
];
|
|
12
|
-
if (this.parentObjectTypes.length > 0) {
|
|
13
|
-
statements.push(code `const ${variables.resource} = ${this.parentObjectTypes[0].name}.toRdfResource(${this.thisVariable}, { ${variables.ignoreRdfType}: true, ${variables.graph}: options?.${variables.graph}, ${variables.resourceSet} });`);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
statements.push(code `const ${variables.resource} = ${variables.resourceSet}.resource(${this.thisVariable}.${syntheticNamePrefix}identifier());`);
|
|
17
|
-
}
|
|
8
|
+
const statements = this.parentObjectTypes.map((parentObjectType) => code `${parentObjectType.name}._toRdfResource({ ...parameters, ignoreRdfType: true });`);
|
|
18
9
|
if (this.toRdfTypes.length > 0) {
|
|
19
|
-
statements.push(code `if (
|
|
10
|
+
statements.push(code `if (!${variables.ignoreRdfType}) { ${joinCode(this.toRdfTypes.map((toRdfType) => code `${variables.resource}.add(${this.rdfjsTermExpression(rdf.type)}, ${this.reusables.imports.dataFactory}.namedNode("${toRdfType.value}"), ${variables.graph});`), { on: " " })} }`);
|
|
20
11
|
}
|
|
21
12
|
for (const property of this.properties) {
|
|
22
13
|
statements.push(...property.toRdfRdfResourceValuesStatements({
|
|
23
14
|
variables: {
|
|
24
|
-
graph:
|
|
15
|
+
graph: variables.graph,
|
|
25
16
|
resource: variables.resource,
|
|
26
17
|
resourceSet: variables.resourceSet,
|
|
27
18
|
value: property.accessExpression({
|
|
28
|
-
variables: { object:
|
|
19
|
+
variables: { object: variables.object },
|
|
29
20
|
}),
|
|
30
21
|
},
|
|
31
22
|
}));
|
|
32
23
|
}
|
|
33
24
|
statements.push(code `return ${variables.resource};`);
|
|
34
25
|
return Maybe.of(code `\
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
-
}
|
|
26
|
+
export const _toRdfResource: ${this.reusables.snippets._ToRdfResourceFunction}<${this.identifierTypeAlias}, ${this.name}> = (parameters) => {
|
|
27
|
+
${joinCode(statements)}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const toRdfResource = ${this.reusables.snippets.wrap_ToRdfResourceFunction}(_toRdfResource);`);
|
|
38
31
|
}
|
|
39
32
|
const variables = {
|
|
40
|
-
ignoreRdfType: code `ignoreRdfType`,
|
|
41
|
-
graph: code `graph`,
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
ignoreRdfType: code `parameters.ignoreRdfType`,
|
|
34
|
+
graph: code `parameters.graph`,
|
|
35
|
+
object: code `parameters.object`,
|
|
36
|
+
resource: code `parameters.resource`,
|
|
37
|
+
resourceSet: code `parameters.resourceSet`,
|
|
44
38
|
};
|
|
45
39
|
//# sourceMappingURL=NamedObjectType_toRdfResourceFunctionDeclaration.js.map
|
|
@@ -4,7 +4,7 @@ export function NamedObjectType_toStringFunctionDeclarations() {
|
|
|
4
4
|
const propertiesToStringRecordProperties = [];
|
|
5
5
|
if (this.parentObjectTypes.length > 0) {
|
|
6
6
|
for (const parentObjectType of this.parentObjectTypes) {
|
|
7
|
-
propertiesToStringRecordProperties.push(code `...${parentObjectType.name}.
|
|
7
|
+
propertiesToStringRecordProperties.push(code `...${parentObjectType.name}._propertiesToStrings(${this.thisVariable})`);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
for (const property of this.properties) {
|
|
@@ -25,14 +25,14 @@ export function NamedObjectType_toStringFunctionDeclarations() {
|
|
|
25
25
|
return [
|
|
26
26
|
// Use overloads to allow the function to be attached to an instance or used freestanding
|
|
27
27
|
code `\
|
|
28
|
-
export function
|
|
28
|
+
export function _propertiesToStrings(${this.thisVariable}: ${this.name}): Record<string, string> {
|
|
29
29
|
return ${propertiesToStringsReturnExpression};
|
|
30
30
|
}`,
|
|
31
31
|
code `\
|
|
32
32
|
export function ${syntheticNamePrefix}toString(this: ${this.name}): string;
|
|
33
33
|
export function ${syntheticNamePrefix}toString(${this.thisVariable}: ${this.name}): string;
|
|
34
34
|
export function ${syntheticNamePrefix}toString(this: ${this.name} | undefined, ${this.thisVariable}?: ${this.name}): string {
|
|
35
|
-
return ${toStringReturnExpression(code `
|
|
35
|
+
return ${toStringReturnExpression(code `_propertiesToStrings((${this.thisVariable} ?? this)!)`)};
|
|
36
36
|
}`,
|
|
37
37
|
];
|
|
38
38
|
}
|
|
@@ -36,7 +36,7 @@ export declare class ShaclProperty<TypeT extends Type> extends AbstractProperty<
|
|
|
36
36
|
type: Code;
|
|
37
37
|
};
|
|
38
38
|
constructorStatements({ variables, }: Parameters<AbstractProperty<TypeT>["constructorStatements"]>[0]): readonly Code[];
|
|
39
|
-
|
|
39
|
+
fromJsonExpression({ variables, }: Parameters<AbstractProperty<TypeT>["fromJsonExpression"]>[0]): Maybe<Code>;
|
|
40
40
|
fromRdfResourceValuesExpression({ variables, }: Parameters<AbstractProperty<TypeT>["fromRdfResourceValuesExpression"]>[0]): Maybe<Code>;
|
|
41
41
|
hashStatements(parameters: Parameters<AbstractProperty<TypeT>["hashStatements"]>[0]): readonly Code[];
|
|
42
42
|
jsonUiSchemaElement({ variables, }: Parameters<AbstractProperty<TypeT>["jsonUiSchemaElement"]>[0]): Maybe<Code>;
|
|
@@ -123,10 +123,10 @@ export class ShaclProperty extends AbstractProperty {
|
|
|
123
123
|
.concat(code `{ ${this.name} = (${variables.parameter}) satisfies never; }`), { on: " else " }));
|
|
124
124
|
return statements;
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
return
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
fromJsonExpression({ variables, }) {
|
|
127
|
+
return Maybe.of(this.type.fromJsonExpression({
|
|
128
|
+
variables: { value: code `${variables.jsonObject}["${this.name}"]` },
|
|
129
|
+
}));
|
|
130
130
|
}
|
|
131
131
|
fromRdfResourceValuesExpression({ variables, }) {
|
|
132
132
|
// Assume the property has the correct range and ignore the object's RDF type.
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
2
|
export const snippets_ToRdfResourceFunction = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}ToRdfResourceFunction`, code `\
|
|
3
|
-
export type ${syntheticNamePrefix}ToRdfResourceFunction<
|
|
4
|
-
|
|
3
|
+
export type ${syntheticNamePrefix}ToRdfResourceFunction<ObjectT, IdentifierT extends ${imports.Resource}.Identifier = ${imports.Resource}.Identifier> = (
|
|
4
|
+
object: ObjectT,
|
|
5
|
+
options?: {
|
|
6
|
+
graph?: Exclude<${imports.Quad_Graph}, ${imports.Variable}>;
|
|
7
|
+
ignoreRdfType?: boolean;
|
|
8
|
+
resourceSet?: ${imports.ResourceSet};
|
|
9
|
+
}
|
|
10
|
+
) => ${imports.Resource}<IdentifierT>;`);
|
|
5
11
|
//# sourceMappingURL=snippets_ToRdfResourceFunction.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets__FromRdfResourceFunction = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}_FromRdfResourceFunction`, code `\
|
|
3
|
+
type ${syntheticNamePrefix}_FromRdfResourceFunction<T> = (
|
|
4
|
+
resource: ${imports.Resource},
|
|
5
|
+
options: {
|
|
6
|
+
context: undefined | unknown;
|
|
7
|
+
graph: Exclude<${imports.Quad_Graph}, ${imports.Variable}> | undefined;
|
|
8
|
+
ignoreRdfType: boolean;
|
|
9
|
+
objectSet: ${syntheticNamePrefix}ObjectSet;
|
|
10
|
+
preferredLanguages: readonly string[] | undefined;
|
|
11
|
+
}
|
|
12
|
+
) => ${imports.Either}<Error, T>;`);
|
|
13
|
+
//# sourceMappingURL=snippets__FromRdfResourceFunction.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets__ToRdfResourceFunction = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}_ToRdfResourceFunction`, code `\
|
|
3
|
+
export type ${syntheticNamePrefix}_ToRdfResourceFunction<IdentifierT extends ${imports.Resource}.Identifier, ObjectT extends { ${syntheticNamePrefix}identifier: () => IdentifierT }> = (
|
|
4
|
+
parameters: {
|
|
5
|
+
graph: Exclude<${imports.Quad_Graph}, ${imports.Variable}> | undefined;
|
|
6
|
+
ignoreRdfType: boolean;
|
|
7
|
+
object: ObjectT
|
|
8
|
+
resource: ${imports.Resource}<IdentifierT>;
|
|
9
|
+
resourceSet: ${imports.ResourceSet};
|
|
10
|
+
}
|
|
11
|
+
) => void;`);
|
|
12
|
+
//# sourceMappingURL=snippets__ToRdfResourceFunction.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_sequenceRecord = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}sequenceRecord`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}sequenceRecord<T extends Record<string, unknown>>(
|
|
4
|
+
record: { [K in keyof T]: ${imports.Either}<Error, T[K]> }
|
|
5
|
+
): ${imports.Either}<Error, T> {
|
|
6
|
+
const result: { [K in keyof T]?: T[K] } = {};
|
|
7
|
+
|
|
8
|
+
for (const key of globalThis.Object.keys(record) as Array<keyof T>) {
|
|
9
|
+
const either = record[key];
|
|
10
|
+
if (either.isLeft()) {
|
|
11
|
+
return either as unknown as ${imports.Either}<Error, T>;
|
|
12
|
+
}
|
|
13
|
+
result[key] = either.extract() as T[typeof key];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return ${imports.Right}(result as T);
|
|
17
|
+
}`);
|
|
18
|
+
//# sourceMappingURL=snippets_sequenceRecord.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_wrap_FromRdfResourceFunction = ({ snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}wrap_FromRdfResourceFunction`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}wrap_FromRdfResourceFunction<T>(_fromRdfResourceFunction: ${snippets._FromRdfResourceFunction}<T>): ${snippets.FromRdfResourceFunction}<T> {
|
|
4
|
+
return (resource, options) => {
|
|
5
|
+
let { context, graph, ignoreRdfType = false, objectSet, preferredLanguages } = (options ?? {});
|
|
6
|
+
if (!objectSet) { objectSet = new ${syntheticNamePrefix}RdfjsDatasetObjectSet(resource.dataset); };
|
|
7
|
+
return _fromRdfResourceFunction(resource, { context, graph, ignoreRdfType, objectSet, preferredLanguages });
|
|
8
|
+
};
|
|
9
|
+
}`);
|
|
10
|
+
//# sourceMappingURL=snippets_wrap_FromRdfResourceFunction.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_wrap_ToRdfResourceFunction = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}wrap_ToRdfResourceFunction`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}wrap_ToRdfResourceFunction<IdentifierT extends ${imports.Resource}.Identifier, ObjectT extends { ${syntheticNamePrefix}identifier: () => IdentifierT }>(_toRdfResourceFunction: ${snippets._ToRdfResourceFunction}<IdentifierT, ObjectT>): ${snippets.ToRdfResourceFunction}<ObjectT, IdentifierT> {
|
|
4
|
+
return (object, options) => {
|
|
5
|
+
let { graph, ignoreRdfType = false, resourceSet } = (options ?? {});
|
|
6
|
+
if (!resourceSet) {
|
|
7
|
+
resourceSet = new ${imports.ResourceSet}({ dataFactory: ${imports.dataFactory}, dataset: ${imports.datasetFactory}.dataset() });
|
|
8
|
+
}
|
|
9
|
+
const resource = resourceSet.resource(object.${syntheticNamePrefix}identifier());
|
|
10
|
+
_toRdfResourceFunction({ graph, ignoreRdfType, object, resource, resourceSet });
|
|
11
|
+
return resource;
|
|
12
|
+
};
|
|
13
|
+
}`);
|
|
14
|
+
//# sourceMappingURL=snippets_wrap_ToRdfResourceFunction.js.map
|
|
@@ -2,6 +2,22 @@ import type { BlankNode, DatasetCore, Literal, NamedNode, Quad_Graph, Variable }
|
|
|
2
2
|
import { PropertyPath as RdfxResourcePropertyPath, Resource, ResourceSet } from "@rdfx/resource";
|
|
3
3
|
import { NTriplesTerm } from "@rdfx/string";
|
|
4
4
|
import { Either, Maybe } from "purify-ts";
|
|
5
|
+
type $_FromRdfResourceFunction<T> = (resource: Resource, options: {
|
|
6
|
+
context: undefined | unknown;
|
|
7
|
+
graph: Exclude<Quad_Graph, Variable> | undefined;
|
|
8
|
+
ignoreRdfType: boolean;
|
|
9
|
+
objectSet: $ObjectSet;
|
|
10
|
+
preferredLanguages: readonly string[] | undefined;
|
|
11
|
+
}) => Either<Error, T>;
|
|
12
|
+
export type $_ToRdfResourceFunction<IdentifierT extends Resource.Identifier, ObjectT extends {
|
|
13
|
+
$identifier: () => IdentifierT;
|
|
14
|
+
}> = (parameters: {
|
|
15
|
+
graph: Exclude<Quad_Graph, Variable> | undefined;
|
|
16
|
+
ignoreRdfType: boolean;
|
|
17
|
+
object: ObjectT;
|
|
18
|
+
resource: Resource<IdentifierT>;
|
|
19
|
+
resourceSet: ResourceSet;
|
|
20
|
+
}) => void;
|
|
5
21
|
interface $BooleanFilter {
|
|
6
22
|
readonly value?: boolean;
|
|
7
23
|
}
|
|
@@ -80,13 +96,6 @@ interface $NumericFilter<T> {
|
|
|
80
96
|
readonly minExclusive?: T;
|
|
81
97
|
readonly minInclusive?: T;
|
|
82
98
|
}
|
|
83
|
-
type $PropertiesFromRdfResourceFunction<T> = (resource: Resource, options: {
|
|
84
|
-
context: undefined | unknown;
|
|
85
|
-
graph: Exclude<Quad_Graph, Variable> | undefined;
|
|
86
|
-
ignoreRdfType: boolean;
|
|
87
|
-
objectSet: $ObjectSet;
|
|
88
|
-
preferredLanguages?: readonly string[];
|
|
89
|
-
}) => Either<Error, T>;
|
|
90
99
|
export type $PropertyPath = RdfxResourcePropertyPath;
|
|
91
100
|
export declare namespace $PropertyPath {
|
|
92
101
|
type Filter = object;
|
|
@@ -113,11 +122,11 @@ interface $TermFilter {
|
|
|
113
122
|
readonly languageIn?: readonly string[];
|
|
114
123
|
readonly typeIn?: readonly ("BlankNode" | "Literal" | "NamedNode")[];
|
|
115
124
|
}
|
|
116
|
-
export type $ToRdfResourceFunction<
|
|
125
|
+
export type $ToRdfResourceFunction<ObjectT, IdentifierT extends Resource.Identifier = Resource.Identifier> = (object: ObjectT, options?: {
|
|
117
126
|
graph?: Exclude<Quad_Graph, Variable>;
|
|
118
127
|
ignoreRdfType?: boolean;
|
|
119
128
|
resourceSet?: ResourceSet;
|
|
120
|
-
}) => Resource
|
|
129
|
+
}) => Resource<IdentifierT>;
|
|
121
130
|
export type $ToRdfResourceValuesFunction<ValueT, ReturnT extends BlankNode | Literal | NamedNode = BlankNode | Literal | NamedNode> = (value: ValueT, options: {
|
|
122
131
|
graph?: Exclude<Quad_Graph, Variable>;
|
|
123
132
|
ignoreRdfType?: boolean;
|
|
@@ -252,50 +261,11 @@ export declare namespace PropertyShape {
|
|
|
252
261
|
readonly uniqueLang?: $MaybeFilter<$BooleanFilter>;
|
|
253
262
|
readonly xone?: $MaybeFilter<$CollectionFilter<$IdentifierFilter>>;
|
|
254
263
|
};
|
|
264
|
+
const _fromRdfResource: $_FromRdfResourceFunction<PropertyShape>;
|
|
255
265
|
const fromRdfResource: $FromRdfResourceFunction<PropertyShape>;
|
|
256
266
|
const fromRdfResourceValues: $FromRdfResourceValuesFunction<PropertyShape>;
|
|
257
267
|
const fromRdfType: NamedNode<string>;
|
|
258
268
|
function isPropertyShape(object: $Object): object is PropertyShape;
|
|
259
|
-
const propertiesFromRdfResource: $PropertiesFromRdfResourceFunction<{
|
|
260
|
-
$identifier: BlankNode | NamedNode;
|
|
261
|
-
$type: "PropertyShape";
|
|
262
|
-
and: Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
263
|
-
classes: readonly NamedNode[];
|
|
264
|
-
comment: Maybe<string>;
|
|
265
|
-
datatype: Maybe<NamedNode>;
|
|
266
|
-
deactivated: Maybe<boolean>;
|
|
267
|
-
defaultValue: Maybe<NamedNode | Literal>;
|
|
268
|
-
description: Maybe<string>;
|
|
269
|
-
display: boolean;
|
|
270
|
-
flags: readonly string[];
|
|
271
|
-
groups: readonly (BlankNode | NamedNode)[];
|
|
272
|
-
hasValues: readonly (NamedNode | Literal)[];
|
|
273
|
-
in_: Maybe<readonly (NamedNode | Literal)[]>;
|
|
274
|
-
isDefinedBy: Maybe<BlankNode | NamedNode>;
|
|
275
|
-
label: Maybe<string>;
|
|
276
|
-
languageIn: Maybe<readonly string[]>;
|
|
277
|
-
maxCount: Maybe<bigint>;
|
|
278
|
-
maxExclusive: Maybe<Literal>;
|
|
279
|
-
maxInclusive: Maybe<Literal>;
|
|
280
|
-
maxLength: Maybe<bigint>;
|
|
281
|
-
minCount: Maybe<bigint>;
|
|
282
|
-
minExclusive: Maybe<Literal>;
|
|
283
|
-
minInclusive: Maybe<Literal>;
|
|
284
|
-
minLength: Maybe<bigint>;
|
|
285
|
-
mutable: Maybe<boolean>;
|
|
286
|
-
name: Maybe<string>;
|
|
287
|
-
node: Maybe<BlankNode | NamedNode>;
|
|
288
|
-
nodeKind: Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
|
|
289
|
-
not: readonly (BlankNode | NamedNode)[];
|
|
290
|
-
or: Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
291
|
-
order: Maybe<number>;
|
|
292
|
-
path: $PropertyPath;
|
|
293
|
-
patterns: readonly string[];
|
|
294
|
-
resolve: Maybe<BlankNode | NamedNode>;
|
|
295
|
-
shaclmateName: Maybe<string>;
|
|
296
|
-
uniqueLang: Maybe<boolean>;
|
|
297
|
-
xone: Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
298
|
-
}>;
|
|
299
269
|
const schema: {
|
|
300
270
|
readonly properties: {
|
|
301
271
|
readonly $identifier: {
|
|
@@ -685,8 +655,9 @@ export declare namespace PropertyShape {
|
|
|
685
655
|
};
|
|
686
656
|
};
|
|
687
657
|
};
|
|
688
|
-
|
|
689
|
-
|
|
658
|
+
const _toRdfResource: $_ToRdfResourceFunction<PropertyShape.Identifier, PropertyShape>;
|
|
659
|
+
const toRdfResource: $ToRdfResourceFunction<PropertyShape, Identifier>;
|
|
660
|
+
function _propertiesToStrings(_propertyShape: PropertyShape): Record<string, string>;
|
|
690
661
|
function $toString(this: PropertyShape): string;
|
|
691
662
|
function $toString(_propertyShape: PropertyShape): string;
|
|
692
663
|
}
|
|
@@ -713,16 +684,11 @@ export declare namespace PropertyGroup {
|
|
|
713
684
|
readonly comment?: $MaybeFilter<$StringFilter>;
|
|
714
685
|
readonly label?: $MaybeFilter<$StringFilter>;
|
|
715
686
|
};
|
|
687
|
+
const _fromRdfResource: $_FromRdfResourceFunction<PropertyGroup>;
|
|
716
688
|
const fromRdfResource: $FromRdfResourceFunction<PropertyGroup>;
|
|
717
689
|
const fromRdfResourceValues: $FromRdfResourceValuesFunction<PropertyGroup>;
|
|
718
690
|
const fromRdfType: NamedNode<string>;
|
|
719
691
|
function isPropertyGroup(object: $Object): object is PropertyGroup;
|
|
720
|
-
const propertiesFromRdfResource: $PropertiesFromRdfResourceFunction<{
|
|
721
|
-
$identifier: BlankNode | NamedNode;
|
|
722
|
-
$type: "PropertyGroup";
|
|
723
|
-
comment: Maybe<string>;
|
|
724
|
-
label: Maybe<string>;
|
|
725
|
-
}>;
|
|
726
692
|
const schema: {
|
|
727
693
|
readonly properties: {
|
|
728
694
|
readonly $identifier: {
|
|
@@ -760,8 +726,9 @@ export declare namespace PropertyGroup {
|
|
|
760
726
|
};
|
|
761
727
|
};
|
|
762
728
|
};
|
|
763
|
-
|
|
764
|
-
|
|
729
|
+
const _toRdfResource: $_ToRdfResourceFunction<PropertyGroup.Identifier, PropertyGroup>;
|
|
730
|
+
const toRdfResource: $ToRdfResourceFunction<PropertyGroup, Identifier>;
|
|
731
|
+
function _propertiesToStrings(_propertyGroup: PropertyGroup): Record<string, string>;
|
|
765
732
|
function $toString(this: PropertyGroup): string;
|
|
766
733
|
function $toString(_propertyGroup: PropertyGroup): string;
|
|
767
734
|
}
|
|
@@ -797,19 +764,11 @@ export declare namespace Ontology {
|
|
|
797
764
|
readonly tsFeatureIncludes?: $CollectionFilter<$IriFilter>;
|
|
798
765
|
readonly tsImports?: $CollectionFilter<$StringFilter>;
|
|
799
766
|
};
|
|
767
|
+
const _fromRdfResource: $_FromRdfResourceFunction<Ontology>;
|
|
800
768
|
const fromRdfResource: $FromRdfResourceFunction<Ontology>;
|
|
801
769
|
const fromRdfResourceValues: $FromRdfResourceValuesFunction<Ontology>;
|
|
802
770
|
const fromRdfType: NamedNode<string>;
|
|
803
771
|
function isOntology(object: $Object): object is Ontology;
|
|
804
|
-
const propertiesFromRdfResource: $PropertiesFromRdfResourceFunction<{
|
|
805
|
-
$identifier: BlankNode | NamedNode;
|
|
806
|
-
$type: "Ontology";
|
|
807
|
-
comment: Maybe<string>;
|
|
808
|
-
label: Maybe<string>;
|
|
809
|
-
tsFeatureExcludes: readonly NamedNode<"http://purl.org/shaclmate/ontology#_TsFeatures_All" | "http://purl.org/shaclmate/ontology#_TsFeature_Create" | "http://purl.org/shaclmate/ontology#_TsFeatures_Default" | "http://purl.org/shaclmate/ontology#_TsFeature_Equals" | "http://purl.org/shaclmate/ontology#_TsFeature_Graphql" | "http://purl.org/shaclmate/ontology#_TsFeature_Hash" | "http://purl.org/shaclmate/ontology#_TsFeature_Json" | "http://purl.org/shaclmate/ontology#_TsFeatures_None" | "http://purl.org/shaclmate/ontology#_TsFeature_Rdf" | "http://purl.org/shaclmate/ontology#_TsFeature_Sparql">[];
|
|
810
|
-
tsFeatureIncludes: readonly NamedNode<"http://purl.org/shaclmate/ontology#_TsFeatures_All" | "http://purl.org/shaclmate/ontology#_TsFeature_Create" | "http://purl.org/shaclmate/ontology#_TsFeatures_Default" | "http://purl.org/shaclmate/ontology#_TsFeature_Equals" | "http://purl.org/shaclmate/ontology#_TsFeature_Graphql" | "http://purl.org/shaclmate/ontology#_TsFeature_Hash" | "http://purl.org/shaclmate/ontology#_TsFeature_Json" | "http://purl.org/shaclmate/ontology#_TsFeatures_None" | "http://purl.org/shaclmate/ontology#_TsFeature_Rdf" | "http://purl.org/shaclmate/ontology#_TsFeature_Sparql">[];
|
|
811
|
-
tsImports: readonly string[];
|
|
812
|
-
}>;
|
|
813
772
|
const schema: {
|
|
814
773
|
readonly properties: {
|
|
815
774
|
readonly $identifier: {
|
|
@@ -879,8 +838,9 @@ export declare namespace Ontology {
|
|
|
879
838
|
};
|
|
880
839
|
};
|
|
881
840
|
};
|
|
882
|
-
|
|
883
|
-
|
|
841
|
+
const _toRdfResource: $_ToRdfResourceFunction<Ontology.Identifier, Ontology>;
|
|
842
|
+
const toRdfResource: $ToRdfResourceFunction<Ontology, Identifier>;
|
|
843
|
+
function _propertiesToStrings(_ontology: Ontology): Record<string, string>;
|
|
884
844
|
function $toString(this: Ontology): string;
|
|
885
845
|
function $toString(_ontology: Ontology): string;
|
|
886
846
|
}
|
|
@@ -1021,54 +981,11 @@ export declare namespace NodeShape {
|
|
|
1021
981
|
readonly types?: $CollectionFilter<$IriFilter>;
|
|
1022
982
|
readonly xone?: $MaybeFilter<$CollectionFilter<$IdentifierFilter>>;
|
|
1023
983
|
};
|
|
984
|
+
const _fromRdfResource: $_FromRdfResourceFunction<NodeShape>;
|
|
1024
985
|
const fromRdfResource: $FromRdfResourceFunction<NodeShape>;
|
|
1025
986
|
const fromRdfResourceValues: $FromRdfResourceValuesFunction<NodeShape>;
|
|
1026
987
|
const fromRdfType: NamedNode<string>;
|
|
1027
988
|
function isNodeShape(object: $Object): object is NodeShape;
|
|
1028
|
-
const propertiesFromRdfResource: $PropertiesFromRdfResourceFunction<{
|
|
1029
|
-
$identifier: BlankNode | NamedNode;
|
|
1030
|
-
$type: "NodeShape";
|
|
1031
|
-
and: Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
1032
|
-
classes: readonly NamedNode[];
|
|
1033
|
-
closed: Maybe<boolean>;
|
|
1034
|
-
comment: Maybe<string>;
|
|
1035
|
-
datatype: Maybe<NamedNode>;
|
|
1036
|
-
deactivated: Maybe<boolean>;
|
|
1037
|
-
discriminantValue: Maybe<string>;
|
|
1038
|
-
extern: Maybe<boolean>;
|
|
1039
|
-
flags: readonly string[];
|
|
1040
|
-
fromRdfType: Maybe<NamedNode>;
|
|
1041
|
-
hasValues: readonly (NamedNode | Literal)[];
|
|
1042
|
-
ignoredProperties: Maybe<readonly NamedNode[]>;
|
|
1043
|
-
in_: Maybe<readonly (NamedNode | Literal)[]>;
|
|
1044
|
-
isDefinedBy: Maybe<BlankNode | NamedNode>;
|
|
1045
|
-
label: Maybe<string>;
|
|
1046
|
-
languageIn: Maybe<readonly string[]>;
|
|
1047
|
-
maxCount: Maybe<bigint>;
|
|
1048
|
-
maxExclusive: Maybe<Literal>;
|
|
1049
|
-
maxInclusive: Maybe<Literal>;
|
|
1050
|
-
maxLength: Maybe<bigint>;
|
|
1051
|
-
minCount: Maybe<bigint>;
|
|
1052
|
-
minExclusive: Maybe<Literal>;
|
|
1053
|
-
minInclusive: Maybe<Literal>;
|
|
1054
|
-
minLength: Maybe<bigint>;
|
|
1055
|
-
mutable: Maybe<boolean>;
|
|
1056
|
-
node: Maybe<BlankNode | NamedNode>;
|
|
1057
|
-
nodeKind: Maybe<NamedNode<"http://www.w3.org/ns/shacl#BlankNode" | "http://www.w3.org/ns/shacl#BlankNodeOrIRI" | "http://www.w3.org/ns/shacl#BlankNodeOrLiteral" | "http://www.w3.org/ns/shacl#IRI" | "http://www.w3.org/ns/shacl#IRIOrLiteral" | "http://www.w3.org/ns/shacl#Literal">>;
|
|
1058
|
-
not: readonly (BlankNode | NamedNode)[];
|
|
1059
|
-
or: Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
1060
|
-
patterns: readonly string[];
|
|
1061
|
-
properties: readonly (BlankNode | NamedNode)[];
|
|
1062
|
-
rdfType: Maybe<NamedNode>;
|
|
1063
|
-
shaclmateName: Maybe<string>;
|
|
1064
|
-
subClassOf: readonly NamedNode[];
|
|
1065
|
-
toRdfTypes: readonly NamedNode[];
|
|
1066
|
-
tsFeatureExcludes: readonly NamedNode<"http://purl.org/shaclmate/ontology#_TsFeatures_All" | "http://purl.org/shaclmate/ontology#_TsFeature_Create" | "http://purl.org/shaclmate/ontology#_TsFeatures_Default" | "http://purl.org/shaclmate/ontology#_TsFeature_Equals" | "http://purl.org/shaclmate/ontology#_TsFeature_Graphql" | "http://purl.org/shaclmate/ontology#_TsFeature_Hash" | "http://purl.org/shaclmate/ontology#_TsFeature_Json" | "http://purl.org/shaclmate/ontology#_TsFeatures_None" | "http://purl.org/shaclmate/ontology#_TsFeature_Rdf" | "http://purl.org/shaclmate/ontology#_TsFeature_Sparql">[];
|
|
1067
|
-
tsFeatureIncludes: readonly NamedNode<"http://purl.org/shaclmate/ontology#_TsFeatures_All" | "http://purl.org/shaclmate/ontology#_TsFeature_Create" | "http://purl.org/shaclmate/ontology#_TsFeatures_Default" | "http://purl.org/shaclmate/ontology#_TsFeature_Equals" | "http://purl.org/shaclmate/ontology#_TsFeature_Graphql" | "http://purl.org/shaclmate/ontology#_TsFeature_Hash" | "http://purl.org/shaclmate/ontology#_TsFeature_Json" | "http://purl.org/shaclmate/ontology#_TsFeatures_None" | "http://purl.org/shaclmate/ontology#_TsFeature_Rdf" | "http://purl.org/shaclmate/ontology#_TsFeature_Sparql">[];
|
|
1068
|
-
tsImports: readonly string[];
|
|
1069
|
-
types: readonly NamedNode[];
|
|
1070
|
-
xone: Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
1071
|
-
}>;
|
|
1072
989
|
const schema: {
|
|
1073
990
|
readonly properties: {
|
|
1074
991
|
readonly $identifier: {
|
|
@@ -1507,8 +1424,9 @@ export declare namespace NodeShape {
|
|
|
1507
1424
|
};
|
|
1508
1425
|
};
|
|
1509
1426
|
};
|
|
1510
|
-
|
|
1511
|
-
|
|
1427
|
+
const _toRdfResource: $_ToRdfResourceFunction<NodeShape.Identifier, NodeShape>;
|
|
1428
|
+
const toRdfResource: $ToRdfResourceFunction<NodeShape, Identifier>;
|
|
1429
|
+
function _propertiesToStrings(_nodeShape: NodeShape): Record<string, string>;
|
|
1512
1430
|
function $toString(this: NodeShape): string;
|
|
1513
1431
|
function $toString(_nodeShape: NodeShape): string;
|
|
1514
1432
|
}
|