@shaclmate/shacl-ast 4.0.34 → 4.0.36
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/generated.d.ts +8 -8
- package/dist/generated.js +160 -163
- package/package.json +1 -1
package/dist/generated.d.ts
CHANGED
|
@@ -135,7 +135,7 @@ export interface PropertyShape {
|
|
|
135
135
|
}
|
|
136
136
|
export declare namespace PropertyShape {
|
|
137
137
|
function create(parameters: {
|
|
138
|
-
readonly $identifier?: (() => PropertyShape.Identifier) |
|
|
138
|
+
readonly $identifier?: (() => PropertyShape.Identifier) | BlankNode | NamedNode | string;
|
|
139
139
|
readonly and?: readonly (BlankNode | NamedNode | string | undefined)[] | Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
140
140
|
readonly classes?: readonly (string | NamedNode)[];
|
|
141
141
|
readonly comment?: string | Maybe<string>;
|
|
@@ -170,7 +170,7 @@ export declare namespace PropertyShape {
|
|
|
170
170
|
readonly xone?: readonly (BlankNode | NamedNode | string | undefined)[] | Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
171
171
|
}): Either<Error, PropertyShape>;
|
|
172
172
|
function createUnsafe(parameters: {
|
|
173
|
-
readonly $identifier?: (() => PropertyShape.Identifier) |
|
|
173
|
+
readonly $identifier?: (() => PropertyShape.Identifier) | BlankNode | NamedNode | string;
|
|
174
174
|
readonly and?: readonly (BlankNode | NamedNode | string | undefined)[] | Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
175
175
|
readonly classes?: readonly (string | NamedNode)[];
|
|
176
176
|
readonly comment?: string | Maybe<string>;
|
|
@@ -612,12 +612,12 @@ export interface PropertyGroup {
|
|
|
612
612
|
}
|
|
613
613
|
export declare namespace PropertyGroup {
|
|
614
614
|
function create(parameters?: {
|
|
615
|
-
readonly $identifier?: (() => PropertyGroup.Identifier) |
|
|
615
|
+
readonly $identifier?: (() => PropertyGroup.Identifier) | BlankNode | NamedNode | string;
|
|
616
616
|
readonly comment?: string | Maybe<string>;
|
|
617
617
|
readonly label?: string | Maybe<string>;
|
|
618
618
|
}): Either<Error, PropertyGroup>;
|
|
619
619
|
function createUnsafe(parameters?: {
|
|
620
|
-
readonly $identifier?: (() => PropertyGroup.Identifier) |
|
|
620
|
+
readonly $identifier?: (() => PropertyGroup.Identifier) | BlankNode | NamedNode | string;
|
|
621
621
|
readonly comment?: string | Maybe<string>;
|
|
622
622
|
readonly label?: string | Maybe<string>;
|
|
623
623
|
}): PropertyGroup;
|
|
@@ -688,12 +688,12 @@ export interface Ontology {
|
|
|
688
688
|
}
|
|
689
689
|
export declare namespace Ontology {
|
|
690
690
|
function create(parameters?: {
|
|
691
|
-
readonly $identifier?: (() => Ontology.Identifier) |
|
|
691
|
+
readonly $identifier?: (() => Ontology.Identifier) | BlankNode | NamedNode | string;
|
|
692
692
|
readonly comment?: string | Maybe<string>;
|
|
693
693
|
readonly label?: string | Maybe<string>;
|
|
694
694
|
}): Either<Error, Ontology>;
|
|
695
695
|
function createUnsafe(parameters?: {
|
|
696
|
-
readonly $identifier?: (() => Ontology.Identifier) |
|
|
696
|
+
readonly $identifier?: (() => Ontology.Identifier) | BlankNode | NamedNode | string;
|
|
697
697
|
readonly comment?: string | Maybe<string>;
|
|
698
698
|
readonly label?: string | Maybe<string>;
|
|
699
699
|
}): Ontology;
|
|
@@ -792,7 +792,7 @@ export interface NodeShape {
|
|
|
792
792
|
}
|
|
793
793
|
export declare namespace NodeShape {
|
|
794
794
|
function create(parameters?: {
|
|
795
|
-
readonly $identifier?: (() => NodeShape.Identifier) |
|
|
795
|
+
readonly $identifier?: (() => NodeShape.Identifier) | BlankNode | NamedNode | string;
|
|
796
796
|
readonly and?: readonly (BlankNode | NamedNode | string | undefined)[] | Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
797
797
|
readonly classes?: readonly (string | NamedNode)[];
|
|
798
798
|
readonly closed?: boolean | Maybe<boolean>;
|
|
@@ -825,7 +825,7 @@ export declare namespace NodeShape {
|
|
|
825
825
|
readonly xone?: readonly (BlankNode | NamedNode | string | undefined)[] | Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
826
826
|
}): Either<Error, NodeShape>;
|
|
827
827
|
function createUnsafe(parameters?: {
|
|
828
|
-
readonly $identifier?: (() => NodeShape.Identifier) |
|
|
828
|
+
readonly $identifier?: (() => NodeShape.Identifier) | BlankNode | NamedNode | string;
|
|
829
829
|
readonly and?: readonly (BlankNode | NamedNode | string | undefined)[] | Maybe<readonly (BlankNode | NamedNode)[]>;
|
|
830
830
|
readonly classes?: readonly (string | NamedNode)[];
|
|
831
831
|
readonly closed?: boolean | Maybe<boolean>;
|
package/dist/generated.js
CHANGED
|
@@ -15,10 +15,12 @@ function $compactRecord(record) {
|
|
|
15
15
|
return definedProperties;
|
|
16
16
|
}, {});
|
|
17
17
|
}
|
|
18
|
-
function $
|
|
19
|
-
return
|
|
18
|
+
function $convertToArray(convertToItem, _readonly) {
|
|
19
|
+
return (value) => (typeof value === "undefined"
|
|
20
|
+
? Either.of([])
|
|
21
|
+
: Either.sequence(value.map(convertToItem)));
|
|
20
22
|
}
|
|
21
|
-
function $convertToIdentifier(
|
|
23
|
+
function $convertToIdentifier(value) {
|
|
22
24
|
switch (typeof value) {
|
|
23
25
|
case "object":
|
|
24
26
|
return Either.of(value);
|
|
@@ -46,7 +48,7 @@ function $convertToIdentifierProperty(identifier) {
|
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
|
-
function $convertToIri(
|
|
51
|
+
function $convertToIri(value) {
|
|
50
52
|
switch (typeof value) {
|
|
51
53
|
case "object":
|
|
52
54
|
return Either.of(value);
|
|
@@ -54,7 +56,7 @@ function $convertToIri(_schema, value) {
|
|
|
54
56
|
return Either.of(dataFactory.namedNode(value));
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
|
-
function $convertToLiteral(
|
|
59
|
+
function $convertToLiteral(value) {
|
|
58
60
|
if (typeof value === "object") {
|
|
59
61
|
if (value instanceof Date) {
|
|
60
62
|
return Either.of($literalFactory.date(value));
|
|
@@ -64,7 +66,7 @@ function $convertToLiteral(_schema, value) {
|
|
|
64
66
|
return Either.of($literalFactory.primitive(value));
|
|
65
67
|
}
|
|
66
68
|
function $convertToMaybe(convertToItem) {
|
|
67
|
-
return (
|
|
69
|
+
return (value) => {
|
|
68
70
|
switch (typeof value) {
|
|
69
71
|
case "object": {
|
|
70
72
|
if (Maybe.isMaybe(value)) {
|
|
@@ -75,33 +77,9 @@ function $convertToMaybe(convertToItem) {
|
|
|
75
77
|
case "undefined":
|
|
76
78
|
return Either.of(Maybe.empty());
|
|
77
79
|
}
|
|
78
|
-
return convertToItem(
|
|
80
|
+
return convertToItem(value).map(Maybe.of);
|
|
79
81
|
};
|
|
80
82
|
}
|
|
81
|
-
function $convertToNumeric(_schema, value) {
|
|
82
|
-
return Either.of(value);
|
|
83
|
-
}
|
|
84
|
-
function $convertToObject(_schema, value) {
|
|
85
|
-
return Either.of(value);
|
|
86
|
-
}
|
|
87
|
-
function $convertToReadonlyArray(convertToItem) {
|
|
88
|
-
return (schema, value) => {
|
|
89
|
-
return (typeof value === "undefined"
|
|
90
|
-
? Either.of([])
|
|
91
|
-
: Either.sequence(value.map((item) => convertToItem(schema.item(), item)))).chain((array) => {
|
|
92
|
-
if (schema.minCount !== undefined && array.length < schema.minCount) {
|
|
93
|
-
return Left(new Error(`array has length (${array.length}) less than minCount (${schema.minCount})`));
|
|
94
|
-
}
|
|
95
|
-
return Either.of(array);
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function $convertToString(_schema, value) {
|
|
100
|
-
return Either.of(value);
|
|
101
|
-
}
|
|
102
|
-
function $convertToTerm(_schema, value) {
|
|
103
|
-
return Either.of(value);
|
|
104
|
-
}
|
|
105
83
|
function $filterArray(filterItem) {
|
|
106
84
|
return (filter, values) => {
|
|
107
85
|
for (const value of values) {
|
|
@@ -259,6 +237,12 @@ class $IdentifierSet {
|
|
|
259
237
|
}
|
|
260
238
|
}
|
|
261
239
|
}
|
|
240
|
+
function $identityConversionFunction(value) {
|
|
241
|
+
return Either.of(value);
|
|
242
|
+
}
|
|
243
|
+
function $identityValidationFunction(_schema, value) {
|
|
244
|
+
return Either.of(value);
|
|
245
|
+
}
|
|
262
246
|
const $literalFactory = new LiteralFactory({ dataFactory: dataFactory });
|
|
263
247
|
const $parseIdentifier = NTriplesIdentifier.parser(dataFactory);
|
|
264
248
|
export var $PropertyPath;
|
|
@@ -327,6 +311,19 @@ function $sequenceRecord(record) {
|
|
|
327
311
|
function $shaclPropertyFromRdf({ graph, propertySchema, resource, typeFromRdf, }) {
|
|
328
312
|
return typeFromRdf(Right(resource.values(propertySchema.path, { graph, unique: true }))).chain((values) => values.head());
|
|
329
313
|
}
|
|
314
|
+
function $validateArray(validateItem, _readonly) {
|
|
315
|
+
return (schema, valueArray) => {
|
|
316
|
+
if (schema.minCount !== undefined && valueArray.length < schema.minCount) {
|
|
317
|
+
return Left(new Error(`value array has length (${valueArray.length}) less than minCount (${schema.minCount})`));
|
|
318
|
+
}
|
|
319
|
+
return Either.sequence(valueArray.map((value) => validateItem(schema.item(), value)));
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
function $validateMaybe(validateItem) {
|
|
323
|
+
return (schema, valueMaybe) => valueMaybe
|
|
324
|
+
.map((value) => validateItem(schema.item(), value).map(() => valueMaybe))
|
|
325
|
+
.orDefault(Either.of(valueMaybe));
|
|
326
|
+
}
|
|
330
327
|
function $wrap_FromRdfResourceFunction(_fromRdfResourceFunction) {
|
|
331
328
|
return (resource, options) => {
|
|
332
329
|
let { context, graph, ignoreRdfType = false, objectSet, preferredLanguages, } = options ?? {};
|
|
@@ -367,38 +364,38 @@ export var PropertyShape;
|
|
|
367
364
|
function create(parameters) {
|
|
368
365
|
return $sequenceRecord({
|
|
369
366
|
$identifier: $convertToIdentifierProperty(parameters.$identifier),
|
|
370
|
-
and: $convertToMaybe($
|
|
371
|
-
classes: $
|
|
372
|
-
comment: $convertToMaybe(
|
|
373
|
-
datatype: $convertToMaybe(($convertToIri))(PropertyShape.schema.properties.datatype.type(),
|
|
374
|
-
deactivated: $convertToMaybe(
|
|
375
|
-
defaultValue: $convertToMaybe(
|
|
376
|
-
description: $convertToMaybe(
|
|
377
|
-
flags: $
|
|
378
|
-
groups: $
|
|
379
|
-
hasValues: $
|
|
380
|
-
in_: $convertToMaybe($
|
|
381
|
-
isDefinedBy: $convertToMaybe($convertToIdentifier)(PropertyShape.schema.properties.isDefinedBy.type(),
|
|
382
|
-
label: $convertToMaybe(
|
|
383
|
-
languageIn: $convertToMaybe($
|
|
384
|
-
maxCount: $convertToMaybe(
|
|
385
|
-
maxExclusive: $convertToMaybe($convertToLiteral)(PropertyShape.schema.properties.maxExclusive.type(),
|
|
386
|
-
maxInclusive: $convertToMaybe($convertToLiteral)(PropertyShape.schema.properties.maxInclusive.type(),
|
|
387
|
-
maxLength: $convertToMaybe(
|
|
388
|
-
minCount: $convertToMaybe(
|
|
389
|
-
minExclusive: $convertToMaybe($convertToLiteral)(PropertyShape.schema.properties.minExclusive.type(),
|
|
390
|
-
minInclusive: $convertToMaybe($convertToLiteral)(PropertyShape.schema.properties.minInclusive.type(),
|
|
391
|
-
minLength: $convertToMaybe(
|
|
392
|
-
name: $convertToMaybe(
|
|
393
|
-
node: $convertToMaybe($convertToIdentifier)(PropertyShape.schema.properties.node.type(),
|
|
394
|
-
nodeKind: $convertToMaybe(($convertToIri))(PropertyShape.schema.properties.nodeKind.type(),
|
|
395
|
-
not: $
|
|
396
|
-
or: $convertToMaybe($
|
|
397
|
-
order: $convertToMaybe(
|
|
398
|
-
path:
|
|
399
|
-
patterns: $
|
|
400
|
-
uniqueLang: $convertToMaybe(
|
|
401
|
-
xone: $convertToMaybe($
|
|
367
|
+
and: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters.and).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.and.type(), value)),
|
|
368
|
+
classes: $convertToArray(($convertToIri), true)(parameters.classes).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.classes.type(), value)),
|
|
369
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters.comment).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.comment.type(), value)),
|
|
370
|
+
datatype: $convertToMaybe(($convertToIri))(parameters.datatype).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.datatype.type(), value)),
|
|
371
|
+
deactivated: $convertToMaybe($identityConversionFunction)(parameters.deactivated).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.deactivated.type(), value)),
|
|
372
|
+
defaultValue: $convertToMaybe($identityConversionFunction)(parameters.defaultValue).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.defaultValue.type(), value)),
|
|
373
|
+
description: $convertToMaybe($identityConversionFunction)(parameters.description).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.description.type(), value)),
|
|
374
|
+
flags: $convertToArray($identityConversionFunction, true)(parameters.flags).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.flags.type(), value)),
|
|
375
|
+
groups: $convertToArray($convertToIdentifier, true)(parameters.groups).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.groups.type(), value)),
|
|
376
|
+
hasValues: $convertToArray($identityConversionFunction, true)(parameters.hasValues).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.hasValues.type(), value)),
|
|
377
|
+
in_: $convertToMaybe($convertToArray($identityConversionFunction, true))(parameters.in_).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.in_.type(), value)),
|
|
378
|
+
isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters.isDefinedBy).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.isDefinedBy.type(), value)),
|
|
379
|
+
label: $convertToMaybe($identityConversionFunction)(parameters.label).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.label.type(), value)),
|
|
380
|
+
languageIn: $convertToMaybe($convertToArray($identityConversionFunction, true))(parameters.languageIn).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.languageIn.type(), value)),
|
|
381
|
+
maxCount: $convertToMaybe($identityConversionFunction)(parameters.maxCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxCount.type(), value)),
|
|
382
|
+
maxExclusive: $convertToMaybe($convertToLiteral)(parameters.maxExclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxExclusive.type(), value)),
|
|
383
|
+
maxInclusive: $convertToMaybe($convertToLiteral)(parameters.maxInclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxInclusive.type(), value)),
|
|
384
|
+
maxLength: $convertToMaybe($identityConversionFunction)(parameters.maxLength).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxLength.type(), value)),
|
|
385
|
+
minCount: $convertToMaybe($identityConversionFunction)(parameters.minCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minCount.type(), value)),
|
|
386
|
+
minExclusive: $convertToMaybe($convertToLiteral)(parameters.minExclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minExclusive.type(), value)),
|
|
387
|
+
minInclusive: $convertToMaybe($convertToLiteral)(parameters.minInclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minInclusive.type(), value)),
|
|
388
|
+
minLength: $convertToMaybe($identityConversionFunction)(parameters.minLength).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minLength.type(), value)),
|
|
389
|
+
name: $convertToMaybe($identityConversionFunction)(parameters.name).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.name.type(), value)),
|
|
390
|
+
node: $convertToMaybe($convertToIdentifier)(parameters.node).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.node.type(), value)),
|
|
391
|
+
nodeKind: $convertToMaybe(($convertToIri))(parameters.nodeKind).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.nodeKind.type(), value)),
|
|
392
|
+
not: $convertToArray($convertToIdentifier, true)(parameters.not).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.not.type(), value)),
|
|
393
|
+
or: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters.or).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.or.type(), value)),
|
|
394
|
+
order: $convertToMaybe($identityConversionFunction)(parameters.order).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.order.type(), value)),
|
|
395
|
+
path: Either.of(parameters.path),
|
|
396
|
+
patterns: $convertToArray($identityConversionFunction, true)(parameters.patterns).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.patterns.type(), value)),
|
|
397
|
+
uniqueLang: $convertToMaybe($identityConversionFunction)(parameters.uniqueLang).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.uniqueLang.type(), value)),
|
|
398
|
+
xone: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters.xone).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.xone.type(), value)),
|
|
402
399
|
}).map((properties) => {
|
|
403
400
|
const finalObject = { ...properties, $type: "PropertyShape" };
|
|
404
401
|
if (!globalThis.Object.prototype.hasOwnProperty.call(finalObject, "toString")) {
|
|
@@ -1424,7 +1421,7 @@ export var PropertyShape;
|
|
|
1424
1421
|
if (!parameters.ignoreRdfType) {
|
|
1425
1422
|
parameters.resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape"), parameters.graph);
|
|
1426
1423
|
}
|
|
1427
|
-
parameters.resource.add(
|
|
1424
|
+
parameters.resource.add(PropertyShape.schema.properties.and.path, parameters.object.and.toList().flatMap((value) => [
|
|
1428
1425
|
value.length > 0
|
|
1429
1426
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
1430
1427
|
if (itemIndex === 0) {
|
|
@@ -1446,24 +1443,24 @@ export var PropertyShape;
|
|
|
1446
1443
|
}).listResource.identifier
|
|
1447
1444
|
: $RdfVocabularies.rdf.nil,
|
|
1448
1445
|
]), parameters.graph);
|
|
1449
|
-
parameters.resource.add(
|
|
1450
|
-
parameters.resource.add(
|
|
1446
|
+
parameters.resource.add(PropertyShape.schema.properties.classes.path, parameters.object.classes.flatMap((item) => [item]), parameters.graph);
|
|
1447
|
+
parameters.resource.add(PropertyShape.schema.properties.comment.path, parameters.object.comment
|
|
1451
1448
|
.toList()
|
|
1452
1449
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1453
|
-
parameters.resource.add(
|
|
1454
|
-
parameters.resource.add(
|
|
1450
|
+
parameters.resource.add(PropertyShape.schema.properties.datatype.path, parameters.object.datatype.toList(), parameters.graph);
|
|
1451
|
+
parameters.resource.add(PropertyShape.schema.properties.deactivated.path, parameters.object.deactivated
|
|
1455
1452
|
.toList()
|
|
1456
1453
|
.flatMap((value) => [
|
|
1457
1454
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
1458
1455
|
]), parameters.graph);
|
|
1459
|
-
parameters.resource.add(
|
|
1460
|
-
parameters.resource.add(
|
|
1456
|
+
parameters.resource.add(PropertyShape.schema.properties.defaultValue.path, parameters.object.defaultValue.toList(), parameters.graph);
|
|
1457
|
+
parameters.resource.add(PropertyShape.schema.properties.description.path, parameters.object.description
|
|
1461
1458
|
.toList()
|
|
1462
1459
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1463
|
-
parameters.resource.add(
|
|
1464
|
-
parameters.resource.add(
|
|
1465
|
-
parameters.resource.add(
|
|
1466
|
-
parameters.resource.add(
|
|
1460
|
+
parameters.resource.add(PropertyShape.schema.properties.flags.path, parameters.object.flags.flatMap((item) => [$literalFactory.string(item)]), parameters.graph);
|
|
1461
|
+
parameters.resource.add(PropertyShape.schema.properties.groups.path, parameters.object.groups.flatMap((item) => [item]), parameters.graph);
|
|
1462
|
+
parameters.resource.add(PropertyShape.schema.properties.hasValues.path, parameters.object.hasValues.flatMap((item) => [item]), parameters.graph);
|
|
1463
|
+
parameters.resource.add(PropertyShape.schema.properties.in_.path, parameters.object.in_.toList().flatMap((value) => [
|
|
1467
1464
|
value.length > 0
|
|
1468
1465
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
1469
1466
|
if (itemIndex === 0) {
|
|
@@ -1485,11 +1482,11 @@ export var PropertyShape;
|
|
|
1485
1482
|
}).listResource.identifier
|
|
1486
1483
|
: $RdfVocabularies.rdf.nil,
|
|
1487
1484
|
]), parameters.graph);
|
|
1488
|
-
parameters.resource.add(
|
|
1489
|
-
parameters.resource.add(
|
|
1485
|
+
parameters.resource.add(PropertyShape.schema.properties.isDefinedBy.path, parameters.object.isDefinedBy.toList(), parameters.graph);
|
|
1486
|
+
parameters.resource.add(PropertyShape.schema.properties.label.path, parameters.object.label
|
|
1490
1487
|
.toList()
|
|
1491
1488
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1492
|
-
parameters.resource.add(
|
|
1489
|
+
parameters.resource.add(PropertyShape.schema.properties.languageIn.path, parameters.object.languageIn.toList().flatMap((value) => [
|
|
1493
1490
|
value.length > 0
|
|
1494
1491
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
1495
1492
|
if (itemIndex === 0) {
|
|
@@ -1511,37 +1508,37 @@ export var PropertyShape;
|
|
|
1511
1508
|
}).listResource.identifier
|
|
1512
1509
|
: $RdfVocabularies.rdf.nil,
|
|
1513
1510
|
]), parameters.graph);
|
|
1514
|
-
parameters.resource.add(
|
|
1511
|
+
parameters.resource.add(PropertyShape.schema.properties.maxCount.path, parameters.object.maxCount
|
|
1515
1512
|
.toList()
|
|
1516
1513
|
.flatMap((value) => [
|
|
1517
1514
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
1518
1515
|
]), parameters.graph);
|
|
1519
|
-
parameters.resource.add(
|
|
1520
|
-
parameters.resource.add(
|
|
1521
|
-
parameters.resource.add(
|
|
1516
|
+
parameters.resource.add(PropertyShape.schema.properties.maxExclusive.path, parameters.object.maxExclusive.toList(), parameters.graph);
|
|
1517
|
+
parameters.resource.add(PropertyShape.schema.properties.maxInclusive.path, parameters.object.maxInclusive.toList(), parameters.graph);
|
|
1518
|
+
parameters.resource.add(PropertyShape.schema.properties.maxLength.path, parameters.object.maxLength
|
|
1522
1519
|
.toList()
|
|
1523
1520
|
.flatMap((value) => [
|
|
1524
1521
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
1525
1522
|
]), parameters.graph);
|
|
1526
|
-
parameters.resource.add(
|
|
1523
|
+
parameters.resource.add(PropertyShape.schema.properties.minCount.path, parameters.object.minCount
|
|
1527
1524
|
.toList()
|
|
1528
1525
|
.flatMap((value) => [
|
|
1529
1526
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
1530
1527
|
]), parameters.graph);
|
|
1531
|
-
parameters.resource.add(
|
|
1532
|
-
parameters.resource.add(
|
|
1533
|
-
parameters.resource.add(
|
|
1528
|
+
parameters.resource.add(PropertyShape.schema.properties.minExclusive.path, parameters.object.minExclusive.toList(), parameters.graph);
|
|
1529
|
+
parameters.resource.add(PropertyShape.schema.properties.minInclusive.path, parameters.object.minInclusive.toList(), parameters.graph);
|
|
1530
|
+
parameters.resource.add(PropertyShape.schema.properties.minLength.path, parameters.object.minLength
|
|
1534
1531
|
.toList()
|
|
1535
1532
|
.flatMap((value) => [
|
|
1536
1533
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
1537
1534
|
]), parameters.graph);
|
|
1538
|
-
parameters.resource.add(
|
|
1535
|
+
parameters.resource.add(PropertyShape.schema.properties.name.path, parameters.object.name
|
|
1539
1536
|
.toList()
|
|
1540
1537
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1541
|
-
parameters.resource.add(
|
|
1542
|
-
parameters.resource.add(
|
|
1543
|
-
parameters.resource.add(
|
|
1544
|
-
parameters.resource.add(
|
|
1538
|
+
parameters.resource.add(PropertyShape.schema.properties.node.path, parameters.object.node.toList(), parameters.graph);
|
|
1539
|
+
parameters.resource.add(PropertyShape.schema.properties.nodeKind.path, parameters.object.nodeKind.toList(), parameters.graph);
|
|
1540
|
+
parameters.resource.add(PropertyShape.schema.properties.not.path, parameters.object.not.flatMap((item) => [item]), parameters.graph);
|
|
1541
|
+
parameters.resource.add(PropertyShape.schema.properties.or.path, parameters.object.or.toList().flatMap((value) => [
|
|
1545
1542
|
value.length > 0
|
|
1546
1543
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
1547
1544
|
if (itemIndex === 0) {
|
|
@@ -1563,26 +1560,26 @@ export var PropertyShape;
|
|
|
1563
1560
|
}).listResource.identifier
|
|
1564
1561
|
: $RdfVocabularies.rdf.nil,
|
|
1565
1562
|
]), parameters.graph);
|
|
1566
|
-
parameters.resource.add(
|
|
1563
|
+
parameters.resource.add(PropertyShape.schema.properties.order.path, parameters.object.order
|
|
1567
1564
|
.toList()
|
|
1568
1565
|
.flatMap((value) => [
|
|
1569
1566
|
$literalFactory.number(value, $RdfVocabularies.xsd.double),
|
|
1570
1567
|
]), parameters.graph);
|
|
1571
|
-
parameters.resource.add(
|
|
1568
|
+
parameters.resource.add(PropertyShape.schema.properties.path.path, [
|
|
1572
1569
|
$PropertyPath.toRdfResource(parameters.object.path, {
|
|
1573
1570
|
graph: parameters.graph,
|
|
1574
1571
|
resourceSet: parameters.resourceSet,
|
|
1575
1572
|
}).identifier,
|
|
1576
1573
|
], parameters.graph);
|
|
1577
|
-
parameters.resource.add(
|
|
1574
|
+
parameters.resource.add(PropertyShape.schema.properties.patterns.path, parameters.object.patterns.flatMap((item) => [
|
|
1578
1575
|
$literalFactory.string(item),
|
|
1579
1576
|
]), parameters.graph);
|
|
1580
|
-
parameters.resource.add(
|
|
1577
|
+
parameters.resource.add(PropertyShape.schema.properties.uniqueLang.path, parameters.object.uniqueLang
|
|
1581
1578
|
.toList()
|
|
1582
1579
|
.flatMap((value) => [
|
|
1583
1580
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
1584
1581
|
]), parameters.graph);
|
|
1585
|
-
parameters.resource.add(
|
|
1582
|
+
parameters.resource.add(PropertyShape.schema.properties.xone.path, parameters.object.xone.toList().flatMap((value) => [
|
|
1586
1583
|
value.length > 0
|
|
1587
1584
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
1588
1585
|
if (itemIndex === 0) {
|
|
@@ -1626,8 +1623,8 @@ export var PropertyGroup;
|
|
|
1626
1623
|
function create(parameters) {
|
|
1627
1624
|
return $sequenceRecord({
|
|
1628
1625
|
$identifier: $convertToIdentifierProperty(parameters?.$identifier),
|
|
1629
|
-
comment: $convertToMaybe(
|
|
1630
|
-
label: $convertToMaybe(
|
|
1626
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.comment.type(), value)),
|
|
1627
|
+
label: $convertToMaybe($identityConversionFunction)(parameters?.label).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.label.type(), value)),
|
|
1631
1628
|
}).map((properties) => {
|
|
1632
1629
|
const finalObject = { ...properties, $type: "PropertyGroup" };
|
|
1633
1630
|
if (!globalThis.Object.prototype.hasOwnProperty.call(finalObject, "toString")) {
|
|
@@ -1771,10 +1768,10 @@ export var PropertyGroup;
|
|
|
1771
1768
|
if (!parameters.ignoreRdfType) {
|
|
1772
1769
|
parameters.resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"), parameters.graph);
|
|
1773
1770
|
}
|
|
1774
|
-
parameters.resource.add(
|
|
1771
|
+
parameters.resource.add(PropertyShape.schema.properties.comment.path, parameters.object.comment
|
|
1775
1772
|
.toList()
|
|
1776
1773
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1777
|
-
parameters.resource.add(
|
|
1774
|
+
parameters.resource.add(PropertyShape.schema.properties.label.path, parameters.object.label
|
|
1778
1775
|
.toList()
|
|
1779
1776
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1780
1777
|
return parameters.resource;
|
|
@@ -1797,8 +1794,8 @@ export var Ontology;
|
|
|
1797
1794
|
function create(parameters) {
|
|
1798
1795
|
return $sequenceRecord({
|
|
1799
1796
|
$identifier: $convertToIdentifierProperty(parameters?.$identifier),
|
|
1800
|
-
comment: $convertToMaybe(
|
|
1801
|
-
label: $convertToMaybe(
|
|
1797
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.comment.type(), value)),
|
|
1798
|
+
label: $convertToMaybe($identityConversionFunction)(parameters?.label).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.label.type(), value)),
|
|
1802
1799
|
}).map((properties) => {
|
|
1803
1800
|
const finalObject = { ...properties, $type: "Ontology" };
|
|
1804
1801
|
if (!globalThis.Object.prototype.hasOwnProperty.call(finalObject, "toString")) {
|
|
@@ -1942,10 +1939,10 @@ export var Ontology;
|
|
|
1942
1939
|
if (!parameters.ignoreRdfType) {
|
|
1943
1940
|
parameters.resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology"), parameters.graph);
|
|
1944
1941
|
}
|
|
1945
|
-
parameters.resource.add(
|
|
1942
|
+
parameters.resource.add(PropertyShape.schema.properties.comment.path, parameters.object.comment
|
|
1946
1943
|
.toList()
|
|
1947
1944
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1948
|
-
parameters.resource.add(
|
|
1945
|
+
parameters.resource.add(PropertyShape.schema.properties.label.path, parameters.object.label
|
|
1949
1946
|
.toList()
|
|
1950
1947
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1951
1948
|
return parameters.resource;
|
|
@@ -1968,36 +1965,36 @@ export var NodeShape;
|
|
|
1968
1965
|
function create(parameters) {
|
|
1969
1966
|
return $sequenceRecord({
|
|
1970
1967
|
$identifier: $convertToIdentifierProperty(parameters?.$identifier),
|
|
1971
|
-
and: $convertToMaybe($
|
|
1972
|
-
classes: $
|
|
1973
|
-
closed: $convertToMaybe(
|
|
1974
|
-
comment: $convertToMaybe(
|
|
1975
|
-
datatype: $convertToMaybe(($convertToIri))(
|
|
1976
|
-
deactivated: $convertToMaybe(
|
|
1977
|
-
flags: $
|
|
1978
|
-
hasValues: $
|
|
1979
|
-
ignoredProperties: $convertToMaybe($
|
|
1980
|
-
in_: $convertToMaybe($
|
|
1981
|
-
isDefinedBy: $convertToMaybe($convertToIdentifier)(
|
|
1982
|
-
label: $convertToMaybe(
|
|
1983
|
-
languageIn: $convertToMaybe($
|
|
1984
|
-
maxCount: $convertToMaybe(
|
|
1985
|
-
maxExclusive: $convertToMaybe($convertToLiteral)(
|
|
1986
|
-
maxInclusive: $convertToMaybe($convertToLiteral)(
|
|
1987
|
-
maxLength: $convertToMaybe(
|
|
1988
|
-
minCount: $convertToMaybe(
|
|
1989
|
-
minExclusive: $convertToMaybe($convertToLiteral)(
|
|
1990
|
-
minInclusive: $convertToMaybe($convertToLiteral)(
|
|
1991
|
-
minLength: $convertToMaybe(
|
|
1992
|
-
node: $convertToMaybe($convertToIdentifier)(
|
|
1993
|
-
nodeKind: $convertToMaybe(($convertToIri))(
|
|
1994
|
-
not: $
|
|
1995
|
-
or: $convertToMaybe($
|
|
1996
|
-
patterns: $
|
|
1997
|
-
properties: $
|
|
1998
|
-
subClassOf: $
|
|
1999
|
-
types: $
|
|
2000
|
-
xone: $convertToMaybe($
|
|
1968
|
+
and: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters?.and).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.and.type(), value)),
|
|
1969
|
+
classes: $convertToArray(($convertToIri), true)(parameters?.classes).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.classes.type(), value)),
|
|
1970
|
+
closed: $convertToMaybe($identityConversionFunction)(parameters?.closed).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.closed.type(), value)),
|
|
1971
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.comment.type(), value)),
|
|
1972
|
+
datatype: $convertToMaybe(($convertToIri))(parameters?.datatype).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.datatype.type(), value)),
|
|
1973
|
+
deactivated: $convertToMaybe($identityConversionFunction)(parameters?.deactivated).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.deactivated.type(), value)),
|
|
1974
|
+
flags: $convertToArray($identityConversionFunction, true)(parameters?.flags).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.flags.type(), value)),
|
|
1975
|
+
hasValues: $convertToArray($identityConversionFunction, true)(parameters?.hasValues).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.hasValues.type(), value)),
|
|
1976
|
+
ignoredProperties: $convertToMaybe($convertToArray(($convertToIri), true))(parameters?.ignoredProperties).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(NodeShape.schema.properties.ignoredProperties.type(), value)),
|
|
1977
|
+
in_: $convertToMaybe($convertToArray($identityConversionFunction, true))(parameters?.in_).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.in_.type(), value)),
|
|
1978
|
+
isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters?.isDefinedBy).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.isDefinedBy.type(), value)),
|
|
1979
|
+
label: $convertToMaybe($identityConversionFunction)(parameters?.label).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.label.type(), value)),
|
|
1980
|
+
languageIn: $convertToMaybe($convertToArray($identityConversionFunction, true))(parameters?.languageIn).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.languageIn.type(), value)),
|
|
1981
|
+
maxCount: $convertToMaybe($identityConversionFunction)(parameters?.maxCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxCount.type(), value)),
|
|
1982
|
+
maxExclusive: $convertToMaybe($convertToLiteral)(parameters?.maxExclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxExclusive.type(), value)),
|
|
1983
|
+
maxInclusive: $convertToMaybe($convertToLiteral)(parameters?.maxInclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxInclusive.type(), value)),
|
|
1984
|
+
maxLength: $convertToMaybe($identityConversionFunction)(parameters?.maxLength).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxLength.type(), value)),
|
|
1985
|
+
minCount: $convertToMaybe($identityConversionFunction)(parameters?.minCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minCount.type(), value)),
|
|
1986
|
+
minExclusive: $convertToMaybe($convertToLiteral)(parameters?.minExclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minExclusive.type(), value)),
|
|
1987
|
+
minInclusive: $convertToMaybe($convertToLiteral)(parameters?.minInclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minInclusive.type(), value)),
|
|
1988
|
+
minLength: $convertToMaybe($identityConversionFunction)(parameters?.minLength).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minLength.type(), value)),
|
|
1989
|
+
node: $convertToMaybe($convertToIdentifier)(parameters?.node).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.node.type(), value)),
|
|
1990
|
+
nodeKind: $convertToMaybe(($convertToIri))(parameters?.nodeKind).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.nodeKind.type(), value)),
|
|
1991
|
+
not: $convertToArray($convertToIdentifier, true)(parameters?.not).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.not.type(), value)),
|
|
1992
|
+
or: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters?.or).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.or.type(), value)),
|
|
1993
|
+
patterns: $convertToArray($identityConversionFunction, true)(parameters?.patterns).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.patterns.type(), value)),
|
|
1994
|
+
properties: $convertToArray($convertToIdentifier, true)(parameters?.properties).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.properties.type(), value)),
|
|
1995
|
+
subClassOf: $convertToArray(($convertToIri), true)(parameters?.subClassOf).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.subClassOf.type(), value)),
|
|
1996
|
+
types: $convertToArray(($convertToIri), true)(parameters?.types).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.types.type(), value)),
|
|
1997
|
+
xone: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters?.xone).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.xone.type(), value)),
|
|
2001
1998
|
}).map((properties) => {
|
|
2002
1999
|
const finalObject = { ...properties, $type: "NodeShape" };
|
|
2003
2000
|
if (!globalThis.Object.prototype.hasOwnProperty.call(finalObject, "toString")) {
|
|
@@ -2966,7 +2963,7 @@ export var NodeShape;
|
|
|
2966
2963
|
if (!parameters.ignoreRdfType) {
|
|
2967
2964
|
parameters.resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape"), parameters.graph);
|
|
2968
2965
|
}
|
|
2969
|
-
parameters.resource.add(
|
|
2966
|
+
parameters.resource.add(PropertyShape.schema.properties.and.path, parameters.object.and.toList().flatMap((value) => [
|
|
2970
2967
|
value.length > 0
|
|
2971
2968
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
2972
2969
|
if (itemIndex === 0) {
|
|
@@ -2988,24 +2985,24 @@ export var NodeShape;
|
|
|
2988
2985
|
}).listResource.identifier
|
|
2989
2986
|
: $RdfVocabularies.rdf.nil,
|
|
2990
2987
|
]), parameters.graph);
|
|
2991
|
-
parameters.resource.add(
|
|
2992
|
-
parameters.resource.add(
|
|
2988
|
+
parameters.resource.add(PropertyShape.schema.properties.classes.path, parameters.object.classes.flatMap((item) => [item]), parameters.graph);
|
|
2989
|
+
parameters.resource.add(NodeShape.schema.properties.closed.path, parameters.object.closed
|
|
2993
2990
|
.toList()
|
|
2994
2991
|
.flatMap((value) => [
|
|
2995
2992
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
2996
2993
|
]), parameters.graph);
|
|
2997
|
-
parameters.resource.add(
|
|
2994
|
+
parameters.resource.add(PropertyShape.schema.properties.comment.path, parameters.object.comment
|
|
2998
2995
|
.toList()
|
|
2999
2996
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
3000
|
-
parameters.resource.add(
|
|
3001
|
-
parameters.resource.add(
|
|
2997
|
+
parameters.resource.add(PropertyShape.schema.properties.datatype.path, parameters.object.datatype.toList(), parameters.graph);
|
|
2998
|
+
parameters.resource.add(PropertyShape.schema.properties.deactivated.path, parameters.object.deactivated
|
|
3002
2999
|
.toList()
|
|
3003
3000
|
.flatMap((value) => [
|
|
3004
3001
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
3005
3002
|
]), parameters.graph);
|
|
3006
|
-
parameters.resource.add(
|
|
3007
|
-
parameters.resource.add(
|
|
3008
|
-
parameters.resource.add(
|
|
3003
|
+
parameters.resource.add(PropertyShape.schema.properties.flags.path, parameters.object.flags.flatMap((item) => [$literalFactory.string(item)]), parameters.graph);
|
|
3004
|
+
parameters.resource.add(PropertyShape.schema.properties.hasValues.path, parameters.object.hasValues.flatMap((item) => [item]), parameters.graph);
|
|
3005
|
+
parameters.resource.add(NodeShape.schema.properties.ignoredProperties.path, parameters.object.ignoredProperties.toList().flatMap((value) => [
|
|
3009
3006
|
value.length > 0
|
|
3010
3007
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
3011
3008
|
if (itemIndex === 0) {
|
|
@@ -3027,7 +3024,7 @@ export var NodeShape;
|
|
|
3027
3024
|
}).listResource.identifier
|
|
3028
3025
|
: $RdfVocabularies.rdf.nil,
|
|
3029
3026
|
]), parameters.graph);
|
|
3030
|
-
parameters.resource.add(
|
|
3027
|
+
parameters.resource.add(PropertyShape.schema.properties.in_.path, parameters.object.in_.toList().flatMap((value) => [
|
|
3031
3028
|
value.length > 0
|
|
3032
3029
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
3033
3030
|
if (itemIndex === 0) {
|
|
@@ -3049,11 +3046,11 @@ export var NodeShape;
|
|
|
3049
3046
|
}).listResource.identifier
|
|
3050
3047
|
: $RdfVocabularies.rdf.nil,
|
|
3051
3048
|
]), parameters.graph);
|
|
3052
|
-
parameters.resource.add(
|
|
3053
|
-
parameters.resource.add(
|
|
3049
|
+
parameters.resource.add(PropertyShape.schema.properties.isDefinedBy.path, parameters.object.isDefinedBy.toList(), parameters.graph);
|
|
3050
|
+
parameters.resource.add(PropertyShape.schema.properties.label.path, parameters.object.label
|
|
3054
3051
|
.toList()
|
|
3055
3052
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
3056
|
-
parameters.resource.add(
|
|
3053
|
+
parameters.resource.add(PropertyShape.schema.properties.languageIn.path, parameters.object.languageIn.toList().flatMap((value) => [
|
|
3057
3054
|
value.length > 0
|
|
3058
3055
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
3059
3056
|
if (itemIndex === 0) {
|
|
@@ -3075,34 +3072,34 @@ export var NodeShape;
|
|
|
3075
3072
|
}).listResource.identifier
|
|
3076
3073
|
: $RdfVocabularies.rdf.nil,
|
|
3077
3074
|
]), parameters.graph);
|
|
3078
|
-
parameters.resource.add(
|
|
3075
|
+
parameters.resource.add(PropertyShape.schema.properties.maxCount.path, parameters.object.maxCount
|
|
3079
3076
|
.toList()
|
|
3080
3077
|
.flatMap((value) => [
|
|
3081
3078
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
3082
3079
|
]), parameters.graph);
|
|
3083
|
-
parameters.resource.add(
|
|
3084
|
-
parameters.resource.add(
|
|
3085
|
-
parameters.resource.add(
|
|
3080
|
+
parameters.resource.add(PropertyShape.schema.properties.maxExclusive.path, parameters.object.maxExclusive.toList(), parameters.graph);
|
|
3081
|
+
parameters.resource.add(PropertyShape.schema.properties.maxInclusive.path, parameters.object.maxInclusive.toList(), parameters.graph);
|
|
3082
|
+
parameters.resource.add(PropertyShape.schema.properties.maxLength.path, parameters.object.maxLength
|
|
3086
3083
|
.toList()
|
|
3087
3084
|
.flatMap((value) => [
|
|
3088
3085
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
3089
3086
|
]), parameters.graph);
|
|
3090
|
-
parameters.resource.add(
|
|
3087
|
+
parameters.resource.add(PropertyShape.schema.properties.minCount.path, parameters.object.minCount
|
|
3091
3088
|
.toList()
|
|
3092
3089
|
.flatMap((value) => [
|
|
3093
3090
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
3094
3091
|
]), parameters.graph);
|
|
3095
|
-
parameters.resource.add(
|
|
3096
|
-
parameters.resource.add(
|
|
3097
|
-
parameters.resource.add(
|
|
3092
|
+
parameters.resource.add(PropertyShape.schema.properties.minExclusive.path, parameters.object.minExclusive.toList(), parameters.graph);
|
|
3093
|
+
parameters.resource.add(PropertyShape.schema.properties.minInclusive.path, parameters.object.minInclusive.toList(), parameters.graph);
|
|
3094
|
+
parameters.resource.add(PropertyShape.schema.properties.minLength.path, parameters.object.minLength
|
|
3098
3095
|
.toList()
|
|
3099
3096
|
.flatMap((value) => [
|
|
3100
3097
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
3101
3098
|
]), parameters.graph);
|
|
3102
|
-
parameters.resource.add(
|
|
3103
|
-
parameters.resource.add(
|
|
3104
|
-
parameters.resource.add(
|
|
3105
|
-
parameters.resource.add(
|
|
3099
|
+
parameters.resource.add(PropertyShape.schema.properties.node.path, parameters.object.node.toList(), parameters.graph);
|
|
3100
|
+
parameters.resource.add(PropertyShape.schema.properties.nodeKind.path, parameters.object.nodeKind.toList(), parameters.graph);
|
|
3101
|
+
parameters.resource.add(PropertyShape.schema.properties.not.path, parameters.object.not.flatMap((item) => [item]), parameters.graph);
|
|
3102
|
+
parameters.resource.add(PropertyShape.schema.properties.or.path, parameters.object.or.toList().flatMap((value) => [
|
|
3106
3103
|
value.length > 0
|
|
3107
3104
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
3108
3105
|
if (itemIndex === 0) {
|
|
@@ -3124,13 +3121,13 @@ export var NodeShape;
|
|
|
3124
3121
|
}).listResource.identifier
|
|
3125
3122
|
: $RdfVocabularies.rdf.nil,
|
|
3126
3123
|
]), parameters.graph);
|
|
3127
|
-
parameters.resource.add(
|
|
3124
|
+
parameters.resource.add(PropertyShape.schema.properties.patterns.path, parameters.object.patterns.flatMap((item) => [
|
|
3128
3125
|
$literalFactory.string(item),
|
|
3129
3126
|
]), parameters.graph);
|
|
3130
|
-
parameters.resource.add(
|
|
3131
|
-
parameters.resource.add(
|
|
3132
|
-
parameters.resource.add(
|
|
3133
|
-
parameters.resource.add(
|
|
3127
|
+
parameters.resource.add(NodeShape.schema.properties.properties.path, parameters.object.properties.flatMap((item) => [item]), parameters.graph);
|
|
3128
|
+
parameters.resource.add(NodeShape.schema.properties.subClassOf.path, parameters.object.subClassOf.flatMap((item) => [item]), parameters.graph);
|
|
3129
|
+
parameters.resource.add(NodeShape.schema.properties.types.path, parameters.object.types.flatMap((item) => [item]), parameters.graph);
|
|
3130
|
+
parameters.resource.add(PropertyShape.schema.properties.xone.path, parameters.object.xone.toList().flatMap((value) => [
|
|
3134
3131
|
value.length > 0
|
|
3135
3132
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
3136
3133
|
if (itemIndex === 0) {
|
package/package.json
CHANGED