@shaclmate/compiler 4.0.50 → 4.0.52
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 +14 -0
- package/dist/Compiler.js +18 -0
- package/dist/Eithers.d.ts +14 -0
- package/dist/Eithers.js +67 -0
- package/dist/ShapesGraphToAstTransformer.d.ts +18 -0
- package/dist/ShapesGraphToAstTransformer.js +50 -0
- package/dist/_ShapesGraphToAstTransformer/ShapeStack.d.ts +15 -0
- package/dist/_ShapesGraphToAstTransformer/ShapeStack.js +51 -0
- package/dist/_ShapesGraphToAstTransformer/defaultNodeShapeNodeKinds.d.ts +3 -0
- package/dist/_ShapesGraphToAstTransformer/defaultNodeShapeNodeKinds.js +5 -0
- package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.d.ts +4 -0
- package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.js +24 -0
- package/dist/_ShapesGraphToAstTransformer/shapeNodeKinds.d.ts +9 -0
- package/dist/_ShapesGraphToAstTransformer/shapeNodeKinds.js +150 -0
- package/dist/_ShapesGraphToAstTransformer/shapeOntology.d.ts +5 -0
- package/dist/_ShapesGraphToAstTransformer/shapeOntology.js +26 -0
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstStructTypeField.d.ts +17 -0
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstStructTypeField.js +285 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.d.ts +10 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.js +92 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.d.ts +11 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.js +149 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstStructType.d.ts +7 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstStructType.js +171 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.d.ts +12 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.js +110 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.d.ts +11 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.js +46 -0
- package/dist/ast/AbstractCollectionType.d.ts +30 -0
- package/dist/ast/AbstractCollectionType.js +33 -0
- package/dist/ast/AbstractCompoundType.d.ts +45 -0
- package/dist/ast/AbstractCompoundType.js +81 -0
- package/dist/ast/AbstractContainerType.d.ts +44 -0
- package/dist/ast/AbstractContainerType.js +63 -0
- package/dist/ast/AbstractLazyType.d.ts +117 -0
- package/dist/ast/AbstractLazyType.js +40 -0
- package/dist/ast/AbstractTermType.d.ts +33 -0
- package/dist/ast/AbstractTermType.js +47 -0
- package/dist/ast/AbstractType.d.ts +55 -0
- package/dist/ast/AbstractType.js +55 -0
- package/dist/ast/Ast.d.ts +6 -0
- package/dist/ast/Ast.js +2 -0
- package/dist/ast/BlankNodeType.d.ts +11 -0
- package/dist/ast/BlankNodeType.js +17 -0
- package/dist/ast/DefaultValueType.d.ts +35 -0
- package/dist/ast/DefaultValueType.js +50 -0
- package/dist/ast/IdentifierType.d.ts +12 -0
- package/dist/ast/IdentifierType.js +20 -0
- package/dist/ast/IntersectionType.d.ts +14 -0
- package/dist/ast/IntersectionType.js +17 -0
- package/dist/ast/IriType.d.ts +10 -0
- package/dist/ast/IriType.js +10 -0
- package/dist/ast/LazyOptionType.d.ts +6 -0
- package/dist/ast/LazyOptionType.js +5 -0
- package/dist/ast/LazySetType.d.ts +6 -0
- package/dist/ast/LazySetType.js +5 -0
- package/dist/ast/LazyType.d.ts +5 -0
- package/dist/ast/LazyType.js +5 -0
- package/dist/ast/ListType.d.ts +44 -0
- package/dist/ast/ListType.js +56 -0
- package/dist/ast/LiteralType.d.ts +40 -0
- package/dist/ast/LiteralType.js +59 -0
- package/dist/ast/OptionType.d.ts +13 -0
- package/dist/ast/OptionType.js +21 -0
- package/dist/ast/SetType.d.ts +31 -0
- package/dist/ast/SetType.js +42 -0
- package/dist/ast/StructCompoundType.d.ts +12 -0
- package/dist/ast/StructCompoundType.js +87 -0
- package/dist/ast/StructIntersectionType.d.ts +4 -0
- package/dist/ast/StructIntersectionType.js +2 -0
- package/dist/ast/StructType.d.ts +178 -0
- package/dist/ast/StructType.js +314 -0
- package/dist/ast/StructUnionType.d.ts +4 -0
- package/dist/ast/StructUnionType.js +2 -0
- package/dist/ast/TermType.d.ts +14 -0
- package/dist/ast/TermType.js +16 -0
- package/dist/ast/Type.d.ts +20 -0
- package/dist/ast/Type.js +42 -0
- package/dist/ast/UnionType.d.ts +30 -0
- package/dist/ast/UnionType.js +27 -0
- package/dist/ast/equals.d.ts +12 -0
- package/dist/ast/equals.js +65 -0
- package/dist/ast/index.d.ts +21 -0
- package/dist/ast/index.js +21 -0
- package/dist/generators/AstJsonGenerator.d.ts +6 -0
- package/dist/generators/AstJsonGenerator.js +15 -0
- package/dist/generators/Cx2Generator.d.ts +10 -0
- package/dist/generators/Cx2Generator.js +140 -0
- package/dist/generators/Generator.d.ts +5 -0
- package/dist/generators/Generator.js +2 -0
- package/dist/generators/LabeledPropertyGraph.d.ts +42 -0
- package/dist/generators/LabeledPropertyGraph.js +2 -0
- package/dist/generators/index.d.ts +6 -0
- package/dist/generators/index.js +6 -0
- package/dist/generators/transformAstToLabeledPropertyGraph.d.ts +4 -0
- package/dist/generators/transformAstToLabeledPropertyGraph.js +78 -0
- package/dist/generators/ts/AbstractCollectionType.d.ts +37 -0
- package/dist/generators/ts/AbstractCollectionType.js +88 -0
- package/dist/generators/ts/AbstractContainerType.d.ts +53 -0
- package/dist/generators/ts/AbstractContainerType.js +97 -0
- package/dist/generators/ts/AbstractDateType.d.ts +23 -0
- package/dist/generators/ts/AbstractDateType.js +37 -0
- package/dist/generators/ts/AbstractIdentifierType.d.ts +21 -0
- package/dist/generators/ts/AbstractIdentifierType.js +25 -0
- package/dist/generators/ts/AbstractLazyType.d.ts +67 -0
- package/dist/generators/ts/AbstractLazyType.js +154 -0
- package/dist/generators/ts/AbstractLiteralType.d.ts +26 -0
- package/dist/generators/ts/AbstractLiteralType.js +15 -0
- package/dist/generators/ts/AbstractNumericType.d.ts +21 -0
- package/dist/generators/ts/AbstractNumericType.js +65 -0
- package/dist/generators/ts/AbstractObjectSetType.d.ts +36 -0
- package/dist/generators/ts/AbstractObjectSetType.js +44 -0
- package/dist/generators/ts/AbstractPrimitiveType.d.ts +32 -0
- package/dist/generators/ts/AbstractPrimitiveType.js +51 -0
- package/dist/generators/ts/AbstractTermType.d.ts +50 -0
- package/dist/generators/ts/AbstractTermType.js +102 -0
- package/dist/generators/ts/AbstractType.d.ts +345 -0
- package/dist/generators/ts/AbstractType.js +135 -0
- package/dist/generators/ts/BigDecimalType.d.ts +28 -0
- package/dist/generators/ts/BigDecimalType.js +58 -0
- package/dist/generators/ts/BigIntType.d.ts +17 -0
- package/dist/generators/ts/BigIntType.js +56 -0
- package/dist/generators/ts/BlankNodeType.d.ts +22 -0
- package/dist/generators/ts/BlankNodeType.js +67 -0
- package/dist/generators/ts/BooleanType.d.ts +21 -0
- package/dist/generators/ts/BooleanType.js +53 -0
- package/dist/generators/ts/DateTimeType.d.ts +13 -0
- package/dist/generators/ts/DateTimeType.js +31 -0
- package/dist/generators/ts/DateType.d.ts +14 -0
- package/dist/generators/ts/DateType.js +32 -0
- package/dist/generators/ts/DefaultValueType.d.ts +83 -0
- package/dist/generators/ts/DefaultValueType.js +143 -0
- package/dist/generators/ts/FloatType.d.ts +13 -0
- package/dist/generators/ts/FloatType.js +30 -0
- package/dist/generators/ts/GraphqlSchema.d.ts +22 -0
- package/dist/generators/ts/GraphqlSchema.js +87 -0
- package/dist/generators/ts/IdentifierType.d.ts +23 -0
- package/dist/generators/ts/IdentifierType.js +83 -0
- package/dist/generators/ts/Imports.d.ts +40 -0
- package/dist/generators/ts/Imports.js +41 -0
- package/dist/generators/ts/IntType.d.ts +13 -0
- package/dist/generators/ts/IntType.js +30 -0
- package/dist/generators/ts/IriType.d.ts +23 -0
- package/dist/generators/ts/IriType.js +112 -0
- package/dist/generators/ts/LazyOptionType.d.ts +36 -0
- package/dist/generators/ts/LazyOptionType.js +75 -0
- package/dist/generators/ts/LazySetType.d.ts +20 -0
- package/dist/generators/ts/LazySetType.js +76 -0
- package/dist/generators/ts/LazyType.d.ts +19 -0
- package/dist/generators/ts/LazyType.js +65 -0
- package/dist/generators/ts/ListType.d.ts +49 -0
- package/dist/generators/ts/ListType.js +161 -0
- package/dist/generators/ts/LiteralType.d.ts +27 -0
- package/dist/generators/ts/LiteralType.js +71 -0
- package/dist/generators/ts/ObjectSetType.d.ts +6 -0
- package/dist/generators/ts/ObjectSetType.js +36 -0
- package/dist/generators/ts/ObjectType.d.ts +105 -0
- package/dist/generators/ts/ObjectType.js +503 -0
- package/dist/generators/ts/ObjectUnionType.d.ts +20 -0
- package/dist/generators/ts/ObjectUnionType.js +223 -0
- package/dist/generators/ts/OptionType.d.ts +39 -0
- package/dist/generators/ts/OptionType.js +157 -0
- package/dist/generators/ts/RdfjsDatasetObjectSetType.d.ts +6 -0
- package/dist/generators/ts/RdfjsDatasetObjectSetType.js +323 -0
- package/dist/generators/ts/Reusables.d.ts +13 -0
- package/dist/generators/ts/Reusables.js +15 -0
- package/dist/generators/ts/SetType.d.ts +32 -0
- package/dist/generators/ts/SetType.js +132 -0
- package/dist/generators/ts/Snippet.d.ts +3 -0
- package/dist/generators/ts/Snippet.js +2 -0
- package/dist/generators/ts/SnippetFactory.d.ts +16 -0
- package/dist/generators/ts/SnippetFactory.js +2 -0
- package/dist/generators/ts/Snippets.d.ts +180 -0
- package/dist/generators/ts/Snippets.js +1184 -0
- package/dist/generators/ts/SparqlObjectSetType.d.ts +6 -0
- package/dist/generators/ts/SparqlObjectSetType.js +241 -0
- package/dist/generators/ts/StringType.d.ts +22 -0
- package/dist/generators/ts/StringType.js +68 -0
- package/dist/generators/ts/TermType.d.ts +31 -0
- package/dist/generators/ts/TermType.js +143 -0
- package/dist/generators/ts/TsFeature.d.ts +3 -0
- package/dist/generators/ts/TsFeature.js +28 -0
- package/dist/generators/ts/TsGenerator.d.ts +30 -0
- package/dist/generators/ts/TsGenerator.js +292 -0
- package/dist/generators/ts/Type.d.ts +25 -0
- package/dist/generators/ts/Type.js +2 -0
- package/dist/generators/ts/TypeFactory.d.ts +43 -0
- package/dist/generators/ts/TypeFactory.js +540 -0
- package/dist/generators/ts/Typeof.d.ts +2 -0
- package/dist/generators/ts/Typeof.js +2 -0
- package/dist/generators/ts/UnionType.d.ts +126 -0
- package/dist/generators/ts/UnionType.js +850 -0
- package/dist/generators/ts/ZodGenerator.d.ts +11 -0
- package/dist/generators/ts/ZodGenerator.js +60 -0
- package/dist/generators/ts/_ObjectType/AbstractProperty.d.ts +217 -0
- package/dist/generators/ts/_ObjectType/AbstractProperty.js +37 -0
- package/dist/generators/ts/_ObjectType/DiscriminantProperty.d.ts +45 -0
- package/dist/generators/ts/_ObjectType/DiscriminantProperty.js +104 -0
- package/dist/generators/ts/_ObjectType/IdentifierProperty.d.ts +43 -0
- package/dist/generators/ts/_ObjectType/IdentifierProperty.js +205 -0
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionExpression.js +28 -0
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionExpression.js +19 -0
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionExpression.js +12 -0
- package/dist/generators/ts/_ObjectType/ObjectType_filterTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_filterTypeExpression.js +20 -0
- package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlConstructTriplesFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlConstructTriplesFunctionExpression.js +46 -0
- package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlWherePatternsFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlWherePatternsFunctionExpression.js +79 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionExpression.js +12 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionExpression.js +38 -0
- package/dist/generators/ts/_ObjectType/ObjectType_graphqlTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_graphqlTypeExpression.js +26 -0
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionExpression.js +30 -0
- package/dist/generators/ts/_ObjectType/ObjectType_identifierTypeDeclarations.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_identifierTypeDeclarations.js +13 -0
- package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.js +20 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.js +10 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaExpression.js +22 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeExpression.js +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionExpression.js +17 -0
- package/dist/generators/ts/_ObjectType/ObjectType_objectSetMethodNames.d.ts +11 -0
- package/dist/generators/ts/_ObjectType/ObjectType_objectSetMethodNames.js +23 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaExpression.js +21 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaTypeExpression.js +18 -0
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.d.ts +10 -0
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js +35 -0
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts +10 -0
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.js +8 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionExpression.js +14 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionExpression.js +33 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionExpression.js +7 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_toStringRecordFunctionExpression.js +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionExpression.js +8 -0
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionExpression.js +10 -0
- package/dist/generators/ts/_ObjectType/Property.d.ts +6 -0
- package/dist/generators/ts/_ObjectType/Property.js +2 -0
- package/dist/generators/ts/_ObjectType/ShaclProperty.d.ts +53 -0
- package/dist/generators/ts/_ObjectType/ShaclProperty.js +284 -0
- package/dist/generators/ts/_snippets/snippets_BlankNodeFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_BlankNodeFilter.js +5 -0
- package/dist/generators/ts/_snippets/snippets_BlankNodeSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_BlankNodeSchema.js +6 -0
- package/dist/generators/ts/_snippets/snippets_BooleanFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_BooleanFilter.js +6 -0
- package/dist/generators/ts/_snippets/snippets_BooleanSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_BooleanSchema.js +8 -0
- package/dist/generators/ts/_snippets/snippets_CollectionFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_CollectionFilter.js +7 -0
- package/dist/generators/ts/_snippets/snippets_CollectionSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_CollectionSchema.js +8 -0
- package/dist/generators/ts/_snippets/snippets_ConversionFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ConversionFunction.js +4 -0
- package/dist/generators/ts/_snippets/snippets_DateFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_DateFilter.js +10 -0
- package/dist/generators/ts/_snippets/snippets_DateSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_DateSchema.js +8 -0
- package/dist/generators/ts/_snippets/snippets_DefaultValueSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_DefaultValueSchema.js +8 -0
- package/dist/generators/ts/_snippets/snippets_EqualsFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_EqualsFunction.js +4 -0
- package/dist/generators/ts/_snippets/snippets_EqualsResult.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_EqualsResult.js +63 -0
- package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.js +10 -0
- package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.js +11 -0
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.js +13 -0
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.js +16 -0
- package/dist/generators/ts/_snippets/snippets_HashFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_HashFunction.js +4 -0
- package/dist/generators/ts/_snippets/snippets_Hasher.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_Hasher.js +3 -0
- package/dist/generators/ts/_snippets/snippets_IdentifierFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_IdentifierFilter.js +7 -0
- package/dist/generators/ts/_snippets/snippets_IdentifierSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_IdentifierSchema.js +7 -0
- package/dist/generators/ts/_snippets/snippets_IdentifierSet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_IdentifierSet.js +27 -0
- package/dist/generators/ts/_snippets/snippets_IriFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_IriFilter.js +6 -0
- package/dist/generators/ts/_snippets/snippets_IriSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_IriSchema.js +8 -0
- package/dist/generators/ts/_snippets/snippets_Lazy.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_Lazy.js +22 -0
- package/dist/generators/ts/_snippets/snippets_LazyOption.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LazyOption.js +25 -0
- package/dist/generators/ts/_snippets/snippets_LazySet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LazySet.js +40 -0
- package/dist/generators/ts/_snippets/snippets_LiteralFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LiteralFilter.js +4 -0
- package/dist/generators/ts/_snippets/snippets_LiteralSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_LiteralSchema.js +9 -0
- package/dist/generators/ts/_snippets/snippets_MaybeFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_MaybeFilter.js +4 -0
- package/dist/generators/ts/_snippets/snippets_MaybeSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_MaybeSchema.js +7 -0
- package/dist/generators/ts/_snippets/snippets_NumericFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_NumericFilter.js +10 -0
- package/dist/generators/ts/_snippets/snippets_NumericSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_NumericSchema.js +8 -0
- package/dist/generators/ts/_snippets/snippets_PropertyPath.d.ts +6 -0
- package/dist/generators/ts/_snippets/snippets_PropertyPath.js +46 -0
- package/dist/generators/ts/_snippets/snippets_RdfVocabularies.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_RdfVocabularies.js +40 -0
- package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.js +8 -0
- package/dist/generators/ts/_snippets/snippets_SparqlFilterPattern.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_SparqlFilterPattern.js +3 -0
- package/dist/generators/ts/_snippets/snippets_SparqlPattern.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_SparqlPattern.js +3 -0
- package/dist/generators/ts/_snippets/snippets_SparqlPattern_isSolutionGenerating.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_SparqlPattern_isSolutionGenerating.js +30 -0
- package/dist/generators/ts/_snippets/snippets_StringFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_StringFilter.js +8 -0
- package/dist/generators/ts/_snippets/snippets_StringSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_StringSchema.js +9 -0
- package/dist/generators/ts/_snippets/snippets_TermFilter.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_TermFilter.js +9 -0
- package/dist/generators/ts/_snippets/snippets_TermSchema.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_TermSchema.js +9 -0
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.js +11 -0
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.js +16 -0
- package/dist/generators/ts/_snippets/snippets_UnwrapR.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_UnwrapR.js +4 -0
- package/dist/generators/ts/_snippets/snippets_ValidationFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ValidationFunction.js +4 -0
- package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.js +11 -0
- package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.js +13 -0
- package/dist/generators/ts/_snippets/snippets__FromRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets__FromRdfResourceFunction.js +13 -0
- package/dist/generators/ts/_snippets/snippets__ToRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets__ToRdfResourceFunction.js +12 -0
- package/dist/generators/ts/_snippets/snippets_arrayEquals.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_arrayEquals.js +68 -0
- package/dist/generators/ts/_snippets/snippets_arrayIntersection.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_arrayIntersection.js +29 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalLiteral.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalLiteral.js +9 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalSparqlWherePatterns.js +83 -0
- package/dist/generators/ts/_snippets/snippets_bigIntFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_bigIntFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_blankNodeSparqlWherePatterns.js +5 -0
- package/dist/generators/ts/_snippets/snippets_booleanEquals.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_booleanEquals.js +16 -0
- package/dist/generators/ts/_snippets/snippets_booleanFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_booleanFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_booleanSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_booleanSparqlWherePatterns.js +15 -0
- package/dist/generators/ts/_snippets/snippets_compactRecord.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_compactRecord.js +15 -0
- package/dist/generators/ts/_snippets/snippets_convertToArraySet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToArraySet.js +8 -0
- package/dist/generators/ts/_snippets/snippets_convertToBlankNode.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToBlankNode.js +11 -0
- package/dist/generators/ts/_snippets/snippets_convertToBlankNodeIdentifierProperty.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToBlankNodeIdentifierProperty.js +17 -0
- package/dist/generators/ts/_snippets/snippets_convertToIdentifier.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToIdentifier.js +13 -0
- package/dist/generators/ts/_snippets/snippets_convertToIdentifierProperty.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToIdentifierProperty.js +21 -0
- package/dist/generators/ts/_snippets/snippets_convertToIri.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToIri.js +11 -0
- package/dist/generators/ts/_snippets/snippets_convertToIriIdentifierProperty.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToIriIdentifierProperty.js +17 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazy.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazy.js +15 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazyOption.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazyOption.js +33 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazySet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToLazySet.js +27 -0
- package/dist/generators/ts/_snippets/snippets_convertToList.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToList.js +7 -0
- package/dist/generators/ts/_snippets/snippets_convertToLiteral.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToLiteral.js +13 -0
- package/dist/generators/ts/_snippets/snippets_convertToMaybe.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToMaybe.js +19 -0
- package/dist/generators/ts/_snippets/snippets_convertToScalarSet.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertToScalarSet.js +15 -0
- package/dist/generators/ts/_snippets/snippets_convertWithDefaultValue.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_convertWithDefaultValue.js +11 -0
- package/dist/generators/ts/_snippets/snippets_dateEquals.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateEquals.js +13 -0
- package/dist/generators/ts/_snippets/snippets_dateFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.js +71 -0
- package/dist/generators/ts/_snippets/snippets_dateTimeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateTimeFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_decodeBigDecimalLiteral.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_decodeBigDecimalLiteral.js +9 -0
- package/dist/generators/ts/_snippets/snippets_deduplicateSparqlPatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_deduplicateSparqlPatterns.js +19 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueFromRdfResourceValues.js +10 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.js +9 -0
- package/dist/generators/ts/_snippets/snippets_ensureRdfResourceType.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_ensureRdfResourceType.js +16 -0
- package/dist/generators/ts/_snippets/snippets_filterArray.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterArray.js +22 -0
- package/dist/generators/ts/_snippets/snippets_filterBigDecimal.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterBigDecimal.js +26 -0
- package/dist/generators/ts/_snippets/snippets_filterBlankNode.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterBlankNode.js +6 -0
- package/dist/generators/ts/_snippets/snippets_filterBoolean.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterBoolean.js +10 -0
- package/dist/generators/ts/_snippets/snippets_filterDate.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterDate.js +26 -0
- package/dist/generators/ts/_snippets/snippets_filterIdentifier.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterIdentifier.js +14 -0
- package/dist/generators/ts/_snippets/snippets_filterIri.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterIri.js +10 -0
- package/dist/generators/ts/_snippets/snippets_filterLiteral.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterLiteral.js +6 -0
- package/dist/generators/ts/_snippets/snippets_filterMaybe.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterMaybe.js +22 -0
- package/dist/generators/ts/_snippets/snippets_filterNumeric.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterNumeric.js +26 -0
- package/dist/generators/ts/_snippets/snippets_filterString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterString.js +18 -0
- package/dist/generators/ts/_snippets/snippets_filterTerm.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_filterTerm.js +22 -0
- package/dist/generators/ts/_snippets/snippets_floatFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_floatFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_hashArray.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashArray.js +11 -0
- package/dist/generators/ts/_snippets/snippets_hashBigDecimal.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashBigDecimal.js +7 -0
- package/dist/generators/ts/_snippets/snippets_hashBoolean.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashBoolean.js +7 -0
- package/dist/generators/ts/_snippets/snippets_hashDate.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashDate.js +7 -0
- package/dist/generators/ts/_snippets/snippets_hashDateTime.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashDateTime.js +7 -0
- package/dist/generators/ts/_snippets/snippets_hashMaybe.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashMaybe.js +11 -0
- package/dist/generators/ts/_snippets/snippets_hashNumeric.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashNumeric.js +7 -0
- package/dist/generators/ts/_snippets/snippets_hashString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashString.js +7 -0
- package/dist/generators/ts/_snippets/snippets_hashTerm.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_hashTerm.js +12 -0
- package/dist/generators/ts/_snippets/snippets_identifierFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identifierFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_identifierSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identifierSparqlWherePatterns.js +30 -0
- package/dist/generators/ts/_snippets/snippets_identityConversionFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identityConversionFunction.js +6 -0
- package/dist/generators/ts/_snippets/snippets_identityValidationFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identityValidationFunction.js +6 -0
- package/dist/generators/ts/_snippets/snippets_intFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_intFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_iriFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_iriFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_iriSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_iriSparqlWherePatterns.js +13 -0
- package/dist/generators/ts/_snippets/snippets_liftSparqlPatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_liftSparqlPatterns.js +15 -0
- package/dist/generators/ts/_snippets/snippets_listFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_listFromRdfResourceValues.js +15 -0
- package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.js +37 -0
- package/dist/generators/ts/_snippets/snippets_listSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_listSparqlWherePatterns.js +116 -0
- package/dist/generators/ts/_snippets/snippets_literalFactory.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_literalFactory.js +3 -0
- package/dist/generators/ts/_snippets/snippets_literalFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_literalFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_literalSchemaSparqlPatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_literalSchemaSparqlPatterns.js +39 -0
- package/dist/generators/ts/_snippets/snippets_literalSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_literalSparqlWherePatterns.js +5 -0
- package/dist/generators/ts/_snippets/snippets_maybeEquals.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeEquals.js +31 -0
- package/dist/generators/ts/_snippets/snippets_maybeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeFromRdfResourceValues.js +11 -0
- package/dist/generators/ts/_snippets/snippets_maybeSparqlConstructTriples.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeSparqlConstructTriples.js +6 -0
- package/dist/generators/ts/_snippets/snippets_maybeSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeSparqlWherePatterns.js +21 -0
- package/dist/generators/ts/_snippets/snippets_monkeyPatchObject.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_monkeyPatchObject.js +16 -0
- package/dist/generators/ts/_snippets/snippets_mutableListFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_mutableListFromRdfResourceValues.js +8 -0
- package/dist/generators/ts/_snippets/snippets_mutableSetFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_mutableSetFromRdfResourceValues.js +8 -0
- package/dist/generators/ts/_snippets/snippets_normalizeSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_normalizeSparqlWherePatterns.js +92 -0
- package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.js +62 -0
- package/dist/generators/ts/_snippets/snippets_parseBlankNode.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_parseBlankNode.js +9 -0
- package/dist/generators/ts/_snippets/snippets_parseIdentifier.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_parseIdentifier.js +4 -0
- package/dist/generators/ts/_snippets/snippets_parseIri.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_parseIri.js +9 -0
- package/dist/generators/ts/_snippets/snippets_propertyEquals.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_propertyEquals.js +11 -0
- package/dist/generators/ts/_snippets/snippets_rdfResourceIdentifierValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_rdfResourceIdentifierValues.js +12 -0
- package/dist/generators/ts/_snippets/snippets_sequenceRecord.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_sequenceRecord.js +18 -0
- package/dist/generators/ts/_snippets/snippets_setFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_setFromRdfResourceValues.js +9 -0
- package/dist/generators/ts/_snippets/snippets_setSparqlConstructTriples.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_setSparqlConstructTriples.js +6 -0
- package/dist/generators/ts/_snippets/snippets_setSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_setSparqlWherePatterns.js +17 -0
- package/dist/generators/ts/_snippets/snippets_shaclPropertyFromRdf.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_shaclPropertyFromRdf.js +17 -0
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlConstructTriples.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlConstructTriples.js +90 -0
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlWherePatterns.js +86 -0
- package/dist/generators/ts/_snippets/snippets_sortSparqlPatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_sortSparqlPatterns.js +24 -0
- package/dist/generators/ts/_snippets/snippets_sparqlInstancesOfPattern.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_sparqlInstancesOfPattern.js +29 -0
- package/dist/generators/ts/_snippets/snippets_sparqlPropertyPath.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_sparqlPropertyPath.js +59 -0
- package/dist/generators/ts/_snippets/snippets_sparqlValueInPattern.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_sparqlValueInPattern.js +23 -0
- package/dist/generators/ts/_snippets/snippets_strictEquals.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_strictEquals.js +12 -0
- package/dist/generators/ts/_snippets/snippets_stringFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_stringFromRdfResourceValues.js +6 -0
- package/dist/generators/ts/_snippets/snippets_stringSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_stringSparqlWherePatterns.js +39 -0
- package/dist/generators/ts/_snippets/snippets_termFilterSparqlPatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termFilterSparqlPatterns.js +93 -0
- package/dist/generators/ts/_snippets/snippets_termFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termFromRdfResourceValues.js +17 -0
- package/dist/generators/ts/_snippets/snippets_termLikeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termLikeFromRdfResourceValues.js +60 -0
- package/dist/generators/ts/_snippets/snippets_termSchemaSparqlPatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termSchemaSparqlPatterns.js +24 -0
- package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.js +5 -0
- package/dist/generators/ts/_snippets/snippets_toIsoDateString.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_toIsoDateString.js +6 -0
- package/dist/generators/ts/_snippets/snippets_validateArray.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_validateArray.js +13 -0
- package/dist/generators/ts/_snippets/snippets_validateMaybe.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_validateMaybe.js +7 -0
- package/dist/generators/ts/_snippets/snippets_wrap_FromRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_wrap_FromRdfResourceFunction.js +9 -0
- package/dist/generators/ts/_snippets/snippets_wrap_ToRdfResourceFunction.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_wrap_ToRdfResourceFunction.js +14 -0
- package/dist/generators/ts/codeEquals.d.ts +3 -0
- package/dist/generators/ts/codeEquals.js +7 -0
- package/dist/generators/ts/rdfjsTermExpression.d.ts +11 -0
- package/dist/generators/ts/rdfjsTermExpression.js +72 -0
- package/dist/generators/ts/singleEntryRecord.d.ts +2 -0
- package/dist/generators/ts/singleEntryRecord.js +6 -0
- package/dist/generators/ts/ts-poet-wrapper.d.ts +5 -0
- package/dist/generators/ts/ts-poet-wrapper.js +13 -0
- package/dist/generators/ts/tsComment.d.ts +5 -0
- package/dist/generators/ts/tsComment.js +11 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/input/ShapesGraph.d.ts +44 -0
- package/dist/input/ShapesGraph.js +66 -0
- package/dist/input/index.d.ts +3 -0
- package/dist/input/index.js +3 -0
- package/dist/input/input.shaclmate.d.ts +4567 -0
- package/dist/input/input.shaclmate.js +3595 -0
- package/package.json +600 -600
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_maybeSparqlWherePatterns = ({ snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}maybeSparqlWherePatterns`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}maybeSparqlWherePatterns<ItemFilterT, ItemSchemaT>(itemSparqlWherePatternsFunction: ${snippets.ValueSparqlWherePatternsFunction}<ItemFilterT, ItemSchemaT>): ${snippets.ValueSparqlWherePatternsFunction}<${snippets.MaybeFilter}<ItemFilterT>, ${snippets.MaybeSchema}<ItemSchemaT>> {
|
|
4
|
+
return ({ filter, schema, ...otherParameters }) => {
|
|
5
|
+
if (filter === undefined) {
|
|
6
|
+
// Treat the item's patterns as optional
|
|
7
|
+
const [itemSparqlWherePatterns, liftSparqlPatterns] = ${snippets.liftSparqlPatterns}(itemSparqlWherePatternsFunction({ ...otherParameters, filter, schema: schema.itemType }));
|
|
8
|
+
return [{ patterns: itemSparqlWherePatterns.concat(), type: "optional" }, ...liftSparqlPatterns];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
if (filter === null) {
|
|
12
|
+
// Use FILTER NOT EXISTS around the item's patterns
|
|
13
|
+
const [itemSparqlWherePatterns, liftSparqlPatterns] = ${snippets.liftSparqlPatterns}(itemSparqlWherePatternsFunction({ ...otherParameters, filter: undefined, schema: schema.itemType }));
|
|
14
|
+
return [{ expression: { args: itemSparqlWherePatterns.concat(), operator: "notexists", type: "operation" }, lift: true, type: "filter" }, ...liftSparqlPatterns]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Treat the item as required.
|
|
18
|
+
return itemSparqlWherePatternsFunction({ ...otherParameters, filter, schema: schema.itemType });
|
|
19
|
+
}
|
|
20
|
+
}`);
|
|
21
|
+
//# sourceMappingURL=snippets_maybeSparqlWherePatterns.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_monkeyPatchObject = ({ syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}monkeyPatchObject`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}monkeyPatchObject<T extends object>(obj: T, methods: { toJson?: (obj: T) => object, ${syntheticNamePrefix}toString?: (obj: T) => string }): T {
|
|
4
|
+
if (methods.toJson && (!globalThis.Object.prototype.hasOwnProperty.call(obj, "toJSON") || typeof (obj as any).toJSON === "function")) {
|
|
5
|
+
const toJsonMethod = methods.toJson;
|
|
6
|
+
(obj as any).toJSON = function(this: T, _key: string) { return toJsonMethod(this); }
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
if (methods.${syntheticNamePrefix}toString && (!globalThis.Object.prototype.hasOwnProperty.call(obj, "toString") || typeof (obj as any).toJSON === "function")) {
|
|
10
|
+
const toStringMethod = methods.${syntheticNamePrefix}toString;
|
|
11
|
+
(obj as any).toString = function(this: T) { return toStringMethod(this); }
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return obj;
|
|
15
|
+
}`);
|
|
16
|
+
//# sourceMappingURL=snippets_monkeyPatchObject.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_mutableListFromRdfResourceValues = ({ snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}mutableListFromRdfResourceValues`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}mutableListFromRdfResourceValues<ItemT, ItemSchemaT>(itemFromRdfResourceValues: ${snippets.FromRdfResourceValuesFunction}<ItemT, ItemSchemaT>): ${snippets.FromRdfResourceValuesFunction}<ItemT[], ${snippets.CollectionSchema}<ItemSchemaT>> {
|
|
4
|
+
const immutableListFromRdfResourceValues = ${snippets.listFromRdfResourceValues}(itemFromRdfResourceValues);
|
|
5
|
+
return (values, options) =>
|
|
6
|
+
immutableListFromRdfResourceValues(values, options).map(values => values.map(value => value.concat()));
|
|
7
|
+
}`);
|
|
8
|
+
//# sourceMappingURL=snippets_mutableListFromRdfResourceValues.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_mutableSetFromRdfResourceValues = ({ snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}mutableSetFromRdfResourceValues`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}mutableSetFromRdfResourceValues<ItemT, ItemSchemaT>(itemFromRdfResourceValues: ${snippets.FromRdfResourceValuesFunction}<ItemT, ItemSchemaT>): ${snippets.FromRdfResourceValuesFunction}<ItemT[], ${snippets.CollectionSchema}<ItemSchemaT>> {
|
|
4
|
+
const immutableSetFromRdfResourceValues = ${snippets.setFromRdfResourceValues}(itemFromRdfResourceValues);
|
|
5
|
+
return (values, options) =>
|
|
6
|
+
immutableSetFromRdfResourceValues(values, options).map(values => values.map(value => value.concat()));
|
|
7
|
+
}`);
|
|
8
|
+
//# sourceMappingURL=snippets_mutableSetFromRdfResourceValues.js.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_normalizeSparqlWherePatterns = ({ snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}normalizeSparqlWherePatterns`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}normalizeSparqlWherePatterns(patterns: readonly ${snippets.SparqlPattern}[]): readonly ${snippets.SparqlPattern}[] {
|
|
4
|
+
function normalizePatternsRecursive(patternsRecursive: readonly ${snippets.SparqlPattern}[]): readonly ${snippets.SparqlPattern}[] {
|
|
5
|
+
if (patternsRecursive.length === 0) {
|
|
6
|
+
return patternsRecursive;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const compactedPatterns: ${snippets.SparqlPattern}[] = [];
|
|
10
|
+
for (const pattern of ${snippets.deduplicateSparqlPatterns}(patternsRecursive)) {
|
|
11
|
+
switch (pattern.type) {
|
|
12
|
+
case "bgp": {
|
|
13
|
+
if (pattern.triples.length === 0) {
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
const lastPattern = compactedPatterns.at(-1);
|
|
17
|
+
if (lastPattern && lastPattern.type === "bgp") {
|
|
18
|
+
// Coalesce adjacent BGP patterns without mutating lastPattern
|
|
19
|
+
compactedPatterns[compactedPatterns.length - 1] = { triples: lastPattern.triples.concat(pattern.triples), type: "bgp" };
|
|
20
|
+
} else {
|
|
21
|
+
compactedPatterns.push(pattern);
|
|
22
|
+
}
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
case "bind":
|
|
26
|
+
case "filter":
|
|
27
|
+
case "query":
|
|
28
|
+
case "values":
|
|
29
|
+
compactedPatterns.push(pattern);
|
|
30
|
+
break;
|
|
31
|
+
case "group":
|
|
32
|
+
// Flatten groups outside unions
|
|
33
|
+
compactedPatterns.push(...normalizePatternsRecursive(pattern.patterns));
|
|
34
|
+
break;
|
|
35
|
+
case "graph":
|
|
36
|
+
case "minus":
|
|
37
|
+
case "optional":
|
|
38
|
+
case "service": {
|
|
39
|
+
const patterns_ = normalizePatternsRecursive(pattern.patterns);
|
|
40
|
+
if (patterns_.length > 0) {
|
|
41
|
+
compactedPatterns.push({ ...pattern, patterns: patterns_.concat() });
|
|
42
|
+
}
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
case "union": {
|
|
46
|
+
const unionPatterns = ${snippets.deduplicateSparqlPatterns}(pattern.patterns.flatMap(pattern => {
|
|
47
|
+
switch (pattern.type) {
|
|
48
|
+
case "group":
|
|
49
|
+
// Don't flatten the groups in a union
|
|
50
|
+
case "graph":
|
|
51
|
+
case "minus":
|
|
52
|
+
case "optional":
|
|
53
|
+
case "service": {
|
|
54
|
+
const patterns_ = normalizePatternsRecursive(pattern.patterns);
|
|
55
|
+
if (patterns_.length > 0) {
|
|
56
|
+
return [{ ...pattern, patterns: patterns_.concat() }];
|
|
57
|
+
}
|
|
58
|
+
return [] as ${snippets.SparqlPattern}[];
|
|
59
|
+
}
|
|
60
|
+
default:
|
|
61
|
+
return [pattern];
|
|
62
|
+
}
|
|
63
|
+
}));
|
|
64
|
+
|
|
65
|
+
switch (unionPatterns.length) {
|
|
66
|
+
case 0:
|
|
67
|
+
break;
|
|
68
|
+
case 1:
|
|
69
|
+
compactedPatterns.push(...normalizePatternsRecursive([unionPatterns[0]]));
|
|
70
|
+
break;
|
|
71
|
+
default:
|
|
72
|
+
compactedPatterns.push({ ...pattern, patterns: unionPatterns.concat() });
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
default:
|
|
78
|
+
pattern satisfies never;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return ${snippets.sortSparqlPatterns}(${snippets.deduplicateSparqlPatterns}(compactedPatterns));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const normalizedPatterns = normalizePatternsRecursive(patterns);
|
|
86
|
+
if (!normalizedPatterns.some(${snippets.SparqlPattern_isSolutionGenerating})) {
|
|
87
|
+
throw new Error("SPARQL WHERE patterns must have at least one solution-generating pattern");
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return normalizedPatterns;
|
|
91
|
+
}`);
|
|
92
|
+
//# sourceMappingURL=snippets_normalizeSparqlWherePatterns.js.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_numericSparqlWherePatterns = ({ snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}numericSparqlWherePatterns`, code `\
|
|
3
|
+
function $numericSparqlWherePatterns<NumericT extends bigint | number>({ filter, valueVariable, ...otherParameters }: Parameters<${snippets.ValueSparqlWherePatternsFunction}<${snippets.NumericFilter}<NumericT>, ${snippets.NumericSchema}<NumericT>>>[0]): ReturnType<${snippets.ValueSparqlWherePatternsFunction}<${snippets.NumericFilter}<NumericT>, ${snippets.NumericSchema}<NumericT>>> {
|
|
4
|
+
const filterPatterns: ${snippets.SparqlFilterPattern}[] = [];
|
|
5
|
+
|
|
6
|
+
if (filter) {
|
|
7
|
+
if (filter.in !== undefined && filter.in.length > 0) {
|
|
8
|
+
filterPatterns.push(${snippets.sparqlValueInPattern}({ lift: true, valueVariable, valueIn: filter.in }));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
if (filter.maxExclusive !== undefined) {
|
|
12
|
+
filterPatterns.push({
|
|
13
|
+
expression: {
|
|
14
|
+
type: "operation",
|
|
15
|
+
operator: "<",
|
|
16
|
+
args: [valueVariable, ${snippets.literalFactory}.primitive(filter.maxExclusive)],
|
|
17
|
+
},
|
|
18
|
+
lift: true,
|
|
19
|
+
type: "filter",
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (filter.maxInclusive !== undefined) {
|
|
24
|
+
filterPatterns.push({
|
|
25
|
+
expression: {
|
|
26
|
+
type: "operation",
|
|
27
|
+
operator: "<=",
|
|
28
|
+
args: [valueVariable, ${snippets.literalFactory}.primitive(filter.maxInclusive)],
|
|
29
|
+
},
|
|
30
|
+
lift: true,
|
|
31
|
+
type: "filter",
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (filter.minExclusive !== undefined) {
|
|
36
|
+
filterPatterns.push({
|
|
37
|
+
expression: {
|
|
38
|
+
type: "operation",
|
|
39
|
+
operator: ">",
|
|
40
|
+
args: [valueVariable, ${snippets.literalFactory}.primitive(filter.minExclusive)],
|
|
41
|
+
},
|
|
42
|
+
lift: true,
|
|
43
|
+
type: "filter",
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (filter.minInclusive !== undefined) {
|
|
48
|
+
filterPatterns.push({
|
|
49
|
+
expression: {
|
|
50
|
+
type: "operation",
|
|
51
|
+
operator: ">=",
|
|
52
|
+
args: [valueVariable, ${snippets.literalFactory}.primitive(filter.minInclusive)],
|
|
53
|
+
},
|
|
54
|
+
lift: true,
|
|
55
|
+
type: "filter",
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return ${snippets.termSchemaSparqlPatterns}({ ...otherParameters, filterPatterns, valueVariable });
|
|
61
|
+
}`);
|
|
62
|
+
//# sourceMappingURL=snippets_numericSparqlWherePatterns.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_parseBlankNode = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}parseBlankNode`, code `\
|
|
3
|
+
export function ${syntheticNamePrefix}parseBlankNode(identifier: string): ${imports.Either}<Error, ${imports.BlankNode}> {
|
|
4
|
+
return \
|
|
5
|
+
${snippets.parseIdentifier}(identifier)\
|
|
6
|
+
.chain((identifier) => (identifier.termType === "BlankNode") ? ${imports.Right}(identifier) : ${imports.Left}(new Error("expected identifier to be BlankNode"))) \
|
|
7
|
+
as ${imports.Either}<Error, ${imports.BlankNode}>;
|
|
8
|
+
}`);
|
|
9
|
+
//# sourceMappingURL=snippets_parseBlankNode.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_parseIdentifier = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}parseIdentifier`, code `\
|
|
3
|
+
const ${syntheticNamePrefix}parseIdentifier = ${imports.NTriplesIdentifier}.parser(${imports.dataFactory});`);
|
|
4
|
+
//# sourceMappingURL=snippets_parseIdentifier.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_parseIri = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}parseIri`, code `\
|
|
3
|
+
export function ${syntheticNamePrefix}parseIri(identifier: string): ${imports.Either}<Error, ${imports.NamedNode}> {
|
|
4
|
+
return \
|
|
5
|
+
${snippets.parseIdentifier}(identifier)\
|
|
6
|
+
.chain((identifier) => (identifier.termType === "NamedNode") ? ${imports.Right}(identifier) : ${imports.Left}(new Error("expected identifier to be NamedNode"))) \
|
|
7
|
+
as ${imports.Either}<Error, ${imports.NamedNode}>;
|
|
8
|
+
}`);
|
|
9
|
+
//# sourceMappingURL=snippets_parseIri.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_propertyEquals = ({ snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}propertyEquals`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}propertyEquals<ObjectT, PropertyValueT>(
|
|
4
|
+
property: Readonly<{ equalsFunction: ${snippets.EqualsFunction}<PropertyValueT>; name: string; }>,
|
|
5
|
+
left: readonly [ObjectT, PropertyValueT],
|
|
6
|
+
right: readonly [ObjectT, PropertyValueT]
|
|
7
|
+
): ${snippets.EqualsResult} {
|
|
8
|
+
return property.equalsFunction(left[1], right[1])
|
|
9
|
+
.mapLeft(propertyValuesUnequal => ({ left: left[0], right: right[0], propertyName: property.name, propertyValuesUnequal, type: "property" as const }));
|
|
10
|
+
}`);
|
|
11
|
+
//# sourceMappingURL=snippets_propertyEquals.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { rdf } from "@tpluscode/rdf-ns-builders";
|
|
2
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
+
export const snippets_rdfResourceIdentifierValues = ({ imports, rdfjsTermExpression, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}rdfResourceIdentifierValues`, code `\
|
|
4
|
+
function ${syntheticNamePrefix}rdfResourceIdentifierValues(resource: ${imports.Resource}): ${imports.Resource}.Values {
|
|
5
|
+
return new ${imports.Resource}.Value({
|
|
6
|
+
dataFactory: ${imports.dataFactory},
|
|
7
|
+
focusResource: resource,
|
|
8
|
+
propertyPath: ${rdfjsTermExpression(rdf.subject)},
|
|
9
|
+
term: resource.identifier,
|
|
10
|
+
}).toValues();
|
|
11
|
+
}`);
|
|
12
|
+
//# sourceMappingURL=snippets_rdfResourceIdentifierValues.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_sequenceRecord = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}sequenceRecord`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}sequenceRecord<T extends Record<string, unknown>>(
|
|
4
|
+
record: { [K in keyof T]: ${imports.Either}<Error, T[K]> }
|
|
5
|
+
): ${imports.Either}<Error, T> {
|
|
6
|
+
const result: { [K in keyof T]?: T[K] } = {};
|
|
7
|
+
|
|
8
|
+
for (const key of globalThis.Object.keys(record) as Array<keyof T>) {
|
|
9
|
+
const either = record[key];
|
|
10
|
+
if (either.isLeft()) {
|
|
11
|
+
return either as unknown as ${imports.Either}<Error, T>;
|
|
12
|
+
}
|
|
13
|
+
result[key] = either.extract() as T[typeof key];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return ${imports.Right}(result as T);
|
|
17
|
+
}`);
|
|
18
|
+
//# sourceMappingURL=snippets_sequenceRecord.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_setFromRdfResourceValues = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}setFromRdfResourceValues`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}setFromRdfResourceValues<ItemT, ItemSchemaT>(itemFromRdfResourceValues: ${snippets.FromRdfResourceValuesFunction}<ItemT, ItemSchemaT>): ${snippets.FromRdfResourceValuesFunction}<readonly ItemT[], ${snippets.CollectionSchema}<ItemSchemaT>> {
|
|
4
|
+
return (values, options) =>
|
|
5
|
+
itemFromRdfResourceValues(values, { ...options, schema: options.schema.itemType })\
|
|
6
|
+
.map(values => values.toArray())\
|
|
7
|
+
.map(valuesArray => ${imports.Resource}.Values.fromValue({ focusResource: options.focusResource, propertyPath: options.propertyPath, value: valuesArray }));
|
|
8
|
+
}`);
|
|
9
|
+
//# sourceMappingURL=snippets_setFromRdfResourceValues.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_setSparqlConstructTriples = ({ snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}setSparqlConstructTriples`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}setSparqlConstructTriples<ItemFilterT, ItemSchemaT>(itemSparqlConstructTriplesFunction: ${snippets.ValueSparqlConstructTriplesFunction}<ItemFilterT, ItemSchemaT>): ${snippets.ValueSparqlConstructTriplesFunction}<${snippets.CollectionFilter}<ItemFilterT>, ${snippets.CollectionSchema}<ItemSchemaT>> {
|
|
4
|
+
return ({ schema, ...otherParameters }) => itemSparqlConstructTriplesFunction({ ...otherParameters, schema: schema.itemType });
|
|
5
|
+
}`);
|
|
6
|
+
//# sourceMappingURL=snippets_setSparqlConstructTriples.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_setSparqlWherePatterns = ({ snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}setSparqlWherePatterns`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}setSparqlWherePatterns<ItemFilterT, ItemSchemaT>(itemSparqlWherePatternsFunction: ${snippets.ValueSparqlWherePatternsFunction}<ItemFilterT, ItemSchemaT>): ${snippets.ValueSparqlWherePatternsFunction}<${snippets.CollectionFilter}<ItemFilterT>, ${snippets.CollectionSchema}<ItemSchemaT>> {
|
|
4
|
+
return ({ filter, schema, ...otherParameters }) => {
|
|
5
|
+
const itemSparqlWherePatterns = itemSparqlWherePatternsFunction({ ...otherParameters, filter, schema: schema.itemType });
|
|
6
|
+
|
|
7
|
+
const minCount = filter?.${syntheticNamePrefix}minCount ?? schema.minCount ?? 0;
|
|
8
|
+
if (minCount > 0) {
|
|
9
|
+
// Required
|
|
10
|
+
return itemSparqlWherePatterns;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const [optionalSparqlWherePatterns, liftSparqlPatterns] = ${snippets.liftSparqlPatterns}(itemSparqlWherePatterns);
|
|
14
|
+
return [{ patterns: optionalSparqlWherePatterns.concat(), type: "optional" }, ...liftSparqlPatterns];
|
|
15
|
+
}
|
|
16
|
+
}`);
|
|
17
|
+
//# sourceMappingURL=snippets_setSparqlWherePatterns.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_shaclPropertyFromRdf = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}shaclPropertyFromRdf`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}shaclPropertyFromRdf<TypeT, TypeSchemaT>(
|
|
4
|
+
{ focusResource, graph, propertySchema, typeFromRdfResourceValues, ...otherParameters }:
|
|
5
|
+
{
|
|
6
|
+
propertySchema: ${snippets.ShaclPropertySchema}<TypeSchemaT>;
|
|
7
|
+
typeFromRdfResourceValues: ${snippets.FromRdfResourceValuesFunction}<TypeT, TypeSchemaT>;
|
|
8
|
+
} & Omit<Parameters<${snippets.FromRdfResourceValuesFunction}<TypeT, TypeSchemaT>>[1], "propertyPath" | "schema">
|
|
9
|
+
): ${imports.Either}<Error, TypeT> {
|
|
10
|
+
return \
|
|
11
|
+
typeFromRdfResourceValues(
|
|
12
|
+
focusResource.values(propertySchema.path, { graph, unique: true }),
|
|
13
|
+
{ ...otherParameters, focusResource, graph, propertyPath: propertySchema.path, schema: propertySchema.type }
|
|
14
|
+
)
|
|
15
|
+
.chain(values => values.head());
|
|
16
|
+
}`);
|
|
17
|
+
//# sourceMappingURL=snippets_shaclPropertyFromRdf.js.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_shaclPropertySparqlConstructTriples = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}shaclPropertySparqlConstructTriples`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}shaclPropertySparqlConstructTriples<FilterT, TypeSchemaT>({ filter, focusIdentifier, ignoreRdfType, propertyName, propertySchema, typeSparqlConstructTriples, variablePrefix }: {
|
|
4
|
+
filter: FilterT | undefined;
|
|
5
|
+
focusIdentifier: ${imports.NamedNode} | ${imports.Variable},
|
|
6
|
+
ignoreRdfType: boolean;
|
|
7
|
+
propertySchema: ${snippets.ShaclPropertySchema}<TypeSchemaT>;
|
|
8
|
+
propertyName: string;
|
|
9
|
+
typeSparqlConstructTriples: ${snippets.ValueSparqlConstructTriplesFunction}<FilterT, TypeSchemaT>;
|
|
10
|
+
variablePrefix: string;
|
|
11
|
+
}): readonly ${imports.sparqljs}.Triple[] {
|
|
12
|
+
const propertyPathSparqlConstructTriples = ({ end, propertyPath, start, variableCounter }: {
|
|
13
|
+
variableCounter: { value: number };
|
|
14
|
+
end: ${imports.Literal} | ${imports.NamedNode} | ${imports.Variable};
|
|
15
|
+
propertyPath: ${snippets.PropertyPath};
|
|
16
|
+
start: ${imports.NamedNode} | ${imports.Variable};
|
|
17
|
+
}): readonly ${imports.sparqljs}.Triple[] => {
|
|
18
|
+
switch (propertyPath.termType) {
|
|
19
|
+
case "AlternativePath": {
|
|
20
|
+
return propertyPath.members.flatMap((member) =>
|
|
21
|
+
propertyPathSparqlConstructTriples({ end, propertyPath: member, start, variableCounter }),
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
case "InversePath": {
|
|
26
|
+
if (end.termType === "Literal") {
|
|
27
|
+
throw new Error(\`invalid term type for inverse path: \${end.termType}\`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return propertyPathSparqlConstructTriples({
|
|
31
|
+
end: start,
|
|
32
|
+
propertyPath: propertyPath.path,
|
|
33
|
+
start: end,
|
|
34
|
+
variableCounter,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
case "NamedNode": {
|
|
39
|
+
return [{ subject: start, predicate: propertyPath as NamedNode, object: end }];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
case "SequencePath": {
|
|
43
|
+
if (propertyPath.members.length === 0) {
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (propertyPath.members.length === 1) {
|
|
48
|
+
return propertyPathSparqlConstructTriples({ end, propertyPath: propertyPath.members[0], start, variableCounter });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
let triples: ${imports.sparqljs}.Triple[] = [];
|
|
52
|
+
let current: ${imports.NamedNode} | ${imports.Variable} = start;
|
|
53
|
+
for (let memberI = 0; memberI < propertyPath.members.length; memberI++) {
|
|
54
|
+
const next: ${imports.NamedNode} | ${imports.Literal} | ${imports.Variable} = memberI === propertyPath.members.length - 1
|
|
55
|
+
? end
|
|
56
|
+
: ${imports.dataFactory}.variable(\`\${variablePrefix}\${variableCounter.value++}\`);
|
|
57
|
+
triples = triples.concat(propertyPathSparqlConstructTriples({ end: next, propertyPath: propertyPath.members[memberI], start: current, variableCounter }));
|
|
58
|
+
current = next as ${imports.NamedNode} | ${imports.Variable};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return triples;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
case "OneOrMorePath":
|
|
65
|
+
case "ZeroOrMorePath":
|
|
66
|
+
case "ZeroOrOnePath": {
|
|
67
|
+
throw new Error(\`\${propertyName}: \${propertyPath.termType} property path cannot be represented as SPARQL CONSTRUCT triples\`);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
default: {
|
|
71
|
+
propertyPath satisfies never;
|
|
72
|
+
throw new Error(\`\${propertyName}: unhandled property path termType: \${(propertyPath as any).termType}\`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const valueString = \`\${variablePrefix}\${propertyName[0].toUpperCase()}\${propertyName.slice(1)}\`;
|
|
78
|
+
const valueVariable = ${imports.dataFactory}.variable!(valueString);
|
|
79
|
+
|
|
80
|
+
const variableCounter = { value: 0 };
|
|
81
|
+
return propertyPathSparqlConstructTriples({ end: valueVariable, propertyPath: propertySchema.path, start: focusIdentifier, variableCounter })
|
|
82
|
+
.concat(typeSparqlConstructTriples({
|
|
83
|
+
filter,
|
|
84
|
+
ignoreRdfType,
|
|
85
|
+
schema: propertySchema.type,
|
|
86
|
+
valueVariable,
|
|
87
|
+
variablePrefix: valueString
|
|
88
|
+
}));
|
|
89
|
+
}`);
|
|
90
|
+
//# sourceMappingURL=snippets_shaclPropertySparqlConstructTriples.js.map
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
2
|
+
export const snippets_shaclPropertySparqlWherePatterns = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}shaclPropertySparqlWherePatterns`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}shaclPropertySparqlWherePatterns<FilterT, TypeSchemaT>({ filter, focusIdentifier, ignoreRdfType, preferredLanguages, propertyName, propertySchema, typeSparqlWherePatterns, variablePrefix }: {
|
|
4
|
+
filter: FilterT | undefined;
|
|
5
|
+
focusIdentifier: ${imports.NamedNode} | ${imports.Variable},
|
|
6
|
+
ignoreRdfType: boolean;
|
|
7
|
+
preferredLanguages: readonly string[] | undefined;
|
|
8
|
+
propertySchema: ${snippets.ShaclPropertySchema}<TypeSchemaT>;
|
|
9
|
+
propertyName: string;
|
|
10
|
+
typeSparqlWherePatterns: ${snippets.ValueSparqlWherePatternsFunction}<FilterT, TypeSchemaT>;
|
|
11
|
+
variablePrefix: string;
|
|
12
|
+
}): readonly ${snippets.SparqlPattern}[] {
|
|
13
|
+
const propertyPathSparqlWherePatterns = ({ end, propertyPath, start, variableCounter }: {
|
|
14
|
+
end: ${imports.Literal} | ${imports.NamedNode} | ${imports.Variable};
|
|
15
|
+
propertyPath: ${snippets.PropertyPath};
|
|
16
|
+
start: ${imports.NamedNode} | ${imports.Variable};
|
|
17
|
+
variableCounter: { value: number };
|
|
18
|
+
}): ${snippets.SparqlPattern}[] => {
|
|
19
|
+
switch (propertyPath.termType) {
|
|
20
|
+
case "AlternativePath": {
|
|
21
|
+
return [{
|
|
22
|
+
patterns: propertyPath.members.map((member) => ({
|
|
23
|
+
patterns: propertyPathSparqlWherePatterns({ end, propertyPath: member, start, variableCounter }),
|
|
24
|
+
type: "group" as const,
|
|
25
|
+
})),
|
|
26
|
+
type: "union",
|
|
27
|
+
}];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
case "InversePath":
|
|
31
|
+
case "NamedNode":
|
|
32
|
+
case "OneOrMorePath":
|
|
33
|
+
case "ZeroOrMorePath":
|
|
34
|
+
case "ZeroOrOnePath": {
|
|
35
|
+
return [{
|
|
36
|
+
triples: [{ subject: start, predicate: ${snippets.sparqlPropertyPath}(propertyPath), object: end }],
|
|
37
|
+
type: "bgp"
|
|
38
|
+
}];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
case "SequencePath": {
|
|
42
|
+
if (propertyPath.members.length === 0) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (propertyPath.members.length === 1) {
|
|
47
|
+
return propertyPathSparqlWherePatterns({ end, propertyPath: propertyPath.members[0], start, variableCounter });
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
let patterns: ${snippets.SparqlPattern}[] = [];
|
|
51
|
+
let current: ${imports.NamedNode} | ${imports.Variable} = start;
|
|
52
|
+
for (let memberI = 0; memberI < propertyPath.members.length; memberI++) {
|
|
53
|
+
const next: ${imports.NamedNode} | ${imports.Literal} | ${imports.Variable} = memberI === propertyPath.members.length - 1
|
|
54
|
+
? end
|
|
55
|
+
: ${imports.dataFactory}.variable(\`\${variablePrefix}\${variableCounter.value++}\`);
|
|
56
|
+
patterns = patterns.concat(propertyPathSparqlWherePatterns({ end: next, propertyPath: propertyPath.members[memberI], start: current, variableCounter }));
|
|
57
|
+
current = next as ${imports.NamedNode} | ${imports.Variable};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return patterns;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
default: {
|
|
64
|
+
propertyPath satisfies never;
|
|
65
|
+
throw new Error(\`\${propertyName}: unhandled property path termType: \${(propertyPath as any).termType}\`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const valueString = \`\${variablePrefix}\${propertyName[0].toUpperCase()}\${propertyName.slice(1)}\`;
|
|
71
|
+
const valueVariable = ${imports.dataFactory}.variable!(valueString);
|
|
72
|
+
|
|
73
|
+
const variableCounter = { value: 0 };
|
|
74
|
+
const propertyPatterns = propertyPathSparqlWherePatterns({ end: valueVariable, propertyPath: propertySchema.path, start: focusIdentifier, variableCounter });
|
|
75
|
+
|
|
76
|
+
return typeSparqlWherePatterns({
|
|
77
|
+
filter,
|
|
78
|
+
ignoreRdfType,
|
|
79
|
+
preferredLanguages,
|
|
80
|
+
propertyPatterns,
|
|
81
|
+
schema: propertySchema.type,
|
|
82
|
+
valueVariable,
|
|
83
|
+
variablePrefix: valueString
|
|
84
|
+
});
|
|
85
|
+
}`);
|
|
86
|
+
//# sourceMappingURL=snippets_shaclPropertySparqlWherePatterns.js.map
|