@shaclmate/compiler 4.0.23 → 4.0.25
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/Compiler.d.ts +1 -1
- package/dist/ShapesGraphToAstTransformer.d.ts +1 -1
- package/dist/ShapesGraphToAstTransformer.js +16 -16
- package/dist/_ShapesGraphToAstTransformer/nodeShapeTsFeatures.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/nodeShapeTsFeatures.js +5 -2
- package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.js +6 -5
- package/dist/_ShapesGraphToAstTransformer/shapeNodeKinds.js +1 -1
- package/dist/_ShapesGraphToAstTransformer/shapeOntology.js +4 -3
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.js +11 -17
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.js +3 -3
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.js +6 -11
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstObjectType.js +21 -40
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.js +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.js +3 -3
- package/dist/ast/AbstractCompoundType.d.ts +1 -1
- package/dist/ast/AbstractLazyObjectType.d.ts +0 -2
- package/dist/ast/ListType.d.ts +1 -8
- package/dist/ast/ListType.js +1 -6
- package/dist/ast/ObjectType.d.ts +3 -30
- package/dist/ast/ObjectType.js +2 -26
- package/dist/generators/ts/AbstractContainerType.d.ts +0 -1
- package/dist/generators/ts/AbstractContainerType.js +0 -1
- package/dist/generators/ts/AbstractLazyObjectType.d.ts +0 -1
- package/dist/generators/ts/AbstractLazyObjectType.js +2 -2
- package/dist/generators/ts/AbstractNamedUnionType.d.ts +1 -2
- package/dist/generators/ts/AbstractNamedUnionType.js +16 -19
- package/dist/generators/ts/AbstractTermType.d.ts +0 -1
- package/dist/generators/ts/AbstractTermType.js +0 -1
- package/dist/generators/ts/AbstractType.d.ts +0 -4
- package/dist/generators/ts/AbstractUnionType.d.ts +1 -10
- package/dist/generators/ts/AbstractUnionType.js +27 -40
- package/dist/generators/ts/LazyObjectOptionType.js +3 -2
- package/dist/generators/ts/LazyObjectSetType.js +2 -1
- package/dist/generators/ts/LazyObjectType.js +2 -1
- package/dist/generators/ts/ListType.d.ts +1 -5
- package/dist/generators/ts/ListType.js +8 -27
- package/dist/generators/ts/NamedObjectType.d.ts +2 -21
- package/dist/generators/ts/NamedObjectType.js +33 -132
- package/dist/generators/ts/NamedObjectUnionType.js +14 -25
- package/dist/generators/ts/TypeFactory.js +11 -67
- package/dist/generators/ts/ZodGenerator.js +2 -2
- package/dist/generators/ts/_NamedObjectType/AbstractProperty.d.ts +11 -17
- package/dist/generators/ts/_NamedObjectType/AbstractProperty.js +7 -6
- package/dist/generators/ts/_NamedObjectType/DiscriminantProperty.d.ts +1 -4
- package/dist/generators/ts/_NamedObjectType/DiscriminantProperty.js +19 -34
- package/dist/generators/ts/_NamedObjectType/IdentifierProperty.d.ts +5 -15
- package/dist/generators/ts/_NamedObjectType/IdentifierProperty.js +31 -212
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_createFunctionDeclaration.js +2 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_equalsFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_equalsFunctionDeclaration.js +25 -0
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterFunctionDeclaration.js +4 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterTypeDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlConstructTriplesFunctionDeclaration.js +2 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlWherePatternsFunctionDeclaration.js +2 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromJsonFunctionDeclaration.js +1 -8
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceFunctionDeclaration.js +5 -13
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceValuesFunctionDeclaration.js +1 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_hashFunctionDeclarations.d.ts +4 -0
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_hashFunctionDeclarations.js +49 -0
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_interfaceDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonParseFunctionDeclaration.js +0 -3
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonSchemaFunctionDeclaration.js +1 -1
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonTypeAliasDeclaration.js +2 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonUiSchemaFunctionDeclaration.js +2 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromJsonFunctionDeclaration.js +2 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromRdfResourceFunctionDeclaration.js +2 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_schemaVariableStatement.js +2 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.d.ts +1 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.js +2 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts +2 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.js +2 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toJsonFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toJsonFunctionDeclaration.js +41 -0
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toRdfResourceFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_NamedObjectType/{NamedObjectType_toRdfResourceFunctionOrMethodDeclaration.js → NamedObjectType_toRdfResourceFunctionDeclaration.js} +8 -27
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toStringFunctionDeclarations.d.ts +4 -0
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toStringFunctionDeclarations.js +40 -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/Property.d.ts +1 -2
- package/dist/generators/ts/_NamedObjectType/ShaclProperty.d.ts +1 -3
- package/dist/generators/ts/_NamedObjectType/ShaclProperty.js +8 -39
- package/dist/generators/ts/_snippets/snippets_LazyObject.js +2 -2
- package/dist/generators/ts/_snippets/snippets_LazyObjectOption.js +2 -2
- package/dist/generators/ts/_snippets/snippets_LazyObjectSet.js +2 -2
- package/dist/generators/ts/imports.d.ts +0 -2
- package/dist/generators/ts/imports.js +0 -2
- package/dist/generators/ts/objectSetDeclarations.js +1 -3
- package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.js +4 -6
- package/dist/generators/ts/sparqlObjectSetClassDeclaration.js +2 -2
- package/dist/input/ShapesGraph.d.ts +1 -1
- package/dist/input/generated.d.ts +10 -181
- package/dist/input/generated.js +116 -392
- package/package.json +2 -4
- package/dist/_ShapesGraphToAstTransformer/nodeShapeIdentifierMintingStrategy.d.ts +0 -6
- package/dist/_ShapesGraphToAstTransformer/nodeShapeIdentifierMintingStrategy.js +0 -32
- package/dist/enums/IdentifierMintingStrategy.d.ts +0 -9
- package/dist/enums/IdentifierMintingStrategy.js +0 -18
- package/dist/enums/TsObjectDeclarationType.d.ts +0 -9
- package/dist/enums/TsObjectDeclarationType.js +0 -16
- package/dist/enums/Visibility.d.ts +0 -6
- package/dist/enums/Visibility.js +0 -18
- package/dist/generators/ts/_NamedObjectType/IdentifierPrefixProperty.d.ts +0 -33
- package/dist/generators/ts/_NamedObjectType/IdentifierPrefixProperty.js +0 -92
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_classDeclaration.d.ts +0 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_classDeclaration.js +0 -62
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_equalsFunctionOrMethodDeclaration.d.ts +0 -5
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_equalsFunctionOrMethodDeclaration.js +0 -51
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_hashFunctionOrMethodDeclarations.d.ts +0 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_hashFunctionOrMethodDeclarations.js +0 -73
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toJsonFunctionOrMethodDeclaration.d.ts +0 -5
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toJsonFunctionOrMethodDeclaration.js +0 -59
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toRdfResourceFunctionOrMethodDeclaration.d.ts +0 -5
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toStringFunctionOrMethodDeclaration.d.ts +0 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toStringFunctionOrMethodDeclaration.js +0 -62
- /package/dist/{enums → generators/ts}/TsFeature.d.ts +0 -0
- /package/dist/{enums → generators/ts}/TsFeature.js +0 -0
package/dist/input/generated.js
CHANGED
|
@@ -267,18 +267,23 @@ function $strictEquals(left, right) {
|
|
|
267
267
|
export var PropertyShape;
|
|
268
268
|
(function (PropertyShape) {
|
|
269
269
|
function $create(parameters) {
|
|
270
|
+
const $identifierParameter = parameters.$identifier;
|
|
270
271
|
let $identifier;
|
|
271
|
-
if (typeof
|
|
272
|
-
$identifier =
|
|
272
|
+
if (typeof $identifierParameter === "function") {
|
|
273
|
+
$identifier = $identifierParameter;
|
|
273
274
|
}
|
|
274
|
-
else if (typeof
|
|
275
|
-
$identifier =
|
|
275
|
+
else if (typeof $identifierParameter === "object") {
|
|
276
|
+
$identifier = () => $identifierParameter;
|
|
276
277
|
}
|
|
277
|
-
else if (
|
|
278
|
-
$identifier = dataFactory.
|
|
278
|
+
else if (typeof $identifierParameter === "string") {
|
|
279
|
+
$identifier = () => dataFactory.namedNode($identifierParameter);
|
|
280
|
+
}
|
|
281
|
+
else if ($identifierParameter === undefined) {
|
|
282
|
+
const $eagerIdentifier = dataFactory.blankNode();
|
|
283
|
+
$identifier = () => $eagerIdentifier;
|
|
279
284
|
}
|
|
280
285
|
else {
|
|
281
|
-
$identifier =
|
|
286
|
+
$identifier = $identifierParameter;
|
|
282
287
|
}
|
|
283
288
|
const $type = "PropertyShape";
|
|
284
289
|
let and;
|
|
@@ -834,22 +839,6 @@ export var PropertyShape;
|
|
|
834
839
|
else {
|
|
835
840
|
uniqueLang = parameters.uniqueLang;
|
|
836
841
|
}
|
|
837
|
-
let visibility;
|
|
838
|
-
if (Maybe.isMaybe(parameters.visibility)) {
|
|
839
|
-
visibility = parameters.visibility;
|
|
840
|
-
}
|
|
841
|
-
else if (typeof parameters.visibility === "object") {
|
|
842
|
-
visibility = Maybe.of(parameters.visibility);
|
|
843
|
-
}
|
|
844
|
-
else if (typeof parameters.visibility === "string") {
|
|
845
|
-
visibility = Maybe.of(dataFactory.namedNode(parameters.visibility));
|
|
846
|
-
}
|
|
847
|
-
else if (parameters.visibility === undefined) {
|
|
848
|
-
visibility = Maybe.empty();
|
|
849
|
-
}
|
|
850
|
-
else {
|
|
851
|
-
visibility = parameters.visibility;
|
|
852
|
-
}
|
|
853
842
|
let xone;
|
|
854
843
|
if (Maybe.isMaybe(parameters.xone)) {
|
|
855
844
|
xone = parameters.xone;
|
|
@@ -904,7 +893,6 @@ export var PropertyShape;
|
|
|
904
893
|
resolve,
|
|
905
894
|
shaclmateName,
|
|
906
895
|
uniqueLang,
|
|
907
|
-
visibility,
|
|
908
896
|
xone,
|
|
909
897
|
};
|
|
910
898
|
}
|
|
@@ -916,7 +904,7 @@ export var PropertyShape;
|
|
|
916
904
|
})($Identifier = PropertyShape.$Identifier || (PropertyShape.$Identifier = {}));
|
|
917
905
|
function $filter(filter, value) {
|
|
918
906
|
if (filter.$identifier !== undefined &&
|
|
919
|
-
!$filterIdentifier(filter.$identifier, value.$identifier)) {
|
|
907
|
+
!$filterIdentifier(filter.$identifier, value.$identifier())) {
|
|
920
908
|
return false;
|
|
921
909
|
}
|
|
922
910
|
if (filter.and !== undefined &&
|
|
@@ -1059,10 +1047,6 @@ export var PropertyShape;
|
|
|
1059
1047
|
!$filterMaybe($filterBoolean)(filter.uniqueLang, value.uniqueLang)) {
|
|
1060
1048
|
return false;
|
|
1061
1049
|
}
|
|
1062
|
-
if (filter.visibility !== undefined &&
|
|
1063
|
-
!$filterMaybe($filterIri)(filter.visibility, value.visibility)) {
|
|
1064
|
-
return false;
|
|
1065
|
-
}
|
|
1066
1050
|
if (filter.xone !== undefined &&
|
|
1067
1051
|
!$filterMaybe($filterArray($filterIdentifier))(filter.xone, value.xone)) {
|
|
1068
1052
|
return false;
|
|
@@ -1081,7 +1065,7 @@ export var PropertyShape;
|
|
|
1081
1065
|
ignoreRdfType,
|
|
1082
1066
|
objectSet,
|
|
1083
1067
|
preferredLanguages,
|
|
1084
|
-
});
|
|
1068
|
+
}).map($create);
|
|
1085
1069
|
};
|
|
1086
1070
|
PropertyShape.$fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
1087
1071
|
.toResource()
|
|
@@ -1807,30 +1791,6 @@ export var PropertyShape;
|
|
|
1807
1791
|
value: Maybe.empty(),
|
|
1808
1792
|
})),
|
|
1809
1793
|
}).chain((uniqueLang) => $shaclPropertyFromRdf({
|
|
1810
|
-
graph: _$options.graph,
|
|
1811
|
-
resource: $resource,
|
|
1812
|
-
propertySchema: PropertyShape.$schema
|
|
1813
|
-
.properties
|
|
1814
|
-
.visibility,
|
|
1815
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
1816
|
-
.chain((values) => values.chainMap((value) => value.toIri([
|
|
1817
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_Visibility_Private"),
|
|
1818
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_Visibility_Protected"),
|
|
1819
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_Visibility_Public"),
|
|
1820
|
-
])))
|
|
1821
|
-
.map((values) => values.length >
|
|
1822
|
-
0
|
|
1823
|
-
? values.map((value) => Maybe.of(value))
|
|
1824
|
-
: Resource.Values.fromValue({
|
|
1825
|
-
focusResource: $resource,
|
|
1826
|
-
propertyPath: PropertyShape
|
|
1827
|
-
.$schema
|
|
1828
|
-
.properties
|
|
1829
|
-
.visibility
|
|
1830
|
-
.path,
|
|
1831
|
-
value: Maybe.empty(),
|
|
1832
|
-
})),
|
|
1833
|
-
}).chain((visibility) => $shaclPropertyFromRdf({
|
|
1834
1794
|
graph: _$options.graph,
|
|
1835
1795
|
resource: $resource,
|
|
1836
1796
|
propertySchema: PropertyShape.$schema
|
|
@@ -1900,9 +1860,8 @@ export var PropertyShape;
|
|
|
1900
1860
|
resolve,
|
|
1901
1861
|
shaclmateName,
|
|
1902
1862
|
uniqueLang,
|
|
1903
|
-
visibility,
|
|
1904
1863
|
xone,
|
|
1905
|
-
}))))))))))))))))))))))))))))))))))))))))
|
|
1864
|
+
}))))))))))))))))))))))))))))))))))))))));
|
|
1906
1865
|
};
|
|
1907
1866
|
PropertyShape.$schema = {
|
|
1908
1867
|
properties: {
|
|
@@ -2217,21 +2176,6 @@ export var PropertyShape;
|
|
|
2217
2176
|
}),
|
|
2218
2177
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#uniqueLang"),
|
|
2219
2178
|
},
|
|
2220
|
-
visibility: {
|
|
2221
|
-
kind: "Shacl",
|
|
2222
|
-
type: () => ({
|
|
2223
|
-
kind: "Maybe",
|
|
2224
|
-
item: () => ({
|
|
2225
|
-
kind: "Iri",
|
|
2226
|
-
in: [
|
|
2227
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_Visibility_Private"),
|
|
2228
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_Visibility_Protected"),
|
|
2229
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_Visibility_Public"),
|
|
2230
|
-
],
|
|
2231
|
-
}),
|
|
2232
|
-
}),
|
|
2233
|
-
path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#visibility"),
|
|
2234
|
-
},
|
|
2235
2179
|
xone: {
|
|
2236
2180
|
kind: "Shacl",
|
|
2237
2181
|
type: () => ({
|
|
@@ -2251,7 +2195,7 @@ export var PropertyShape;
|
|
|
2251
2195
|
dataFactory: dataFactory,
|
|
2252
2196
|
dataset: datasetFactory.dataset(),
|
|
2253
2197
|
});
|
|
2254
|
-
const resource = resourceSet.resource(_propertyShape.$identifier);
|
|
2198
|
+
const resource = resourceSet.resource(_propertyShape.$identifier());
|
|
2255
2199
|
if (!options?.ignoreRdfType) {
|
|
2256
2200
|
resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape"), options?.graph);
|
|
2257
2201
|
}
|
|
@@ -2262,7 +2206,7 @@ export var PropertyShape;
|
|
|
2262
2206
|
currentSubListResource = listResource;
|
|
2263
2207
|
}
|
|
2264
2208
|
else {
|
|
2265
|
-
const newSubListResource = resourceSet.resource(dataFactory.blankNode());
|
|
2209
|
+
const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
|
|
2266
2210
|
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
|
|
2267
2211
|
currentSubListResource = newSubListResource;
|
|
2268
2212
|
}
|
|
@@ -2273,7 +2217,7 @@ export var PropertyShape;
|
|
|
2273
2217
|
return { currentSubListResource, listResource };
|
|
2274
2218
|
}, {
|
|
2275
2219
|
currentSubListResource: null,
|
|
2276
|
-
listResource: resourceSet.resource(dataFactory.blankNode()),
|
|
2220
|
+
listResource: resourceSet.resource((() => dataFactory.blankNode())()),
|
|
2277
2221
|
}).listResource.identifier
|
|
2278
2222
|
: $RdfVocabularies.rdf.nil,
|
|
2279
2223
|
]), options?.graph);
|
|
@@ -2306,7 +2250,7 @@ export var PropertyShape;
|
|
|
2306
2250
|
currentSubListResource = listResource;
|
|
2307
2251
|
}
|
|
2308
2252
|
else {
|
|
2309
|
-
const newSubListResource = resourceSet.resource(dataFactory.blankNode());
|
|
2253
|
+
const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
|
|
2310
2254
|
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
|
|
2311
2255
|
currentSubListResource = newSubListResource;
|
|
2312
2256
|
}
|
|
@@ -2317,7 +2261,7 @@ export var PropertyShape;
|
|
|
2317
2261
|
return { currentSubListResource, listResource };
|
|
2318
2262
|
}, {
|
|
2319
2263
|
currentSubListResource: null,
|
|
2320
|
-
listResource: resourceSet.resource(dataFactory.blankNode()),
|
|
2264
|
+
listResource: resourceSet.resource((() => dataFactory.blankNode())()),
|
|
2321
2265
|
}).listResource.identifier
|
|
2322
2266
|
: $RdfVocabularies.rdf.nil,
|
|
2323
2267
|
]), options?.graph);
|
|
@@ -2332,7 +2276,7 @@ export var PropertyShape;
|
|
|
2332
2276
|
currentSubListResource = listResource;
|
|
2333
2277
|
}
|
|
2334
2278
|
else {
|
|
2335
|
-
const newSubListResource = resourceSet.resource(dataFactory.blankNode());
|
|
2279
|
+
const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
|
|
2336
2280
|
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
|
|
2337
2281
|
currentSubListResource = newSubListResource;
|
|
2338
2282
|
}
|
|
@@ -2343,7 +2287,7 @@ export var PropertyShape;
|
|
|
2343
2287
|
return { currentSubListResource, listResource };
|
|
2344
2288
|
}, {
|
|
2345
2289
|
currentSubListResource: null,
|
|
2346
|
-
listResource: resourceSet.resource(dataFactory.blankNode()),
|
|
2290
|
+
listResource: resourceSet.resource((() => dataFactory.blankNode())()),
|
|
2347
2291
|
}).listResource.identifier
|
|
2348
2292
|
: $RdfVocabularies.rdf.nil,
|
|
2349
2293
|
]), options?.graph);
|
|
@@ -2389,7 +2333,7 @@ export var PropertyShape;
|
|
|
2389
2333
|
currentSubListResource = listResource;
|
|
2390
2334
|
}
|
|
2391
2335
|
else {
|
|
2392
|
-
const newSubListResource = resourceSet.resource(dataFactory.blankNode());
|
|
2336
|
+
const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
|
|
2393
2337
|
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
|
|
2394
2338
|
currentSubListResource = newSubListResource;
|
|
2395
2339
|
}
|
|
@@ -2400,7 +2344,7 @@ export var PropertyShape;
|
|
|
2400
2344
|
return { currentSubListResource, listResource };
|
|
2401
2345
|
}, {
|
|
2402
2346
|
currentSubListResource: null,
|
|
2403
|
-
listResource: resourceSet.resource(dataFactory.blankNode()),
|
|
2347
|
+
listResource: resourceSet.resource((() => dataFactory.blankNode())()),
|
|
2404
2348
|
}).listResource.identifier
|
|
2405
2349
|
: $RdfVocabularies.rdf.nil,
|
|
2406
2350
|
]), options?.graph);
|
|
@@ -2425,7 +2369,6 @@ export var PropertyShape;
|
|
|
2425
2369
|
.flatMap((value) => [
|
|
2426
2370
|
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
2427
2371
|
]), options?.graph);
|
|
2428
|
-
resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#visibility"), _propertyShape.visibility.toList(), options?.graph);
|
|
2429
2372
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#xone"), _propertyShape.xone.toList().flatMap((value) => [
|
|
2430
2373
|
value.length > 0
|
|
2431
2374
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
@@ -2433,7 +2376,7 @@ export var PropertyShape;
|
|
|
2433
2376
|
currentSubListResource = listResource;
|
|
2434
2377
|
}
|
|
2435
2378
|
else {
|
|
2436
|
-
const newSubListResource = resourceSet.resource(dataFactory.blankNode());
|
|
2379
|
+
const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
|
|
2437
2380
|
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
|
|
2438
2381
|
currentSubListResource = newSubListResource;
|
|
2439
2382
|
}
|
|
@@ -2444,7 +2387,7 @@ export var PropertyShape;
|
|
|
2444
2387
|
return { currentSubListResource, listResource };
|
|
2445
2388
|
}, {
|
|
2446
2389
|
currentSubListResource: null,
|
|
2447
|
-
listResource: resourceSet.resource(dataFactory.blankNode()),
|
|
2390
|
+
listResource: resourceSet.resource((() => dataFactory.blankNode())()),
|
|
2448
2391
|
}).listResource.identifier
|
|
2449
2392
|
: $RdfVocabularies.rdf.nil,
|
|
2450
2393
|
]), options?.graph);
|
|
@@ -2453,7 +2396,7 @@ export var PropertyShape;
|
|
|
2453
2396
|
PropertyShape.$toRdfResource = $toRdfResource;
|
|
2454
2397
|
function $propertiesToStrings(_propertyShape) {
|
|
2455
2398
|
return $compactRecord({
|
|
2456
|
-
$identifier: _propertyShape.$identifier.toString(),
|
|
2399
|
+
$identifier: _propertyShape.$identifier().toString(),
|
|
2457
2400
|
label: _propertyShape.label.map((item) => item.toString()).extract(),
|
|
2458
2401
|
name: _propertyShape.name.map((item) => item.toString()).extract(),
|
|
2459
2402
|
path: $PropertyPath.$toString(_propertyShape.path),
|
|
@@ -2471,18 +2414,23 @@ export var PropertyShape;
|
|
|
2471
2414
|
export var PropertyGroup;
|
|
2472
2415
|
(function (PropertyGroup) {
|
|
2473
2416
|
function $create(parameters) {
|
|
2417
|
+
const $identifierParameter = parameters?.$identifier;
|
|
2474
2418
|
let $identifier;
|
|
2475
|
-
if (typeof
|
|
2476
|
-
$identifier =
|
|
2419
|
+
if (typeof $identifierParameter === "function") {
|
|
2420
|
+
$identifier = $identifierParameter;
|
|
2421
|
+
}
|
|
2422
|
+
else if (typeof $identifierParameter === "object") {
|
|
2423
|
+
$identifier = () => $identifierParameter;
|
|
2477
2424
|
}
|
|
2478
|
-
else if (typeof
|
|
2479
|
-
$identifier = dataFactory.namedNode(
|
|
2425
|
+
else if (typeof $identifierParameter === "string") {
|
|
2426
|
+
$identifier = () => dataFactory.namedNode($identifierParameter);
|
|
2480
2427
|
}
|
|
2481
|
-
else if (
|
|
2482
|
-
$
|
|
2428
|
+
else if ($identifierParameter === undefined) {
|
|
2429
|
+
const $eagerIdentifier = dataFactory.blankNode();
|
|
2430
|
+
$identifier = () => $eagerIdentifier;
|
|
2483
2431
|
}
|
|
2484
2432
|
else {
|
|
2485
|
-
$identifier =
|
|
2433
|
+
$identifier = $identifierParameter;
|
|
2486
2434
|
}
|
|
2487
2435
|
const $type = "PropertyGroup";
|
|
2488
2436
|
let comment;
|
|
@@ -2521,7 +2469,7 @@ export var PropertyGroup;
|
|
|
2521
2469
|
})($Identifier = PropertyGroup.$Identifier || (PropertyGroup.$Identifier = {}));
|
|
2522
2470
|
function $filter(filter, value) {
|
|
2523
2471
|
if (filter.$identifier !== undefined &&
|
|
2524
|
-
!$filterIdentifier(filter.$identifier, value.$identifier)) {
|
|
2472
|
+
!$filterIdentifier(filter.$identifier, value.$identifier())) {
|
|
2525
2473
|
return false;
|
|
2526
2474
|
}
|
|
2527
2475
|
if (filter.comment !== undefined &&
|
|
@@ -2546,7 +2494,7 @@ export var PropertyGroup;
|
|
|
2546
2494
|
ignoreRdfType,
|
|
2547
2495
|
objectSet,
|
|
2548
2496
|
preferredLanguages,
|
|
2549
|
-
});
|
|
2497
|
+
}).map($create);
|
|
2550
2498
|
};
|
|
2551
2499
|
PropertyGroup.$fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
2552
2500
|
.toResource()
|
|
@@ -2655,7 +2603,7 @@ export var PropertyGroup;
|
|
|
2655
2603
|
dataFactory: dataFactory,
|
|
2656
2604
|
dataset: datasetFactory.dataset(),
|
|
2657
2605
|
});
|
|
2658
|
-
const resource = resourceSet.resource(_propertyGroup.$identifier);
|
|
2606
|
+
const resource = resourceSet.resource(_propertyGroup.$identifier());
|
|
2659
2607
|
if (!options?.ignoreRdfType) {
|
|
2660
2608
|
resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"), options?.graph);
|
|
2661
2609
|
}
|
|
@@ -2670,7 +2618,7 @@ export var PropertyGroup;
|
|
|
2670
2618
|
PropertyGroup.$toRdfResource = $toRdfResource;
|
|
2671
2619
|
function $propertiesToStrings(_propertyGroup) {
|
|
2672
2620
|
return $compactRecord({
|
|
2673
|
-
$identifier: _propertyGroup.$identifier.toString(),
|
|
2621
|
+
$identifier: _propertyGroup.$identifier().toString(),
|
|
2674
2622
|
label: _propertyGroup.label.map((item) => item.toString()).extract(),
|
|
2675
2623
|
});
|
|
2676
2624
|
}
|
|
@@ -2683,18 +2631,23 @@ export var PropertyGroup;
|
|
|
2683
2631
|
export var Ontology;
|
|
2684
2632
|
(function (Ontology) {
|
|
2685
2633
|
function $create(parameters) {
|
|
2634
|
+
const $identifierParameter = parameters?.$identifier;
|
|
2686
2635
|
let $identifier;
|
|
2687
|
-
if (typeof
|
|
2688
|
-
$identifier =
|
|
2636
|
+
if (typeof $identifierParameter === "function") {
|
|
2637
|
+
$identifier = $identifierParameter;
|
|
2638
|
+
}
|
|
2639
|
+
else if (typeof $identifierParameter === "object") {
|
|
2640
|
+
$identifier = () => $identifierParameter;
|
|
2689
2641
|
}
|
|
2690
|
-
else if (typeof
|
|
2691
|
-
$identifier = dataFactory.namedNode(
|
|
2642
|
+
else if (typeof $identifierParameter === "string") {
|
|
2643
|
+
$identifier = () => dataFactory.namedNode($identifierParameter);
|
|
2692
2644
|
}
|
|
2693
|
-
else if (
|
|
2694
|
-
$
|
|
2645
|
+
else if ($identifierParameter === undefined) {
|
|
2646
|
+
const $eagerIdentifier = dataFactory.blankNode();
|
|
2647
|
+
$identifier = () => $eagerIdentifier;
|
|
2695
2648
|
}
|
|
2696
2649
|
else {
|
|
2697
|
-
$identifier =
|
|
2650
|
+
$identifier = $identifierParameter;
|
|
2698
2651
|
}
|
|
2699
2652
|
const $type = "Ontology";
|
|
2700
2653
|
let comment;
|
|
@@ -2759,23 +2712,6 @@ export var Ontology;
|
|
|
2759
2712
|
else {
|
|
2760
2713
|
tsImports = parameters?.tsImports;
|
|
2761
2714
|
}
|
|
2762
|
-
let tsObjectDeclarationType;
|
|
2763
|
-
if (Maybe.isMaybe(parameters?.tsObjectDeclarationType)) {
|
|
2764
|
-
tsObjectDeclarationType = parameters?.tsObjectDeclarationType;
|
|
2765
|
-
}
|
|
2766
|
-
else if (typeof parameters?.tsObjectDeclarationType === "object") {
|
|
2767
|
-
tsObjectDeclarationType = Maybe.of(parameters?.tsObjectDeclarationType);
|
|
2768
|
-
}
|
|
2769
|
-
else if (typeof parameters?.tsObjectDeclarationType === "string") {
|
|
2770
|
-
tsObjectDeclarationType = Maybe.of(dataFactory.namedNode(parameters?.tsObjectDeclarationType));
|
|
2771
|
-
}
|
|
2772
|
-
else if (parameters?.tsObjectDeclarationType === undefined) {
|
|
2773
|
-
tsObjectDeclarationType = Maybe.empty();
|
|
2774
|
-
}
|
|
2775
|
-
else {
|
|
2776
|
-
tsObjectDeclarationType =
|
|
2777
|
-
parameters?.tsObjectDeclarationType;
|
|
2778
|
-
}
|
|
2779
2715
|
return {
|
|
2780
2716
|
$identifier,
|
|
2781
2717
|
$type,
|
|
@@ -2784,7 +2720,6 @@ export var Ontology;
|
|
|
2784
2720
|
tsFeatureExcludes,
|
|
2785
2721
|
tsFeatureIncludes,
|
|
2786
2722
|
tsImports,
|
|
2787
|
-
tsObjectDeclarationType,
|
|
2788
2723
|
};
|
|
2789
2724
|
}
|
|
2790
2725
|
Ontology.$create = $create;
|
|
@@ -2795,7 +2730,7 @@ export var Ontology;
|
|
|
2795
2730
|
})($Identifier = Ontology.$Identifier || (Ontology.$Identifier = {}));
|
|
2796
2731
|
function $filter(filter, value) {
|
|
2797
2732
|
if (filter.$identifier !== undefined &&
|
|
2798
|
-
!$filterIdentifier(filter.$identifier, value.$identifier)) {
|
|
2733
|
+
!$filterIdentifier(filter.$identifier, value.$identifier())) {
|
|
2799
2734
|
return false;
|
|
2800
2735
|
}
|
|
2801
2736
|
if (filter.comment !== undefined &&
|
|
@@ -2818,10 +2753,6 @@ export var Ontology;
|
|
|
2818
2753
|
!$filterArray($filterString)(filter.tsImports, value.tsImports)) {
|
|
2819
2754
|
return false;
|
|
2820
2755
|
}
|
|
2821
|
-
if (filter.tsObjectDeclarationType !== undefined &&
|
|
2822
|
-
!$filterMaybe($filterIri)(filter.tsObjectDeclarationType, value.tsObjectDeclarationType)) {
|
|
2823
|
-
return false;
|
|
2824
|
-
}
|
|
2825
2756
|
return true;
|
|
2826
2757
|
}
|
|
2827
2758
|
Ontology.$filter = $filter;
|
|
@@ -2836,7 +2767,7 @@ export var Ontology;
|
|
|
2836
2767
|
ignoreRdfType,
|
|
2837
2768
|
objectSet,
|
|
2838
2769
|
preferredLanguages,
|
|
2839
|
-
});
|
|
2770
|
+
}).map($create);
|
|
2840
2771
|
};
|
|
2841
2772
|
Ontology.$fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
2842
2773
|
.toResource()
|
|
@@ -2966,24 +2897,7 @@ export var Ontology;
|
|
|
2966
2897
|
propertyPath: Ontology.$schema.properties.tsImports.path,
|
|
2967
2898
|
value: valuesArray,
|
|
2968
2899
|
})),
|
|
2969
|
-
}).
|
|
2970
|
-
graph: _$options.graph,
|
|
2971
|
-
resource: $resource,
|
|
2972
|
-
propertySchema: Ontology.$schema.properties.tsObjectDeclarationType,
|
|
2973
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
2974
|
-
.chain((values) => values.chainMap((value) => value.toIri([
|
|
2975
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsObjectDeclarationType_Class"),
|
|
2976
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsObjectDeclarationType_Interface"),
|
|
2977
|
-
])))
|
|
2978
|
-
.map((values) => values.length > 0
|
|
2979
|
-
? values.map((value) => Maybe.of(value))
|
|
2980
|
-
: Resource.Values.fromValue({
|
|
2981
|
-
focusResource: $resource,
|
|
2982
|
-
propertyPath: Ontology.$schema.properties
|
|
2983
|
-
.tsObjectDeclarationType.path,
|
|
2984
|
-
value: Maybe.empty(),
|
|
2985
|
-
})),
|
|
2986
|
-
}).map((tsObjectDeclarationType) => ({
|
|
2900
|
+
}).map((tsImports) => ({
|
|
2987
2901
|
$identifier,
|
|
2988
2902
|
$type,
|
|
2989
2903
|
comment,
|
|
@@ -2991,8 +2905,7 @@ export var Ontology;
|
|
|
2991
2905
|
tsFeatureExcludes,
|
|
2992
2906
|
tsFeatureIncludes,
|
|
2993
2907
|
tsImports,
|
|
2994
|
-
|
|
2995
|
-
}))))))))));
|
|
2908
|
+
})))))))));
|
|
2996
2909
|
};
|
|
2997
2910
|
Ontology.$schema = {
|
|
2998
2911
|
properties: {
|
|
@@ -3075,20 +2988,6 @@ export var Ontology;
|
|
|
3075
2988
|
}),
|
|
3076
2989
|
path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsImport"),
|
|
3077
2990
|
},
|
|
3078
|
-
tsObjectDeclarationType: {
|
|
3079
|
-
kind: "Shacl",
|
|
3080
|
-
type: () => ({
|
|
3081
|
-
kind: "Maybe",
|
|
3082
|
-
item: () => ({
|
|
3083
|
-
kind: "Iri",
|
|
3084
|
-
in: [
|
|
3085
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsObjectDeclarationType_Class"),
|
|
3086
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsObjectDeclarationType_Interface"),
|
|
3087
|
-
],
|
|
3088
|
-
}),
|
|
3089
|
-
}),
|
|
3090
|
-
path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsObjectDeclarationType"),
|
|
3091
|
-
},
|
|
3092
2991
|
},
|
|
3093
2992
|
};
|
|
3094
2993
|
function $toRdfResource(_ontology, options) {
|
|
@@ -3097,7 +2996,7 @@ export var Ontology;
|
|
|
3097
2996
|
dataFactory: dataFactory,
|
|
3098
2997
|
dataset: datasetFactory.dataset(),
|
|
3099
2998
|
});
|
|
3100
|
-
const resource = resourceSet.resource(_ontology.$identifier);
|
|
2999
|
+
const resource = resourceSet.resource(_ontology.$identifier());
|
|
3101
3000
|
if (!options?.ignoreRdfType) {
|
|
3102
3001
|
resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology"), options?.graph);
|
|
3103
3002
|
}
|
|
@@ -3110,13 +3009,12 @@ export var Ontology;
|
|
|
3110
3009
|
resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsFeatureExclude"), _ontology.tsFeatureExcludes.flatMap((item) => [item]), options?.graph);
|
|
3111
3010
|
resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsFeatureInclude"), _ontology.tsFeatureIncludes.flatMap((item) => [item]), options?.graph);
|
|
3112
3011
|
resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsImport"), _ontology.tsImports.flatMap((item) => [$literalFactory.string(item)]), options?.graph);
|
|
3113
|
-
resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsObjectDeclarationType"), _ontology.tsObjectDeclarationType.toList(), options?.graph);
|
|
3114
3012
|
return resource;
|
|
3115
3013
|
}
|
|
3116
3014
|
Ontology.$toRdfResource = $toRdfResource;
|
|
3117
3015
|
function $propertiesToStrings(_ontology) {
|
|
3118
3016
|
return $compactRecord({
|
|
3119
|
-
$identifier: _ontology.$identifier.toString(),
|
|
3017
|
+
$identifier: _ontology.$identifier().toString(),
|
|
3120
3018
|
label: _ontology.label.map((item) => item.toString()).extract(),
|
|
3121
3019
|
});
|
|
3122
3020
|
}
|
|
@@ -3129,33 +3027,25 @@ export var Ontology;
|
|
|
3129
3027
|
export var NodeShape;
|
|
3130
3028
|
(function (NodeShape) {
|
|
3131
3029
|
function $create(parameters) {
|
|
3030
|
+
const $identifierParameter = parameters?.$identifier;
|
|
3132
3031
|
let $identifier;
|
|
3133
|
-
if (typeof
|
|
3134
|
-
$identifier =
|
|
3032
|
+
if (typeof $identifierParameter === "function") {
|
|
3033
|
+
$identifier = $identifierParameter;
|
|
3135
3034
|
}
|
|
3136
|
-
else if (typeof
|
|
3137
|
-
$identifier =
|
|
3035
|
+
else if (typeof $identifierParameter === "object") {
|
|
3036
|
+
$identifier = () => $identifierParameter;
|
|
3138
3037
|
}
|
|
3139
|
-
else if (
|
|
3140
|
-
$identifier = dataFactory.
|
|
3038
|
+
else if (typeof $identifierParameter === "string") {
|
|
3039
|
+
$identifier = () => dataFactory.namedNode($identifierParameter);
|
|
3141
3040
|
}
|
|
3142
|
-
else {
|
|
3143
|
-
$
|
|
3144
|
-
|
|
3145
|
-
const $type = "NodeShape";
|
|
3146
|
-
let abstract;
|
|
3147
|
-
if (Maybe.isMaybe(parameters?.abstract)) {
|
|
3148
|
-
abstract = parameters?.abstract;
|
|
3149
|
-
}
|
|
3150
|
-
else if (typeof parameters?.abstract === "boolean") {
|
|
3151
|
-
abstract = Maybe.of(parameters?.abstract);
|
|
3152
|
-
}
|
|
3153
|
-
else if (parameters?.abstract === undefined) {
|
|
3154
|
-
abstract = Maybe.empty();
|
|
3041
|
+
else if ($identifierParameter === undefined) {
|
|
3042
|
+
const $eagerIdentifier = dataFactory.blankNode();
|
|
3043
|
+
$identifier = () => $eagerIdentifier;
|
|
3155
3044
|
}
|
|
3156
3045
|
else {
|
|
3157
|
-
|
|
3046
|
+
$identifier = $identifierParameter;
|
|
3158
3047
|
}
|
|
3048
|
+
const $type = "NodeShape";
|
|
3159
3049
|
let and;
|
|
3160
3050
|
if (Maybe.isMaybe(parameters?.and)) {
|
|
3161
3051
|
and = parameters?.and;
|
|
@@ -3314,23 +3204,6 @@ export var NodeShape;
|
|
|
3314
3204
|
else {
|
|
3315
3205
|
hasValues = parameters?.hasValues;
|
|
3316
3206
|
}
|
|
3317
|
-
let identifierMintingStrategy;
|
|
3318
|
-
if (Maybe.isMaybe(parameters?.identifierMintingStrategy)) {
|
|
3319
|
-
identifierMintingStrategy = parameters?.identifierMintingStrategy;
|
|
3320
|
-
}
|
|
3321
|
-
else if (typeof parameters?.identifierMintingStrategy === "object") {
|
|
3322
|
-
identifierMintingStrategy = Maybe.of(parameters?.identifierMintingStrategy);
|
|
3323
|
-
}
|
|
3324
|
-
else if (typeof parameters?.identifierMintingStrategy === "string") {
|
|
3325
|
-
identifierMintingStrategy = Maybe.of(dataFactory.namedNode(parameters?.identifierMintingStrategy));
|
|
3326
|
-
}
|
|
3327
|
-
else if (parameters?.identifierMintingStrategy === undefined) {
|
|
3328
|
-
identifierMintingStrategy = Maybe.empty();
|
|
3329
|
-
}
|
|
3330
|
-
else {
|
|
3331
|
-
identifierMintingStrategy =
|
|
3332
|
-
parameters?.identifierMintingStrategy;
|
|
3333
|
-
}
|
|
3334
3207
|
let ignoredProperties;
|
|
3335
3208
|
if (Maybe.isMaybe(parameters?.ignoredProperties)) {
|
|
3336
3209
|
ignoredProperties = parameters?.ignoredProperties;
|
|
@@ -3767,23 +3640,6 @@ export var NodeShape;
|
|
|
3767
3640
|
else {
|
|
3768
3641
|
tsImports = parameters?.tsImports;
|
|
3769
3642
|
}
|
|
3770
|
-
let tsObjectDeclarationType;
|
|
3771
|
-
if (Maybe.isMaybe(parameters?.tsObjectDeclarationType)) {
|
|
3772
|
-
tsObjectDeclarationType = parameters?.tsObjectDeclarationType;
|
|
3773
|
-
}
|
|
3774
|
-
else if (typeof parameters?.tsObjectDeclarationType === "object") {
|
|
3775
|
-
tsObjectDeclarationType = Maybe.of(parameters?.tsObjectDeclarationType);
|
|
3776
|
-
}
|
|
3777
|
-
else if (typeof parameters?.tsObjectDeclarationType === "string") {
|
|
3778
|
-
tsObjectDeclarationType = Maybe.of(dataFactory.namedNode(parameters?.tsObjectDeclarationType));
|
|
3779
|
-
}
|
|
3780
|
-
else if (parameters?.tsObjectDeclarationType === undefined) {
|
|
3781
|
-
tsObjectDeclarationType = Maybe.empty();
|
|
3782
|
-
}
|
|
3783
|
-
else {
|
|
3784
|
-
tsObjectDeclarationType =
|
|
3785
|
-
parameters?.tsObjectDeclarationType;
|
|
3786
|
-
}
|
|
3787
3643
|
let types;
|
|
3788
3644
|
if (parameters?.types === undefined) {
|
|
3789
3645
|
types = [];
|
|
@@ -3816,7 +3672,6 @@ export var NodeShape;
|
|
|
3816
3672
|
return {
|
|
3817
3673
|
$identifier,
|
|
3818
3674
|
$type,
|
|
3819
|
-
abstract,
|
|
3820
3675
|
and,
|
|
3821
3676
|
classes,
|
|
3822
3677
|
closed,
|
|
@@ -3828,7 +3683,6 @@ export var NodeShape;
|
|
|
3828
3683
|
flags,
|
|
3829
3684
|
fromRdfType,
|
|
3830
3685
|
hasValues,
|
|
3831
|
-
identifierMintingStrategy,
|
|
3832
3686
|
ignoredProperties,
|
|
3833
3687
|
in_,
|
|
3834
3688
|
isDefinedBy,
|
|
@@ -3856,7 +3710,6 @@ export var NodeShape;
|
|
|
3856
3710
|
tsFeatureExcludes,
|
|
3857
3711
|
tsFeatureIncludes,
|
|
3858
3712
|
tsImports,
|
|
3859
|
-
tsObjectDeclarationType,
|
|
3860
3713
|
types,
|
|
3861
3714
|
xone,
|
|
3862
3715
|
};
|
|
@@ -3869,11 +3722,7 @@ export var NodeShape;
|
|
|
3869
3722
|
})($Identifier = NodeShape.$Identifier || (NodeShape.$Identifier = {}));
|
|
3870
3723
|
function $filter(filter, value) {
|
|
3871
3724
|
if (filter.$identifier !== undefined &&
|
|
3872
|
-
!$filterIdentifier(filter.$identifier, value.$identifier)) {
|
|
3873
|
-
return false;
|
|
3874
|
-
}
|
|
3875
|
-
if (filter.abstract !== undefined &&
|
|
3876
|
-
!$filterMaybe($filterBoolean)(filter.abstract, value.abstract)) {
|
|
3725
|
+
!$filterIdentifier(filter.$identifier, value.$identifier())) {
|
|
3877
3726
|
return false;
|
|
3878
3727
|
}
|
|
3879
3728
|
if (filter.and !== undefined &&
|
|
@@ -3920,10 +3769,6 @@ export var NodeShape;
|
|
|
3920
3769
|
!$filterArray($filterTerm)(filter.hasValues, value.hasValues)) {
|
|
3921
3770
|
return false;
|
|
3922
3771
|
}
|
|
3923
|
-
if (filter.identifierMintingStrategy !== undefined &&
|
|
3924
|
-
!$filterMaybe($filterIri)(filter.identifierMintingStrategy, value.identifierMintingStrategy)) {
|
|
3925
|
-
return false;
|
|
3926
|
-
}
|
|
3927
3772
|
if (filter.ignoredProperties !== undefined &&
|
|
3928
3773
|
!$filterMaybe($filterArray($filterIri))(filter.ignoredProperties, value.ignoredProperties)) {
|
|
3929
3774
|
return false;
|
|
@@ -4032,10 +3877,6 @@ export var NodeShape;
|
|
|
4032
3877
|
!$filterArray($filterString)(filter.tsImports, value.tsImports)) {
|
|
4033
3878
|
return false;
|
|
4034
3879
|
}
|
|
4035
|
-
if (filter.tsObjectDeclarationType !== undefined &&
|
|
4036
|
-
!$filterMaybe($filterIri)(filter.tsObjectDeclarationType, value.tsObjectDeclarationType)) {
|
|
4037
|
-
return false;
|
|
4038
|
-
}
|
|
4039
3880
|
if (filter.types !== undefined &&
|
|
4040
3881
|
!$filterArray($filterIri)(filter.types, value.types)) {
|
|
4041
3882
|
return false;
|
|
@@ -4058,7 +3899,7 @@ export var NodeShape;
|
|
|
4058
3899
|
ignoreRdfType,
|
|
4059
3900
|
objectSet,
|
|
4060
3901
|
preferredLanguages,
|
|
4061
|
-
});
|
|
3902
|
+
}).map($create);
|
|
4062
3903
|
};
|
|
4063
3904
|
NodeShape.$fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
4064
3905
|
.toResource()
|
|
@@ -4101,19 +3942,6 @@ export var NodeShape;
|
|
|
4101
3942
|
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
4102
3943
|
.chain((values) => values.head())
|
|
4103
3944
|
.chain(($identifier) => Right("NodeShape").chain(($type) => $shaclPropertyFromRdf({
|
|
4104
|
-
graph: _$options.graph,
|
|
4105
|
-
resource: $resource,
|
|
4106
|
-
propertySchema: NodeShape.$schema.properties.abstract,
|
|
4107
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4108
|
-
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
4109
|
-
.map((values) => values.length > 0
|
|
4110
|
-
? values.map((value) => Maybe.of(value))
|
|
4111
|
-
: Resource.Values.fromValue({
|
|
4112
|
-
focusResource: $resource,
|
|
4113
|
-
propertyPath: NodeShape.$schema.properties.abstract.path,
|
|
4114
|
-
value: Maybe.empty(),
|
|
4115
|
-
})),
|
|
4116
|
-
}).chain((abstract) => $shaclPropertyFromRdf({
|
|
4117
3945
|
graph: _$options.graph,
|
|
4118
3946
|
resource: $resource,
|
|
4119
3947
|
propertySchema: NodeShape.$schema.properties.and,
|
|
@@ -4168,8 +3996,7 @@ export var NodeShape;
|
|
|
4168
3996
|
? values.map((value) => Maybe.of(value))
|
|
4169
3997
|
: Resource.Values.fromValue({
|
|
4170
3998
|
focusResource: $resource,
|
|
4171
|
-
propertyPath: PropertyShape.$schema.properties.comment
|
|
4172
|
-
.path,
|
|
3999
|
+
propertyPath: PropertyShape.$schema.properties.comment.path,
|
|
4173
4000
|
value: Maybe.empty(),
|
|
4174
4001
|
})),
|
|
4175
4002
|
}).chain((comment) => $shaclPropertyFromRdf({
|
|
@@ -4273,8 +4100,8 @@ export var NodeShape;
|
|
|
4273
4100
|
expectedValueType: "(NamedNode | Literal)",
|
|
4274
4101
|
focusResource: $resource,
|
|
4275
4102
|
propertyPath: PropertyShape.$schema
|
|
4276
|
-
.properties
|
|
4277
|
-
.
|
|
4103
|
+
.properties.hasValues
|
|
4104
|
+
.path,
|
|
4278
4105
|
}));
|
|
4279
4106
|
}
|
|
4280
4107
|
})))
|
|
@@ -4286,26 +4113,6 @@ export var NodeShape;
|
|
|
4286
4113
|
value: valuesArray,
|
|
4287
4114
|
})),
|
|
4288
4115
|
}).chain((hasValues) => $shaclPropertyFromRdf({
|
|
4289
|
-
graph: _$options.graph,
|
|
4290
|
-
resource: $resource,
|
|
4291
|
-
propertySchema: NodeShape.$schema.properties
|
|
4292
|
-
.identifierMintingStrategy,
|
|
4293
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4294
|
-
.chain((values) => values.chainMap((value) => value.toIri([
|
|
4295
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_IdentifierMintingStrategy_BlankNode"),
|
|
4296
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_IdentifierMintingStrategy_SHA256"),
|
|
4297
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_IdentifierMintingStrategy_UUIDv4"),
|
|
4298
|
-
])))
|
|
4299
|
-
.map((values) => values.length > 0
|
|
4300
|
-
? values.map((value) => Maybe.of(value))
|
|
4301
|
-
: Resource.Values.fromValue({
|
|
4302
|
-
focusResource: $resource,
|
|
4303
|
-
propertyPath: NodeShape.$schema.properties
|
|
4304
|
-
.identifierMintingStrategy
|
|
4305
|
-
.path,
|
|
4306
|
-
value: Maybe.empty(),
|
|
4307
|
-
})),
|
|
4308
|
-
}).chain((identifierMintingStrategy) => $shaclPropertyFromRdf({
|
|
4309
4116
|
graph: _$options.graph,
|
|
4310
4117
|
resource: $resource,
|
|
4311
4118
|
propertySchema: NodeShape.$schema.properties.ignoredProperties,
|
|
@@ -4315,8 +4122,7 @@ export var NodeShape;
|
|
|
4315
4122
|
})))
|
|
4316
4123
|
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
4317
4124
|
focusResource: $resource,
|
|
4318
|
-
propertyPath: NodeShape.$schema
|
|
4319
|
-
.properties
|
|
4125
|
+
propertyPath: NodeShape.$schema.properties
|
|
4320
4126
|
.ignoredProperties.path,
|
|
4321
4127
|
values: valueList.toArray(),
|
|
4322
4128
|
})).chain((values) => values.chainMap((value) => value.toIri()))))
|
|
@@ -4325,8 +4131,7 @@ export var NodeShape;
|
|
|
4325
4131
|
? values.map((value) => Maybe.of(value))
|
|
4326
4132
|
: Resource.Values.fromValue({
|
|
4327
4133
|
focusResource: $resource,
|
|
4328
|
-
propertyPath: NodeShape.$schema
|
|
4329
|
-
.properties
|
|
4134
|
+
propertyPath: NodeShape.$schema.properties
|
|
4330
4135
|
.ignoredProperties.path,
|
|
4331
4136
|
value: Maybe.empty(),
|
|
4332
4137
|
})),
|
|
@@ -4340,10 +4145,8 @@ export var NodeShape;
|
|
|
4340
4145
|
})))
|
|
4341
4146
|
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
4342
4147
|
focusResource: $resource,
|
|
4343
|
-
propertyPath: PropertyShape
|
|
4344
|
-
|
|
4345
|
-
.properties.in_
|
|
4346
|
-
.path,
|
|
4148
|
+
propertyPath: PropertyShape.$schema
|
|
4149
|
+
.properties.in_.path,
|
|
4347
4150
|
values: valueList.toArray(),
|
|
4348
4151
|
})).chain((values) => values.chainMap((value) => value
|
|
4349
4152
|
.toTerm()
|
|
@@ -4360,8 +4163,7 @@ export var NodeShape;
|
|
|
4360
4163
|
propertyPath: PropertyShape
|
|
4361
4164
|
.$schema
|
|
4362
4165
|
.properties
|
|
4363
|
-
.in_
|
|
4364
|
-
.path,
|
|
4166
|
+
.in_.path,
|
|
4365
4167
|
}));
|
|
4366
4168
|
}
|
|
4367
4169
|
})))))
|
|
@@ -4385,8 +4187,8 @@ export var NodeShape;
|
|
|
4385
4187
|
: Resource.Values.fromValue({
|
|
4386
4188
|
focusResource: $resource,
|
|
4387
4189
|
propertyPath: PropertyShape.$schema
|
|
4388
|
-
.properties
|
|
4389
|
-
.
|
|
4190
|
+
.properties.isDefinedBy
|
|
4191
|
+
.path,
|
|
4390
4192
|
value: Maybe.empty(),
|
|
4391
4193
|
})),
|
|
4392
4194
|
}).chain((isDefinedBy) => $shaclPropertyFromRdf({
|
|
@@ -4400,8 +4202,7 @@ export var NodeShape;
|
|
|
4400
4202
|
? values.map((value) => Maybe.of(value))
|
|
4401
4203
|
: Resource.Values.fromValue({
|
|
4402
4204
|
focusResource: $resource,
|
|
4403
|
-
propertyPath: PropertyShape
|
|
4404
|
-
.$schema
|
|
4205
|
+
propertyPath: PropertyShape.$schema
|
|
4405
4206
|
.properties.label
|
|
4406
4207
|
.path,
|
|
4407
4208
|
value: Maybe.empty(),
|
|
@@ -4430,11 +4231,9 @@ export var NodeShape;
|
|
|
4430
4231
|
? values.map((value) => Maybe.of(value))
|
|
4431
4232
|
: Resource.Values.fromValue({
|
|
4432
4233
|
focusResource: $resource,
|
|
4433
|
-
propertyPath: PropertyShape
|
|
4434
|
-
.$schema
|
|
4234
|
+
propertyPath: PropertyShape.$schema
|
|
4435
4235
|
.properties
|
|
4436
|
-
.languageIn
|
|
4437
|
-
.path,
|
|
4236
|
+
.languageIn.path,
|
|
4438
4237
|
value: Maybe.empty(),
|
|
4439
4238
|
})),
|
|
4440
4239
|
}).chain((languageIn) => $shaclPropertyFromRdf({
|
|
@@ -4450,8 +4249,7 @@ export var NodeShape;
|
|
|
4450
4249
|
propertyPath: PropertyShape
|
|
4451
4250
|
.$schema
|
|
4452
4251
|
.properties
|
|
4453
|
-
.maxCount
|
|
4454
|
-
.path,
|
|
4252
|
+
.maxCount.path,
|
|
4455
4253
|
value: Maybe.empty(),
|
|
4456
4254
|
})),
|
|
4457
4255
|
}).chain((maxCount) => $shaclPropertyFromRdf({
|
|
@@ -4517,8 +4315,7 @@ export var NodeShape;
|
|
|
4517
4315
|
.minCount,
|
|
4518
4316
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4519
4317
|
.chain((values) => values.chainMap((value) => value.toInt()))
|
|
4520
|
-
.map((values) => values.length >
|
|
4521
|
-
0
|
|
4318
|
+
.map((values) => values.length > 0
|
|
4522
4319
|
? values.map((value) => Maybe.of(value))
|
|
4523
4320
|
: Resource.Values.fromValue({
|
|
4524
4321
|
focusResource: $resource,
|
|
@@ -4532,14 +4329,12 @@ export var NodeShape;
|
|
|
4532
4329
|
}).chain((minCount) => $shaclPropertyFromRdf({
|
|
4533
4330
|
graph: _$options.graph,
|
|
4534
4331
|
resource: $resource,
|
|
4535
|
-
propertySchema: NodeShape.$schema
|
|
4536
|
-
.properties
|
|
4332
|
+
propertySchema: NodeShape.$schema.properties
|
|
4537
4333
|
.minExclusive,
|
|
4538
4334
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4539
4335
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4540
4336
|
.chain((values) => values.chainMap((value) => value.toLiteral()))
|
|
4541
|
-
.map((values) => values.length >
|
|
4542
|
-
0
|
|
4337
|
+
.map((values) => values.length > 0
|
|
4543
4338
|
? values.map((value) => Maybe.of(value))
|
|
4544
4339
|
: Resource.Values.fromValue({
|
|
4545
4340
|
focusResource: $resource,
|
|
@@ -4553,8 +4348,7 @@ export var NodeShape;
|
|
|
4553
4348
|
}).chain((minExclusive) => $shaclPropertyFromRdf({
|
|
4554
4349
|
graph: _$options.graph,
|
|
4555
4350
|
resource: $resource,
|
|
4556
|
-
propertySchema: NodeShape.$schema
|
|
4557
|
-
.properties
|
|
4351
|
+
propertySchema: NodeShape.$schema.properties
|
|
4558
4352
|
.minInclusive,
|
|
4559
4353
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4560
4354
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
@@ -4898,29 +4692,6 @@ export var NodeShape;
|
|
|
4898
4692
|
value: valuesArray,
|
|
4899
4693
|
})),
|
|
4900
4694
|
}).chain((tsImports) => $shaclPropertyFromRdf({
|
|
4901
|
-
graph: _$options.graph,
|
|
4902
|
-
resource: $resource,
|
|
4903
|
-
propertySchema: NodeShape.$schema
|
|
4904
|
-
.properties
|
|
4905
|
-
.tsObjectDeclarationType,
|
|
4906
|
-
typeFromRdf: (resourceValues) => resourceValues
|
|
4907
|
-
.chain((values) => values.chainMap((value) => value.toIri([
|
|
4908
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsObjectDeclarationType_Class"),
|
|
4909
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsObjectDeclarationType_Interface"),
|
|
4910
|
-
])))
|
|
4911
|
-
.map((values) => values.length >
|
|
4912
|
-
0
|
|
4913
|
-
? values.map((value) => Maybe.of(value))
|
|
4914
|
-
: Resource.Values.fromValue({
|
|
4915
|
-
focusResource: $resource,
|
|
4916
|
-
propertyPath: Ontology
|
|
4917
|
-
.$schema
|
|
4918
|
-
.properties
|
|
4919
|
-
.tsObjectDeclarationType
|
|
4920
|
-
.path,
|
|
4921
|
-
value: Maybe.empty(),
|
|
4922
|
-
})),
|
|
4923
|
-
}).chain((tsObjectDeclarationType) => $shaclPropertyFromRdf({
|
|
4924
4695
|
graph: _$options.graph,
|
|
4925
4696
|
resource: $resource,
|
|
4926
4697
|
propertySchema: NodeShape.$schema
|
|
@@ -4973,7 +4744,6 @@ export var NodeShape;
|
|
|
4973
4744
|
}).map((xone) => ({
|
|
4974
4745
|
$identifier,
|
|
4975
4746
|
$type,
|
|
4976
|
-
abstract,
|
|
4977
4747
|
and,
|
|
4978
4748
|
classes,
|
|
4979
4749
|
closed,
|
|
@@ -4985,7 +4755,6 @@ export var NodeShape;
|
|
|
4985
4755
|
flags,
|
|
4986
4756
|
fromRdfType,
|
|
4987
4757
|
hasValues,
|
|
4988
|
-
identifierMintingStrategy,
|
|
4989
4758
|
ignoredProperties,
|
|
4990
4759
|
in_,
|
|
4991
4760
|
isDefinedBy,
|
|
@@ -5013,10 +4782,9 @@ export var NodeShape;
|
|
|
5013
4782
|
tsFeatureExcludes,
|
|
5014
4783
|
tsFeatureIncludes,
|
|
5015
4784
|
tsImports,
|
|
5016
|
-
tsObjectDeclarationType,
|
|
5017
4785
|
types,
|
|
5018
4786
|
xone,
|
|
5019
|
-
}))))))))))))))))))))))))))))))))))))))))))))
|
|
4787
|
+
}))))))))))))))))))))))))))))))))))))))))))));
|
|
5020
4788
|
};
|
|
5021
4789
|
NodeShape.$schema = {
|
|
5022
4790
|
properties: {
|
|
@@ -5031,14 +4799,6 @@ export var NodeShape;
|
|
|
5031
4799
|
ownValues: ["NodeShape"],
|
|
5032
4800
|
}),
|
|
5033
4801
|
},
|
|
5034
|
-
abstract: {
|
|
5035
|
-
kind: "Shacl",
|
|
5036
|
-
type: () => ({
|
|
5037
|
-
kind: "Maybe",
|
|
5038
|
-
item: () => ({ kind: "Boolean" }),
|
|
5039
|
-
}),
|
|
5040
|
-
path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#abstract"),
|
|
5041
|
-
},
|
|
5042
4802
|
and: {
|
|
5043
4803
|
kind: "Shacl",
|
|
5044
4804
|
type: () => ({
|
|
@@ -5130,21 +4890,6 @@ export var NodeShape;
|
|
|
5130
4890
|
}),
|
|
5131
4891
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#hasValue"),
|
|
5132
4892
|
},
|
|
5133
|
-
identifierMintingStrategy: {
|
|
5134
|
-
kind: "Shacl",
|
|
5135
|
-
type: () => ({
|
|
5136
|
-
kind: "Maybe",
|
|
5137
|
-
item: () => ({
|
|
5138
|
-
kind: "Iri",
|
|
5139
|
-
in: [
|
|
5140
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_IdentifierMintingStrategy_BlankNode"),
|
|
5141
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_IdentifierMintingStrategy_SHA256"),
|
|
5142
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_IdentifierMintingStrategy_UUIDv4"),
|
|
5143
|
-
],
|
|
5144
|
-
}),
|
|
5145
|
-
}),
|
|
5146
|
-
path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#identifierMintingStrategy"),
|
|
5147
|
-
},
|
|
5148
4893
|
ignoredProperties: {
|
|
5149
4894
|
kind: "Shacl",
|
|
5150
4895
|
type: () => ({
|
|
@@ -5411,20 +5156,6 @@ export var NodeShape;
|
|
|
5411
5156
|
}),
|
|
5412
5157
|
path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsImport"),
|
|
5413
5158
|
},
|
|
5414
|
-
tsObjectDeclarationType: {
|
|
5415
|
-
kind: "Shacl",
|
|
5416
|
-
type: () => ({
|
|
5417
|
-
kind: "Maybe",
|
|
5418
|
-
item: () => ({
|
|
5419
|
-
kind: "Iri",
|
|
5420
|
-
in: [
|
|
5421
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsObjectDeclarationType_Class"),
|
|
5422
|
-
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsObjectDeclarationType_Interface"),
|
|
5423
|
-
],
|
|
5424
|
-
}),
|
|
5425
|
-
}),
|
|
5426
|
-
path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsObjectDeclarationType"),
|
|
5427
|
-
},
|
|
5428
5159
|
types: {
|
|
5429
5160
|
kind: "Shacl",
|
|
5430
5161
|
type: () => ({
|
|
@@ -5452,15 +5183,10 @@ export var NodeShape;
|
|
|
5452
5183
|
dataFactory: dataFactory,
|
|
5453
5184
|
dataset: datasetFactory.dataset(),
|
|
5454
5185
|
});
|
|
5455
|
-
const resource = resourceSet.resource(_nodeShape.$identifier);
|
|
5186
|
+
const resource = resourceSet.resource(_nodeShape.$identifier());
|
|
5456
5187
|
if (!options?.ignoreRdfType) {
|
|
5457
5188
|
resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape"), options?.graph);
|
|
5458
5189
|
}
|
|
5459
|
-
resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#abstract"), _nodeShape.abstract
|
|
5460
|
-
.toList()
|
|
5461
|
-
.flatMap((value) => [
|
|
5462
|
-
$literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
|
|
5463
|
-
]), options?.graph);
|
|
5464
5190
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#and"), _nodeShape.and.toList().flatMap((value) => [
|
|
5465
5191
|
value.length > 0
|
|
5466
5192
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
@@ -5468,7 +5194,7 @@ export var NodeShape;
|
|
|
5468
5194
|
currentSubListResource = listResource;
|
|
5469
5195
|
}
|
|
5470
5196
|
else {
|
|
5471
|
-
const newSubListResource = resourceSet.resource(dataFactory.blankNode());
|
|
5197
|
+
const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
|
|
5472
5198
|
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
|
|
5473
5199
|
currentSubListResource = newSubListResource;
|
|
5474
5200
|
}
|
|
@@ -5479,7 +5205,7 @@ export var NodeShape;
|
|
|
5479
5205
|
return { currentSubListResource, listResource };
|
|
5480
5206
|
}, {
|
|
5481
5207
|
currentSubListResource: null,
|
|
5482
|
-
listResource: resourceSet.resource(dataFactory.blankNode()),
|
|
5208
|
+
listResource: resourceSet.resource((() => dataFactory.blankNode())()),
|
|
5483
5209
|
}).listResource.identifier
|
|
5484
5210
|
: $RdfVocabularies.rdf.nil,
|
|
5485
5211
|
]), options?.graph);
|
|
@@ -5509,7 +5235,6 @@ export var NodeShape;
|
|
|
5509
5235
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#flags"), _nodeShape.flags.flatMap((item) => [$literalFactory.string(item)]), options?.graph);
|
|
5510
5236
|
resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#fromRdfType"), _nodeShape.fromRdfType.toList(), options?.graph);
|
|
5511
5237
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#hasValue"), _nodeShape.hasValues.flatMap((item) => [item]), options?.graph);
|
|
5512
|
-
resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#identifierMintingStrategy"), _nodeShape.identifierMintingStrategy.toList(), options?.graph);
|
|
5513
5238
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#ignoredProperties"), _nodeShape.ignoredProperties.toList().flatMap((value) => [
|
|
5514
5239
|
value.length > 0
|
|
5515
5240
|
? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
|
|
@@ -5517,7 +5242,7 @@ export var NodeShape;
|
|
|
5517
5242
|
currentSubListResource = listResource;
|
|
5518
5243
|
}
|
|
5519
5244
|
else {
|
|
5520
|
-
const newSubListResource = resourceSet.resource(dataFactory.blankNode());
|
|
5245
|
+
const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
|
|
5521
5246
|
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
|
|
5522
5247
|
currentSubListResource = newSubListResource;
|
|
5523
5248
|
}
|
|
@@ -5528,7 +5253,7 @@ export var NodeShape;
|
|
|
5528
5253
|
return { currentSubListResource, listResource };
|
|
5529
5254
|
}, {
|
|
5530
5255
|
currentSubListResource: null,
|
|
5531
|
-
listResource: resourceSet.resource(dataFactory.blankNode()),
|
|
5256
|
+
listResource: resourceSet.resource((() => dataFactory.blankNode())()),
|
|
5532
5257
|
}).listResource.identifier
|
|
5533
5258
|
: $RdfVocabularies.rdf.nil,
|
|
5534
5259
|
]), options?.graph);
|
|
@@ -5539,7 +5264,7 @@ export var NodeShape;
|
|
|
5539
5264
|
currentSubListResource = listResource;
|
|
5540
5265
|
}
|
|
5541
5266
|
else {
|
|
5542
|
-
const newSubListResource = resourceSet.resource(dataFactory.blankNode());
|
|
5267
|
+
const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
|
|
5543
5268
|
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
|
|
5544
5269
|
currentSubListResource = newSubListResource;
|
|
5545
5270
|
}
|
|
@@ -5550,7 +5275,7 @@ export var NodeShape;
|
|
|
5550
5275
|
return { currentSubListResource, listResource };
|
|
5551
5276
|
}, {
|
|
5552
5277
|
currentSubListResource: null,
|
|
5553
|
-
listResource: resourceSet.resource(dataFactory.blankNode()),
|
|
5278
|
+
listResource: resourceSet.resource((() => dataFactory.blankNode())()),
|
|
5554
5279
|
}).listResource.identifier
|
|
5555
5280
|
: $RdfVocabularies.rdf.nil,
|
|
5556
5281
|
]), options?.graph);
|
|
@@ -5565,7 +5290,7 @@ export var NodeShape;
|
|
|
5565
5290
|
currentSubListResource = listResource;
|
|
5566
5291
|
}
|
|
5567
5292
|
else {
|
|
5568
|
-
const newSubListResource = resourceSet.resource(dataFactory.blankNode());
|
|
5293
|
+
const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
|
|
5569
5294
|
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
|
|
5570
5295
|
currentSubListResource = newSubListResource;
|
|
5571
5296
|
}
|
|
@@ -5576,7 +5301,7 @@ export var NodeShape;
|
|
|
5576
5301
|
return { currentSubListResource, listResource };
|
|
5577
5302
|
}, {
|
|
5578
5303
|
currentSubListResource: null,
|
|
5579
|
-
listResource: resourceSet.resource(dataFactory.blankNode()),
|
|
5304
|
+
listResource: resourceSet.resource((() => dataFactory.blankNode())()),
|
|
5580
5305
|
}).listResource.identifier
|
|
5581
5306
|
: $RdfVocabularies.rdf.nil,
|
|
5582
5307
|
]), options?.graph);
|
|
@@ -5619,7 +5344,7 @@ export var NodeShape;
|
|
|
5619
5344
|
currentSubListResource = listResource;
|
|
5620
5345
|
}
|
|
5621
5346
|
else {
|
|
5622
|
-
const newSubListResource = resourceSet.resource(dataFactory.blankNode());
|
|
5347
|
+
const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
|
|
5623
5348
|
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
|
|
5624
5349
|
currentSubListResource = newSubListResource;
|
|
5625
5350
|
}
|
|
@@ -5630,7 +5355,7 @@ export var NodeShape;
|
|
|
5630
5355
|
return { currentSubListResource, listResource };
|
|
5631
5356
|
}, {
|
|
5632
5357
|
currentSubListResource: null,
|
|
5633
|
-
listResource: resourceSet.resource(dataFactory.blankNode()),
|
|
5358
|
+
listResource: resourceSet.resource((() => dataFactory.blankNode())()),
|
|
5634
5359
|
}).listResource.identifier
|
|
5635
5360
|
: $RdfVocabularies.rdf.nil,
|
|
5636
5361
|
]), options?.graph);
|
|
@@ -5645,7 +5370,6 @@ export var NodeShape;
|
|
|
5645
5370
|
resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsFeatureExclude"), _nodeShape.tsFeatureExcludes.flatMap((item) => [item]), options?.graph);
|
|
5646
5371
|
resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsFeatureInclude"), _nodeShape.tsFeatureIncludes.flatMap((item) => [item]), options?.graph);
|
|
5647
5372
|
resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsImport"), _nodeShape.tsImports.flatMap((item) => [$literalFactory.string(item)]), options?.graph);
|
|
5648
|
-
resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsObjectDeclarationType"), _nodeShape.tsObjectDeclarationType.toList(), options?.graph);
|
|
5649
5373
|
resource.add($RdfVocabularies.rdf.type, _nodeShape.types.flatMap((item) => [item]), options?.graph);
|
|
5650
5374
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#xone"), _nodeShape.xone.toList().flatMap((value) => [
|
|
5651
5375
|
value.length > 0
|
|
@@ -5654,7 +5378,7 @@ export var NodeShape;
|
|
|
5654
5378
|
currentSubListResource = listResource;
|
|
5655
5379
|
}
|
|
5656
5380
|
else {
|
|
5657
|
-
const newSubListResource = resourceSet.resource(dataFactory.blankNode());
|
|
5381
|
+
const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
|
|
5658
5382
|
currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
|
|
5659
5383
|
currentSubListResource = newSubListResource;
|
|
5660
5384
|
}
|
|
@@ -5665,7 +5389,7 @@ export var NodeShape;
|
|
|
5665
5389
|
return { currentSubListResource, listResource };
|
|
5666
5390
|
}, {
|
|
5667
5391
|
currentSubListResource: null,
|
|
5668
|
-
listResource: resourceSet.resource(dataFactory.blankNode()),
|
|
5392
|
+
listResource: resourceSet.resource((() => dataFactory.blankNode())()),
|
|
5669
5393
|
}).listResource.identifier
|
|
5670
5394
|
: $RdfVocabularies.rdf.nil,
|
|
5671
5395
|
]), options?.graph);
|
|
@@ -5674,7 +5398,7 @@ export var NodeShape;
|
|
|
5674
5398
|
NodeShape.$toRdfResource = $toRdfResource;
|
|
5675
5399
|
function $propertiesToStrings(_nodeShape) {
|
|
5676
5400
|
return $compactRecord({
|
|
5677
|
-
$identifier: _nodeShape.$identifier.toString(),
|
|
5401
|
+
$identifier: _nodeShape.$identifier().toString(),
|
|
5678
5402
|
label: _nodeShape.label.map((item) => item.toString()).extract(),
|
|
5679
5403
|
shaclmateName: _nodeShape.shaclmateName
|
|
5680
5404
|
.map((item) => item.toString())
|
|
@@ -5691,7 +5415,7 @@ export var Shape;
|
|
|
5691
5415
|
(function (Shape) {
|
|
5692
5416
|
Shape.$filter = (filter, value) => {
|
|
5693
5417
|
if (filter.$identifier !== undefined &&
|
|
5694
|
-
!$filterIdentifier(filter.$identifier, value.$identifier)) {
|
|
5418
|
+
!$filterIdentifier(filter.$identifier, value.$identifier())) {
|
|
5695
5419
|
return false;
|
|
5696
5420
|
}
|
|
5697
5421
|
if (filter.on?.["NodeShape"] !== undefined &&
|
|
@@ -6041,7 +5765,7 @@ export var $Object;
|
|
|
6041
5765
|
(function ($Object) {
|
|
6042
5766
|
$Object.$filter = (filter, value) => {
|
|
6043
5767
|
if (filter.$identifier !== undefined &&
|
|
6044
|
-
!$filterIdentifier(filter.$identifier, value.$identifier)) {
|
|
5768
|
+
!$filterIdentifier(filter.$identifier, value.$identifier())) {
|
|
6045
5769
|
return false;
|
|
6046
5770
|
}
|
|
6047
5771
|
if (filter.on?.["NodeShape"] !== undefined &&
|
|
@@ -6267,7 +5991,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6267
5991
|
return this.nodeShapeIdentifiersSync(query);
|
|
6268
5992
|
}
|
|
6269
5993
|
nodeShapeIdentifiersSync(query) {
|
|
6270
|
-
return this.nodeShapesSync(query).map((objects) => objects.map((object) => object.$identifier));
|
|
5994
|
+
return this.nodeShapesSync(query).map((objects) => objects.map((object) => object.$identifier()));
|
|
6271
5995
|
}
|
|
6272
5996
|
async nodeShapes(query) {
|
|
6273
5997
|
return this.nodeShapesSync(query);
|
|
@@ -6298,7 +6022,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6298
6022
|
return this.ontologyIdentifiersSync(query);
|
|
6299
6023
|
}
|
|
6300
6024
|
ontologyIdentifiersSync(query) {
|
|
6301
|
-
return this.ontologiesSync(query).map((objects) => objects.map((object) => object.$identifier));
|
|
6025
|
+
return this.ontologiesSync(query).map((objects) => objects.map((object) => object.$identifier()));
|
|
6302
6026
|
}
|
|
6303
6027
|
async ontologies(query) {
|
|
6304
6028
|
return this.ontologiesSync(query);
|
|
@@ -6329,7 +6053,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6329
6053
|
return this.propertyGroupIdentifiersSync(query);
|
|
6330
6054
|
}
|
|
6331
6055
|
propertyGroupIdentifiersSync(query) {
|
|
6332
|
-
return this.propertyGroupsSync(query).map((objects) => objects.map((object) => object.$identifier));
|
|
6056
|
+
return this.propertyGroupsSync(query).map((objects) => objects.map((object) => object.$identifier()));
|
|
6333
6057
|
}
|
|
6334
6058
|
async propertyGroups(query) {
|
|
6335
6059
|
return this.propertyGroupsSync(query);
|
|
@@ -6360,7 +6084,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6360
6084
|
return this.propertyShapeIdentifiersSync(query);
|
|
6361
6085
|
}
|
|
6362
6086
|
propertyShapeIdentifiersSync(query) {
|
|
6363
|
-
return this.propertyShapesSync(query).map((objects) => objects.map((object) => object.$identifier));
|
|
6087
|
+
return this.propertyShapesSync(query).map((objects) => objects.map((object) => object.$identifier()));
|
|
6364
6088
|
}
|
|
6365
6089
|
async propertyShapes(query) {
|
|
6366
6090
|
return this.propertyShapesSync(query);
|
|
@@ -6391,7 +6115,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6391
6115
|
return this.shapeIdentifiersSync(query);
|
|
6392
6116
|
}
|
|
6393
6117
|
shapeIdentifiersSync(query) {
|
|
6394
|
-
return this.shapesSync(query).map((objects) => objects.map((object) => object.$identifier));
|
|
6118
|
+
return this.shapesSync(query).map((objects) => objects.map((object) => object.$identifier()));
|
|
6395
6119
|
}
|
|
6396
6120
|
async shapes(query) {
|
|
6397
6121
|
return this.shapesSync(query);
|
|
@@ -6429,7 +6153,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6429
6153
|
return this.objectIdentifiersSync(query);
|
|
6430
6154
|
}
|
|
6431
6155
|
objectIdentifiersSync(query) {
|
|
6432
|
-
return this.objectsSync(query).map((objects) => objects.map((object) => object.$identifier));
|
|
6156
|
+
return this.objectsSync(query).map((objects) => objects.map((object) => object.$identifier()));
|
|
6433
6157
|
}
|
|
6434
6158
|
async objects(query) {
|
|
6435
6159
|
return this.objectsSync(query);
|