@shaclmate/compiler 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/generators/ts/AbstractCollectionType.d.ts +2 -1
- package/dist/generators/ts/AbstractCollectionType.js +14 -13
- package/dist/generators/ts/AbstractContainerType.d.ts +2 -0
- package/dist/generators/ts/AbstractContainerType.js +20 -0
- package/dist/generators/ts/AbstractDateType.d.ts +1 -1
- package/dist/generators/ts/AbstractDateType.js +3 -3
- package/dist/generators/ts/AbstractLazyObjectType.d.ts +1 -0
- package/dist/generators/ts/AbstractLazyObjectType.js +1 -0
- package/dist/generators/ts/AbstractLiteralType.d.ts +1 -1
- package/dist/generators/ts/AbstractLiteralType.js +2 -2
- package/dist/generators/ts/AbstractNamedUnionType.js +33 -20
- package/dist/generators/ts/AbstractNumericType.d.ts +1 -8
- package/dist/generators/ts/AbstractNumericType.js +2 -16
- package/dist/generators/ts/AbstractPrimitiveType.d.ts +1 -0
- package/dist/generators/ts/AbstractPrimitiveType.js +2 -1
- package/dist/generators/ts/AbstractTermType.d.ts +2 -1
- package/dist/generators/ts/AbstractTermType.js +3 -2
- package/dist/generators/ts/AbstractType.d.ts +19 -8
- package/dist/generators/ts/AbstractUnionType.d.ts +3 -2
- package/dist/generators/ts/AbstractUnionType.js +14 -13
- package/dist/generators/ts/BigDecimalType.d.ts +3 -2
- package/dist/generators/ts/BigDecimalType.js +5 -12
- package/dist/generators/ts/BigIntType.js +1 -1
- package/dist/generators/ts/BlankNodeType.d.ts +3 -2
- package/dist/generators/ts/BlankNodeType.js +6 -5
- package/dist/generators/ts/BooleanType.d.ts +1 -2
- package/dist/generators/ts/BooleanType.js +2 -16
- package/dist/generators/ts/DateTimeType.d.ts +0 -1
- package/dist/generators/ts/DateTimeType.js +0 -9
- package/dist/generators/ts/DateType.d.ts +0 -1
- package/dist/generators/ts/DateType.js +0 -9
- package/dist/generators/ts/DefaultValueType.d.ts +2 -1
- package/dist/generators/ts/DefaultValueType.js +5 -4
- package/dist/generators/ts/IdentifierType.d.ts +3 -2
- package/dist/generators/ts/IdentifierType.js +6 -5
- package/dist/generators/ts/IriType.d.ts +3 -11
- package/dist/generators/ts/IriType.js +6 -5
- package/dist/generators/ts/LazyObjectOptionType.d.ts +1 -1
- package/dist/generators/ts/LazyObjectOptionType.js +3 -3
- package/dist/generators/ts/LazyObjectSetType.d.ts +2 -1
- package/dist/generators/ts/LazyObjectSetType.js +3 -3
- package/dist/generators/ts/LazyObjectType.d.ts +2 -1
- package/dist/generators/ts/LazyObjectType.js +3 -3
- package/dist/generators/ts/LiteralType.d.ts +2 -1
- package/dist/generators/ts/LiteralType.js +4 -3
- package/dist/generators/ts/NamedObjectType.d.ts +2 -1
- package/dist/generators/ts/NamedObjectType.js +9 -16
- package/dist/generators/ts/NamedObjectUnionType.js +14 -5
- package/dist/generators/ts/OptionType.d.ts +4 -3
- package/dist/generators/ts/OptionType.js +20 -17
- package/dist/generators/ts/Snippets.d.ts +7 -11
- package/dist/generators/ts/Snippets.js +46 -74
- package/dist/generators/ts/StringType.d.ts +1 -2
- package/dist/generators/ts/StringType.js +2 -16
- package/dist/generators/ts/TermType.d.ts +2 -1
- package/dist/generators/ts/TermType.js +6 -16
- package/dist/generators/ts/TsFeature.d.ts +1 -1
- package/dist/generators/ts/TsFeature.js +25 -7
- package/dist/generators/ts/TsGenerator.d.ts +1 -1
- package/dist/generators/ts/TsGenerator.js +66 -8
- package/dist/generators/ts/_NamedObjectType/IdentifierProperty.js +2 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_createFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_equalsFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterFunctionDeclaration.d.ts +2 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterFunctionDeclaration.js +6 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterTypeDeclaration.d.ts +2 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterTypeDeclaration.js +6 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlConstructTriplesFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlWherePatternsFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromJsonFunctionDeclaration.js +30 -9
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceFunctionDeclaration.js +6 -6
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceValuesFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfTypeVariableStatement.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_graphqlTypeVariableStatement.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_hashFunctionDeclarations.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_isTypeFunctionDeclaration.d.ts +2 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_isTypeFunctionDeclaration.js +6 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonParseFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonSchemaFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonTypeAliasDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonUiSchemaFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_schemaVariableStatement.d.ts +2 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_schemaVariableStatement.js +6 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toJsonFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toRdfResourceFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toStringFunctionDeclarations.js +3 -0
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlWherePatternsFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/ShaclProperty.js +26 -4
- package/dist/generators/ts/_NamedObjectType/identifierTypeDeclarations.js +3 -0
- package/dist/generators/ts/_snippets/snippets_ConversionFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ConversionFunction.js +4 -0
- package/dist/generators/ts/_snippets/snippets_PropertyPath.js +12 -6
- package/dist/generators/ts/_snippets/snippets_ValidationFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ValidationFunction.js +4 -0
- package/dist/generators/ts/_snippets/snippets_convertToArray.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToArray.js +8 -0
- package/dist/generators/ts/_snippets/snippets_convertToBlankNode.js +2 -2
- package/dist/generators/ts/_snippets/snippets_convertToIdentifier.js +2 -2
- package/dist/generators/ts/_snippets/snippets_convertToIri.js +2 -2
- package/dist/generators/ts/_snippets/snippets_convertToLazyObject.js +1 -1
- package/dist/generators/ts/_snippets/snippets_convertToLazyObjectOption.js +1 -1
- package/dist/generators/ts/_snippets/snippets_convertToLazyObjectSet.js +1 -1
- package/dist/generators/ts/_snippets/snippets_convertToLiteral.js +1 -1
- package/dist/generators/ts/_snippets/snippets_convertToMaybe.js +3 -3
- package/dist/generators/ts/_snippets/snippets_convertWithDefaultValue.js +4 -4
- package/dist/generators/ts/_snippets/snippets_identityConversionFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identityConversionFunction.js +6 -0
- package/dist/generators/ts/_snippets/snippets_identityValidationFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identityValidationFunction.js +6 -0
- package/dist/generators/ts/_snippets/snippets_validateArray.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_validateArray.js +13 -0
- package/dist/generators/ts/_snippets/snippets_validateMaybe.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_validateMaybe.js +7 -0
- package/dist/generators/ts/graphqlSchemaVariableStatement.js +1 -1
- package/dist/generators/ts/objectSetDeclarations.js +7 -10
- package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.js +0 -6
- package/dist/generators/ts/sparqlObjectSetClassDeclaration.js +0 -6
- package/dist/input/generated.d.ts +8 -8
- package/dist/input/generated.js +188 -191
- package/package.json +2 -2
- package/dist/generators/ts/_snippets/snippets_convertToBigDecimal.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToBigDecimal.js +0 -6
- package/dist/generators/ts/_snippets/snippets_convertToBoolean.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToBoolean.js +0 -6
- package/dist/generators/ts/_snippets/snippets_convertToDate.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToDate.js +0 -6
- package/dist/generators/ts/_snippets/snippets_convertToDateTime.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToDateTime.js +0 -6
- package/dist/generators/ts/_snippets/snippets_convertToMutableArray.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToMutableArray.js +0 -14
- package/dist/generators/ts/_snippets/snippets_convertToNumeric.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToNumeric.js +0 -6
- package/dist/generators/ts/_snippets/snippets_convertToObject.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToObject.js +0 -6
- package/dist/generators/ts/_snippets/snippets_convertToReadonlyArray.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToReadonlyArray.js +0 -14
- package/dist/generators/ts/_snippets/snippets_convertToString.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToString.js +0 -6
- package/dist/generators/ts/_snippets/snippets_convertToTerm.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToTerm.js +0 -6
- package/dist/generators/ts/_snippets/snippets_convertToUnion.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToUnion.js +0 -6
- package/dist/generators/ts/unsupportedObjectSetMethodDeclarations.d.ts +0 -12
- package/dist/generators/ts/unsupportedObjectSetMethodDeclarations.js +0 -21
package/dist/input/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,39 +77,15 @@ 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 $
|
|
82
|
-
return
|
|
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
|
-
function $convertWithDefaultValue(convertToItem) {
|
|
106
|
-
return (schema, value) => {
|
|
83
|
+
function $convertWithDefaultValue(convertToItem, defaultValue) {
|
|
84
|
+
return (value) => {
|
|
107
85
|
if (typeof value === "undefined") {
|
|
108
|
-
return convertToItem(
|
|
86
|
+
return convertToItem(defaultValue);
|
|
109
87
|
}
|
|
110
|
-
return convertToItem(
|
|
88
|
+
return convertToItem(value);
|
|
111
89
|
};
|
|
112
90
|
}
|
|
113
91
|
export var $EqualsResult;
|
|
@@ -281,6 +259,12 @@ class $IdentifierSet {
|
|
|
281
259
|
}
|
|
282
260
|
}
|
|
283
261
|
}
|
|
262
|
+
function $identityConversionFunction(value) {
|
|
263
|
+
return Either.of(value);
|
|
264
|
+
}
|
|
265
|
+
function $identityValidationFunction(_schema, value) {
|
|
266
|
+
return Either.of(value);
|
|
267
|
+
}
|
|
284
268
|
const $literalFactory = new LiteralFactory({ dataFactory: dataFactory });
|
|
285
269
|
const $parseIdentifier = NTriplesIdentifier.parser(dataFactory);
|
|
286
270
|
export var $PropertyPath;
|
|
@@ -355,6 +339,19 @@ function $shaclPropertyFromRdf({ graph, propertySchema, resource, typeFromRdf, }
|
|
|
355
339
|
function $strictEquals(left, right) {
|
|
356
340
|
return $EqualsResult.fromBooleanEqualsResult(left, right, left === right);
|
|
357
341
|
}
|
|
342
|
+
function $validateArray(validateItem, _readonly) {
|
|
343
|
+
return (schema, valueArray) => {
|
|
344
|
+
if (schema.minCount !== undefined && valueArray.length < schema.minCount) {
|
|
345
|
+
return Left(new Error(`value array has length (${valueArray.length}) less than minCount (${schema.minCount})`));
|
|
346
|
+
}
|
|
347
|
+
return Either.sequence(valueArray.map((value) => validateItem(schema.item(), value)));
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
function $validateMaybe(validateItem) {
|
|
351
|
+
return (schema, valueMaybe) => valueMaybe
|
|
352
|
+
.map((value) => validateItem(schema.item(), value).map(() => valueMaybe))
|
|
353
|
+
.orDefault(Either.of(valueMaybe));
|
|
354
|
+
}
|
|
358
355
|
function $wrap_FromRdfResourceFunction(_fromRdfResourceFunction) {
|
|
359
356
|
return (resource, options) => {
|
|
360
357
|
let { context, graph, ignoreRdfType = false, objectSet, preferredLanguages, } = options ?? {};
|
|
@@ -395,42 +392,42 @@ export var PropertyShape;
|
|
|
395
392
|
function create(parameters) {
|
|
396
393
|
return $sequenceRecord({
|
|
397
394
|
$identifier: $convertToIdentifierProperty(parameters.$identifier),
|
|
398
|
-
and: $convertToMaybe($
|
|
399
|
-
classes: $
|
|
400
|
-
comment: $convertToMaybe(
|
|
401
|
-
datatype: $convertToMaybe(($convertToIri))(PropertyShape.schema.properties.datatype.type(),
|
|
402
|
-
deactivated: $convertToMaybe(
|
|
403
|
-
defaultValue: $convertToMaybe(
|
|
404
|
-
description: $convertToMaybe(
|
|
405
|
-
display: $convertWithDefaultValue(
|
|
406
|
-
flags: $
|
|
407
|
-
groups: $
|
|
408
|
-
hasValues: $
|
|
409
|
-
in_: $convertToMaybe($
|
|
410
|
-
isDefinedBy: $convertToMaybe($convertToIdentifier)(PropertyShape.schema.properties.isDefinedBy.type(),
|
|
411
|
-
label: $convertToMaybe(
|
|
412
|
-
languageIn: $convertToMaybe($
|
|
413
|
-
maxCount: $convertToMaybe(
|
|
414
|
-
maxExclusive: $convertToMaybe($convertToLiteral)(PropertyShape.schema.properties.maxExclusive.type(),
|
|
415
|
-
maxInclusive: $convertToMaybe($convertToLiteral)(PropertyShape.schema.properties.maxInclusive.type(),
|
|
416
|
-
maxLength: $convertToMaybe(
|
|
417
|
-
minCount: $convertToMaybe(
|
|
418
|
-
minExclusive: $convertToMaybe($convertToLiteral)(PropertyShape.schema.properties.minExclusive.type(),
|
|
419
|
-
minInclusive: $convertToMaybe($convertToLiteral)(PropertyShape.schema.properties.minInclusive.type(),
|
|
420
|
-
minLength: $convertToMaybe(
|
|
421
|
-
mutable: $convertToMaybe(
|
|
422
|
-
name: $convertToMaybe(
|
|
423
|
-
node: $convertToMaybe($convertToIdentifier)(PropertyShape.schema.properties.node.type(),
|
|
424
|
-
nodeKind: $convertToMaybe(($convertToIri))(PropertyShape.schema.properties.nodeKind.type(),
|
|
425
|
-
not: $
|
|
426
|
-
or: $convertToMaybe($
|
|
427
|
-
order: $convertToMaybe(
|
|
428
|
-
path:
|
|
429
|
-
patterns: $
|
|
430
|
-
resolve: $convertToMaybe($convertToIdentifier)(PropertyShape.schema.properties.resolve.type(),
|
|
431
|
-
shaclmateName: $convertToMaybe(
|
|
432
|
-
uniqueLang: $convertToMaybe(
|
|
433
|
-
xone: $convertToMaybe($
|
|
395
|
+
and: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters.and).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.and.type(), value)),
|
|
396
|
+
classes: $convertToArray(($convertToIri), true)(parameters.classes).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.classes.type(), value)),
|
|
397
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters.comment).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.comment.type(), value)),
|
|
398
|
+
datatype: $convertToMaybe(($convertToIri))(parameters.datatype).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.datatype.type(), value)),
|
|
399
|
+
deactivated: $convertToMaybe($identityConversionFunction)(parameters.deactivated).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.deactivated.type(), value)),
|
|
400
|
+
defaultValue: $convertToMaybe($identityConversionFunction)(parameters.defaultValue).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.defaultValue.type(), value)),
|
|
401
|
+
description: $convertToMaybe($identityConversionFunction)(parameters.description).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.description.type(), value)),
|
|
402
|
+
display: $convertWithDefaultValue($identityConversionFunction, false)(parameters.display),
|
|
403
|
+
flags: $convertToArray($identityConversionFunction, true)(parameters.flags).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.flags.type(), value)),
|
|
404
|
+
groups: $convertToArray($convertToIdentifier, true)(parameters.groups).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.groups.type(), value)),
|
|
405
|
+
hasValues: $convertToArray($identityConversionFunction, true)(parameters.hasValues).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.hasValues.type(), value)),
|
|
406
|
+
in_: $convertToMaybe($convertToArray($identityConversionFunction, true))(parameters.in_).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.in_.type(), value)),
|
|
407
|
+
isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters.isDefinedBy).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.isDefinedBy.type(), value)),
|
|
408
|
+
label: $convertToMaybe($identityConversionFunction)(parameters.label).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.label.type(), value)),
|
|
409
|
+
languageIn: $convertToMaybe($convertToArray($identityConversionFunction, true))(parameters.languageIn).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.languageIn.type(), value)),
|
|
410
|
+
maxCount: $convertToMaybe($identityConversionFunction)(parameters.maxCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxCount.type(), value)),
|
|
411
|
+
maxExclusive: $convertToMaybe($convertToLiteral)(parameters.maxExclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxExclusive.type(), value)),
|
|
412
|
+
maxInclusive: $convertToMaybe($convertToLiteral)(parameters.maxInclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxInclusive.type(), value)),
|
|
413
|
+
maxLength: $convertToMaybe($identityConversionFunction)(parameters.maxLength).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxLength.type(), value)),
|
|
414
|
+
minCount: $convertToMaybe($identityConversionFunction)(parameters.minCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minCount.type(), value)),
|
|
415
|
+
minExclusive: $convertToMaybe($convertToLiteral)(parameters.minExclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minExclusive.type(), value)),
|
|
416
|
+
minInclusive: $convertToMaybe($convertToLiteral)(parameters.minInclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minInclusive.type(), value)),
|
|
417
|
+
minLength: $convertToMaybe($identityConversionFunction)(parameters.minLength).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minLength.type(), value)),
|
|
418
|
+
mutable: $convertToMaybe($identityConversionFunction)(parameters.mutable).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.mutable.type(), value)),
|
|
419
|
+
name: $convertToMaybe($identityConversionFunction)(parameters.name).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.name.type(), value)),
|
|
420
|
+
node: $convertToMaybe($convertToIdentifier)(parameters.node).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.node.type(), value)),
|
|
421
|
+
nodeKind: $convertToMaybe(($convertToIri))(parameters.nodeKind).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.nodeKind.type(), value)),
|
|
422
|
+
not: $convertToArray($convertToIdentifier, true)(parameters.not).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.not.type(), value)),
|
|
423
|
+
or: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters.or).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.or.type(), value)),
|
|
424
|
+
order: $convertToMaybe($identityConversionFunction)(parameters.order).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.order.type(), value)),
|
|
425
|
+
path: Either.of(parameters.path),
|
|
426
|
+
patterns: $convertToArray($identityConversionFunction, true)(parameters.patterns).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.patterns.type(), value)),
|
|
427
|
+
resolve: $convertToMaybe($convertToIdentifier)(parameters.resolve).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.resolve.type(), value)),
|
|
428
|
+
shaclmateName: $convertToMaybe($identityConversionFunction)(parameters.shaclmateName).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.shaclmateName.type(), value)),
|
|
429
|
+
uniqueLang: $convertToMaybe($identityConversionFunction)(parameters.uniqueLang).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.uniqueLang.type(), value)),
|
|
430
|
+
xone: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters.xone).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.xone.type(), value)),
|
|
434
431
|
}).map((properties) => {
|
|
435
432
|
const finalObject = { ...properties, $type: "PropertyShape" };
|
|
436
433
|
if (!globalThis.Object.prototype.hasOwnProperty.call(finalObject, "toString")) {
|
|
@@ -1563,7 +1560,7 @@ export var PropertyShape;
|
|
|
1563
1560
|
if (!parameters.ignoreRdfType) {
|
|
1564
1561
|
parameters.resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape"), parameters.graph);
|
|
1565
1562
|
}
|
|
1566
|
-
parameters.resource.add(
|
|
1563
|
+
parameters.resource.add(PropertyShape.schema.properties.and.path, parameters.object.and.toList().flatMap((value) => [
|
|
1567
1564
|
value.length > 0
|
|
1568
1565
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
1569
1566
|
if (itemIndex === 0) {
|
|
@@ -1585,29 +1582,29 @@ export var PropertyShape;
|
|
|
1585
1582
|
}).listResource.identifier
|
|
1586
1583
|
: $RdfVocabularies.rdf.nil,
|
|
1587
1584
|
]), parameters.graph);
|
|
1588
|
-
parameters.resource.add(
|
|
1589
|
-
parameters.resource.add(
|
|
1585
|
+
parameters.resource.add(PropertyShape.schema.properties.classes.path, parameters.object.classes.flatMap((item) => [item]), parameters.graph);
|
|
1586
|
+
parameters.resource.add(PropertyShape.schema.properties.comment.path, parameters.object.comment
|
|
1590
1587
|
.toList()
|
|
1591
1588
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1592
|
-
parameters.resource.add(
|
|
1593
|
-
parameters.resource.add(
|
|
1589
|
+
parameters.resource.add(PropertyShape.schema.properties.datatype.path, parameters.object.datatype.toList(), parameters.graph);
|
|
1590
|
+
parameters.resource.add(PropertyShape.schema.properties.deactivated.path, parameters.object.deactivated
|
|
1594
1591
|
.toList()
|
|
1595
1592
|
.flatMap((value) => [
|
|
1596
1593
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
1597
1594
|
]), parameters.graph);
|
|
1598
|
-
parameters.resource.add(
|
|
1599
|
-
parameters.resource.add(
|
|
1595
|
+
parameters.resource.add(PropertyShape.schema.properties.defaultValue.path, parameters.object.defaultValue.toList(), parameters.graph);
|
|
1596
|
+
parameters.resource.add(PropertyShape.schema.properties.description.path, parameters.object.description
|
|
1600
1597
|
.toList()
|
|
1601
1598
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1602
|
-
parameters.resource.add(
|
|
1599
|
+
parameters.resource.add(PropertyShape.schema.properties.display.path, $strictEquals(parameters.object.display, false).isLeft()
|
|
1603
1600
|
? [
|
|
1604
1601
|
$literalFactory.boolean(parameters.object.display, $RdfVocabularies.xsd.boolean),
|
|
1605
1602
|
]
|
|
1606
1603
|
: [], parameters.graph);
|
|
1607
|
-
parameters.resource.add(
|
|
1608
|
-
parameters.resource.add(
|
|
1609
|
-
parameters.resource.add(
|
|
1610
|
-
parameters.resource.add(
|
|
1604
|
+
parameters.resource.add(PropertyShape.schema.properties.flags.path, parameters.object.flags.flatMap((item) => [$literalFactory.string(item)]), parameters.graph);
|
|
1605
|
+
parameters.resource.add(PropertyShape.schema.properties.groups.path, parameters.object.groups.flatMap((item) => [item]), parameters.graph);
|
|
1606
|
+
parameters.resource.add(PropertyShape.schema.properties.hasValues.path, parameters.object.hasValues.flatMap((item) => [item]), parameters.graph);
|
|
1607
|
+
parameters.resource.add(PropertyShape.schema.properties.in_.path, parameters.object.in_.toList().flatMap((value) => [
|
|
1611
1608
|
value.length > 0
|
|
1612
1609
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
1613
1610
|
if (itemIndex === 0) {
|
|
@@ -1629,11 +1626,11 @@ export var PropertyShape;
|
|
|
1629
1626
|
}).listResource.identifier
|
|
1630
1627
|
: $RdfVocabularies.rdf.nil,
|
|
1631
1628
|
]), parameters.graph);
|
|
1632
|
-
parameters.resource.add(
|
|
1633
|
-
parameters.resource.add(
|
|
1629
|
+
parameters.resource.add(PropertyShape.schema.properties.isDefinedBy.path, parameters.object.isDefinedBy.toList(), parameters.graph);
|
|
1630
|
+
parameters.resource.add(PropertyShape.schema.properties.label.path, parameters.object.label
|
|
1634
1631
|
.toList()
|
|
1635
1632
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1636
|
-
parameters.resource.add(
|
|
1633
|
+
parameters.resource.add(PropertyShape.schema.properties.languageIn.path, parameters.object.languageIn.toList().flatMap((value) => [
|
|
1637
1634
|
value.length > 0
|
|
1638
1635
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
1639
1636
|
if (itemIndex === 0) {
|
|
@@ -1655,42 +1652,42 @@ export var PropertyShape;
|
|
|
1655
1652
|
}).listResource.identifier
|
|
1656
1653
|
: $RdfVocabularies.rdf.nil,
|
|
1657
1654
|
]), parameters.graph);
|
|
1658
|
-
parameters.resource.add(
|
|
1655
|
+
parameters.resource.add(PropertyShape.schema.properties.maxCount.path, parameters.object.maxCount
|
|
1659
1656
|
.toList()
|
|
1660
1657
|
.flatMap((value) => [
|
|
1661
1658
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
1662
1659
|
]), parameters.graph);
|
|
1663
|
-
parameters.resource.add(
|
|
1664
|
-
parameters.resource.add(
|
|
1665
|
-
parameters.resource.add(
|
|
1660
|
+
parameters.resource.add(PropertyShape.schema.properties.maxExclusive.path, parameters.object.maxExclusive.toList(), parameters.graph);
|
|
1661
|
+
parameters.resource.add(PropertyShape.schema.properties.maxInclusive.path, parameters.object.maxInclusive.toList(), parameters.graph);
|
|
1662
|
+
parameters.resource.add(PropertyShape.schema.properties.maxLength.path, parameters.object.maxLength
|
|
1666
1663
|
.toList()
|
|
1667
1664
|
.flatMap((value) => [
|
|
1668
1665
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
1669
1666
|
]), parameters.graph);
|
|
1670
|
-
parameters.resource.add(
|
|
1667
|
+
parameters.resource.add(PropertyShape.schema.properties.minCount.path, parameters.object.minCount
|
|
1671
1668
|
.toList()
|
|
1672
1669
|
.flatMap((value) => [
|
|
1673
1670
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
1674
1671
|
]), parameters.graph);
|
|
1675
|
-
parameters.resource.add(
|
|
1676
|
-
parameters.resource.add(
|
|
1677
|
-
parameters.resource.add(
|
|
1672
|
+
parameters.resource.add(PropertyShape.schema.properties.minExclusive.path, parameters.object.minExclusive.toList(), parameters.graph);
|
|
1673
|
+
parameters.resource.add(PropertyShape.schema.properties.minInclusive.path, parameters.object.minInclusive.toList(), parameters.graph);
|
|
1674
|
+
parameters.resource.add(PropertyShape.schema.properties.minLength.path, parameters.object.minLength
|
|
1678
1675
|
.toList()
|
|
1679
1676
|
.flatMap((value) => [
|
|
1680
1677
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
1681
1678
|
]), parameters.graph);
|
|
1682
|
-
parameters.resource.add(
|
|
1679
|
+
parameters.resource.add(PropertyShape.schema.properties.mutable.path, parameters.object.mutable
|
|
1683
1680
|
.toList()
|
|
1684
1681
|
.flatMap((value) => [
|
|
1685
1682
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
1686
1683
|
]), parameters.graph);
|
|
1687
|
-
parameters.resource.add(
|
|
1684
|
+
parameters.resource.add(PropertyShape.schema.properties.name.path, parameters.object.name
|
|
1688
1685
|
.toList()
|
|
1689
1686
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1690
|
-
parameters.resource.add(
|
|
1691
|
-
parameters.resource.add(
|
|
1692
|
-
parameters.resource.add(
|
|
1693
|
-
parameters.resource.add(
|
|
1687
|
+
parameters.resource.add(PropertyShape.schema.properties.node.path, parameters.object.node.toList(), parameters.graph);
|
|
1688
|
+
parameters.resource.add(PropertyShape.schema.properties.nodeKind.path, parameters.object.nodeKind.toList(), parameters.graph);
|
|
1689
|
+
parameters.resource.add(PropertyShape.schema.properties.not.path, parameters.object.not.flatMap((item) => [item]), parameters.graph);
|
|
1690
|
+
parameters.resource.add(PropertyShape.schema.properties.or.path, parameters.object.or.toList().flatMap((value) => [
|
|
1694
1691
|
value.length > 0
|
|
1695
1692
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
1696
1693
|
if (itemIndex === 0) {
|
|
@@ -1712,30 +1709,30 @@ export var PropertyShape;
|
|
|
1712
1709
|
}).listResource.identifier
|
|
1713
1710
|
: $RdfVocabularies.rdf.nil,
|
|
1714
1711
|
]), parameters.graph);
|
|
1715
|
-
parameters.resource.add(
|
|
1712
|
+
parameters.resource.add(PropertyShape.schema.properties.order.path, parameters.object.order
|
|
1716
1713
|
.toList()
|
|
1717
1714
|
.flatMap((value) => [
|
|
1718
1715
|
$literalFactory.number(value, $RdfVocabularies.xsd.double),
|
|
1719
1716
|
]), parameters.graph);
|
|
1720
|
-
parameters.resource.add(
|
|
1717
|
+
parameters.resource.add(PropertyShape.schema.properties.path.path, [
|
|
1721
1718
|
$PropertyPath.toRdfResource(parameters.object.path, {
|
|
1722
1719
|
graph: parameters.graph,
|
|
1723
1720
|
resourceSet: parameters.resourceSet,
|
|
1724
1721
|
}).identifier,
|
|
1725
1722
|
], parameters.graph);
|
|
1726
|
-
parameters.resource.add(
|
|
1723
|
+
parameters.resource.add(PropertyShape.schema.properties.patterns.path, parameters.object.patterns.flatMap((item) => [
|
|
1727
1724
|
$literalFactory.string(item),
|
|
1728
1725
|
]), parameters.graph);
|
|
1729
|
-
parameters.resource.add(
|
|
1730
|
-
parameters.resource.add(
|
|
1726
|
+
parameters.resource.add(PropertyShape.schema.properties.resolve.path, parameters.object.resolve.toList(), parameters.graph);
|
|
1727
|
+
parameters.resource.add(PropertyShape.schema.properties.shaclmateName.path, parameters.object.shaclmateName
|
|
1731
1728
|
.toList()
|
|
1732
1729
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1733
|
-
parameters.resource.add(
|
|
1730
|
+
parameters.resource.add(PropertyShape.schema.properties.uniqueLang.path, parameters.object.uniqueLang
|
|
1734
1731
|
.toList()
|
|
1735
1732
|
.flatMap((value) => [
|
|
1736
1733
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
1737
1734
|
]), parameters.graph);
|
|
1738
|
-
parameters.resource.add(
|
|
1735
|
+
parameters.resource.add(PropertyShape.schema.properties.xone.path, parameters.object.xone.toList().flatMap((value) => [
|
|
1739
1736
|
value.length > 0
|
|
1740
1737
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
1741
1738
|
if (itemIndex === 0) {
|
|
@@ -1782,8 +1779,8 @@ export var PropertyGroup;
|
|
|
1782
1779
|
function create(parameters) {
|
|
1783
1780
|
return $sequenceRecord({
|
|
1784
1781
|
$identifier: $convertToIdentifierProperty(parameters?.$identifier),
|
|
1785
|
-
comment: $convertToMaybe(
|
|
1786
|
-
label: $convertToMaybe(
|
|
1782
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.comment.type(), value)),
|
|
1783
|
+
label: $convertToMaybe($identityConversionFunction)(parameters?.label).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.label.type(), value)),
|
|
1787
1784
|
}).map((properties) => {
|
|
1788
1785
|
const finalObject = { ...properties, $type: "PropertyGroup" };
|
|
1789
1786
|
if (!globalThis.Object.prototype.hasOwnProperty.call(finalObject, "toString")) {
|
|
@@ -1927,10 +1924,10 @@ export var PropertyGroup;
|
|
|
1927
1924
|
if (!parameters.ignoreRdfType) {
|
|
1928
1925
|
parameters.resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"), parameters.graph);
|
|
1929
1926
|
}
|
|
1930
|
-
parameters.resource.add(
|
|
1927
|
+
parameters.resource.add(PropertyShape.schema.properties.comment.path, parameters.object.comment
|
|
1931
1928
|
.toList()
|
|
1932
1929
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1933
|
-
parameters.resource.add(
|
|
1930
|
+
parameters.resource.add(PropertyShape.schema.properties.label.path, parameters.object.label
|
|
1934
1931
|
.toList()
|
|
1935
1932
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
1936
1933
|
return parameters.resource;
|
|
@@ -1953,8 +1950,8 @@ export var Ontology;
|
|
|
1953
1950
|
function create(parameters) {
|
|
1954
1951
|
return $sequenceRecord({
|
|
1955
1952
|
$identifier: $convertToIdentifierProperty(parameters?.$identifier),
|
|
1956
|
-
comment: $convertToMaybe(
|
|
1957
|
-
label: $convertToMaybe(
|
|
1953
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.comment.type(), value)),
|
|
1954
|
+
label: $convertToMaybe($identityConversionFunction)(parameters?.label).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.label.type(), value)),
|
|
1958
1955
|
}).map((properties) => {
|
|
1959
1956
|
const finalObject = { ...properties, $type: "Ontology" };
|
|
1960
1957
|
if (!globalThis.Object.prototype.hasOwnProperty.call(finalObject, "toString")) {
|
|
@@ -2098,10 +2095,10 @@ export var Ontology;
|
|
|
2098
2095
|
if (!parameters.ignoreRdfType) {
|
|
2099
2096
|
parameters.resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology"), parameters.graph);
|
|
2100
2097
|
}
|
|
2101
|
-
parameters.resource.add(
|
|
2098
|
+
parameters.resource.add(PropertyShape.schema.properties.comment.path, parameters.object.comment
|
|
2102
2099
|
.toList()
|
|
2103
2100
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
2104
|
-
parameters.resource.add(
|
|
2101
|
+
parameters.resource.add(PropertyShape.schema.properties.label.path, parameters.object.label
|
|
2105
2102
|
.toList()
|
|
2106
2103
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
2107
2104
|
return parameters.resource;
|
|
@@ -2124,44 +2121,44 @@ export var NodeShape;
|
|
|
2124
2121
|
function create(parameters) {
|
|
2125
2122
|
return $sequenceRecord({
|
|
2126
2123
|
$identifier: $convertToIdentifierProperty(parameters?.$identifier),
|
|
2127
|
-
and: $convertToMaybe($
|
|
2128
|
-
classes: $
|
|
2129
|
-
closed: $convertToMaybe(
|
|
2130
|
-
comment: $convertToMaybe(
|
|
2131
|
-
datatype: $convertToMaybe(($convertToIri))(
|
|
2132
|
-
deactivated: $convertToMaybe(
|
|
2133
|
-
discriminantValue: $convertToMaybe(
|
|
2134
|
-
extern: $convertToMaybe(
|
|
2135
|
-
flags: $
|
|
2136
|
-
fromRdfType: $convertToMaybe(($convertToIri))(NodeShape.schema.properties.fromRdfType.type(),
|
|
2137
|
-
hasValues: $
|
|
2138
|
-
ignoredProperties: $convertToMaybe($
|
|
2139
|
-
in_: $convertToMaybe($
|
|
2140
|
-
isDefinedBy: $convertToMaybe($convertToIdentifier)(
|
|
2141
|
-
label: $convertToMaybe(
|
|
2142
|
-
languageIn: $convertToMaybe($
|
|
2143
|
-
maxCount: $convertToMaybe(
|
|
2144
|
-
maxExclusive: $convertToMaybe($convertToLiteral)(
|
|
2145
|
-
maxInclusive: $convertToMaybe($convertToLiteral)(
|
|
2146
|
-
maxLength: $convertToMaybe(
|
|
2147
|
-
minCount: $convertToMaybe(
|
|
2148
|
-
minExclusive: $convertToMaybe($convertToLiteral)(
|
|
2149
|
-
minInclusive: $convertToMaybe($convertToLiteral)(
|
|
2150
|
-
minLength: $convertToMaybe(
|
|
2151
|
-
mutable: $convertToMaybe(
|
|
2152
|
-
node: $convertToMaybe($convertToIdentifier)(
|
|
2153
|
-
nodeKind: $convertToMaybe(($convertToIri))(
|
|
2154
|
-
not: $
|
|
2155
|
-
or: $convertToMaybe($
|
|
2156
|
-
patterns: $
|
|
2157
|
-
properties: $
|
|
2158
|
-
rdfType: $convertToMaybe(($convertToIri))(NodeShape.schema.properties.rdfType.type(),
|
|
2159
|
-
shaclmateName: $convertToMaybe(
|
|
2160
|
-
subClassOf: $
|
|
2161
|
-
toRdfTypes: $
|
|
2162
|
-
tsImports: $
|
|
2163
|
-
types: $
|
|
2164
|
-
xone: $convertToMaybe($
|
|
2124
|
+
and: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters?.and).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.and.type(), value)),
|
|
2125
|
+
classes: $convertToArray(($convertToIri), true)(parameters?.classes).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.classes.type(), value)),
|
|
2126
|
+
closed: $convertToMaybe($identityConversionFunction)(parameters?.closed).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.closed.type(), value)),
|
|
2127
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.comment.type(), value)),
|
|
2128
|
+
datatype: $convertToMaybe(($convertToIri))(parameters?.datatype).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.datatype.type(), value)),
|
|
2129
|
+
deactivated: $convertToMaybe($identityConversionFunction)(parameters?.deactivated).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.deactivated.type(), value)),
|
|
2130
|
+
discriminantValue: $convertToMaybe($identityConversionFunction)(parameters?.discriminantValue).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.discriminantValue.type(), value)),
|
|
2131
|
+
extern: $convertToMaybe($identityConversionFunction)(parameters?.extern).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.extern.type(), value)),
|
|
2132
|
+
flags: $convertToArray($identityConversionFunction, true)(parameters?.flags).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.flags.type(), value)),
|
|
2133
|
+
fromRdfType: $convertToMaybe(($convertToIri))(parameters?.fromRdfType).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.fromRdfType.type(), value)),
|
|
2134
|
+
hasValues: $convertToArray($identityConversionFunction, true)(parameters?.hasValues).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.hasValues.type(), value)),
|
|
2135
|
+
ignoredProperties: $convertToMaybe($convertToArray(($convertToIri), true))(parameters?.ignoredProperties).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(NodeShape.schema.properties.ignoredProperties.type(), value)),
|
|
2136
|
+
in_: $convertToMaybe($convertToArray($identityConversionFunction, true))(parameters?.in_).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.in_.type(), value)),
|
|
2137
|
+
isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters?.isDefinedBy).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.isDefinedBy.type(), value)),
|
|
2138
|
+
label: $convertToMaybe($identityConversionFunction)(parameters?.label).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.label.type(), value)),
|
|
2139
|
+
languageIn: $convertToMaybe($convertToArray($identityConversionFunction, true))(parameters?.languageIn).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.languageIn.type(), value)),
|
|
2140
|
+
maxCount: $convertToMaybe($identityConversionFunction)(parameters?.maxCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxCount.type(), value)),
|
|
2141
|
+
maxExclusive: $convertToMaybe($convertToLiteral)(parameters?.maxExclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxExclusive.type(), value)),
|
|
2142
|
+
maxInclusive: $convertToMaybe($convertToLiteral)(parameters?.maxInclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxInclusive.type(), value)),
|
|
2143
|
+
maxLength: $convertToMaybe($identityConversionFunction)(parameters?.maxLength).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxLength.type(), value)),
|
|
2144
|
+
minCount: $convertToMaybe($identityConversionFunction)(parameters?.minCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minCount.type(), value)),
|
|
2145
|
+
minExclusive: $convertToMaybe($convertToLiteral)(parameters?.minExclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minExclusive.type(), value)),
|
|
2146
|
+
minInclusive: $convertToMaybe($convertToLiteral)(parameters?.minInclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minInclusive.type(), value)),
|
|
2147
|
+
minLength: $convertToMaybe($identityConversionFunction)(parameters?.minLength).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minLength.type(), value)),
|
|
2148
|
+
mutable: $convertToMaybe($identityConversionFunction)(parameters?.mutable).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.mutable.type(), value)),
|
|
2149
|
+
node: $convertToMaybe($convertToIdentifier)(parameters?.node).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.node.type(), value)),
|
|
2150
|
+
nodeKind: $convertToMaybe(($convertToIri))(parameters?.nodeKind).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.nodeKind.type(), value)),
|
|
2151
|
+
not: $convertToArray($convertToIdentifier, true)(parameters?.not).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.not.type(), value)),
|
|
2152
|
+
or: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters?.or).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.or.type(), value)),
|
|
2153
|
+
patterns: $convertToArray($identityConversionFunction, true)(parameters?.patterns).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.patterns.type(), value)),
|
|
2154
|
+
properties: $convertToArray($convertToIdentifier, true)(parameters?.properties).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.properties.type(), value)),
|
|
2155
|
+
rdfType: $convertToMaybe(($convertToIri))(parameters?.rdfType).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.rdfType.type(), value)),
|
|
2156
|
+
shaclmateName: $convertToMaybe($identityConversionFunction)(parameters?.shaclmateName).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.shaclmateName.type(), value)),
|
|
2157
|
+
subClassOf: $convertToArray(($convertToIri), true)(parameters?.subClassOf).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.subClassOf.type(), value)),
|
|
2158
|
+
toRdfTypes: $convertToArray(($convertToIri), true)(parameters?.toRdfTypes).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.toRdfTypes.type(), value)),
|
|
2159
|
+
tsImports: $convertToArray($identityConversionFunction, true)(parameters?.tsImports).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.tsImports.type(), value)),
|
|
2160
|
+
types: $convertToArray(($convertToIri), true)(parameters?.types).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.types.type(), value)),
|
|
2161
|
+
xone: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters?.xone).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.xone.type(), value)),
|
|
2165
2162
|
}).map((properties) => {
|
|
2166
2163
|
const finalObject = { ...properties, $type: "NodeShape" };
|
|
2167
2164
|
if (!globalThis.Object.prototype.hasOwnProperty.call(finalObject, "toString")) {
|
|
@@ -3339,7 +3336,7 @@ export var NodeShape;
|
|
|
3339
3336
|
if (!parameters.ignoreRdfType) {
|
|
3340
3337
|
parameters.resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape"), parameters.graph);
|
|
3341
3338
|
}
|
|
3342
|
-
parameters.resource.add(
|
|
3339
|
+
parameters.resource.add(PropertyShape.schema.properties.and.path, parameters.object.and.toList().flatMap((value) => [
|
|
3343
3340
|
value.length > 0
|
|
3344
3341
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
3345
3342
|
if (itemIndex === 0) {
|
|
@@ -3361,33 +3358,33 @@ export var NodeShape;
|
|
|
3361
3358
|
}).listResource.identifier
|
|
3362
3359
|
: $RdfVocabularies.rdf.nil,
|
|
3363
3360
|
]), parameters.graph);
|
|
3364
|
-
parameters.resource.add(
|
|
3365
|
-
parameters.resource.add(
|
|
3361
|
+
parameters.resource.add(PropertyShape.schema.properties.classes.path, parameters.object.classes.flatMap((item) => [item]), parameters.graph);
|
|
3362
|
+
parameters.resource.add(NodeShape.schema.properties.closed.path, parameters.object.closed
|
|
3366
3363
|
.toList()
|
|
3367
3364
|
.flatMap((value) => [
|
|
3368
3365
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
3369
3366
|
]), parameters.graph);
|
|
3370
|
-
parameters.resource.add(
|
|
3367
|
+
parameters.resource.add(PropertyShape.schema.properties.comment.path, parameters.object.comment
|
|
3371
3368
|
.toList()
|
|
3372
3369
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
3373
|
-
parameters.resource.add(
|
|
3374
|
-
parameters.resource.add(
|
|
3370
|
+
parameters.resource.add(PropertyShape.schema.properties.datatype.path, parameters.object.datatype.toList(), parameters.graph);
|
|
3371
|
+
parameters.resource.add(PropertyShape.schema.properties.deactivated.path, parameters.object.deactivated
|
|
3375
3372
|
.toList()
|
|
3376
3373
|
.flatMap((value) => [
|
|
3377
3374
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
3378
3375
|
]), parameters.graph);
|
|
3379
|
-
parameters.resource.add(
|
|
3376
|
+
parameters.resource.add(NodeShape.schema.properties.discriminantValue.path, parameters.object.discriminantValue
|
|
3380
3377
|
.toList()
|
|
3381
3378
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
3382
|
-
parameters.resource.add(
|
|
3379
|
+
parameters.resource.add(NodeShape.schema.properties.extern.path, parameters.object.extern
|
|
3383
3380
|
.toList()
|
|
3384
3381
|
.flatMap((value) => [
|
|
3385
3382
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
3386
3383
|
]), parameters.graph);
|
|
3387
|
-
parameters.resource.add(
|
|
3388
|
-
parameters.resource.add(
|
|
3389
|
-
parameters.resource.add(
|
|
3390
|
-
parameters.resource.add(
|
|
3384
|
+
parameters.resource.add(PropertyShape.schema.properties.flags.path, parameters.object.flags.flatMap((item) => [$literalFactory.string(item)]), parameters.graph);
|
|
3385
|
+
parameters.resource.add(NodeShape.schema.properties.fromRdfType.path, parameters.object.fromRdfType.toList(), parameters.graph);
|
|
3386
|
+
parameters.resource.add(PropertyShape.schema.properties.hasValues.path, parameters.object.hasValues.flatMap((item) => [item]), parameters.graph);
|
|
3387
|
+
parameters.resource.add(NodeShape.schema.properties.ignoredProperties.path, parameters.object.ignoredProperties.toList().flatMap((value) => [
|
|
3391
3388
|
value.length > 0
|
|
3392
3389
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
3393
3390
|
if (itemIndex === 0) {
|
|
@@ -3409,7 +3406,7 @@ export var NodeShape;
|
|
|
3409
3406
|
}).listResource.identifier
|
|
3410
3407
|
: $RdfVocabularies.rdf.nil,
|
|
3411
3408
|
]), parameters.graph);
|
|
3412
|
-
parameters.resource.add(
|
|
3409
|
+
parameters.resource.add(PropertyShape.schema.properties.in_.path, parameters.object.in_.toList().flatMap((value) => [
|
|
3413
3410
|
value.length > 0
|
|
3414
3411
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
3415
3412
|
if (itemIndex === 0) {
|
|
@@ -3431,11 +3428,11 @@ export var NodeShape;
|
|
|
3431
3428
|
}).listResource.identifier
|
|
3432
3429
|
: $RdfVocabularies.rdf.nil,
|
|
3433
3430
|
]), parameters.graph);
|
|
3434
|
-
parameters.resource.add(
|
|
3435
|
-
parameters.resource.add(
|
|
3431
|
+
parameters.resource.add(PropertyShape.schema.properties.isDefinedBy.path, parameters.object.isDefinedBy.toList(), parameters.graph);
|
|
3432
|
+
parameters.resource.add(PropertyShape.schema.properties.label.path, parameters.object.label
|
|
3436
3433
|
.toList()
|
|
3437
3434
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
3438
|
-
parameters.resource.add(
|
|
3435
|
+
parameters.resource.add(PropertyShape.schema.properties.languageIn.path, parameters.object.languageIn.toList().flatMap((value) => [
|
|
3439
3436
|
value.length > 0
|
|
3440
3437
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
3441
3438
|
if (itemIndex === 0) {
|
|
@@ -3457,39 +3454,39 @@ export var NodeShape;
|
|
|
3457
3454
|
}).listResource.identifier
|
|
3458
3455
|
: $RdfVocabularies.rdf.nil,
|
|
3459
3456
|
]), parameters.graph);
|
|
3460
|
-
parameters.resource.add(
|
|
3457
|
+
parameters.resource.add(PropertyShape.schema.properties.maxCount.path, parameters.object.maxCount
|
|
3461
3458
|
.toList()
|
|
3462
3459
|
.flatMap((value) => [
|
|
3463
3460
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
3464
3461
|
]), parameters.graph);
|
|
3465
|
-
parameters.resource.add(
|
|
3466
|
-
parameters.resource.add(
|
|
3467
|
-
parameters.resource.add(
|
|
3462
|
+
parameters.resource.add(PropertyShape.schema.properties.maxExclusive.path, parameters.object.maxExclusive.toList(), parameters.graph);
|
|
3463
|
+
parameters.resource.add(PropertyShape.schema.properties.maxInclusive.path, parameters.object.maxInclusive.toList(), parameters.graph);
|
|
3464
|
+
parameters.resource.add(PropertyShape.schema.properties.maxLength.path, parameters.object.maxLength
|
|
3468
3465
|
.toList()
|
|
3469
3466
|
.flatMap((value) => [
|
|
3470
3467
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
3471
3468
|
]), parameters.graph);
|
|
3472
|
-
parameters.resource.add(
|
|
3469
|
+
parameters.resource.add(PropertyShape.schema.properties.minCount.path, parameters.object.minCount
|
|
3473
3470
|
.toList()
|
|
3474
3471
|
.flatMap((value) => [
|
|
3475
3472
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
3476
3473
|
]), parameters.graph);
|
|
3477
|
-
parameters.resource.add(
|
|
3478
|
-
parameters.resource.add(
|
|
3479
|
-
parameters.resource.add(
|
|
3474
|
+
parameters.resource.add(PropertyShape.schema.properties.minExclusive.path, parameters.object.minExclusive.toList(), parameters.graph);
|
|
3475
|
+
parameters.resource.add(PropertyShape.schema.properties.minInclusive.path, parameters.object.minInclusive.toList(), parameters.graph);
|
|
3476
|
+
parameters.resource.add(PropertyShape.schema.properties.minLength.path, parameters.object.minLength
|
|
3480
3477
|
.toList()
|
|
3481
3478
|
.flatMap((value) => [
|
|
3482
3479
|
$literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
|
|
3483
3480
|
]), parameters.graph);
|
|
3484
|
-
parameters.resource.add(
|
|
3481
|
+
parameters.resource.add(PropertyShape.schema.properties.mutable.path, parameters.object.mutable
|
|
3485
3482
|
.toList()
|
|
3486
3483
|
.flatMap((value) => [
|
|
3487
3484
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
3488
3485
|
]), parameters.graph);
|
|
3489
|
-
parameters.resource.add(
|
|
3490
|
-
parameters.resource.add(
|
|
3491
|
-
parameters.resource.add(
|
|
3492
|
-
parameters.resource.add(
|
|
3486
|
+
parameters.resource.add(PropertyShape.schema.properties.node.path, parameters.object.node.toList(), parameters.graph);
|
|
3487
|
+
parameters.resource.add(PropertyShape.schema.properties.nodeKind.path, parameters.object.nodeKind.toList(), parameters.graph);
|
|
3488
|
+
parameters.resource.add(PropertyShape.schema.properties.not.path, parameters.object.not.flatMap((item) => [item]), parameters.graph);
|
|
3489
|
+
parameters.resource.add(PropertyShape.schema.properties.or.path, parameters.object.or.toList().flatMap((value) => [
|
|
3493
3490
|
value.length > 0
|
|
3494
3491
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
3495
3492
|
if (itemIndex === 0) {
|
|
@@ -3511,21 +3508,21 @@ export var NodeShape;
|
|
|
3511
3508
|
}).listResource.identifier
|
|
3512
3509
|
: $RdfVocabularies.rdf.nil,
|
|
3513
3510
|
]), parameters.graph);
|
|
3514
|
-
parameters.resource.add(
|
|
3511
|
+
parameters.resource.add(PropertyShape.schema.properties.patterns.path, parameters.object.patterns.flatMap((item) => [
|
|
3515
3512
|
$literalFactory.string(item),
|
|
3516
3513
|
]), parameters.graph);
|
|
3517
|
-
parameters.resource.add(
|
|
3518
|
-
parameters.resource.add(
|
|
3519
|
-
parameters.resource.add(
|
|
3514
|
+
parameters.resource.add(NodeShape.schema.properties.properties.path, parameters.object.properties.flatMap((item) => [item]), parameters.graph);
|
|
3515
|
+
parameters.resource.add(NodeShape.schema.properties.rdfType.path, parameters.object.rdfType.toList(), parameters.graph);
|
|
3516
|
+
parameters.resource.add(PropertyShape.schema.properties.shaclmateName.path, parameters.object.shaclmateName
|
|
3520
3517
|
.toList()
|
|
3521
3518
|
.flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
|
|
3522
|
-
parameters.resource.add(
|
|
3523
|
-
parameters.resource.add(
|
|
3524
|
-
parameters.resource.add(
|
|
3519
|
+
parameters.resource.add(NodeShape.schema.properties.subClassOf.path, parameters.object.subClassOf.flatMap((item) => [item]), parameters.graph);
|
|
3520
|
+
parameters.resource.add(NodeShape.schema.properties.toRdfTypes.path, parameters.object.toRdfTypes.flatMap((item) => [item]), parameters.graph);
|
|
3521
|
+
parameters.resource.add(NodeShape.schema.properties.tsImports.path, parameters.object.tsImports.flatMap((item) => [
|
|
3525
3522
|
$literalFactory.string(item),
|
|
3526
3523
|
]), parameters.graph);
|
|
3527
|
-
parameters.resource.add(
|
|
3528
|
-
parameters.resource.add(
|
|
3524
|
+
parameters.resource.add(NodeShape.schema.properties.types.path, parameters.object.types.flatMap((item) => [item]), parameters.graph);
|
|
3525
|
+
parameters.resource.add(PropertyShape.schema.properties.xone.path, parameters.object.xone.toList().flatMap((value) => [
|
|
3529
3526
|
value.length > 0
|
|
3530
3527
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
3531
3528
|
if (itemIndex === 0) {
|