@shaclmate/compiler 4.0.29 → 4.0.30
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/_ShapesGraphToAstTransformer/shapeAstTypeName.js +0 -4
- package/dist/generators/ts/AbstractCollectionType.js +13 -15
- package/dist/generators/ts/AbstractDateType.js +6 -8
- package/dist/generators/ts/AbstractIdentifierType.d.ts +1 -1
- package/dist/generators/ts/AbstractIdentifierType.js +9 -5
- package/dist/generators/ts/AbstractLazyObjectType.d.ts +2 -3
- package/dist/generators/ts/AbstractLazyObjectType.js +2 -5
- package/dist/generators/ts/AbstractLiteralType.js +2 -3
- package/dist/generators/ts/AbstractNamedUnionType.js +39 -41
- package/dist/generators/ts/AbstractNumericType.js +8 -11
- package/dist/generators/ts/AbstractPrimitiveType.js +1 -2
- package/dist/generators/ts/AbstractTermType.js +10 -13
- package/dist/generators/ts/AbstractType.d.ts +8 -2
- package/dist/generators/ts/AbstractType.js +15 -5
- package/dist/generators/ts/AbstractUnionType.js +17 -19
- package/dist/generators/ts/BigDecimalType.d.ts +3 -3
- package/dist/generators/ts/BigDecimalType.js +24 -21
- package/dist/generators/ts/BigIntType.d.ts +1 -1
- package/dist/generators/ts/BigIntType.js +9 -5
- package/dist/generators/ts/BlankNodeType.js +9 -11
- package/dist/generators/ts/BooleanType.d.ts +1 -1
- package/dist/generators/ts/BooleanType.js +13 -11
- package/dist/generators/ts/DateTimeType.d.ts +1 -1
- package/dist/generators/ts/DateTimeType.js +14 -3
- package/dist/generators/ts/DateType.d.ts +1 -1
- package/dist/generators/ts/DateType.js +14 -3
- package/dist/generators/ts/DefaultValueType.js +5 -8
- package/dist/generators/ts/FloatType.d.ts +1 -1
- package/dist/generators/ts/FloatType.js +13 -2
- package/dist/generators/ts/IdentifierType.js +9 -11
- package/dist/generators/ts/{imports.d.ts → Imports.d.ts} +3 -3
- package/dist/generators/ts/Imports.js +41 -0
- package/dist/generators/ts/IntType.d.ts +1 -1
- package/dist/generators/ts/IntType.js +13 -2
- package/dist/generators/ts/IriType.js +15 -20
- package/dist/generators/ts/LazyObjectOptionType.d.ts +8 -8
- package/dist/generators/ts/LazyObjectOptionType.js +21 -26
- package/dist/generators/ts/LazyObjectSetType.d.ts +5 -1
- package/dist/generators/ts/LazyObjectSetType.js +12 -20
- package/dist/generators/ts/LazyObjectType.d.ts +5 -1
- package/dist/generators/ts/LazyObjectType.js +20 -18
- package/dist/generators/ts/ListType.js +11 -14
- package/dist/generators/ts/LiteralType.js +8 -10
- package/dist/generators/ts/NamedObjectType.d.ts +1 -3
- package/dist/generators/ts/NamedObjectType.js +32 -30
- package/dist/generators/ts/NamedObjectUnionType.js +37 -29
- package/dist/generators/ts/OptionType.js +13 -15
- package/dist/generators/ts/Reusables.d.ts +11 -0
- package/dist/generators/ts/Reusables.js +14 -0
- package/dist/generators/ts/SetType.js +4 -6
- package/dist/generators/ts/Snippet.d.ts +3 -0
- package/dist/generators/ts/Snippet.js +2 -0
- package/dist/generators/ts/SnippetFactory.d.ts +14 -0
- package/dist/generators/ts/SnippetFactory.js +2 -0
- package/dist/generators/ts/Snippets.d.ts +123 -0
- package/dist/generators/ts/Snippets.js +804 -0
- package/dist/generators/ts/StringType.d.ts +2 -2
- package/dist/generators/ts/StringType.js +14 -12
- package/dist/generators/ts/TermType.js +14 -17
- package/dist/generators/ts/TsGenerator.d.ts +7 -1
- package/dist/generators/ts/TsGenerator.js +90 -14
- package/dist/generators/ts/TypeFactory.d.ts +4 -1
- package/dist/generators/ts/TypeFactory.js +29 -3
- package/dist/generators/ts/ZodGenerator.d.ts +1 -0
- package/dist/generators/ts/ZodGenerator.js +10 -8
- package/dist/generators/ts/_NamedObjectType/AbstractProperty.d.ts +6 -1
- package/dist/generators/ts/_NamedObjectType/AbstractProperty.js +10 -1
- package/dist/generators/ts/_NamedObjectType/DiscriminantProperty.js +3 -4
- package/dist/generators/ts/_NamedObjectType/IdentifierProperty.js +6 -10
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_createFunctionDeclaration.js +3 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_equalsFunctionDeclaration.js +2 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterFunctionDeclaration.js +1 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterTypeDeclaration.js +2 -3
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlConstructTriplesFunctionDeclaration.js +7 -11
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlWherePatternsFunctionDeclaration.js +11 -15
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromJsonFunctionDeclaration.js +2 -3
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceFunctionDeclaration.js +2 -3
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceValuesFunctionDeclaration.js +2 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfTypeVariableStatement.js +1 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_graphqlTypeVariableStatement.js +1 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_hashFunctionDeclarations.js +4 -6
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonParseFunctionDeclaration.js +3 -5
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonSchemaFunctionDeclaration.js +1 -3
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonTypeAliasDeclaration.js +1 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonUiSchemaFunctionDeclaration.js +1 -2
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromJsonFunctionDeclaration.js +3 -3
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromRdfResourceFunctionDeclaration.js +9 -12
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_schemaVariableStatement.js +2 -3
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.d.ts +2 -0
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.js +4 -7
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts +2 -0
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.js +2 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toJsonFunctionDeclaration.js +2 -3
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toRdfResourceFunctionDeclaration.js +4 -7
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_toStringFunctionDeclarations.js +4 -5
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration.js +2 -4
- package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlWherePatternsFunctionDeclaration.js +3 -5
- package/dist/generators/ts/_NamedObjectType/ShaclProperty.js +8 -11
- package/dist/generators/ts/_NamedObjectType/identifierTypeDeclarations.js +4 -5
- package/dist/generators/ts/_snippets/snippets_BlankNodeFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_BlankNodeFilter.js +1 -2
- package/dist/generators/ts/_snippets/snippets_BlankNodeSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_BlankNodeSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_BooleanFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_BooleanFilter.js +1 -2
- package/dist/generators/ts/_snippets/snippets_BooleanSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_BooleanSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_CollectionFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_CollectionFilter.js +1 -2
- package/dist/generators/ts/_snippets/snippets_CollectionSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_CollectionSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_DateFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_DateFilter.js +1 -2
- package/dist/generators/ts/_snippets/snippets_DateSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_DateSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_DefaultValueSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_DefaultValueSchema.js +1 -3
- package/dist/generators/ts/_snippets/snippets_EqualsResult.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_EqualsResult.js +1 -3
- package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.js +1 -3
- package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.js +2 -5
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.js +1 -3
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.js +1 -3
- package/dist/generators/ts/_snippets/snippets_Hasher.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_Hasher.js +1 -2
- package/dist/generators/ts/_snippets/snippets_IdentifierFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_IdentifierFilter.js +1 -3
- package/dist/generators/ts/_snippets/snippets_IdentifierSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_IdentifierSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_IdentifierSet.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_IdentifierSet.js +1 -3
- package/dist/generators/ts/_snippets/snippets_IriFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_IriFilter.js +1 -3
- package/dist/generators/ts/_snippets/snippets_IriSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_IriSchema.js +1 -3
- package/dist/generators/ts/_snippets/snippets_LazyObject.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_LazyObject.js +1 -3
- package/dist/generators/ts/_snippets/snippets_LazyObjectOption.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_LazyObjectOption.js +1 -3
- package/dist/generators/ts/_snippets/snippets_LazyObjectSet.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_LazyObjectSet.js +1 -3
- package/dist/generators/ts/_snippets/snippets_LiteralFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_LiteralFilter.js +2 -5
- package/dist/generators/ts/_snippets/snippets_LiteralSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_LiteralSchema.js +1 -3
- package/dist/generators/ts/_snippets/snippets_MaybeFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_MaybeFilter.js +1 -2
- package/dist/generators/ts/_snippets/snippets_MaybeSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_MaybeSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_NumericFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_NumericFilter.js +1 -2
- package/dist/generators/ts/_snippets/snippets_NumericSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_NumericSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.js +1 -3
- package/dist/generators/ts/_snippets/snippets_PropertyPath.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_PropertyPath.js +8 -13
- package/dist/generators/ts/_snippets/snippets_RdfVocabularies.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_RdfVocabularies.js +1 -3
- package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.js +2 -4
- package/dist/generators/ts/_snippets/snippets_SparqlFilterPattern.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_SparqlFilterPattern.js +1 -3
- package/dist/generators/ts/_snippets/snippets_SparqlPattern.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_SparqlPattern.js +1 -4
- package/dist/generators/ts/_snippets/snippets_SparqlPattern_isSolutionGenerating.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_SparqlPattern_isSolutionGenerating.js +2 -4
- package/dist/generators/ts/_snippets/snippets_StringFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_StringFilter.js +1 -2
- package/dist/generators/ts/_snippets/snippets_StringSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_StringSchema.js +1 -2
- package/dist/generators/ts/_snippets/snippets_TermFilter.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_TermFilter.js +1 -3
- package/dist/generators/ts/_snippets/snippets_TermSchema.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_TermSchema.js +1 -3
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.js +1 -3
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.js +5 -6
- package/dist/generators/ts/_snippets/snippets_UnwrapR.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_UnwrapR.js +1 -3
- package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.js +1 -3
- package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.js +3 -6
- package/dist/generators/ts/_snippets/snippets_arrayEquals.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_arrayEquals.js +7 -10
- package/dist/generators/ts/_snippets/snippets_arrayIntersection.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_arrayIntersection.js +1 -2
- package/dist/generators/ts/_snippets/snippets_bigDecimalLiteral.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_bigDecimalLiteral.js +2 -5
- package/dist/generators/ts/_snippets/snippets_bigDecimalSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_bigDecimalSparqlWherePatterns.js +11 -19
- package/dist/generators/ts/_snippets/snippets_blankNodeSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_blankNodeSparqlWherePatterns.js +2 -6
- package/dist/generators/ts/_snippets/snippets_booleanEquals.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_booleanEquals.js +4 -6
- package/dist/generators/ts/_snippets/snippets_booleanSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_booleanSparqlWherePatterns.js +5 -12
- package/dist/generators/ts/_snippets/snippets_compactRecord.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_compactRecord.js +1 -2
- package/dist/generators/ts/_snippets/snippets_dateEquals.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_dateEquals.js +4 -6
- package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.js +9 -17
- package/dist/generators/ts/_snippets/snippets_decodeBigDecimalLiteral.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_decodeBigDecimalLiteral.js +1 -3
- package/dist/generators/ts/_snippets/snippets_deduplicateSparqlPatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_deduplicateSparqlPatterns.js +3 -5
- package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.js +3 -7
- package/dist/generators/ts/_snippets/snippets_filterArray.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterArray.js +2 -4
- package/dist/generators/ts/_snippets/snippets_filterBigDecimal.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterBigDecimal.js +2 -5
- package/dist/generators/ts/_snippets/snippets_filterBlankNode.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterBlankNode.js +2 -5
- package/dist/generators/ts/_snippets/snippets_filterBoolean.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterBoolean.js +2 -4
- package/dist/generators/ts/_snippets/snippets_filterDate.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterDate.js +2 -4
- package/dist/generators/ts/_snippets/snippets_filterIdentifier.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterIdentifier.js +2 -5
- package/dist/generators/ts/_snippets/snippets_filterIri.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterIri.js +2 -5
- package/dist/generators/ts/_snippets/snippets_filterLiteral.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterLiteral.js +3 -7
- package/dist/generators/ts/_snippets/snippets_filterMaybe.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterMaybe.js +2 -5
- package/dist/generators/ts/_snippets/snippets_filterNumeric.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterNumeric.js +2 -4
- package/dist/generators/ts/_snippets/snippets_filterString.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterString.js +2 -4
- package/dist/generators/ts/_snippets/snippets_filterTerm.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_filterTerm.js +2 -5
- package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.js +1 -3
- package/dist/generators/ts/_snippets/snippets_fromRdfPreferredLanguages.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_fromRdfPreferredLanguages.js +1 -3
- package/dist/generators/ts/_snippets/snippets_identifierSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_identifierSparqlWherePatterns.js +4 -10
- package/dist/generators/ts/_snippets/snippets_iriSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_iriSparqlWherePatterns.js +5 -12
- package/dist/generators/ts/_snippets/snippets_isReadonlyBigIntArray.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_isReadonlyBigIntArray.js +1 -2
- package/dist/generators/ts/_snippets/snippets_isReadonlyBooleanArray.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_isReadonlyBooleanArray.js +1 -2
- package/dist/generators/ts/_snippets/snippets_isReadonlyNumberArray.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_isReadonlyNumberArray.js +1 -2
- package/dist/generators/ts/_snippets/snippets_isReadonlyObjectArray.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_isReadonlyObjectArray.js +1 -2
- package/dist/generators/ts/_snippets/snippets_isReadonlyStringArray.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_isReadonlyStringArray.js +1 -2
- package/dist/generators/ts/_snippets/snippets_liftSparqlPatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_liftSparqlPatterns.js +4 -7
- package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.js +6 -12
- package/dist/generators/ts/_snippets/snippets_listSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_listSparqlWherePatterns.js +9 -18
- package/dist/generators/ts/_snippets/snippets_literalFactory.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_literalFactory.js +1 -3
- package/dist/generators/ts/_snippets/snippets_literalSchemaSparqlPatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_literalSchemaSparqlPatterns.js +7 -13
- package/dist/generators/ts/_snippets/snippets_literalSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_literalSparqlWherePatterns.js +3 -8
- package/dist/generators/ts/_snippets/snippets_maybeEquals.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_maybeEquals.js +5 -8
- package/dist/generators/ts/_snippets/snippets_maybeSparqlConstructTriples.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_maybeSparqlConstructTriples.js +2 -6
- package/dist/generators/ts/_snippets/snippets_maybeSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_maybeSparqlWherePatterns.js +4 -9
- package/dist/generators/ts/_snippets/snippets_normalizeSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_normalizeSparqlWherePatterns.js +9 -14
- package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.js +9 -17
- package/dist/generators/ts/_snippets/snippets_parseBlankNode.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_parseBlankNode.js +2 -5
- package/dist/generators/ts/_snippets/snippets_parseIdentifier.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_parseIdentifier.js +1 -3
- package/dist/generators/ts/_snippets/snippets_parseIri.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_parseIri.js +2 -5
- package/dist/generators/ts/_snippets/snippets_setSparqlConstructTriples.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_setSparqlConstructTriples.js +2 -6
- package/dist/generators/ts/_snippets/snippets_setSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_setSparqlWherePatterns.js +3 -8
- package/dist/generators/ts/_snippets/snippets_shaclPropertyFromRdf.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_shaclPropertyFromRdf.js +2 -5
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlConstructTriples.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlConstructTriples.js +4 -9
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlWherePatterns.js +8 -15
- package/dist/generators/ts/_snippets/snippets_sortSparqlPatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_sortSparqlPatterns.js +5 -7
- package/dist/generators/ts/_snippets/snippets_sparqlInstancesOfPattern.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_sparqlInstancesOfPattern.js +3 -6
- package/dist/generators/ts/_snippets/snippets_sparqlPropertyPath.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_sparqlPropertyPath.js +3 -6
- package/dist/generators/ts/_snippets/snippets_sparqlValueInPattern.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_sparqlValueInPattern.js +3 -7
- package/dist/generators/ts/_snippets/snippets_strictEquals.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_strictEquals.js +4 -6
- package/dist/generators/ts/_snippets/snippets_stringSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_stringSparqlWherePatterns.js +7 -15
- package/dist/generators/ts/_snippets/snippets_termFilterSparqlPatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_termFilterSparqlPatterns.js +4 -9
- package/dist/generators/ts/_snippets/snippets_termSchemaSparqlPatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_termSchemaSparqlPatterns.js +6 -11
- package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.d.ts +2 -1
- package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.js +3 -9
- package/dist/generators/ts/graphqlSchemaVariableStatement.d.ts +2 -1
- package/dist/generators/ts/graphqlSchemaVariableStatement.js +13 -14
- package/dist/generators/ts/objectSetDeclarations.d.ts +2 -1
- package/dist/generators/ts/objectSetDeclarations.js +3 -3
- package/dist/generators/ts/objectSetInterfaceDeclaration.d.ts +2 -1
- package/dist/generators/ts/objectSetInterfaceDeclaration.js +4 -5
- package/dist/generators/ts/objectSetMethodSignatures.d.ts +2 -1
- package/dist/generators/ts/objectSetMethodSignatures.js +4 -5
- package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.d.ts +2 -1
- package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.js +49 -51
- package/dist/generators/ts/rdfjsTermExpression.d.ts +6 -2
- package/dist/generators/ts/rdfjsTermExpression.js +13 -15
- package/dist/generators/ts/sparqlObjectSetClassDeclaration.d.ts +2 -1
- package/dist/generators/ts/sparqlObjectSetClassDeclaration.js +43 -45
- package/dist/generators/ts/unsupportedObjectSetMethodDeclarations.d.ts +2 -1
- package/dist/generators/ts/unsupportedObjectSetMethodDeclarations.js +6 -7
- package/dist/input/ShapesGraph.d.ts +4 -4
- package/dist/input/ShapesGraph.js +4 -4
- package/dist/input/generated.d.ts +162 -163
- package/dist/input/generated.js +410 -416
- package/package.json +2 -2
- package/dist/generators/ts/imports.js +0 -41
- package/dist/generators/ts/snippets.d.ts +0 -110
- package/dist/generators/ts/snippets.js +0 -217
- package/dist/generators/ts/synthesizeUberObjectUnionType.d.ts +0 -11
- package/dist/generators/ts/synthesizeUberObjectUnionType.js +0 -68
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { snippets_sortSparqlPatterns } from "./snippets_sortSparqlPatterns.js";
|
|
7
|
-
export const snippets_normalizeSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}normalizeSparqlWherePatterns`, code `\
|
|
8
|
-
function ${syntheticNamePrefix}normalizeSparqlWherePatterns(patterns: readonly ${snippets_SparqlPattern}[]): readonly ${snippets_SparqlPattern}[] {
|
|
9
|
-
function normalizePatternsRecursive(patternsRecursive: readonly ${snippets_SparqlPattern}[]): readonly ${snippets_SparqlPattern}[] {
|
|
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}[] {
|
|
10
5
|
if (patternsRecursive.length === 0) {
|
|
11
6
|
return patternsRecursive;
|
|
12
7
|
}
|
|
13
8
|
|
|
14
|
-
const compactedPatterns: ${
|
|
15
|
-
for (const pattern of ${
|
|
9
|
+
const compactedPatterns: ${snippets.SparqlPattern}[] = [];
|
|
10
|
+
for (const pattern of ${snippets.deduplicateSparqlPatterns}(patternsRecursive)) {
|
|
16
11
|
switch (pattern.type) {
|
|
17
12
|
case "bgp": {
|
|
18
13
|
if (pattern.triples.length === 0) {
|
|
@@ -48,7 +43,7 @@ function ${syntheticNamePrefix}normalizeSparqlWherePatterns(patterns: readonly $
|
|
|
48
43
|
break;
|
|
49
44
|
}
|
|
50
45
|
case "union": {
|
|
51
|
-
const unionPatterns = ${
|
|
46
|
+
const unionPatterns = ${snippets.deduplicateSparqlPatterns}(pattern.patterns.flatMap(pattern => {
|
|
52
47
|
switch (pattern.type) {
|
|
53
48
|
case "group":
|
|
54
49
|
// Don't flatten the groups in a union
|
|
@@ -60,7 +55,7 @@ function ${syntheticNamePrefix}normalizeSparqlWherePatterns(patterns: readonly $
|
|
|
60
55
|
if (patterns_.length > 0) {
|
|
61
56
|
return [{ ...pattern, patterns: patterns_.concat() }];
|
|
62
57
|
}
|
|
63
|
-
return [] as ${
|
|
58
|
+
return [] as ${snippets.SparqlPattern}[];
|
|
64
59
|
}
|
|
65
60
|
default:
|
|
66
61
|
return [pattern];
|
|
@@ -84,11 +79,11 @@ function ${syntheticNamePrefix}normalizeSparqlWherePatterns(patterns: readonly $
|
|
|
84
79
|
}
|
|
85
80
|
}
|
|
86
81
|
|
|
87
|
-
return ${
|
|
82
|
+
return ${snippets.sortSparqlPatterns}(${snippets.deduplicateSparqlPatterns}(compactedPatterns));
|
|
88
83
|
}
|
|
89
84
|
|
|
90
85
|
const normalizedPatterns = normalizePatternsRecursive(patterns);
|
|
91
|
-
if (!normalizedPatterns.some(${
|
|
86
|
+
if (!normalizedPatterns.some(${snippets.SparqlPattern_isSolutionGenerating})) {
|
|
92
87
|
throw new Error("SPARQL WHERE patterns must have at least one solution-generating pattern");
|
|
93
88
|
}
|
|
94
89
|
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_numericSparqlWherePatterns: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_numericSparqlWherePatterns.d.ts.map
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { snippets_SparqlFilterPattern } from "./snippets_SparqlFilterPattern.js";
|
|
7
|
-
import { snippets_sparqlValueInPattern } from "./snippets_sparqlValueInPattern.js";
|
|
8
|
-
import { snippets_termSchemaSparqlPatterns } from "./snippets_termSchemaSparqlPatterns.js";
|
|
9
|
-
import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
|
|
10
|
-
export const snippets_numericSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}numericSparqlWherePatterns`, code `\
|
|
11
|
-
function $numericSparqlWherePatterns<T extends bigint | number>({ filter, valueVariable, ...otherParameters }: Parameters<${snippets_ValueSparqlWherePatternsFunction}<${snippets_NumericFilter}<T>, ${snippets_NumericSchema}<T>>>[0]): ReturnType<${snippets_ValueSparqlWherePatternsFunction}<${snippets_NumericFilter}<T>, ${snippets_NumericSchema}<T>>> {
|
|
12
|
-
const filterPatterns: ${snippets_SparqlFilterPattern}[] = [];
|
|
2
|
+
export const snippets_numericSparqlWherePatterns = ({ snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}numericSparqlWherePatterns`, code `\
|
|
3
|
+
function $numericSparqlWherePatterns<T extends bigint | number>({ filter, valueVariable, ...otherParameters }: Parameters<${snippets.ValueSparqlWherePatternsFunction}<${snippets.NumericFilter}<T>, ${snippets.NumericSchema}<T>>>[0]): ReturnType<${snippets.ValueSparqlWherePatternsFunction}<${snippets.NumericFilter}<T>, ${snippets.NumericSchema}<T>>> {
|
|
4
|
+
const filterPatterns: ${snippets.SparqlFilterPattern}[] = [];
|
|
13
5
|
|
|
14
6
|
if (filter) {
|
|
15
7
|
if (filter.in !== undefined && filter.in.length > 0) {
|
|
16
|
-
filterPatterns.push(${
|
|
8
|
+
filterPatterns.push(${snippets.sparqlValueInPattern}({ lift: true, valueVariable, valueIn: filter.in }));
|
|
17
9
|
}
|
|
18
10
|
|
|
19
11
|
if (filter.maxExclusive !== undefined) {
|
|
@@ -21,7 +13,7 @@ function $numericSparqlWherePatterns<T extends bigint | number>({ filter, valueV
|
|
|
21
13
|
expression: {
|
|
22
14
|
type: "operation",
|
|
23
15
|
operator: "<",
|
|
24
|
-
args: [valueVariable, ${
|
|
16
|
+
args: [valueVariable, ${snippets.literalFactory}.primitive(filter.maxExclusive)],
|
|
25
17
|
},
|
|
26
18
|
lift: true,
|
|
27
19
|
type: "filter",
|
|
@@ -33,7 +25,7 @@ function $numericSparqlWherePatterns<T extends bigint | number>({ filter, valueV
|
|
|
33
25
|
expression: {
|
|
34
26
|
type: "operation",
|
|
35
27
|
operator: "<=",
|
|
36
|
-
args: [valueVariable, ${
|
|
28
|
+
args: [valueVariable, ${snippets.literalFactory}.primitive(filter.maxInclusive)],
|
|
37
29
|
},
|
|
38
30
|
lift: true,
|
|
39
31
|
type: "filter",
|
|
@@ -45,7 +37,7 @@ function $numericSparqlWherePatterns<T extends bigint | number>({ filter, valueV
|
|
|
45
37
|
expression: {
|
|
46
38
|
type: "operation",
|
|
47
39
|
operator: ">",
|
|
48
|
-
args: [valueVariable, ${
|
|
40
|
+
args: [valueVariable, ${snippets.literalFactory}.primitive(filter.minExclusive)],
|
|
49
41
|
},
|
|
50
42
|
lift: true,
|
|
51
43
|
type: "filter",
|
|
@@ -57,7 +49,7 @@ function $numericSparqlWherePatterns<T extends bigint | number>({ filter, valueV
|
|
|
57
49
|
expression: {
|
|
58
50
|
type: "operation",
|
|
59
51
|
operator: ">=",
|
|
60
|
-
args: [valueVariable, ${
|
|
52
|
+
args: [valueVariable, ${snippets.literalFactory}.primitive(filter.minInclusive)],
|
|
61
53
|
},
|
|
62
54
|
lift: true,
|
|
63
55
|
type: "filter",
|
|
@@ -65,6 +57,6 @@ function $numericSparqlWherePatterns<T extends bigint | number>({ filter, valueV
|
|
|
65
57
|
}
|
|
66
58
|
}
|
|
67
59
|
|
|
68
|
-
return ${
|
|
60
|
+
return ${snippets.termSchemaSparqlPatterns}({ ...otherParameters, filterPatterns, valueVariable });
|
|
69
61
|
}`);
|
|
70
62
|
//# sourceMappingURL=snippets_numericSparqlWherePatterns.js.map
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_parseBlankNode: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_parseBlankNode.d.ts.map
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { imports } from "../imports.js";
|
|
2
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
4
|
-
|
|
5
|
-
export const snippets_parseBlankNode = conditionalOutput(`${syntheticNamePrefix}parseBlankNode`, code `\
|
|
2
|
+
export const snippets_parseBlankNode = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}parseBlankNode`, code `\
|
|
6
3
|
export function ${syntheticNamePrefix}parseBlankNode(identifier: string): ${imports.Either}<Error, ${imports.BlankNode}> {
|
|
7
4
|
return \
|
|
8
|
-
${
|
|
5
|
+
${snippets.parseIdentifier}(identifier)\
|
|
9
6
|
.chain((identifier) => (identifier.termType === "BlankNode") ? ${imports.Right}(identifier) : ${imports.Left}(new Error("expected identifier to be BlankNode"))) \
|
|
10
7
|
as ${imports.Either}<Error, ${imports.BlankNode}>;
|
|
11
8
|
}`);
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_parseIdentifier: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_parseIdentifier.d.ts.map
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { imports } from "../imports.js";
|
|
2
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
4
|
-
export const snippets_parseIdentifier = conditionalOutput(`${syntheticNamePrefix}parseIdentifier`, code `\
|
|
2
|
+
export const snippets_parseIdentifier = ({ imports, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}parseIdentifier`, code `\
|
|
5
3
|
const ${syntheticNamePrefix}parseIdentifier = ${imports.NTriplesIdentifier}.parser(${imports.dataFactory});`);
|
|
6
4
|
//# sourceMappingURL=snippets_parseIdentifier.js.map
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { imports } from "../imports.js";
|
|
2
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
4
|
-
|
|
5
|
-
export const snippets_parseIri = conditionalOutput(`${syntheticNamePrefix}parseIri`, code `\
|
|
2
|
+
export const snippets_parseIri = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}parseIri`, code `\
|
|
6
3
|
export function ${syntheticNamePrefix}parseIri(identifier: string): ${imports.Either}<Error, ${imports.NamedNode}> {
|
|
7
4
|
return \
|
|
8
|
-
${
|
|
5
|
+
${snippets.parseIdentifier}(identifier)\
|
|
9
6
|
.chain((identifier) => (identifier.termType === "NamedNode") ? ${imports.Right}(identifier) : ${imports.Left}(new Error("expected identifier to be NamedNode"))) \
|
|
10
7
|
as ${imports.Either}<Error, ${imports.NamedNode}>;
|
|
11
8
|
}`);
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_setSparqlConstructTriples: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_setSparqlConstructTriples.d.ts.map
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { snippets_ValueSparqlConstructTriplesFunction } from "./snippets_ValueSparqlConstructTriplesFunction.js";
|
|
6
|
-
export const snippets_setSparqlConstructTriples = conditionalOutput(`${syntheticNamePrefix}setSparqlConstructTriples`, code `\
|
|
7
|
-
function ${syntheticNamePrefix}setSparqlConstructTriples<ItemFilterT, ItemSchemaT>(itemSparqlConstructTriplesFunction: ${snippets_ValueSparqlConstructTriplesFunction}<ItemFilterT, ItemSchemaT>): ${snippets_ValueSparqlConstructTriplesFunction}<${snippets_CollectionFilter}<ItemFilterT>, ${snippets_CollectionSchema}<ItemSchemaT>> {
|
|
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>> {
|
|
8
4
|
return ({ schema, ...otherParameters }) => itemSparqlConstructTriplesFunction({ ...otherParameters, schema: schema.item() });
|
|
9
5
|
}`);
|
|
10
6
|
//# sourceMappingURL=snippets_setSparqlConstructTriples.js.map
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_setSparqlWherePatterns: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_setSparqlWherePatterns.d.ts.map
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { snippets_liftSparqlPatterns } from "./snippets_liftSparqlPatterns.js";
|
|
6
|
-
import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
|
|
7
|
-
export const snippets_setSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}setSparqlWherePatterns`, code `\
|
|
8
|
-
function ${syntheticNamePrefix}setSparqlWherePatterns<ItemFilterT, ItemSchemaT>(itemSparqlWherePatternsFunction: ${snippets_ValueSparqlWherePatternsFunction}<ItemFilterT, ItemSchemaT>): ${snippets_ValueSparqlWherePatternsFunction}<${snippets_CollectionFilter}<ItemFilterT>, ${snippets_CollectionSchema}<ItemSchemaT>> {
|
|
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>> {
|
|
9
4
|
return ({ filter, schema, ...otherParameters }) => {
|
|
10
5
|
const itemSparqlWherePatterns = itemSparqlWherePatternsFunction({ ...otherParameters, filter, schema: schema.item() });
|
|
11
6
|
|
|
@@ -15,7 +10,7 @@ function ${syntheticNamePrefix}setSparqlWherePatterns<ItemFilterT, ItemSchemaT>(
|
|
|
15
10
|
return itemSparqlWherePatterns;
|
|
16
11
|
}
|
|
17
12
|
|
|
18
|
-
const [optionalSparqlWherePatterns, liftSparqlPatterns] = ${
|
|
13
|
+
const [optionalSparqlWherePatterns, liftSparqlPatterns] = ${snippets.liftSparqlPatterns}(itemSparqlWherePatterns);
|
|
19
14
|
return [{ patterns: optionalSparqlWherePatterns.concat(), type: "optional" }, ...liftSparqlPatterns];
|
|
20
15
|
}
|
|
21
16
|
}`);
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_shaclPropertyFromRdf: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_shaclPropertyFromRdf.d.ts.map
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { imports } from "../imports.js";
|
|
2
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
4
|
-
|
|
5
|
-
export const snippets_shaclPropertyFromRdf = conditionalOutput(`${syntheticNamePrefix}shaclPropertyFromRdf`, code `\
|
|
2
|
+
export const snippets_shaclPropertyFromRdf = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}shaclPropertyFromRdf`, code `\
|
|
6
3
|
function ${syntheticNamePrefix}shaclPropertyFromRdf<T>({ graph, propertySchema, resource, typeFromRdf }: {
|
|
7
4
|
graph?: Exclude<${imports.Quad_Graph}, ${imports.Variable}>;
|
|
8
|
-
propertySchema: ${
|
|
5
|
+
propertySchema: ${snippets.ShaclPropertySchema};
|
|
9
6
|
resource: ${imports.Resource};
|
|
10
7
|
typeFromRdf: (resourceValues: ${imports.Either}<Error, ${imports.Resource}.Values>) => ${imports.Either}<Error, ${imports.Resource}.Values<T>>;
|
|
11
8
|
}): ${imports.Either}<Error, T> {
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_shaclPropertySparqlConstructTriples: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_shaclPropertySparqlConstructTriples.d.ts.map
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import { imports } from "../imports.js";
|
|
2
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
4
|
-
|
|
5
|
-
import { snippets_ShaclPropertySchema } from "./snippets_ShaclPropertySchema.js";
|
|
6
|
-
import { snippets_ValueSparqlConstructTriplesFunction } from "./snippets_ValueSparqlConstructTriplesFunction.js";
|
|
7
|
-
export const snippets_shaclPropertySparqlConstructTriples = conditionalOutput(`${syntheticNamePrefix}shaclPropertySparqlConstructTriples`, code `\
|
|
2
|
+
export const snippets_shaclPropertySparqlConstructTriples = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}shaclPropertySparqlConstructTriples`, code `\
|
|
8
3
|
function ${syntheticNamePrefix}shaclPropertySparqlConstructTriples<FilterT, TypeSchemaT>({ filter, focusIdentifier, ignoreRdfType, propertyName, propertySchema, typeSparqlConstructTriples, variablePrefix }: {
|
|
9
4
|
filter: FilterT | undefined;
|
|
10
5
|
focusIdentifier: ${imports.NamedNode} | ${imports.Variable},
|
|
11
6
|
ignoreRdfType: boolean;
|
|
12
|
-
propertySchema: ${
|
|
7
|
+
propertySchema: ${snippets.ShaclPropertySchema}<TypeSchemaT>;
|
|
13
8
|
propertyName: string;
|
|
14
|
-
typeSparqlConstructTriples: ${
|
|
9
|
+
typeSparqlConstructTriples: ${snippets.ValueSparqlConstructTriplesFunction}<FilterT, TypeSchemaT>;
|
|
15
10
|
variablePrefix: string;
|
|
16
11
|
}): readonly ${imports.sparqljs}.Triple[] {
|
|
17
12
|
const propertyPathSparqlConstructTriples = ({ end, propertyPath, start, variableCounter }: {
|
|
18
13
|
variableCounter: { value: number };
|
|
19
14
|
end: ${imports.Literal} | ${imports.NamedNode} | ${imports.Variable};
|
|
20
|
-
propertyPath: ${
|
|
15
|
+
propertyPath: ${snippets.PropertyPath};
|
|
21
16
|
start: ${imports.NamedNode} | ${imports.Variable};
|
|
22
17
|
}): readonly ${imports.sparqljs}.Triple[] => {
|
|
23
18
|
switch (propertyPath.termType) {
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_shaclPropertySparqlWherePatterns: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_shaclPropertySparqlWherePatterns.d.ts.map
|
|
@@ -1,28 +1,21 @@
|
|
|
1
|
-
import { imports } from "../imports.js";
|
|
2
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
4
|
-
|
|
5
|
-
import { snippets_ShaclPropertySchema } from "./snippets_ShaclPropertySchema.js";
|
|
6
|
-
import { snippets_SparqlPattern } from "./snippets_SparqlPattern.js";
|
|
7
|
-
import { snippets_sparqlPropertyPath } from "./snippets_sparqlPropertyPath.js";
|
|
8
|
-
import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
|
|
9
|
-
export const snippets_shaclPropertySparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}shaclPropertySparqlWherePatterns`, code `\
|
|
2
|
+
export const snippets_shaclPropertySparqlWherePatterns = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}shaclPropertySparqlWherePatterns`, code `\
|
|
10
3
|
function ${syntheticNamePrefix}shaclPropertySparqlWherePatterns<FilterT, TypeSchemaT>({ filter, focusIdentifier, ignoreRdfType, preferredLanguages, propertyName, propertySchema, typeSparqlWherePatterns, variablePrefix }: {
|
|
11
4
|
filter: FilterT | undefined;
|
|
12
5
|
focusIdentifier: ${imports.NamedNode} | ${imports.Variable},
|
|
13
6
|
ignoreRdfType: boolean;
|
|
14
7
|
preferredLanguages: readonly string[] | undefined;
|
|
15
|
-
propertySchema: ${
|
|
8
|
+
propertySchema: ${snippets.ShaclPropertySchema}<TypeSchemaT>;
|
|
16
9
|
propertyName: string;
|
|
17
|
-
typeSparqlWherePatterns: ${
|
|
10
|
+
typeSparqlWherePatterns: ${snippets.ValueSparqlWherePatternsFunction}<FilterT, TypeSchemaT>;
|
|
18
11
|
variablePrefix: string;
|
|
19
|
-
}): readonly ${
|
|
12
|
+
}): readonly ${snippets.SparqlPattern}[] {
|
|
20
13
|
const propertyPathSparqlWherePatterns = ({ end, propertyPath, start, variableCounter }: {
|
|
21
14
|
end: ${imports.Literal} | ${imports.NamedNode} | ${imports.Variable};
|
|
22
|
-
propertyPath: ${
|
|
15
|
+
propertyPath: ${snippets.PropertyPath};
|
|
23
16
|
start: ${imports.NamedNode} | ${imports.Variable};
|
|
24
17
|
variableCounter: { value: number };
|
|
25
|
-
}): ${
|
|
18
|
+
}): ${snippets.SparqlPattern}[] => {
|
|
26
19
|
switch (propertyPath.termType) {
|
|
27
20
|
case "AlternativePath": {
|
|
28
21
|
return [{
|
|
@@ -40,7 +33,7 @@ function ${syntheticNamePrefix}shaclPropertySparqlWherePatterns<FilterT, TypeSch
|
|
|
40
33
|
case "ZeroOrMorePath":
|
|
41
34
|
case "ZeroOrOnePath": {
|
|
42
35
|
return [{
|
|
43
|
-
triples: [{ subject: start, predicate: ${
|
|
36
|
+
triples: [{ subject: start, predicate: ${snippets.sparqlPropertyPath}(propertyPath), object: end }],
|
|
44
37
|
type: "bgp"
|
|
45
38
|
}];
|
|
46
39
|
}
|
|
@@ -54,7 +47,7 @@ function ${syntheticNamePrefix}shaclPropertySparqlWherePatterns<FilterT, TypeSch
|
|
|
54
47
|
return propertyPathSparqlWherePatterns({ end, propertyPath: propertyPath.members[0], start, variableCounter });
|
|
55
48
|
}
|
|
56
49
|
|
|
57
|
-
let patterns: ${
|
|
50
|
+
let patterns: ${snippets.SparqlPattern}[] = [];
|
|
58
51
|
let current: ${imports.NamedNode} | ${imports.Variable} = start;
|
|
59
52
|
for (let memberI = 0; memberI < propertyPath.members.length; memberI++) {
|
|
60
53
|
const next: ${imports.NamedNode} | ${imports.Literal} | ${imports.Variable} = memberI === propertyPath.members.length - 1
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_sortSparqlPatterns: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_sortSparqlPatterns.d.ts.map
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const valuesPatterns: ${snippets_SparqlPattern}[] = [];
|
|
2
|
+
export const snippets_sortSparqlPatterns = ({ snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}sortSparqlPatterns`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}sortSparqlPatterns(patterns: readonly ${snippets.SparqlPattern}[]): readonly ${snippets.SparqlPattern}[] {
|
|
4
|
+
const filterPatterns: ${snippets.SparqlPattern}[] = [];
|
|
5
|
+
const otherPatterns: ${snippets.SparqlPattern}[] = [];
|
|
6
|
+
const valuesPatterns: ${snippets.SparqlPattern}[] = [];
|
|
9
7
|
|
|
10
8
|
for (const pattern of patterns) {
|
|
11
9
|
switch (pattern.type) {
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_sparqlInstancesOfPattern: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_sparqlInstancesOfPattern.d.ts.map
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { imports } from "../imports.js";
|
|
2
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
4
|
-
|
|
5
|
-
export const snippets_sparqlInstancesOfPattern = conditionalOutput(`${syntheticNamePrefix}sparqlInstancesOfPattern`, code `\
|
|
2
|
+
export const snippets_sparqlInstancesOfPattern = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}sparqlInstancesOfPattern`, code `\
|
|
6
3
|
/**
|
|
7
4
|
* A sparqljs.Pattern that's the equivalent of ?subject rdf:type/rdfs:subClassOf* ?rdfType .
|
|
8
5
|
*/
|
|
@@ -13,9 +10,9 @@ function ${syntheticNamePrefix}sparqlInstancesOfPattern({ rdfType, subject }: {
|
|
|
13
10
|
subject,
|
|
14
11
|
predicate: {
|
|
15
12
|
items: [
|
|
16
|
-
${
|
|
13
|
+
${snippets.RdfVocabularies}.rdf.type,
|
|
17
14
|
{
|
|
18
|
-
items: [${
|
|
15
|
+
items: [${snippets.RdfVocabularies}.rdfs.subClassOf],
|
|
19
16
|
pathType: "*",
|
|
20
17
|
type: "path",
|
|
21
18
|
},
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_sparqlPropertyPath: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_sparqlPropertyPath.d.ts.map
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { imports } from "../imports.js";
|
|
2
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
4
|
-
|
|
5
|
-
export const snippets_sparqlPropertyPath = conditionalOutput(`${syntheticNamePrefix}sparqlPropertyPath`, code `\
|
|
2
|
+
export const snippets_sparqlPropertyPath = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}sparqlPropertyPath`, code `\
|
|
6
3
|
/**
|
|
7
|
-
* Convert a ${
|
|
4
|
+
* Convert a ${snippets.PropertyPath} to a ${imports.sparqljs}.PropertyPath.
|
|
8
5
|
*/
|
|
9
|
-
function ${syntheticNamePrefix}sparqlPropertyPath(propertyPath: ${
|
|
6
|
+
function ${syntheticNamePrefix}sparqlPropertyPath(propertyPath: ${snippets.PropertyPath}): ${imports.NamedNode} | ${imports.sparqljs}.PropertyPath {
|
|
10
7
|
switch (propertyPath.termType) {
|
|
11
8
|
case "AlternativePath":
|
|
12
9
|
return {
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_sparqlValueInPattern: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_sparqlValueInPattern.d.ts.map
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { imports } from "../imports.js";
|
|
2
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export const snippets_sparqlValueInPattern = conditionalOutput(`${syntheticNamePrefix}sparqlValueInPattern`, code `\
|
|
7
|
-
function ${syntheticNamePrefix}sparqlValueInPattern({ lift, valueIn, valueVariable }: { lift?: boolean, valueIn: readonly (bigint | boolean | Date | number | string | ${imports.Literal} | ${imports.NamedNode})[], valueVariable: ${imports.Variable}}): ${snippets_SparqlFilterPattern} {
|
|
2
|
+
export const snippets_sparqlValueInPattern = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}sparqlValueInPattern`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}sparqlValueInPattern({ lift, valueIn, valueVariable }: { lift?: boolean, valueIn: readonly (bigint | boolean | Date | number | string | ${imports.Literal} | ${imports.NamedNode})[], valueVariable: ${imports.Variable}}): ${snippets.SparqlFilterPattern} {
|
|
8
4
|
if (valueIn.length === 0) {
|
|
9
5
|
throw new RangeError("expected valueIn not to be empty");
|
|
10
6
|
}
|
|
@@ -13,7 +9,7 @@ function ${syntheticNamePrefix}sparqlValueInPattern({ lift, valueIn, valueVariab
|
|
|
13
9
|
expression: {
|
|
14
10
|
args: [valueVariable, valueIn.map(inValue => {
|
|
15
11
|
if (typeof inValue !== "object" || inValue instanceof Date) {
|
|
16
|
-
return ${
|
|
12
|
+
return ${snippets.literalFactory}.primitive(inValue);
|
|
17
13
|
}
|
|
18
14
|
return inValue;
|
|
19
15
|
})],
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_strictEquals: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_strictEquals.d.ts.map
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
|
|
4
|
-
export const snippets_strictEquals = conditionalOutput(`${syntheticNamePrefix}strictEquals`, code `\
|
|
2
|
+
export const snippets_strictEquals = ({ snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}strictEquals`, code `\
|
|
5
3
|
/**
|
|
6
|
-
* Compare two values for strict equality (===), returning an ${
|
|
4
|
+
* Compare two values for strict equality (===), returning an ${snippets.EqualsResult} rather than a boolean.
|
|
7
5
|
*/
|
|
8
6
|
function ${syntheticNamePrefix}strictEquals<T extends bigint | boolean | number | string>(
|
|
9
7
|
left: T,
|
|
10
8
|
right: T,
|
|
11
|
-
): ${
|
|
12
|
-
return ${
|
|
9
|
+
): ${snippets.EqualsResult} {
|
|
10
|
+
return ${snippets.EqualsResult}.fromBooleanEqualsResult(left, right, left === right);
|
|
13
11
|
}`);
|
|
14
12
|
//# sourceMappingURL=snippets_strictEquals.js.map
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_stringSparqlWherePatterns: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_stringSparqlWherePatterns.d.ts.map
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
2
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { snippets_SparqlFilterPattern } from "./snippets_SparqlFilterPattern.js";
|
|
6
|
-
import { snippets_StringFilter } from "./snippets_StringFilter.js";
|
|
7
|
-
import { snippets_StringSchema } from "./snippets_StringSchema.js";
|
|
8
|
-
import { snippets_sparqlValueInPattern } from "./snippets_sparqlValueInPattern.js";
|
|
9
|
-
import { snippets_ValueSparqlWherePatternsFunction } from "./snippets_ValueSparqlWherePatternsFunction.js";
|
|
10
|
-
export const snippets_stringSparqlWherePatterns = conditionalOutput(`${syntheticNamePrefix}stringSparqlWherePatterns`, code `\
|
|
11
|
-
const ${syntheticNamePrefix}stringSparqlWherePatterns: ${snippets_ValueSparqlWherePatternsFunction}<${snippets_StringFilter}, ${snippets_StringSchema}> =
|
|
2
|
+
export const snippets_stringSparqlWherePatterns = ({ snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}stringSparqlWherePatterns`, code `\
|
|
3
|
+
const ${syntheticNamePrefix}stringSparqlWherePatterns: ${snippets.ValueSparqlWherePatternsFunction}<${snippets.StringFilter}, ${snippets.StringSchema}> =
|
|
12
4
|
({ filter, valueVariable, ...otherParameters }) => {
|
|
13
|
-
const filterPatterns: ${
|
|
5
|
+
const filterPatterns: ${snippets.SparqlFilterPattern}[] = [];
|
|
14
6
|
|
|
15
7
|
if (filter) {
|
|
16
8
|
if (filter.in !== undefined && filter.in.length > 0) {
|
|
17
|
-
filterPatterns.push(${
|
|
9
|
+
filterPatterns.push(${snippets.sparqlValueInPattern}({ lift: true, valueVariable, valueIn: filter.in }));
|
|
18
10
|
}
|
|
19
11
|
|
|
20
12
|
if (filter.maxLength !== undefined) {
|
|
@@ -22,7 +14,7 @@ const ${syntheticNamePrefix}stringSparqlWherePatterns: ${snippets_ValueSparqlWhe
|
|
|
22
14
|
expression: {
|
|
23
15
|
type: "operation",
|
|
24
16
|
operator: "<=",
|
|
25
|
-
args: [{ args: [valueVariable], operator: "strlen", type: "operation" }, ${
|
|
17
|
+
args: [{ args: [valueVariable], operator: "strlen", type: "operation" }, ${snippets.literalFactory}.number(filter.maxLength)],
|
|
26
18
|
},
|
|
27
19
|
lift: true,
|
|
28
20
|
type: "filter",
|
|
@@ -34,7 +26,7 @@ const ${syntheticNamePrefix}stringSparqlWherePatterns: ${snippets_ValueSparqlWhe
|
|
|
34
26
|
expression: {
|
|
35
27
|
type: "operation",
|
|
36
28
|
operator: ">=",
|
|
37
|
-
args: [{ args: [valueVariable], operator: "strlen", type: "operation" }, ${
|
|
29
|
+
args: [{ args: [valueVariable], operator: "strlen", type: "operation" }, ${snippets.literalFactory}.number(filter.minLength)],
|
|
38
30
|
},
|
|
39
31
|
lift: true,
|
|
40
32
|
type: "filter",
|
|
@@ -42,6 +34,6 @@ const ${syntheticNamePrefix}stringSparqlWherePatterns: ${snippets_ValueSparqlWhe
|
|
|
42
34
|
}
|
|
43
35
|
}
|
|
44
36
|
|
|
45
|
-
return ${
|
|
37
|
+
return ${snippets.literalSchemaSparqlPatterns}({ ...otherParameters, filterPatterns, valueVariable });
|
|
46
38
|
}`);
|
|
47
39
|
//# sourceMappingURL=snippets_stringSparqlWherePatterns.js.map
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_termFilterSparqlPatterns: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_termFilterSparqlPatterns.d.ts.map
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { imports } from "../imports.js";
|
|
2
|
-
import { syntheticNamePrefix } from "../syntheticNamePrefix.js";
|
|
3
1
|
import { code, conditionalOutput } from "../ts-poet-wrapper.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { snippets_TermFilter } from "./snippets_TermFilter.js";
|
|
7
|
-
export const snippets_termFilterSparqlPatterns = conditionalOutput(`${syntheticNamePrefix}termFilterSparqlPatterns`, code `\
|
|
8
|
-
function ${syntheticNamePrefix}termFilterSparqlPatterns({ filter, valueVariable }: { filter?: ${snippets_TermFilter}; valueVariable: ${imports.Variable} }): readonly ${snippets_SparqlFilterPattern}[] {
|
|
2
|
+
export const snippets_termFilterSparqlPatterns = ({ imports, snippets, syntheticNamePrefix, }) => conditionalOutput(`${syntheticNamePrefix}termFilterSparqlPatterns`, code `\
|
|
3
|
+
function ${syntheticNamePrefix}termFilterSparqlPatterns({ filter, valueVariable }: { filter?: ${snippets.TermFilter}; valueVariable: ${imports.Variable} }): readonly ${snippets.SparqlFilterPattern}[] {
|
|
9
4
|
if (!filter) {
|
|
10
5
|
return [];
|
|
11
6
|
}
|
|
12
7
|
|
|
13
|
-
const filterPatterns: ${
|
|
8
|
+
const filterPatterns: ${snippets.SparqlFilterPattern}[] = [];
|
|
14
9
|
|
|
15
10
|
if (
|
|
16
11
|
filter.datatypeIn !== undefined &&
|
|
@@ -31,7 +26,7 @@ function ${syntheticNamePrefix}termFilterSparqlPatterns({ filter, valueVariable
|
|
|
31
26
|
}
|
|
32
27
|
|
|
33
28
|
if (filter.in !== undefined && filter.in.length > 0) {
|
|
34
|
-
filterPatterns.push(${
|
|
29
|
+
filterPatterns.push(${snippets.sparqlValueInPattern}({ lift: true, valueVariable, valueIn: filter.in }));
|
|
35
30
|
}
|
|
36
31
|
|
|
37
32
|
if (
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { SnippetFactory } from "../SnippetFactory.js";
|
|
2
|
+
export declare const snippets_termSchemaSparqlPatterns: SnippetFactory;
|
|
2
3
|
//# sourceMappingURL=snippets_termSchemaSparqlPatterns.d.ts.map
|