@shaclmate/compiler 2.0.14 → 2.0.16
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/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.js +22 -7
- package/_ShapesGraphToAstTransformer/transformPropertyShapeToAstCompositeType.js +5 -3
- package/ast/ListType.d.ts +2 -2
- package/ast/ObjectType.d.ts +18 -12
- package/enums/IdentifierMintingStrategy.d.ts +5 -0
- package/enums/IdentifierMintingStrategy.js +2 -0
- package/enums/index.d.ts +1 -1
- package/enums/index.js +1 -1
- package/generators/json/AstJsonGenerator.js +5 -1
- package/generators/ts/DateTimeType.d.ts +3 -1
- package/generators/ts/DateTimeType.js +9 -1
- package/generators/ts/IdentifierType.d.ts +2 -0
- package/generators/ts/IdentifierType.js +11 -0
- package/generators/ts/Import.d.ts +0 -1
- package/generators/ts/Import.js +0 -5
- package/generators/ts/ListType.d.ts +4 -3
- package/generators/ts/ListType.js +27 -16
- package/generators/ts/ObjectType.d.ts +5 -4
- package/generators/ts/ObjectType.js +21 -9
- package/generators/ts/ObjectUnionType.d.ts +1 -1
- package/generators/ts/ObjectUnionType.js +22 -52
- package/generators/ts/OptionType.d.ts +3 -1
- package/generators/ts/OptionType.js +12 -11
- package/generators/ts/PrimitiveType.d.ts +2 -2
- package/generators/ts/PrimitiveType.js +9 -4
- package/generators/ts/SetType.d.ts +3 -1
- package/generators/ts/SetType.js +12 -8
- package/generators/ts/SnippetDeclarations.d.ts +11 -0
- package/generators/ts/SnippetDeclarations.js +215 -0
- package/generators/ts/TermType.d.ts +3 -1
- package/generators/ts/TermType.js +16 -8
- package/generators/ts/TsGenerator.js +15 -1
- package/generators/ts/Type.d.ts +15 -5
- package/generators/ts/Type.js +17 -0
- package/generators/ts/TypeFactory.js +18 -8
- package/generators/ts/UnionType.d.ts +2 -1
- package/generators/ts/UnionType.js +3 -3
- package/generators/ts/_ObjectType/IdentifierProperty.d.ts +7 -8
- package/generators/ts/_ObjectType/IdentifierProperty.js +99 -25
- package/generators/ts/_ObjectType/Property.d.ts +17 -3
- package/generators/ts/_ObjectType/Property.js +2 -1
- package/generators/ts/_ObjectType/ShaclProperty.d.ts +1 -0
- package/generators/ts/_ObjectType/ShaclProperty.js +4 -1
- package/generators/ts/_ObjectType/TypeDiscriminatorProperty.d.ts +3 -5
- package/generators/ts/_ObjectType/TypeDiscriminatorProperty.js +11 -4
- package/generators/ts/_ObjectType/equalsFunctionOrMethodDeclaration.js +1 -1
- package/generators/ts/_ObjectType/fromJsonFunctionDeclarations.js +1 -1
- package/generators/ts/_ObjectType/fromRdfFunctionDeclarations.js +1 -1
- package/generators/ts/_ObjectType/fromRdfTypeVariableStatement.d.ts +5 -0
- package/generators/ts/_ObjectType/fromRdfTypeVariableStatement.js +25 -0
- package/generators/ts/_ObjectType/index.d.ts +1 -0
- package/generators/ts/_ObjectType/index.js +1 -0
- package/generators/ts/_ObjectType/sparqlConstructQueryFunctionDeclaration.d.ts +5 -0
- package/generators/ts/_ObjectType/sparqlConstructQueryFunctionDeclaration.js +21 -0
- package/generators/ts/_ObjectType/sparqlConstructQueryStringFunctionDeclaration.d.ts +5 -0
- package/generators/ts/_ObjectType/sparqlConstructQueryStringFunctionDeclaration.js +20 -0
- package/generators/ts/_ObjectType/sparqlFunctionDeclarations.js +35 -58
- package/generators/ts/_ObjectType/toJsonFunctionOrMethodDeclaration.js +1 -1
- package/generators/ts/_ObjectType/toRdfFunctionOrMethodDeclaration.js +3 -3
- package/input/NodeShape.d.ts +2 -2
- package/input/generated.d.ts +24 -16
- package/input/generated.js +53 -8
- package/input/tsFeatures.d.ts +1 -1
- package/input/tsFeatures.js +21 -13
- package/package.json +4 -4
- package/enums/MintingStrategy.d.ts +0 -5
- package/enums/MintingStrategy.js +0 -2
package/input/generated.js
CHANGED
|
@@ -625,6 +625,7 @@ export var ShaclCorePropertyShape;
|
|
|
625
625
|
return ShaclCorePropertyShape.propertiesFromRdf(parameters);
|
|
626
626
|
}
|
|
627
627
|
ShaclCorePropertyShape.fromRdf = fromRdf;
|
|
628
|
+
ShaclCorePropertyShape.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape");
|
|
628
629
|
})(ShaclCorePropertyShape || (ShaclCorePropertyShape = {}));
|
|
629
630
|
export var ShaclmatePropertyShape;
|
|
630
631
|
(function (ShaclmatePropertyShape) {
|
|
@@ -718,6 +719,7 @@ export var ShaclmatePropertyShape;
|
|
|
718
719
|
return ShaclmatePropertyShape.propertiesFromRdf(parameters);
|
|
719
720
|
}
|
|
720
721
|
ShaclmatePropertyShape.fromRdf = fromRdf;
|
|
722
|
+
ShaclmatePropertyShape.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape");
|
|
721
723
|
})(ShaclmatePropertyShape || (ShaclmatePropertyShape = {}));
|
|
722
724
|
export var OwlOntology;
|
|
723
725
|
(function (OwlOntology) {
|
|
@@ -766,6 +768,7 @@ export var OwlOntology;
|
|
|
766
768
|
return OwlOntology.propertiesFromRdf(parameters);
|
|
767
769
|
}
|
|
768
770
|
OwlOntology.fromRdf = fromRdf;
|
|
771
|
+
OwlOntology.fromRdfType = dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology");
|
|
769
772
|
})(OwlOntology || (OwlOntology = {}));
|
|
770
773
|
export var ShaclmateOntology;
|
|
771
774
|
(function (ShaclmateOntology) {
|
|
@@ -808,6 +811,8 @@ export var ShaclmateOntology;
|
|
|
808
811
|
.head()
|
|
809
812
|
.chain((_value) => _value.toIri().chain((iri) => {
|
|
810
813
|
switch (iri.value) {
|
|
814
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_All":
|
|
815
|
+
return purify.Either.of(iri);
|
|
811
816
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Create":
|
|
812
817
|
return purify.Either.of(iri);
|
|
813
818
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals":
|
|
@@ -818,10 +823,16 @@ export var ShaclmateOntology;
|
|
|
818
823
|
return purify.Either.of(iri);
|
|
819
824
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash":
|
|
820
825
|
return purify.Either.of(iri);
|
|
826
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Json":
|
|
827
|
+
return purify.Either.of(iri);
|
|
821
828
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema":
|
|
822
829
|
return purify.Either.of(iri);
|
|
823
830
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema":
|
|
824
831
|
return purify.Either.of(iri);
|
|
832
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_None":
|
|
833
|
+
return purify.Either.of(iri);
|
|
834
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf":
|
|
835
|
+
return purify.Either.of(iri);
|
|
825
836
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql":
|
|
826
837
|
return purify.Either.of(iri);
|
|
827
838
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson":
|
|
@@ -831,7 +842,7 @@ export var ShaclmateOntology;
|
|
|
831
842
|
default:
|
|
832
843
|
return purify.Left(new rdfjsResource.Resource.MistypedValueError({
|
|
833
844
|
actualValue: iri,
|
|
834
|
-
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">',
|
|
845
|
+
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">',
|
|
835
846
|
focusResource: _resource,
|
|
836
847
|
predicate: dataFactory.namedNode("http://minorg.github.io/shaclmate/ns#tsFeatureExclude"),
|
|
837
848
|
}));
|
|
@@ -852,6 +863,8 @@ export var ShaclmateOntology;
|
|
|
852
863
|
.head()
|
|
853
864
|
.chain((_value) => _value.toIri().chain((iri) => {
|
|
854
865
|
switch (iri.value) {
|
|
866
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_All":
|
|
867
|
+
return purify.Either.of(iri);
|
|
855
868
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Create":
|
|
856
869
|
return purify.Either.of(iri);
|
|
857
870
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals":
|
|
@@ -862,10 +875,16 @@ export var ShaclmateOntology;
|
|
|
862
875
|
return purify.Either.of(iri);
|
|
863
876
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash":
|
|
864
877
|
return purify.Either.of(iri);
|
|
878
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Json":
|
|
879
|
+
return purify.Either.of(iri);
|
|
865
880
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema":
|
|
866
881
|
return purify.Either.of(iri);
|
|
867
882
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema":
|
|
868
883
|
return purify.Either.of(iri);
|
|
884
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_None":
|
|
885
|
+
return purify.Either.of(iri);
|
|
886
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf":
|
|
887
|
+
return purify.Either.of(iri);
|
|
869
888
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql":
|
|
870
889
|
return purify.Either.of(iri);
|
|
871
890
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson":
|
|
@@ -875,7 +894,7 @@ export var ShaclmateOntology;
|
|
|
875
894
|
default:
|
|
876
895
|
return purify.Left(new rdfjsResource.Resource.MistypedValueError({
|
|
877
896
|
actualValue: iri,
|
|
878
|
-
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">',
|
|
897
|
+
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">',
|
|
879
898
|
focusResource: _resource,
|
|
880
899
|
predicate: dataFactory.namedNode("http://minorg.github.io/shaclmate/ns#tsFeatureInclude"),
|
|
881
900
|
}));
|
|
@@ -962,6 +981,7 @@ export var ShaclmateOntology;
|
|
|
962
981
|
return ShaclmateOntology.propertiesFromRdf(parameters);
|
|
963
982
|
}
|
|
964
983
|
ShaclmateOntology.fromRdf = fromRdf;
|
|
984
|
+
ShaclmateOntology.fromRdfType = dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology");
|
|
965
985
|
})(ShaclmateOntology || (ShaclmateOntology = {}));
|
|
966
986
|
export var ShaclCoreNodeShape;
|
|
967
987
|
(function (ShaclCoreNodeShape) {
|
|
@@ -1044,6 +1064,7 @@ export var ShaclCoreNodeShape;
|
|
|
1044
1064
|
return ShaclCoreNodeShape.propertiesFromRdf(parameters);
|
|
1045
1065
|
}
|
|
1046
1066
|
ShaclCoreNodeShape.fromRdf = fromRdf;
|
|
1067
|
+
ShaclCoreNodeShape.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape");
|
|
1047
1068
|
})(ShaclCoreNodeShape || (ShaclCoreNodeShape = {}));
|
|
1048
1069
|
export var ShaclmateNodeShape;
|
|
1049
1070
|
(function (ShaclmateNodeShape) {
|
|
@@ -1168,6 +1189,8 @@ export var ShaclmateNodeShape;
|
|
|
1168
1189
|
.head()
|
|
1169
1190
|
.chain((_value) => _value.toIri().chain((iri) => {
|
|
1170
1191
|
switch (iri.value) {
|
|
1192
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_All":
|
|
1193
|
+
return purify.Either.of(iri);
|
|
1171
1194
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Create":
|
|
1172
1195
|
return purify.Either.of(iri);
|
|
1173
1196
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals":
|
|
@@ -1178,10 +1201,16 @@ export var ShaclmateNodeShape;
|
|
|
1178
1201
|
return purify.Either.of(iri);
|
|
1179
1202
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash":
|
|
1180
1203
|
return purify.Either.of(iri);
|
|
1204
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Json":
|
|
1205
|
+
return purify.Either.of(iri);
|
|
1181
1206
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema":
|
|
1182
1207
|
return purify.Either.of(iri);
|
|
1183
1208
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema":
|
|
1184
1209
|
return purify.Either.of(iri);
|
|
1210
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_None":
|
|
1211
|
+
return purify.Either.of(iri);
|
|
1212
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf":
|
|
1213
|
+
return purify.Either.of(iri);
|
|
1185
1214
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql":
|
|
1186
1215
|
return purify.Either.of(iri);
|
|
1187
1216
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson":
|
|
@@ -1191,7 +1220,7 @@ export var ShaclmateNodeShape;
|
|
|
1191
1220
|
default:
|
|
1192
1221
|
return purify.Left(new rdfjsResource.Resource.MistypedValueError({
|
|
1193
1222
|
actualValue: iri,
|
|
1194
|
-
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">',
|
|
1223
|
+
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">',
|
|
1195
1224
|
focusResource: _resource,
|
|
1196
1225
|
predicate: dataFactory.namedNode("http://minorg.github.io/shaclmate/ns#tsFeatureExclude"),
|
|
1197
1226
|
}));
|
|
@@ -1212,6 +1241,8 @@ export var ShaclmateNodeShape;
|
|
|
1212
1241
|
.head()
|
|
1213
1242
|
.chain((_value) => _value.toIri().chain((iri) => {
|
|
1214
1243
|
switch (iri.value) {
|
|
1244
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_All":
|
|
1245
|
+
return purify.Either.of(iri);
|
|
1215
1246
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Create":
|
|
1216
1247
|
return purify.Either.of(iri);
|
|
1217
1248
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals":
|
|
@@ -1222,10 +1253,16 @@ export var ShaclmateNodeShape;
|
|
|
1222
1253
|
return purify.Either.of(iri);
|
|
1223
1254
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash":
|
|
1224
1255
|
return purify.Either.of(iri);
|
|
1256
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Json":
|
|
1257
|
+
return purify.Either.of(iri);
|
|
1225
1258
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema":
|
|
1226
1259
|
return purify.Either.of(iri);
|
|
1227
1260
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema":
|
|
1228
1261
|
return purify.Either.of(iri);
|
|
1262
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_None":
|
|
1263
|
+
return purify.Either.of(iri);
|
|
1264
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf":
|
|
1265
|
+
return purify.Either.of(iri);
|
|
1229
1266
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql":
|
|
1230
1267
|
return purify.Either.of(iri);
|
|
1231
1268
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson":
|
|
@@ -1235,7 +1272,7 @@ export var ShaclmateNodeShape;
|
|
|
1235
1272
|
default:
|
|
1236
1273
|
return purify.Left(new rdfjsResource.Resource.MistypedValueError({
|
|
1237
1274
|
actualValue: iri,
|
|
1238
|
-
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">',
|
|
1275
|
+
expectedValueType: 'rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">',
|
|
1239
1276
|
focusResource: _resource,
|
|
1240
1277
|
predicate: dataFactory.namedNode("http://minorg.github.io/shaclmate/ns#tsFeatureInclude"),
|
|
1241
1278
|
}));
|
|
@@ -1329,6 +1366,7 @@ export var ShaclmateNodeShape;
|
|
|
1329
1366
|
return ShaclmateNodeShape.propertiesFromRdf(parameters);
|
|
1330
1367
|
}
|
|
1331
1368
|
ShaclmateNodeShape.fromRdf = fromRdf;
|
|
1369
|
+
ShaclmateNodeShape.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape");
|
|
1332
1370
|
})(ShaclmateNodeShape || (ShaclmateNodeShape = {}));
|
|
1333
1371
|
export var ShaclCorePropertyGroup;
|
|
1334
1372
|
(function (ShaclCorePropertyGroup) {
|
|
@@ -1402,18 +1440,25 @@ export var ShaclCorePropertyGroup;
|
|
|
1402
1440
|
return ShaclCorePropertyGroup.propertiesFromRdf(parameters);
|
|
1403
1441
|
}
|
|
1404
1442
|
ShaclCorePropertyGroup.fromRdf = fromRdf;
|
|
1443
|
+
ShaclCorePropertyGroup.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup");
|
|
1405
1444
|
})(ShaclCorePropertyGroup || (ShaclCorePropertyGroup = {}));
|
|
1406
1445
|
export var ShaclCoreShape;
|
|
1407
1446
|
(function (ShaclCoreShape) {
|
|
1408
|
-
function fromRdf(
|
|
1409
|
-
return ShaclCoreNodeShape.fromRdf(
|
|
1447
|
+
function fromRdf({ ignoreRdfType, resource, ...context }) {
|
|
1448
|
+
return ShaclCoreNodeShape.fromRdf({ ...context, resource }).altLazy(() => ShaclCorePropertyShape.fromRdf({
|
|
1449
|
+
...context,
|
|
1450
|
+
resource,
|
|
1451
|
+
}));
|
|
1410
1452
|
}
|
|
1411
1453
|
ShaclCoreShape.fromRdf = fromRdf;
|
|
1412
1454
|
})(ShaclCoreShape || (ShaclCoreShape = {}));
|
|
1413
1455
|
export var ShaclmateShape;
|
|
1414
1456
|
(function (ShaclmateShape) {
|
|
1415
|
-
function fromRdf(
|
|
1416
|
-
return ShaclmateNodeShape.fromRdf(
|
|
1457
|
+
function fromRdf({ ignoreRdfType, resource, ...context }) {
|
|
1458
|
+
return ShaclmateNodeShape.fromRdf({ ...context, resource }).altLazy(() => ShaclCorePropertyShape.fromRdf({
|
|
1459
|
+
...context,
|
|
1460
|
+
resource,
|
|
1461
|
+
}));
|
|
1417
1462
|
}
|
|
1418
1463
|
ShaclmateShape.fromRdf = fromRdf;
|
|
1419
1464
|
})(ShaclmateShape || (ShaclmateShape = {}));
|
package/input/tsFeatures.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as rdfjs from "@rdfjs/types";
|
|
2
2
|
import { Maybe } from "purify-ts";
|
|
3
3
|
import { TsFeature } from "../enums/index.js";
|
|
4
|
-
type TsFeatureIri = rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">;
|
|
4
|
+
type TsFeatureIri = rdfjs.NamedNode<"http://minorg.github.io/shaclmate/ns#_TsFeature_All" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Create" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Json" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash" | "http://minorg.github.io/shaclmate/ns#_TsFeature_None" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf" | "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson" | "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf">;
|
|
5
5
|
export declare function tsFeatures(generated: {
|
|
6
6
|
readonly tsFeatureExcludes: readonly TsFeatureIri[];
|
|
7
7
|
readonly tsFeatureIncludes: readonly TsFeatureIri[];
|
package/input/tsFeatures.js
CHANGED
|
@@ -1,32 +1,40 @@
|
|
|
1
1
|
import { Maybe } from "purify-ts";
|
|
2
2
|
import { TsFeature } from "../enums/index.js";
|
|
3
|
-
function
|
|
3
|
+
function iriToTsFeatures(iri) {
|
|
4
4
|
switch (iri.value) {
|
|
5
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_All":
|
|
6
|
+
return TsFeature.MEMBERS;
|
|
5
7
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Create":
|
|
6
|
-
return "create";
|
|
8
|
+
return ["create"];
|
|
7
9
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Equals":
|
|
8
|
-
return "equals";
|
|
10
|
+
return ["equals"];
|
|
9
11
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_FromJson":
|
|
10
|
-
return "fromJson";
|
|
12
|
+
return ["fromJson"];
|
|
11
13
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_FromRdf":
|
|
12
|
-
return "fromRdf";
|
|
14
|
+
return ["fromRdf"];
|
|
13
15
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Hash":
|
|
14
|
-
return "hash";
|
|
16
|
+
return ["hash"];
|
|
17
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Json":
|
|
18
|
+
return ["fromJson", "jsonSchema", "jsonUiSchema", "toJson"];
|
|
15
19
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonSchema":
|
|
16
|
-
return "jsonSchema";
|
|
20
|
+
return ["jsonSchema"];
|
|
17
21
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_JsonUiSchema":
|
|
18
|
-
return "jsonUiSchema";
|
|
22
|
+
return ["jsonUiSchema"];
|
|
23
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_None":
|
|
24
|
+
return [];
|
|
19
25
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Sparql":
|
|
20
|
-
return "sparql";
|
|
26
|
+
return ["sparql"];
|
|
27
|
+
case "http://minorg.github.io/shaclmate/ns#_TsFeature_Rdf":
|
|
28
|
+
return ["fromRdf", "toRdf"];
|
|
21
29
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_ToJson":
|
|
22
|
-
return "toJson";
|
|
30
|
+
return ["toJson"];
|
|
23
31
|
case "http://minorg.github.io/shaclmate/ns#_TsFeature_ToRdf":
|
|
24
|
-
return "toRdf";
|
|
32
|
+
return ["toRdf"];
|
|
25
33
|
}
|
|
26
34
|
}
|
|
27
35
|
export function tsFeatures(generated) {
|
|
28
|
-
const tsFeatureIncludes = generated.tsFeatureIncludes.
|
|
29
|
-
const tsFeatureExcludes = generated.tsFeatureExcludes.
|
|
36
|
+
const tsFeatureIncludes = generated.tsFeatureIncludes.flatMap(iriToTsFeatures);
|
|
37
|
+
const tsFeatureExcludes = generated.tsFeatureExcludes.flatMap(iriToTsFeatures);
|
|
30
38
|
if (tsFeatureIncludes.length > 0) {
|
|
31
39
|
return Maybe.of(new Set(tsFeatureIncludes));
|
|
32
40
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@shaclmate/shacl-ast": "2.0.
|
|
3
|
+
"@shaclmate/shacl-ast": "2.0.16",
|
|
4
4
|
"@rdfjs/prefix-map": "^0.1.2",
|
|
5
5
|
"@rdfjs/term-map": "^2.0.2",
|
|
6
6
|
"@rdfjs/term-set": "^2.0.3",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"typescript-memoize": "^1.1.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@shaclmate/runtime": "2.0.
|
|
23
|
+
"@shaclmate/runtime": "2.0.16",
|
|
24
24
|
"oxigraph": "^0.4.0"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"format:write": "biome format --write",
|
|
57
57
|
"format:write:unsafe": "biome format --write --unsafe",
|
|
58
58
|
"rebuild": "run-s clean build",
|
|
59
|
-
"link-dependencies": "npm link
|
|
59
|
+
"link-dependencies": "npm link rdfjs-resource",
|
|
60
60
|
"lint": "biome lint",
|
|
61
61
|
"lint:write": "biome lint --write",
|
|
62
62
|
"lint:write:unsafe": "biome lint --write --unsafe",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
},
|
|
74
74
|
"type": "module",
|
|
75
75
|
"types": "index.d.ts",
|
|
76
|
-
"version": "2.0.
|
|
76
|
+
"version": "2.0.16"
|
|
77
77
|
}
|
package/enums/MintingStrategy.js
DELETED