@shaclmate/compiler 4.0.78 → 4.0.79
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/AbstractType.d.ts +5 -1
- package/dist/generators/ts/AbstractType.js +5 -0
- package/dist/generators/ts/DiscriminatedUnionType.d.ts +3 -2
- package/dist/generators/ts/DiscriminatedUnionType.js +67 -63
- package/dist/generators/ts/LazyOptionType.d.ts +1 -0
- package/dist/generators/ts/ObjectType.js +10 -2
- package/dist/generators/ts/_AbstractType/AbstractType_ConversionFunction.d.ts +9 -3
- package/dist/generators/ts/_AbstractType/AbstractType_ConversionFunction.js +18 -1
- package/dist/generators/ts/_DiscriminatedUnionType/DiscriminatedUnionType_conversionFunctionExpression.d.ts +6 -0
- package/dist/generators/ts/_DiscriminatedUnionType/DiscriminatedUnionType_conversionFunctionExpression.js +86 -0
- package/dist/input/input.shaclmate.d.ts +116 -100
- package/dist/input/input.shaclmate.js +144 -130
- package/package.json +4 -2
|
@@ -24,17 +24,19 @@ function $compactRecord(record) {
|
|
|
24
24
|
return definedProperties;
|
|
25
25
|
}, {});
|
|
26
26
|
}
|
|
27
|
-
function $convertToIdentifier(value) {
|
|
27
|
+
function $convertToIdentifier(value, defaultNamespace) {
|
|
28
28
|
switch (typeof value) {
|
|
29
29
|
case "object":
|
|
30
30
|
return Either.of(value);
|
|
31
31
|
case "string":
|
|
32
|
-
return Either.of(
|
|
32
|
+
return Either.of(defaultNamespace
|
|
33
|
+
? defaultNamespace(value)
|
|
34
|
+
: dataFactory.namedNode(value));
|
|
33
35
|
case "undefined":
|
|
34
36
|
return Either.of(dataFactory.blankNode());
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
|
-
function $convertToIdentifierProperty(identifier) {
|
|
39
|
+
function $convertToIdentifierProperty(identifier, defaultNamespace) {
|
|
38
40
|
switch (typeof identifier) {
|
|
39
41
|
case "function":
|
|
40
42
|
return Either.of(identifier);
|
|
@@ -43,7 +45,9 @@ function $convertToIdentifierProperty(identifier) {
|
|
|
43
45
|
return Either.of(() => captureIdentifier);
|
|
44
46
|
}
|
|
45
47
|
case "string": {
|
|
46
|
-
const captureIdentifier =
|
|
48
|
+
const captureIdentifier = defaultNamespace
|
|
49
|
+
? defaultNamespace(identifier)
|
|
50
|
+
: dataFactory.namedNode(identifier);
|
|
47
51
|
return Either.of(() => captureIdentifier);
|
|
48
52
|
}
|
|
49
53
|
case "undefined": {
|
|
@@ -52,7 +56,7 @@ function $convertToIdentifierProperty(identifier) {
|
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
|
-
function $
|
|
59
|
+
function $convertToInIri(value, _defaultNamespace) {
|
|
56
60
|
switch (typeof value) {
|
|
57
61
|
case "object":
|
|
58
62
|
return Either.of(value);
|
|
@@ -60,10 +64,20 @@ function $convertToIri(value) {
|
|
|
60
64
|
return Either.of(dataFactory.namedNode(value));
|
|
61
65
|
}
|
|
62
66
|
}
|
|
63
|
-
function $
|
|
64
|
-
|
|
67
|
+
function $convertToIri(value, defaultNamespace) {
|
|
68
|
+
switch (typeof value) {
|
|
69
|
+
case "object":
|
|
70
|
+
return Either.of(value);
|
|
71
|
+
case "string":
|
|
72
|
+
return Either.of(defaultNamespace
|
|
73
|
+
? defaultNamespace(value)
|
|
74
|
+
: dataFactory.namedNode(value));
|
|
75
|
+
}
|
|
65
76
|
}
|
|
66
|
-
function $
|
|
77
|
+
function $convertToList(convertToItem) {
|
|
78
|
+
return (value, defaultNamespace) => Either.sequence(value.map((value) => convertToItem(value, defaultNamespace)));
|
|
79
|
+
}
|
|
80
|
+
const $convertToLiteral = (value) => {
|
|
67
81
|
if (typeof value === "object") {
|
|
68
82
|
if (value instanceof Date) {
|
|
69
83
|
return Either.of($literalFactory.date(value));
|
|
@@ -71,9 +85,9 @@ function $convertToLiteral(value) {
|
|
|
71
85
|
return Either.of(value);
|
|
72
86
|
}
|
|
73
87
|
return Either.of($literalFactory.primitive(value));
|
|
74
|
-
}
|
|
88
|
+
};
|
|
75
89
|
function $convertToMaybe(convertToItem) {
|
|
76
|
-
return (value) => {
|
|
90
|
+
return (value, defaultNamespace) => {
|
|
77
91
|
switch (typeof value) {
|
|
78
92
|
case "object": {
|
|
79
93
|
if (Maybe.isMaybe(value)) {
|
|
@@ -84,16 +98,16 @@ function $convertToMaybe(convertToItem) {
|
|
|
84
98
|
case "undefined":
|
|
85
99
|
return Either.of(Maybe.empty());
|
|
86
100
|
}
|
|
87
|
-
return convertToItem(value).map(Maybe.of);
|
|
101
|
+
return convertToItem(value, defaultNamespace).map(Maybe.of);
|
|
88
102
|
};
|
|
89
103
|
}
|
|
90
|
-
function $convertToScalarSet(convertToItem
|
|
91
|
-
return (value) => {
|
|
104
|
+
function $convertToScalarSet(convertToItem) {
|
|
105
|
+
return (value, defaultNamespace) => {
|
|
92
106
|
if (typeof value === "undefined") {
|
|
93
107
|
return Either.of([]);
|
|
94
108
|
}
|
|
95
109
|
if (Array.isArray(value)) {
|
|
96
|
-
return Either.sequence(value.map(convertToItem));
|
|
110
|
+
return Either.sequence(value.map((value) => convertToItem(value, defaultNamespace)));
|
|
97
111
|
}
|
|
98
112
|
return convertToItem(value).map((value) => [
|
|
99
113
|
value,
|
|
@@ -140,7 +154,7 @@ function $floatFromRdfResourceValues(values, options) {
|
|
|
140
154
|
function $identifierFromRdfResourceValues(values, options) {
|
|
141
155
|
return $termLikeFromRdfResourceValues(values, options).chain((values) => values.chainMap((value) => value.toIdentifier()));
|
|
142
156
|
}
|
|
143
|
-
function $identityConversionFunction(value) {
|
|
157
|
+
function $identityConversionFunction(value, _defaultNamespace) {
|
|
144
158
|
return Either.of(value);
|
|
145
159
|
}
|
|
146
160
|
function $identityValidationFunction(_schema, value) {
|
|
@@ -361,7 +375,7 @@ const $termLikeFromRdfResourceValues = (values, { preferredLanguages, schema: {
|
|
|
361
375
|
}
|
|
362
376
|
return chain;
|
|
363
377
|
};
|
|
364
|
-
function $validateArray(validateItem
|
|
378
|
+
function $validateArray(validateItem) {
|
|
365
379
|
return (schema, valueArray) => {
|
|
366
380
|
if (schema.minCount !== undefined && valueArray.length < schema.minCount) {
|
|
367
381
|
return Left(new Error(`value array has length (${valueArray.length}) less than minCount (${schema.minCount})`));
|
|
@@ -702,50 +716,50 @@ export var NodeShape;
|
|
|
702
716
|
}).chain((properties) => NodeShape.create(properties)));
|
|
703
717
|
NodeShape.$toString = (_nodeShape) => `NodeShape(${JSON.stringify(NodeShape.toStringRecord(_nodeShape))})`;
|
|
704
718
|
NodeShape.create = (parameters) => $sequenceRecord({
|
|
705
|
-
$identifier: $convertToIdentifierProperty(parameters?.$identifier),
|
|
706
|
-
and: $convertToMaybe($convertToList($convertToIdentifier
|
|
707
|
-
classes: $convertToScalarSet(
|
|
708
|
-
closed: $convertToMaybe($identityConversionFunction)(parameters?.closed).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.closed.type, value)),
|
|
709
|
-
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
|
|
710
|
-
datatype: $convertToMaybe(
|
|
711
|
-
deactivated: $convertToMaybe($identityConversionFunction)(parameters?.deactivated).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.deactivated.type, value)),
|
|
712
|
-
discriminantValue: $convertToMaybe($identityConversionFunction)(parameters?.discriminantValue).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.discriminantValue.type, value)),
|
|
713
|
-
extern: $convertToMaybe($identityConversionFunction)(parameters?.extern).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.extern.type, value)),
|
|
714
|
-
flags: $convertToMaybe($identityConversionFunction)(parameters?.flags).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.flags.type, value)),
|
|
715
|
-
fromRdfType: $convertToMaybe(
|
|
716
|
-
hasValues: $convertToScalarSet($identityConversionFunction
|
|
717
|
-
ignore: $convertWithDefaultValue($identityConversionFunction, false)(parameters?.ignore),
|
|
718
|
-
ignoredProperties: $convertToMaybe($convertToList(
|
|
719
|
-
in_: $convertToMaybe($convertToList($identityConversionFunction
|
|
720
|
-
isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters?.isDefinedBy).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.isDefinedBy.type, value)),
|
|
721
|
-
label: $convertToMaybe($identityConversionFunction)(parameters?.label).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
|
|
722
|
-
languageIn: $convertToMaybe($convertToList($identityConversionFunction
|
|
723
|
-
maxExclusive: $convertToMaybe($convertToLiteral)(parameters?.maxExclusive).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxExclusive.type, value)),
|
|
724
|
-
maxInclusive: $convertToMaybe($convertToLiteral)(parameters?.maxInclusive).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxInclusive.type, value)),
|
|
725
|
-
maxLength: $convertToMaybe($identityConversionFunction)(parameters?.maxLength).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxLength.type, value)),
|
|
726
|
-
message: $convertToMaybe($identityConversionFunction)(parameters?.message).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.message.type, value)),
|
|
727
|
-
minExclusive: $convertToMaybe($convertToLiteral)(parameters?.minExclusive).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minExclusive.type, value)),
|
|
728
|
-
minInclusive: $convertToMaybe($convertToLiteral)(parameters?.minInclusive).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minInclusive.type, value)),
|
|
729
|
-
minLength: $convertToMaybe($identityConversionFunction)(parameters?.minLength).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minLength.type, value)),
|
|
730
|
-
mutable: $convertToMaybe($identityConversionFunction)(parameters?.mutable).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.mutable.type, value)),
|
|
731
|
-
node: $convertToMaybe($convertToIdentifier)(parameters?.node).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.node.type, value)),
|
|
732
|
-
nodeKind: $convertToMaybe(($
|
|
733
|
-
not: $convertToScalarSet($convertToIdentifier
|
|
734
|
-
or: $convertToMaybe($convertToList($convertToIdentifier
|
|
735
|
-
pattern: $convertToMaybe($identityConversionFunction)(parameters?.pattern).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.pattern.type, value)),
|
|
736
|
-
properties: $convertToScalarSet($convertToIdentifier
|
|
737
|
-
rdfType: $convertToMaybe(
|
|
738
|
-
severity: $convertToMaybe(($
|
|
739
|
-
shaclmateName: $convertToMaybe($identityConversionFunction)(parameters?.shaclmateName).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.shaclmateName.type, value)),
|
|
740
|
-
subClassOf: $convertToScalarSet(
|
|
741
|
-
targetClasses: $convertToScalarSet(
|
|
742
|
-
targetNodes: $convertToScalarSet($identityConversionFunction
|
|
743
|
-
targetObjectsOf: $convertToScalarSet(
|
|
744
|
-
targetSubjectsOf: $convertToScalarSet(
|
|
745
|
-
toRdfTypes: $convertToScalarSet(
|
|
746
|
-
tsImports: $convertToScalarSet($identityConversionFunction
|
|
747
|
-
types: $convertToScalarSet(
|
|
748
|
-
xone: $convertToMaybe($convertToList($convertToIdentifier
|
|
719
|
+
$identifier: $convertToIdentifierProperty(parameters?.$identifier, parameters?.$defaultNamespace),
|
|
720
|
+
and: $convertToMaybe($convertToList($convertToIdentifier))(parameters?.and, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.and.type, value)),
|
|
721
|
+
classes: $convertToScalarSet($convertToIri)(parameters?.classes, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.classes.type, value)),
|
|
722
|
+
closed: $convertToMaybe($identityConversionFunction)(parameters?.closed, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.closed.type, value)),
|
|
723
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
|
|
724
|
+
datatype: $convertToMaybe($convertToIri)(parameters?.datatype, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.datatype.type, value)),
|
|
725
|
+
deactivated: $convertToMaybe($identityConversionFunction)(parameters?.deactivated, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.deactivated.type, value)),
|
|
726
|
+
discriminantValue: $convertToMaybe($identityConversionFunction)(parameters?.discriminantValue, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.discriminantValue.type, value)),
|
|
727
|
+
extern: $convertToMaybe($identityConversionFunction)(parameters?.extern, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.extern.type, value)),
|
|
728
|
+
flags: $convertToMaybe($identityConversionFunction)(parameters?.flags, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.flags.type, value)),
|
|
729
|
+
fromRdfType: $convertToMaybe($convertToIri)(parameters?.fromRdfType, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.fromRdfType.type, value)),
|
|
730
|
+
hasValues: $convertToScalarSet($identityConversionFunction)(parameters?.hasValues, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.hasValues.type, value)),
|
|
731
|
+
ignore: $convertWithDefaultValue($identityConversionFunction, false)(parameters?.ignore, parameters?.$defaultNamespace),
|
|
732
|
+
ignoredProperties: $convertToMaybe($convertToList($convertToIri))(parameters?.ignoredProperties, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.ignoredProperties.type, value)),
|
|
733
|
+
in_: $convertToMaybe($convertToList($identityConversionFunction))(parameters?.in_, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.in_.type, value)),
|
|
734
|
+
isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters?.isDefinedBy, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.isDefinedBy.type, value)),
|
|
735
|
+
label: $convertToMaybe($identityConversionFunction)(parameters?.label, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
|
|
736
|
+
languageIn: $convertToMaybe($convertToList($identityConversionFunction))(parameters?.languageIn, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.languageIn.type, value)),
|
|
737
|
+
maxExclusive: $convertToMaybe($convertToLiteral)(parameters?.maxExclusive, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxExclusive.type, value)),
|
|
738
|
+
maxInclusive: $convertToMaybe($convertToLiteral)(parameters?.maxInclusive, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxInclusive.type, value)),
|
|
739
|
+
maxLength: $convertToMaybe($identityConversionFunction)(parameters?.maxLength, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxLength.type, value)),
|
|
740
|
+
message: $convertToMaybe($identityConversionFunction)(parameters?.message, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.message.type, value)),
|
|
741
|
+
minExclusive: $convertToMaybe($convertToLiteral)(parameters?.minExclusive, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minExclusive.type, value)),
|
|
742
|
+
minInclusive: $convertToMaybe($convertToLiteral)(parameters?.minInclusive, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minInclusive.type, value)),
|
|
743
|
+
minLength: $convertToMaybe($identityConversionFunction)(parameters?.minLength, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minLength.type, value)),
|
|
744
|
+
mutable: $convertToMaybe($identityConversionFunction)(parameters?.mutable, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.mutable.type, value)),
|
|
745
|
+
node: $convertToMaybe($convertToIdentifier)(parameters?.node, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.node.type, value)),
|
|
746
|
+
nodeKind: $convertToMaybe(($convertToInIri))(parameters?.nodeKind, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.nodeKind.type, value)),
|
|
747
|
+
not: $convertToScalarSet($convertToIdentifier)(parameters?.not, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.not.type, value)),
|
|
748
|
+
or: $convertToMaybe($convertToList($convertToIdentifier))(parameters?.or, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.or.type, value)),
|
|
749
|
+
pattern: $convertToMaybe($identityConversionFunction)(parameters?.pattern, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.pattern.type, value)),
|
|
750
|
+
properties: $convertToScalarSet($convertToIdentifier)(parameters?.properties, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.properties.type, value)),
|
|
751
|
+
rdfType: $convertToMaybe($convertToIri)(parameters?.rdfType, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.rdfType.type, value)),
|
|
752
|
+
severity: $convertToMaybe(($convertToInIri))(parameters?.severity, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.severity.type, value)),
|
|
753
|
+
shaclmateName: $convertToMaybe($identityConversionFunction)(parameters?.shaclmateName, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.shaclmateName.type, value)),
|
|
754
|
+
subClassOf: $convertToScalarSet($convertToIri)(parameters?.subClassOf, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.subClassOf.type, value)),
|
|
755
|
+
targetClasses: $convertToScalarSet($convertToIri)(parameters?.targetClasses, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetClasses.type, value)),
|
|
756
|
+
targetNodes: $convertToScalarSet($identityConversionFunction)(parameters?.targetNodes, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetNodes.type, value)),
|
|
757
|
+
targetObjectsOf: $convertToScalarSet($convertToIri)(parameters?.targetObjectsOf, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetObjectsOf.type, value)),
|
|
758
|
+
targetSubjectsOf: $convertToScalarSet($convertToIri)(parameters?.targetSubjectsOf, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetSubjectsOf.type, value)),
|
|
759
|
+
toRdfTypes: $convertToScalarSet($convertToIri)(parameters?.toRdfTypes, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.toRdfTypes.type, value)),
|
|
760
|
+
tsImports: $convertToScalarSet($identityConversionFunction)(parameters?.tsImports, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.tsImports.type, value)),
|
|
761
|
+
types: $convertToScalarSet($convertToIri)(parameters?.types, parameters?.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.types.type, value)),
|
|
762
|
+
xone: $convertToMaybe($convertToList($convertToIdentifier))(parameters?.xone, parameters?.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.xone.type, value)),
|
|
749
763
|
})
|
|
750
764
|
.map((properties) => ({ ...properties, $type: "NodeShape" }))
|
|
751
765
|
.map((object) => $monkeyPatchObject(object, { $toString: NodeShape.$toString }));
|
|
@@ -1159,9 +1173,9 @@ export var Ontology;
|
|
|
1159
1173
|
}).chain((properties) => Ontology.create(properties)));
|
|
1160
1174
|
Ontology.$toString = (_ontology) => `Ontology(${JSON.stringify(Ontology.toStringRecord(_ontology))})`;
|
|
1161
1175
|
Ontology.create = (parameters) => $sequenceRecord({
|
|
1162
|
-
$identifier: $convertToIdentifierProperty(parameters?.$identifier),
|
|
1163
|
-
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
|
|
1164
|
-
label: $convertToMaybe($identityConversionFunction)(parameters?.label).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
|
|
1176
|
+
$identifier: $convertToIdentifierProperty(parameters?.$identifier, parameters?.$defaultNamespace),
|
|
1177
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
|
|
1178
|
+
label: $convertToMaybe($identityConversionFunction)(parameters?.label, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
|
|
1165
1179
|
})
|
|
1166
1180
|
.map((properties) => ({ ...properties, $type: "Ontology" }))
|
|
1167
1181
|
.map((object) => $monkeyPatchObject(object, { $toString: Ontology.$toString }));
|
|
@@ -1243,9 +1257,9 @@ export var PropertyGroup;
|
|
|
1243
1257
|
}).chain((properties) => PropertyGroup.create(properties)));
|
|
1244
1258
|
PropertyGroup.$toString = (_propertyGroup) => `PropertyGroup(${JSON.stringify(PropertyGroup.toStringRecord(_propertyGroup))})`;
|
|
1245
1259
|
PropertyGroup.create = (parameters) => $sequenceRecord({
|
|
1246
|
-
$identifier: $convertToIdentifierProperty(parameters?.$identifier),
|
|
1247
|
-
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
|
|
1248
|
-
label: $convertToMaybe($identityConversionFunction)(parameters?.label).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
|
|
1260
|
+
$identifier: $convertToIdentifierProperty(parameters?.$identifier, parameters?.$defaultNamespace),
|
|
1261
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters?.comment, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
|
|
1262
|
+
label: $convertToMaybe($identityConversionFunction)(parameters?.label, parameters?.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
|
|
1249
1263
|
})
|
|
1250
1264
|
.map((properties) => ({ ...properties, $type: "PropertyGroup" }))
|
|
1251
1265
|
.map((object) => $monkeyPatchObject(object, { $toString: PropertyGroup.$toString }));
|
|
@@ -1670,58 +1684,58 @@ export var PropertyShape;
|
|
|
1670
1684
|
}).chain((properties) => PropertyShape.create(properties)));
|
|
1671
1685
|
PropertyShape.$toString = (_propertyShape) => `PropertyShape(${JSON.stringify(PropertyShape.toStringRecord(_propertyShape))})`;
|
|
1672
1686
|
PropertyShape.create = (parameters) => $sequenceRecord({
|
|
1673
|
-
$identifier: $convertToIdentifierProperty(parameters.$identifier),
|
|
1674
|
-
and: $convertToMaybe($convertToList($convertToIdentifier
|
|
1675
|
-
classes: $convertToScalarSet(
|
|
1676
|
-
comment: $convertToMaybe($identityConversionFunction)(parameters.comment).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
|
|
1677
|
-
datatype: $convertToMaybe(
|
|
1678
|
-
deactivated: $convertToMaybe($identityConversionFunction)(parameters.deactivated).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.deactivated.type, value)),
|
|
1679
|
-
defaultValue: $convertToMaybe($identityConversionFunction)(parameters.defaultValue).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.defaultValue.type, value)),
|
|
1680
|
-
description: $convertToMaybe($identityConversionFunction)(parameters.description).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.description.type, value)),
|
|
1681
|
-
disjoint: $convertToScalarSet(
|
|
1682
|
-
display: $convertWithDefaultValue($identityConversionFunction, false)(parameters.display),
|
|
1683
|
-
equals: $convertToScalarSet(
|
|
1684
|
-
flags: $convertToMaybe($identityConversionFunction)(parameters.flags).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.flags.type, value)),
|
|
1685
|
-
groups: $convertToScalarSet($convertToIdentifier
|
|
1686
|
-
hasValues: $convertToScalarSet($identityConversionFunction
|
|
1687
|
-
ignore: $convertWithDefaultValue($identityConversionFunction, false)(parameters.ignore),
|
|
1688
|
-
in_: $convertToMaybe($convertToList($identityConversionFunction
|
|
1689
|
-
isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters.isDefinedBy).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.isDefinedBy.type, value)),
|
|
1690
|
-
label: $convertToMaybe($identityConversionFunction)(parameters.label).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
|
|
1691
|
-
languageIn: $convertToMaybe($convertToList($identityConversionFunction
|
|
1692
|
-
lessThan: $convertToScalarSet(
|
|
1693
|
-
lessThanOrEquals: $convertToScalarSet(
|
|
1694
|
-
maxCount: $convertToMaybe($identityConversionFunction)(parameters.maxCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxCount.type, value)),
|
|
1695
|
-
maxExclusive: $convertToMaybe($convertToLiteral)(parameters.maxExclusive).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxExclusive.type, value)),
|
|
1696
|
-
maxInclusive: $convertToMaybe($convertToLiteral)(parameters.maxInclusive).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxInclusive.type, value)),
|
|
1697
|
-
maxLength: $convertToMaybe($identityConversionFunction)(parameters.maxLength).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxLength.type, value)),
|
|
1698
|
-
message: $convertToMaybe($identityConversionFunction)(parameters.message).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.message.type, value)),
|
|
1699
|
-
minCount: $convertToMaybe($identityConversionFunction)(parameters.minCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minCount.type, value)),
|
|
1700
|
-
minExclusive: $convertToMaybe($convertToLiteral)(parameters.minExclusive).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minExclusive.type, value)),
|
|
1701
|
-
minInclusive: $convertToMaybe($convertToLiteral)(parameters.minInclusive).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minInclusive.type, value)),
|
|
1702
|
-
minLength: $convertToMaybe($identityConversionFunction)(parameters.minLength).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minLength.type, value)),
|
|
1703
|
-
mutable: $convertToMaybe($identityConversionFunction)(parameters.mutable).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.mutable.type, value)),
|
|
1704
|
-
name: $convertToMaybe($identityConversionFunction)(parameters.name).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.name.type, value)),
|
|
1705
|
-
node: $convertToMaybe($convertToIdentifier)(parameters.node).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.node.type, value)),
|
|
1706
|
-
nodeKind: $convertToMaybe(($
|
|
1707
|
-
not: $convertToScalarSet($convertToIdentifier
|
|
1708
|
-
or: $convertToMaybe($convertToList($convertToIdentifier
|
|
1709
|
-
order: $convertToMaybe($identityConversionFunction)(parameters.order).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.order.type, value)),
|
|
1687
|
+
$identifier: $convertToIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
|
|
1688
|
+
and: $convertToMaybe($convertToList($convertToIdentifier))(parameters.and, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.and.type, value)),
|
|
1689
|
+
classes: $convertToScalarSet($convertToIri)(parameters.classes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.classes.type, value)),
|
|
1690
|
+
comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
|
|
1691
|
+
datatype: $convertToMaybe($convertToIri)(parameters.datatype, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.datatype.type, value)),
|
|
1692
|
+
deactivated: $convertToMaybe($identityConversionFunction)(parameters.deactivated, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.deactivated.type, value)),
|
|
1693
|
+
defaultValue: $convertToMaybe($identityConversionFunction)(parameters.defaultValue, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.defaultValue.type, value)),
|
|
1694
|
+
description: $convertToMaybe($identityConversionFunction)(parameters.description, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.description.type, value)),
|
|
1695
|
+
disjoint: $convertToScalarSet($convertToIri)(parameters.disjoint, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShape.schema.properties.disjoint.type, value)),
|
|
1696
|
+
display: $convertWithDefaultValue($identityConversionFunction, false)(parameters.display, parameters.$defaultNamespace),
|
|
1697
|
+
equals: $convertToScalarSet($convertToIri)(parameters.equals, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShape.schema.properties.equals.type, value)),
|
|
1698
|
+
flags: $convertToMaybe($identityConversionFunction)(parameters.flags, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.flags.type, value)),
|
|
1699
|
+
groups: $convertToScalarSet($convertToIdentifier)(parameters.groups, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShape.schema.properties.groups.type, value)),
|
|
1700
|
+
hasValues: $convertToScalarSet($identityConversionFunction)(parameters.hasValues, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.hasValues.type, value)),
|
|
1701
|
+
ignore: $convertWithDefaultValue($identityConversionFunction, false)(parameters.ignore, parameters.$defaultNamespace),
|
|
1702
|
+
in_: $convertToMaybe($convertToList($identityConversionFunction))(parameters.in_, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.in_.type, value)),
|
|
1703
|
+
isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters.isDefinedBy, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.isDefinedBy.type, value)),
|
|
1704
|
+
label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
|
|
1705
|
+
languageIn: $convertToMaybe($convertToList($identityConversionFunction))(parameters.languageIn, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.languageIn.type, value)),
|
|
1706
|
+
lessThan: $convertToScalarSet($convertToIri)(parameters.lessThan, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShape.schema.properties.lessThan.type, value)),
|
|
1707
|
+
lessThanOrEquals: $convertToScalarSet($convertToIri)(parameters.lessThanOrEquals, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShape.schema.properties.lessThanOrEquals.type, value)),
|
|
1708
|
+
maxCount: $convertToMaybe($identityConversionFunction)(parameters.maxCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxCount.type, value)),
|
|
1709
|
+
maxExclusive: $convertToMaybe($convertToLiteral)(parameters.maxExclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxExclusive.type, value)),
|
|
1710
|
+
maxInclusive: $convertToMaybe($convertToLiteral)(parameters.maxInclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxInclusive.type, value)),
|
|
1711
|
+
maxLength: $convertToMaybe($identityConversionFunction)(parameters.maxLength, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxLength.type, value)),
|
|
1712
|
+
message: $convertToMaybe($identityConversionFunction)(parameters.message, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.message.type, value)),
|
|
1713
|
+
minCount: $convertToMaybe($identityConversionFunction)(parameters.minCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minCount.type, value)),
|
|
1714
|
+
minExclusive: $convertToMaybe($convertToLiteral)(parameters.minExclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minExclusive.type, value)),
|
|
1715
|
+
minInclusive: $convertToMaybe($convertToLiteral)(parameters.minInclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minInclusive.type, value)),
|
|
1716
|
+
minLength: $convertToMaybe($identityConversionFunction)(parameters.minLength, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minLength.type, value)),
|
|
1717
|
+
mutable: $convertToMaybe($identityConversionFunction)(parameters.mutable, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.mutable.type, value)),
|
|
1718
|
+
name: $convertToMaybe($identityConversionFunction)(parameters.name, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.name.type, value)),
|
|
1719
|
+
node: $convertToMaybe($convertToIdentifier)(parameters.node, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.node.type, value)),
|
|
1720
|
+
nodeKind: $convertToMaybe(($convertToInIri))(parameters.nodeKind, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.nodeKind.type, value)),
|
|
1721
|
+
not: $convertToScalarSet($convertToIdentifier)(parameters.not, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.not.type, value)),
|
|
1722
|
+
or: $convertToMaybe($convertToList($convertToIdentifier))(parameters.or, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.or.type, value)),
|
|
1723
|
+
order: $convertToMaybe($identityConversionFunction)(parameters.order, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.order.type, value)),
|
|
1710
1724
|
path: Either.of(parameters.path),
|
|
1711
|
-
pattern: $convertToMaybe($identityConversionFunction)(parameters.pattern).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.pattern.type, value)),
|
|
1712
|
-
qualifiedMaxCount: $convertToMaybe($identityConversionFunction)(parameters.qualifiedMaxCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedMaxCount.type, value)),
|
|
1713
|
-
qualifiedMinCount: $convertToMaybe($identityConversionFunction)(parameters.qualifiedMinCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedMinCount.type, value)),
|
|
1714
|
-
qualifiedValueShape: $convertToMaybe($convertToIdentifier)(parameters.qualifiedValueShape).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedValueShape.type, value)),
|
|
1715
|
-
qualifiedValueShapesDisjoint: $convertToMaybe($identityConversionFunction)(parameters.qualifiedValueShapesDisjoint).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedValueShapesDisjoint.type, value)),
|
|
1716
|
-
resolve: $convertToMaybe($convertToIdentifier)(parameters.resolve).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.resolve.type, value)),
|
|
1717
|
-
severity: $convertToMaybe(($
|
|
1718
|
-
shaclmateName: $convertToMaybe($identityConversionFunction)(parameters.shaclmateName).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.shaclmateName.type, value)),
|
|
1719
|
-
targetClasses: $convertToScalarSet(
|
|
1720
|
-
targetNodes: $convertToScalarSet($identityConversionFunction
|
|
1721
|
-
targetObjectsOf: $convertToScalarSet(
|
|
1722
|
-
targetSubjectsOf: $convertToScalarSet(
|
|
1723
|
-
uniqueLang: $convertToMaybe($identityConversionFunction)(parameters.uniqueLang).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.uniqueLang.type, value)),
|
|
1724
|
-
xone: $convertToMaybe($convertToList($convertToIdentifier
|
|
1725
|
+
pattern: $convertToMaybe($identityConversionFunction)(parameters.pattern, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.pattern.type, value)),
|
|
1726
|
+
qualifiedMaxCount: $convertToMaybe($identityConversionFunction)(parameters.qualifiedMaxCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedMaxCount.type, value)),
|
|
1727
|
+
qualifiedMinCount: $convertToMaybe($identityConversionFunction)(parameters.qualifiedMinCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedMinCount.type, value)),
|
|
1728
|
+
qualifiedValueShape: $convertToMaybe($convertToIdentifier)(parameters.qualifiedValueShape, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedValueShape.type, value)),
|
|
1729
|
+
qualifiedValueShapesDisjoint: $convertToMaybe($identityConversionFunction)(parameters.qualifiedValueShapesDisjoint, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedValueShapesDisjoint.type, value)),
|
|
1730
|
+
resolve: $convertToMaybe($convertToIdentifier)(parameters.resolve, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.resolve.type, value)),
|
|
1731
|
+
severity: $convertToMaybe(($convertToInIri))(parameters.severity, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.severity.type, value)),
|
|
1732
|
+
shaclmateName: $convertToMaybe($identityConversionFunction)(parameters.shaclmateName, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.shaclmateName.type, value)),
|
|
1733
|
+
targetClasses: $convertToScalarSet($convertToIri)(parameters.targetClasses, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetClasses.type, value)),
|
|
1734
|
+
targetNodes: $convertToScalarSet($identityConversionFunction)(parameters.targetNodes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetNodes.type, value)),
|
|
1735
|
+
targetObjectsOf: $convertToScalarSet($convertToIri)(parameters.targetObjectsOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetObjectsOf.type, value)),
|
|
1736
|
+
targetSubjectsOf: $convertToScalarSet($convertToIri)(parameters.targetSubjectsOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetSubjectsOf.type, value)),
|
|
1737
|
+
uniqueLang: $convertToMaybe($identityConversionFunction)(parameters.uniqueLang, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.uniqueLang.type, value)),
|
|
1738
|
+
xone: $convertToMaybe($convertToList($convertToIdentifier))(parameters.xone, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.xone.type, value)),
|
|
1725
1739
|
})
|
|
1726
1740
|
.map((properties) => ({ ...properties, $type: "PropertyShape" }))
|
|
1727
1741
|
.map((object) => $monkeyPatchObject(object, { $toString: PropertyShape.$toString }));
|
|
@@ -2221,10 +2235,10 @@ export var ValidationReport;
|
|
|
2221
2235
|
}).chain((properties) => ValidationReport.create(properties)));
|
|
2222
2236
|
ValidationReport.$toString = (_validationReport) => `ValidationReport(${JSON.stringify(ValidationReport.toStringRecord(_validationReport))})`;
|
|
2223
2237
|
ValidationReport.create = (parameters) => $sequenceRecord({
|
|
2224
|
-
$identifier: $convertToIdentifierProperty(parameters.$identifier),
|
|
2238
|
+
$identifier: $convertToIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
|
|
2225
2239
|
conforms: Either.of(parameters.conforms),
|
|
2226
|
-
results: $convertToScalarSet($identityConversionFunction
|
|
2227
|
-
shapesGraphWellFormed: $convertToMaybe($identityConversionFunction)(parameters.shapesGraphWellFormed).chain((value) => $validateMaybe($identityValidationFunction)(ValidationReport.schema.properties.shapesGraphWellFormed.type, value)),
|
|
2240
|
+
results: $convertToScalarSet($identityConversionFunction)(parameters.results, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(ValidationReport.schema.properties.results.type, value)),
|
|
2241
|
+
shapesGraphWellFormed: $convertToMaybe($identityConversionFunction)(parameters.shapesGraphWellFormed, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(ValidationReport.schema.properties.shapesGraphWellFormed.type, value)),
|
|
2228
2242
|
})
|
|
2229
2243
|
.map((properties) => ({
|
|
2230
2244
|
...properties,
|
|
@@ -2355,15 +2369,15 @@ export var ValidationResult;
|
|
|
2355
2369
|
}).chain((properties) => ValidationResult.create(properties)));
|
|
2356
2370
|
ValidationResult.$toString = (_validationResult) => `ValidationResult(${JSON.stringify(ValidationResult.toStringRecord(_validationResult))})`;
|
|
2357
2371
|
ValidationResult.create = (parameters) => $sequenceRecord({
|
|
2358
|
-
$identifier: $convertToIdentifierProperty(parameters.$identifier),
|
|
2359
|
-
details: $convertToScalarSet($identityConversionFunction
|
|
2372
|
+
$identifier: $convertToIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
|
|
2373
|
+
details: $convertToScalarSet($identityConversionFunction)(parameters.details, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(ValidationResult.schema.properties.details.type, value)),
|
|
2360
2374
|
focusNode: Either.of(parameters.focusNode),
|
|
2361
|
-
message: $convertToMaybe($identityConversionFunction)(parameters.message).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.message.type, value)),
|
|
2362
|
-
path: $convertToMaybe($identityConversionFunction)(parameters.path).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.path.type, value)),
|
|
2363
|
-
severity: $
|
|
2364
|
-
sourceConstraintComponent: $convertToIri(parameters.sourceConstraintComponent),
|
|
2365
|
-
sourceShape: $convertToMaybe($convertToIdentifier)(parameters.sourceShape).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.sourceShape.type, value)),
|
|
2366
|
-
value: $convertToMaybe($identityConversionFunction)(parameters.value).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.value.type, value)),
|
|
2375
|
+
message: $convertToMaybe($identityConversionFunction)(parameters.message, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.message.type, value)),
|
|
2376
|
+
path: $convertToMaybe($identityConversionFunction)(parameters.path, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.path.type, value)),
|
|
2377
|
+
severity: $convertToInIri(parameters.severity, parameters.$defaultNamespace),
|
|
2378
|
+
sourceConstraintComponent: $convertToIri(parameters.sourceConstraintComponent, parameters.$defaultNamespace),
|
|
2379
|
+
sourceShape: $convertToMaybe($convertToIdentifier)(parameters.sourceShape, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.sourceShape.type, value)),
|
|
2380
|
+
value: $convertToMaybe($identityConversionFunction)(parameters.value, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(ValidationResult.schema.properties.value.type, value)),
|
|
2367
2381
|
})
|
|
2368
2382
|
.map((properties) => ({
|
|
2369
2383
|
...properties,
|
|
@@ -2472,10 +2486,10 @@ export var ValidationResult;
|
|
|
2472
2486
|
export var Shape;
|
|
2473
2487
|
(function (Shape) {
|
|
2474
2488
|
Shape.$toString = (value) => {
|
|
2475
|
-
if (NodeShape
|
|
2489
|
+
if (value["$type"] === "NodeShape") {
|
|
2476
2490
|
return NodeShape.$toString(value);
|
|
2477
2491
|
}
|
|
2478
|
-
if (PropertyShape
|
|
2492
|
+
if (value["$type"] === "PropertyShape") {
|
|
2479
2493
|
return PropertyShape.$toString(value);
|
|
2480
2494
|
}
|
|
2481
2495
|
throw new Error("unable to serialize to string");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@shaclmate/shacl-ast": "4.0.
|
|
3
|
+
"@shaclmate/shacl-ast": "4.0.79",
|
|
4
4
|
"@rdfjs/types": "~2.0.1",
|
|
5
5
|
"@rdfx/collection": "0.0.43",
|
|
6
6
|
"@rdfx/data-factory": "0.0.43",
|
|
@@ -235,6 +235,8 @@
|
|
|
235
235
|
"dist/generators/ts/_AbstractType/AbstractType_JsonType.js",
|
|
236
236
|
"dist/generators/ts/_DiscriminatedUnionType/DiscriminatedUnionType_Discriminant.d.ts",
|
|
237
237
|
"dist/generators/ts/_DiscriminatedUnionType/DiscriminatedUnionType_Discriminant.js",
|
|
238
|
+
"dist/generators/ts/_DiscriminatedUnionType/DiscriminatedUnionType_conversionFunctionExpression.d.ts",
|
|
239
|
+
"dist/generators/ts/_DiscriminatedUnionType/DiscriminatedUnionType_conversionFunctionExpression.js",
|
|
238
240
|
"dist/generators/ts/_DiscriminatedUnionType/DiscriminatedUnionType_equalsFunctionExpression.d.ts",
|
|
239
241
|
"dist/generators/ts/_DiscriminatedUnionType/DiscriminatedUnionType_equalsFunctionExpression.js",
|
|
240
242
|
"dist/generators/ts/_DiscriminatedUnionType/DiscriminatedUnionType_filterFunctionExpression.d.ts",
|
|
@@ -729,5 +731,5 @@
|
|
|
729
731
|
},
|
|
730
732
|
"type": "module",
|
|
731
733
|
"types": "./dist/index.d.ts",
|
|
732
|
-
"version": "4.0.
|
|
734
|
+
"version": "4.0.79"
|
|
733
735
|
}
|