@shaclmate/compiler 4.0.41 → 4.0.42
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.d.ts +1 -0
- package/dist/ShapesGraphToAstTransformer.js +10 -45
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstStructTypeField.d.ts +17 -0
- package/dist/_ShapesGraphToAstTransformer/{transformPropertyShapeToAstObjectTypeProperty.js → transformPropertyShapeToAstStructTypeField.js} +71 -48
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.js +29 -20
- package/dist/_ShapesGraphToAstTransformer/{transformShapeToAstObjectType.d.ts → transformShapeToAstStructType.d.ts} +2 -2
- package/dist/_ShapesGraphToAstTransformer/{transformShapeToAstObjectType.js → transformShapeToAstStructType.js} +35 -29
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.js +2 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.js +3 -3
- package/dist/ast/AbstractCompoundType.d.ts +2 -2
- package/dist/ast/AbstractCompoundType.js +4 -4
- package/dist/ast/AbstractContainerType.d.ts +2 -2
- package/dist/ast/AbstractContainerType.js +4 -4
- package/dist/ast/{AbstractLazyObjectType.d.ts → AbstractLazyType.d.ts} +10 -10
- package/dist/ast/{AbstractLazyObjectType.js → AbstractLazyType.js} +3 -3
- package/dist/ast/AbstractType.d.ts +1 -1
- package/dist/ast/AbstractType.js +3 -0
- package/dist/ast/Ast.d.ts +2 -4
- package/dist/ast/DefaultValueType.js +2 -1
- package/dist/ast/IntersectionType.d.ts +2 -2
- package/dist/ast/IntersectionType.js +3 -3
- 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 +2 -2
- package/dist/ast/ListType.js +4 -4
- package/dist/ast/OptionType.js +2 -1
- package/dist/ast/SetType.js +2 -1
- package/dist/ast/StructCompoundType.d.ts +12 -0
- package/dist/ast/{ObjectCompoundType.js → StructCompoundType.js} +18 -18
- package/dist/ast/StructIntersectionType.d.ts +4 -0
- package/dist/ast/StructIntersectionType.js +2 -0
- package/dist/ast/{ObjectType.d.ts → StructType.d.ts} +28 -27
- package/dist/ast/{ObjectType.js → StructType.js} +81 -78
- package/dist/ast/StructUnionType.d.ts +4 -0
- package/dist/ast/StructUnionType.js +2 -0
- package/dist/ast/Type.d.ts +5 -5
- package/dist/ast/Type.js +4 -4
- package/dist/ast/UnionType.d.ts +2 -2
- package/dist/ast/UnionType.js +3 -3
- package/dist/ast/index.d.ts +7 -7
- package/dist/ast/index.js +7 -7
- package/dist/generators/AstJsonGenerator.js +2 -2
- package/dist/generators/transformAstToLabeledPropertyGraph.js +8 -8
- package/dist/generators/ts/AbstractContainerType.d.ts +1 -1
- package/dist/generators/ts/AbstractContainerType.js +6 -6
- package/dist/generators/ts/AbstractDateType.d.ts +1 -7
- package/dist/generators/ts/AbstractDateType.js +1 -11
- package/dist/generators/ts/{AbstractLazyObjectType.d.ts → AbstractLazyType.d.ts} +7 -7
- package/dist/generators/ts/{AbstractLazyObjectType.js → AbstractLazyType.js} +19 -17
- package/dist/generators/ts/AbstractLiteralType.d.ts +2 -5
- package/dist/generators/ts/AbstractLiteralType.js +0 -21
- package/dist/generators/ts/AbstractNumericType.d.ts +1 -7
- package/dist/generators/ts/AbstractNumericType.js +15 -25
- package/dist/generators/ts/AbstractObjectSetType.d.ts +1 -1
- package/dist/generators/ts/AbstractObjectSetType.js +2 -2
- package/dist/generators/ts/AbstractPrimitiveType.d.ts +1 -1
- package/dist/generators/ts/AbstractPrimitiveType.js +1 -1
- package/dist/generators/ts/AbstractTermType.d.ts +6 -21
- package/dist/generators/ts/AbstractTermType.js +26 -55
- package/dist/generators/ts/AbstractType.d.ts +40 -47
- package/dist/generators/ts/AbstractType.js +17 -6
- package/dist/generators/ts/BigDecimalType.d.ts +3 -3
- package/dist/generators/ts/BigDecimalType.js +3 -8
- package/dist/generators/ts/BigIntType.d.ts +2 -2
- package/dist/generators/ts/BigIntType.js +7 -4
- package/dist/generators/ts/BlankNodeType.d.ts +2 -7
- package/dist/generators/ts/BlankNodeType.js +2 -7
- package/dist/generators/ts/BooleanType.d.ts +3 -3
- package/dist/generators/ts/BooleanType.js +12 -14
- package/dist/generators/ts/DateTimeType.d.ts +2 -2
- package/dist/generators/ts/DateTimeType.js +14 -4
- package/dist/generators/ts/DateType.d.ts +2 -2
- package/dist/generators/ts/DateType.js +14 -4
- package/dist/generators/ts/DefaultValueType.d.ts +8 -8
- package/dist/generators/ts/DefaultValueType.js +10 -12
- package/dist/generators/ts/FloatType.d.ts +2 -2
- package/dist/generators/ts/FloatType.js +7 -4
- package/dist/generators/ts/IdentifierType.d.ts +2 -2
- package/dist/generators/ts/IdentifierType.js +2 -7
- package/dist/generators/ts/IntType.d.ts +2 -2
- package/dist/generators/ts/IntType.js +7 -4
- package/dist/generators/ts/IriType.d.ts +2 -2
- package/dist/generators/ts/IriType.js +12 -14
- package/dist/generators/ts/{LazyObjectOptionType.d.ts → LazyOptionType.d.ts} +12 -11
- package/dist/generators/ts/{LazyObjectOptionType.js → LazyOptionType.js} +23 -14
- package/dist/generators/ts/LazySetType.d.ts +20 -0
- package/dist/generators/ts/{LazyObjectSetType.js → LazySetType.js} +22 -13
- package/dist/generators/ts/LazyType.d.ts +19 -0
- package/dist/generators/ts/{LazyObjectType.js → LazyType.js} +22 -13
- package/dist/generators/ts/ListType.d.ts +1 -1
- package/dist/generators/ts/ListType.js +9 -19
- package/dist/generators/ts/LiteralType.d.ts +3 -2
- package/dist/generators/ts/LiteralType.js +6 -2
- package/dist/generators/ts/ObjectType.d.ts +16 -3
- package/dist/generators/ts/ObjectType.js +301 -91
- package/dist/generators/ts/ObjectUnionType.js +40 -40
- package/dist/generators/ts/OptionType.d.ts +2 -2
- package/dist/generators/ts/OptionType.js +7 -5
- package/dist/generators/ts/SetType.d.ts +3 -3
- package/dist/generators/ts/SetType.js +8 -10
- package/dist/generators/ts/Snippets.d.ts +26 -8
- package/dist/generators/ts/Snippets.js +161 -35
- package/dist/generators/ts/StringType.d.ts +4 -3
- package/dist/generators/ts/StringType.js +18 -11
- package/dist/generators/ts/TermType.d.ts +7 -5
- package/dist/generators/ts/TermType.js +28 -9
- package/dist/generators/ts/TsGenerator.js +11 -6
- package/dist/generators/ts/Type.d.ts +4 -4
- package/dist/generators/ts/TypeFactory.d.ts +5 -5
- package/dist/generators/ts/TypeFactory.js +79 -58
- package/dist/generators/ts/UnionType.d.ts +23 -18
- package/dist/generators/ts/UnionType.js +227 -221
- package/dist/generators/ts/ZodGenerator.js +15 -7
- package/dist/generators/ts/_ObjectType/AbstractProperty.d.ts +24 -15
- package/dist/generators/ts/_ObjectType/AbstractProperty.js +1 -24
- package/dist/generators/ts/_ObjectType/DiscriminantProperty.d.ts +8 -6
- package/dist/generators/ts/_ObjectType/DiscriminantProperty.js +11 -24
- package/dist/generators/ts/_ObjectType/IdentifierProperty.d.ts +8 -2
- package/dist/generators/ts/_ObjectType/IdentifierProperty.js +44 -16
- 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_equalsFunctionDeclaration.js → ObjectType_equalsFunctionExpression.js} +6 -10
- 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_filterTypeDeclaration.js → ObjectType_filterTypeExpression.js} +6 -8
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlConstructTriplesFunctionDeclaration.d.ts → ObjectType_focusSparqlConstructTriplesFunctionExpression.d.ts} +2 -3
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlConstructTriplesFunctionDeclaration.js → ObjectType_focusSparqlConstructTriplesFunctionExpression.js} +5 -9
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlWherePatternsFunctionDeclaration.d.ts → ObjectType_focusSparqlWherePatternsFunctionExpression.d.ts} +2 -3
- package/dist/generators/ts/_ObjectType/{ObjectType_focusSparqlWherePatternsFunctionDeclaration.js → ObjectType_focusSparqlWherePatternsFunctionExpression.js} +5 -9
- 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_fromRdfResourceFunctionDeclaration.js → ObjectType_fromRdfResourceFunctionExpression.js} +8 -16
- package/dist/generators/ts/_ObjectType/ObjectType_graphqlTypeExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_graphqlTypeVariableStatement.js → ObjectType_graphqlTypeExpression.js} +6 -13
- 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/{identifierTypeDeclarations.js → ObjectType_identifierTypeDeclarations.js} +2 -5
- package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.js +3 -3
- package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.d.ts +1 -2
- package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.js +2 -6
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_jsonSchemaFunctionDeclaration.js → ObjectType_jsonSchemaExpression.js} +3 -10
- 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 +1 -1
- package/dist/generators/ts/_ObjectType/ObjectType_objectSetMethodNames.js +2 -2
- package/dist/generators/ts/_ObjectType/ObjectType_schemaExpression.d.ts +4 -0
- package/dist/generators/ts/_ObjectType/ObjectType_schemaExpression.js +18 -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 +2 -3
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js +5 -9
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts +2 -3
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.js +4 -8
- 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_toRdfResourceFunctionDeclaration.js → ObjectType_toRdfResourceFunctionExpression.js} +6 -12
- 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_valueSparqlConstructTriplesFunctionDeclaration.d.ts → ObjectType_valueSparqlConstructTriplesFunctionExpression.d.ts} +2 -3
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionExpression.js +8 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_valueSparqlWherePatternsFunctionDeclaration.d.ts → ObjectType_valueSparqlWherePatternsFunctionExpression.d.ts} +2 -3
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionExpression.js +10 -0
- package/dist/generators/ts/_ObjectType/ShaclProperty.d.ts +9 -2
- package/dist/generators/ts/_ObjectType/ShaclProperty.js +65 -33
- package/dist/generators/ts/_snippets/snippets_BooleanSchema.js +4 -3
- package/dist/generators/ts/_snippets/snippets_DateSchema.js +4 -3
- package/dist/generators/ts/_snippets/snippets_DefaultValueSchema.js +3 -3
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.js +6 -5
- package/dist/generators/ts/_snippets/snippets_IdentifierSchema.js +2 -1
- package/dist/generators/ts/_snippets/snippets_IriSchema.js +1 -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.js +1 -3
- package/dist/generators/ts/_snippets/snippets_LiteralSchema.js +1 -0
- package/dist/generators/ts/_snippets/snippets_NumericSchema.js +2 -1
- package/dist/generators/ts/_snippets/snippets_PropertyPath.js +6 -8
- package/dist/generators/ts/_snippets/snippets_RdfVocabularies.js +32 -32
- package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.js +1 -1
- package/dist/generators/ts/_snippets/snippets_StringSchema.js +5 -3
- package/dist/generators/ts/_snippets/snippets_TermFilter.js +3 -3
- package/dist/generators/ts/_snippets/snippets_TermSchema.js +4 -2
- 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_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_booleanFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_booleanFromRdfResourceValues.js +6 -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_dateFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_dateFromRdfResourceValues.js +6 -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_defaultValueFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueFromRdfResourceValues.js +10 -0
- package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.js +1 -1
- package/dist/generators/ts/_snippets/snippets_filterNumeric.js +1 -1
- package/dist/generators/ts/_snippets/snippets_filterTerm.js +1 -2
- 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_identifierFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_identifierFromRdfResourceValues.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_listFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_listFromRdfResourceValues.js +15 -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_maybeFromRdfResourceValues.d.ts +3 -0
- package/dist/generators/ts/_snippets/snippets_maybeFromRdfResourceValues.js +11 -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_numericSparqlWherePatterns.js +1 -1
- 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_shaclPropertyFromRdf.js +13 -7
- 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_termFilterSparqlPatterns.js +1 -1
- 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_termSparqlWherePatterns.js +2 -2
- package/dist/input/generated.d.ts +464 -389
- package/dist/input/generated.js +1748 -2294
- package/package.json +2 -2
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.d.ts +0 -9
- package/dist/ast/LazyObjectOptionType.d.ts +0 -6
- package/dist/ast/LazyObjectOptionType.js +0 -5
- package/dist/ast/LazyObjectSetType.d.ts +0 -6
- package/dist/ast/LazyObjectSetType.js +0 -5
- package/dist/ast/LazyObjectType.d.ts +0 -5
- package/dist/ast/LazyObjectType.js +0 -5
- package/dist/ast/ObjectCompoundType.d.ts +0 -12
- package/dist/ast/ObjectIntersectionType.d.ts +0 -4
- package/dist/ast/ObjectIntersectionType.js +0 -2
- package/dist/ast/ObjectUnionType.d.ts +0 -4
- package/dist/ast/ObjectUnionType.js +0 -2
- package/dist/generators/ts/LazyObjectSetType.d.ts +0 -20
- package/dist/generators/ts/LazyObjectType.d.ts +0 -19
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_createFunctionDeclaration.js +0 -44
- package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionDeclaration.js +0 -21
- package/dist/generators/ts/_ObjectType/ObjectType_filterTypeDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.js +0 -18
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.js +0 -15
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfTypeVariableStatement.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfTypeVariableStatement.js +0 -10
- package/dist/generators/ts/_ObjectType/ObjectType_graphqlTypeVariableStatement.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionDeclarations.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionDeclarations.js +0 -41
- package/dist/generators/ts/_ObjectType/ObjectType_interfaceDeclaration.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_interfaceDeclaration.js +0 -12
- package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeAliasDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeAliasDeclaration.js +0 -9
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionDeclaration.js +0 -15
- package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.js +0 -12
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionDeclaration.js +0 -20
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionDeclarations.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionDeclarations.js +0 -29
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionDeclaration.js +0 -11
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionDeclaration.js +0 -13
- package/dist/generators/ts/_ObjectType/identifierTypeDeclarations.d.ts +0 -4
- package/dist/generators/ts/_snippets/snippets_LazyObject.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_LazyObject.js +0 -22
- package/dist/generators/ts/_snippets/snippets_LazyObjectOption.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_LazyObjectOption.js +0 -25
- package/dist/generators/ts/_snippets/snippets_LazyObjectSet.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_LazyObjectSet.js +0 -40
- package/dist/generators/ts/_snippets/snippets_convertToLazyObject.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToLazyObject.js +0 -15
- package/dist/generators/ts/_snippets/snippets_convertToLazyObjectOption.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToLazyObjectOption.js +0 -31
- package/dist/generators/ts/_snippets/snippets_convertToLazyObjectSet.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_convertToLazyObjectSet.js +0 -25
- package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.js +0 -15
- package/dist/generators/ts/_snippets/snippets_fromRdfPreferredLanguages.d.ts +0 -3
- package/dist/generators/ts/_snippets/snippets_fromRdfPreferredLanguages.js +0 -23
|
@@ -16,28 +16,28 @@ import { UnionType } from "./UnionType.js";
|
|
|
16
16
|
export class ObjectUnionType extends UnionType {
|
|
17
17
|
kind = "ObjectUnion";
|
|
18
18
|
get identifierTypeAlias() {
|
|
19
|
-
return this.
|
|
19
|
+
return this.name.map((name) => code `${name}.Identifier`).unsafeCoerce();
|
|
20
20
|
}
|
|
21
21
|
get objectSetMethodNames() {
|
|
22
|
-
return this.
|
|
23
|
-
.map((
|
|
24
|
-
|
|
22
|
+
return this.name
|
|
23
|
+
.map((name) => ObjectType_objectSetMethodNames.call({
|
|
24
|
+
name,
|
|
25
25
|
configuration: this.configuration,
|
|
26
26
|
}))
|
|
27
27
|
.unsafeCoerce();
|
|
28
28
|
}
|
|
29
29
|
get schema() {
|
|
30
|
-
return this.
|
|
31
|
-
.map((
|
|
30
|
+
return this.name
|
|
31
|
+
.map((name) => code `${name}.schema`)
|
|
32
32
|
.orDefault(super.schema);
|
|
33
33
|
}
|
|
34
34
|
get schemaType() {
|
|
35
|
-
return this.
|
|
35
|
+
return this.name
|
|
36
36
|
.map(() => code `typeof ${this.schema}`)
|
|
37
37
|
.orDefault(super.schemaType);
|
|
38
38
|
}
|
|
39
39
|
get staticModuleDeclarations() {
|
|
40
|
-
const
|
|
40
|
+
const name = this.name.unsafeCoerce();
|
|
41
41
|
return {
|
|
42
42
|
...super.staticModuleDeclarations,
|
|
43
43
|
...this.identifierTypeDeclarations,
|
|
@@ -47,22 +47,22 @@ export class ObjectUnionType extends UnionType {
|
|
|
47
47
|
...this.graphqlTypeVariableStatement,
|
|
48
48
|
...this.isTypeFunctionDeclaration,
|
|
49
49
|
...this.schemaVariableStatement,
|
|
50
|
-
...
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
...(this.configuration.features.has("Object.SPARQL")
|
|
51
|
+
? {
|
|
52
|
+
...singleEntryRecord("sparqlConstructQuery", ObjectType_sparqlConstructQueryFunctionDeclaration.call({
|
|
53
|
+
name,
|
|
54
|
+
configuration: this.configuration,
|
|
55
|
+
filterType: this.filterType,
|
|
56
|
+
reusables: this.reusables,
|
|
57
|
+
})),
|
|
58
|
+
...singleEntryRecord("sparqlConstructQueryString", ObjectType_sparqlConstructQueryStringFunctionDeclaration.call({
|
|
59
|
+
name,
|
|
60
|
+
configuration: this.configuration,
|
|
61
|
+
filterType: this.filterType,
|
|
62
|
+
reusables: this.reusables,
|
|
63
|
+
})),
|
|
64
|
+
}
|
|
65
|
+
: {}),
|
|
66
66
|
...this.toRdfResourceFunctionDeclaration,
|
|
67
67
|
};
|
|
68
68
|
}
|
|
@@ -72,7 +72,7 @@ export class ObjectUnionType extends UnionType {
|
|
|
72
72
|
}
|
|
73
73
|
return singleEntryRecord(`focusSparqlConstructTriples`, code `\
|
|
74
74
|
export function focusSparqlConstructTriples({ filter, focusIdentifier, variablePrefix }: { filter: ${this.filterType} | undefined; focusIdentifier: ${this.reusables.imports.NamedNode} | ${this.reusables.imports.Variable}; ignoreRdfType: boolean; variablePrefix: string }): readonly ${this.reusables.imports.sparqljs}.Triple[] {
|
|
75
|
-
return [${joinCode(this.members.map((member) => code `...${member.type.
|
|
75
|
+
return [${joinCode(this.members.map((member) => code `...${member.type.name.unsafeCoerce()}.focusSparqlConstructTriples({ filter: filter?.on?.${member.type.name.unsafeCoerce()}, focusIdentifier, ignoreRdfType: false, variablePrefix: \`\${variablePrefix}${pascalCase(member.type.name.unsafeCoerce())}\` }).concat()`), { on: ", " })}];
|
|
76
76
|
}`);
|
|
77
77
|
}
|
|
78
78
|
get focusSparqlWherePatternsFunctionDeclaration() {
|
|
@@ -96,7 +96,7 @@ if (focusIdentifier.termType === "Variable") {
|
|
|
96
96
|
}));
|
|
97
97
|
}`,
|
|
98
98
|
code `patterns.push({ patterns: [${joinCode(this.members.map((member) => code `${{
|
|
99
|
-
patterns: code `${member.type.
|
|
99
|
+
patterns: code `${member.type.name.unsafeCoerce()}.focusSparqlWherePatterns({ filter: filter?.on?.${member.type.name.unsafeCoerce()}, focusIdentifier, ignoreRdfType: false, preferredLanguages, variablePrefix: \`\${variablePrefix}${pascalCase(member.type.name.unsafeCoerce())}\` }).concat()`,
|
|
100
100
|
type: literalOf("group"),
|
|
101
101
|
}}`), { on: ", " })}], type: "union" });`,
|
|
102
102
|
code `return patterns;`,
|
|
@@ -107,11 +107,11 @@ if (focusIdentifier.termType === "Variable") {
|
|
|
107
107
|
if (!this.configuration.features.has("Object.fromRdf")) {
|
|
108
108
|
return {};
|
|
109
109
|
}
|
|
110
|
-
const
|
|
110
|
+
const name = this.name.unsafeCoerce();
|
|
111
111
|
return singleEntryRecord(`fromRdfResource`, code `\
|
|
112
|
-
export const fromRdfResource: ${this.reusables.snippets.FromRdfResourceFunction}<${
|
|
112
|
+
export const fromRdfResource: ${this.reusables.snippets.FromRdfResourceFunction}<${name}> = (resource, options) =>
|
|
113
113
|
${this.members.reduce((expression, member) => {
|
|
114
|
-
const memberTypeExpression = code `(${member.type.
|
|
114
|
+
const memberTypeExpression = code `(${member.type.name.unsafeCoerce()}.fromRdfResource(resource, { ...options, ignoreRdfType: false }) as ${this.reusables.imports.Either}<Error, ${name}>)`;
|
|
115
115
|
return expression !== null
|
|
116
116
|
? code `${expression}.altLazy(() => ${memberTypeExpression})`
|
|
117
117
|
: memberTypeExpression;
|
|
@@ -124,12 +124,12 @@ export const fromRdfResource: ${this.reusables.snippets.FromRdfResourceFunction}
|
|
|
124
124
|
if (this.synthetic) {
|
|
125
125
|
return {};
|
|
126
126
|
}
|
|
127
|
-
const
|
|
127
|
+
const name = this.name.unsafeCoerce();
|
|
128
128
|
return singleEntryRecord(`GraphQL`, code `\
|
|
129
129
|
export const GraphQL = new ${this.reusables.imports.GraphQLUnionType}(${{
|
|
130
130
|
description: this.comment.map(JSON.stringify).extract(),
|
|
131
|
-
name:
|
|
132
|
-
resolveType: code `(value: ${
|
|
131
|
+
name: name,
|
|
132
|
+
resolveType: code `(value: ${name}) => value.${this.configuration.syntheticNamePrefix}type`,
|
|
133
133
|
types: code `[${joinCode(this.members.map((member) => member.type.graphqlType.nullableExpression), { on: ", " })}]`,
|
|
134
134
|
}});`);
|
|
135
135
|
}
|
|
@@ -148,13 +148,13 @@ export namespace Identifier {
|
|
|
148
148
|
if (!this.configuration.features.has("Object.type")) {
|
|
149
149
|
return {};
|
|
150
150
|
}
|
|
151
|
-
const
|
|
152
|
-
if (
|
|
151
|
+
const name = this.name.unsafeCoerce();
|
|
152
|
+
if (name === `${this.configuration.syntheticNamePrefix}Object`) {
|
|
153
153
|
return {};
|
|
154
154
|
}
|
|
155
|
-
return singleEntryRecord(`is${
|
|
156
|
-
export function is${
|
|
157
|
-
return ${joinCode(this.members.map((member) => code `${member.type.
|
|
155
|
+
return singleEntryRecord(`is${name}`, code `\
|
|
156
|
+
export function is${name}(object: ${this.configuration.syntheticNamePrefix}Object): object is ${name} {
|
|
157
|
+
return ${joinCode(this.members.map((member) => code `${member.type.name.unsafeCoerce()}.is${member.type.name.unsafeCoerce()}(object)`), { on: " || " })};
|
|
158
158
|
}`);
|
|
159
159
|
}
|
|
160
160
|
get schemaVariableStatement() {
|
|
@@ -199,11 +199,11 @@ export const schema = { ${joinCode(super.schemaInitializers.concat(code `propert
|
|
|
199
199
|
if (!this.configuration.features.has("Object.toRdf")) {
|
|
200
200
|
return {};
|
|
201
201
|
}
|
|
202
|
-
const
|
|
202
|
+
const name = this.name.unsafeCoerce();
|
|
203
203
|
return singleEntryRecord(`toRdfResource`, code `\
|
|
204
|
-
export const toRdfResource: ${this.reusables.snippets.ToRdfResourceFunction}<${
|
|
204
|
+
export const toRdfResource: ${this.reusables.snippets.ToRdfResourceFunction}<${name}> = (object, options) => {
|
|
205
205
|
${joinCode(this.members
|
|
206
|
-
.map((member) => code `if (${member.type.
|
|
206
|
+
.map((member) => code `if (${member.type.name.unsafeCoerce()}.is${member.type.name.unsafeCoerce()}(object)) { return ${member.type.name.unsafeCoerce()}.toRdfResource(object, options); }`)
|
|
207
207
|
.concat(code `throw new Error("unrecognized type");`))}
|
|
208
208
|
};`);
|
|
209
209
|
}
|
|
@@ -4,16 +4,17 @@ import { type Code } from "./ts-poet-wrapper.js";
|
|
|
4
4
|
export declare class OptionType<ItemTypeT extends OptionType.ItemType> extends AbstractContainerType<ItemTypeT> {
|
|
5
5
|
readonly discriminantProperty: Maybe<AbstractContainerType.DiscriminantProperty>;
|
|
6
6
|
readonly graphqlArgs: AbstractContainerType<ItemTypeT>["graphqlArgs"];
|
|
7
|
-
readonly kind = "Option";
|
|
8
7
|
readonly jsTypes: readonly [{
|
|
9
8
|
readonly instanceof: "Maybe";
|
|
10
9
|
readonly typeof: "object";
|
|
11
10
|
}];
|
|
11
|
+
readonly kind = "Option";
|
|
12
12
|
get conversionFunction(): Maybe<AbstractContainerType.ConversionFunction>;
|
|
13
13
|
get equalsFunction(): Code;
|
|
14
14
|
get expression(): Code;
|
|
15
15
|
get filterFunction(): Code;
|
|
16
16
|
get filterType(): Code;
|
|
17
|
+
get fromRdfResourceValuesFunction(): Code;
|
|
17
18
|
get graphqlType(): AbstractContainerType.GraphqlType;
|
|
18
19
|
get hashFunction(): Code;
|
|
19
20
|
get mutable(): boolean;
|
|
@@ -23,7 +24,6 @@ export declare class OptionType<ItemTypeT extends OptionType.ItemType> extends A
|
|
|
23
24
|
get valueSparqlConstructTriplesFunction(): Code;
|
|
24
25
|
get valueSparqlWherePatternsFunction(): Code;
|
|
25
26
|
fromJsonExpression({ variables, }: Parameters<AbstractContainerType<ItemTypeT>["fromJsonExpression"]>[0]): Code;
|
|
26
|
-
fromRdfResourceValuesExpression(parameters: Parameters<AbstractContainerType<ItemTypeT>["fromRdfResourceValuesExpression"]>[0]): Code;
|
|
27
27
|
graphqlResolveExpression(parameters: Parameters<AbstractContainerType<ItemTypeT>["graphqlResolveExpression"]>[0]): Code;
|
|
28
28
|
jsonSchema(parameters: Parameters<AbstractContainerType<ItemTypeT>["jsonSchema"]>[0]): Code;
|
|
29
29
|
jsonType(parameters?: Parameters<AbstractContainerType<ItemTypeT>["jsonType"]>[0]): AbstractContainerType.JsonType;
|
|
@@ -13,10 +13,10 @@ import { code } from "./ts-poet-wrapper.js";
|
|
|
13
13
|
export class OptionType extends AbstractContainerType {
|
|
14
14
|
discriminantProperty = Maybe.empty();
|
|
15
15
|
graphqlArgs = Maybe.empty();
|
|
16
|
-
kind = "Option";
|
|
17
16
|
jsTypes = [
|
|
18
17
|
{ instanceof: "Maybe", typeof: "object" },
|
|
19
18
|
];
|
|
19
|
+
kind = "Option";
|
|
20
20
|
get conversionFunction() {
|
|
21
21
|
const itemConversionFunction = this.itemType.conversionFunction.orDefault(this.itemConversionFunctionDefault);
|
|
22
22
|
return Maybe.of({
|
|
@@ -42,6 +42,9 @@ export class OptionType extends AbstractContainerType {
|
|
|
42
42
|
get filterType() {
|
|
43
43
|
return code `${this.reusables.snippets.MaybeFilter}<${this.itemType.filterType}>`;
|
|
44
44
|
}
|
|
45
|
+
get fromRdfResourceValuesFunction() {
|
|
46
|
+
return code `${this.reusables.snippets.maybeFromRdfResourceValues}<${this.itemType.expression}, ${this.itemType.schemaType}>(${this.itemType.fromRdfResourceValuesFunction})`;
|
|
47
|
+
}
|
|
45
48
|
get graphqlType() {
|
|
46
49
|
invariant(!this.itemType.graphqlType.nullable);
|
|
47
50
|
return new AbstractContainerType.GraphqlType(this.itemType.graphqlType.expression, this.reusables, {
|
|
@@ -76,10 +79,6 @@ export class OptionType extends AbstractContainerType {
|
|
|
76
79
|
});
|
|
77
80
|
return code `${expression}.map(item => (${itemFromJsonExpression}).map(${this.reusables.imports.Maybe}.of)).orDefault(${this.reusables.imports.Either}.of(${this.reusables.imports.Maybe}.empty()))`;
|
|
78
81
|
}
|
|
79
|
-
fromRdfResourceValuesExpression(parameters) {
|
|
80
|
-
const { variables } = parameters;
|
|
81
|
-
return code `${this.itemType.fromRdfResourceValuesExpression(parameters)}.map(values => values.length > 0 ? values.map(value => ${this.reusables.imports.Maybe}.of(value)) : ${this.reusables.imports.Resource}.Values.fromValue<${this.reusables.imports.Maybe}<${this.itemType.expression}>>({ focusResource: ${variables.resource}, propertyPath: ${variables.propertyPath}, value: ${this.reusables.imports.Maybe}.empty() }))`;
|
|
82
|
-
}
|
|
83
82
|
graphqlResolveExpression(parameters) {
|
|
84
83
|
return code `${this.itemType.graphqlResolveExpression(parameters)}.extractNullable()`;
|
|
85
84
|
}
|
|
@@ -128,6 +127,9 @@ __decorate([
|
|
|
128
127
|
__decorate([
|
|
129
128
|
Memoize()
|
|
130
129
|
], OptionType.prototype, "filterType", null);
|
|
130
|
+
__decorate([
|
|
131
|
+
Memoize()
|
|
132
|
+
], OptionType.prototype, "fromRdfResourceValuesFunction", null);
|
|
131
133
|
__decorate([
|
|
132
134
|
Memoize()
|
|
133
135
|
], OptionType.prototype, "graphqlType", null);
|
|
@@ -4,22 +4,22 @@ import type { AbstractContainerType } from "./AbstractContainerType.js";
|
|
|
4
4
|
import { type Code } from "./ts-poet-wrapper.js";
|
|
5
5
|
export declare class SetType<ItemTypeT extends SetType.ItemType> extends AbstractCollectionType<ItemTypeT> {
|
|
6
6
|
readonly graphqlArgs: AbstractCollectionType<ItemTypeT>["graphqlArgs"];
|
|
7
|
-
readonly kind = "Set";
|
|
8
|
-
readonly minCount: bigint;
|
|
9
7
|
readonly jsTypes: readonly [{
|
|
10
8
|
readonly instanceof: "Array";
|
|
11
9
|
readonly typeof: "object";
|
|
12
10
|
}];
|
|
11
|
+
readonly kind = "Set";
|
|
12
|
+
readonly minCount: bigint;
|
|
13
13
|
constructor({ minCount, ...superParameters }: {
|
|
14
14
|
minCount: bigint;
|
|
15
15
|
} & ConstructorParameters<typeof AbstractCollectionType<ItemTypeT>>[0]);
|
|
16
16
|
get conversionFunction(): Maybe<AbstractCollectionType.ConversionFunction>;
|
|
17
|
+
get fromRdfResourceValuesFunction(): Code;
|
|
17
18
|
get toRdfResourceValueTypes(): AbstractCollectionType<ItemTypeT>["toRdfResourceValueTypes"];
|
|
18
19
|
get valueSparqlConstructTriplesFunction(): Code;
|
|
19
20
|
get valueSparqlWherePatternsFunction(): Code;
|
|
20
21
|
protected get schemaInitializers(): readonly Code[];
|
|
21
22
|
fromJsonExpression({ variables, }: Parameters<AbstractContainerType<ItemTypeT>["fromJsonExpression"]>[0]): Code;
|
|
22
|
-
fromRdfResourceValuesExpression(parameters: Parameters<AbstractCollectionType<ItemTypeT>["fromRdfResourceValuesExpression"]>[0]): Code;
|
|
23
23
|
jsonSchema(parameters: Parameters<AbstractContainerType<ItemTypeT>["jsonSchema"]>[0]): Code;
|
|
24
24
|
jsonType(): AbstractCollectionType.JsonType;
|
|
25
25
|
toRdfResourceValuesExpression({ variables, }: Parameters<AbstractCollectionType<ItemTypeT>["toRdfResourceValuesExpression"]>[0]): Code;
|
|
@@ -11,11 +11,11 @@ import { AbstractCollectionType } from "./AbstractCollectionType.js";
|
|
|
11
11
|
import { code, joinCode, literalOf } from "./ts-poet-wrapper.js";
|
|
12
12
|
export class SetType extends AbstractCollectionType {
|
|
13
13
|
graphqlArgs = Maybe.empty();
|
|
14
|
-
kind = "Set";
|
|
15
|
-
minCount;
|
|
16
14
|
jsTypes = [
|
|
17
15
|
{ instanceof: "Array", typeof: "object" },
|
|
18
16
|
];
|
|
17
|
+
kind = "Set";
|
|
18
|
+
minCount;
|
|
19
19
|
constructor({ minCount, ...superParameters }) {
|
|
20
20
|
super(superParameters);
|
|
21
21
|
this.minCount = minCount;
|
|
@@ -54,6 +54,9 @@ export class SetType extends AbstractCollectionType {
|
|
|
54
54
|
sourceTypes,
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
+
get fromRdfResourceValuesFunction() {
|
|
58
|
+
return code `${this._mutable ? this.reusables.snippets.mutableSetFromRdfResourceValues : this.reusables.snippets.setFromRdfResourceValues}<${this.itemType.expression}, ${this.itemType.schemaType}>(${this.itemType.fromRdfResourceValuesFunction})`;
|
|
59
|
+
}
|
|
57
60
|
get toRdfResourceValueTypes() {
|
|
58
61
|
return this.itemType.toRdfResourceValueTypes;
|
|
59
62
|
}
|
|
@@ -79,14 +82,6 @@ export class SetType extends AbstractCollectionType {
|
|
|
79
82
|
variables: { value: code `item` },
|
|
80
83
|
})})))`;
|
|
81
84
|
}
|
|
82
|
-
fromRdfResourceValuesExpression(parameters) {
|
|
83
|
-
const { variables } = parameters;
|
|
84
|
-
return joinCode([
|
|
85
|
-
this.itemType.fromRdfResourceValuesExpression(parameters),
|
|
86
|
-
code `map(values => values.toArray()${this._mutable ? ".concat()" : ""})`,
|
|
87
|
-
code `map(valuesArray => ${this.reusables.imports.Resource}.Values.fromValue({ focusResource: ${variables.resource}, propertyPath: ${variables.propertyPath}, value: valuesArray }))`,
|
|
88
|
-
], { on: "." });
|
|
89
|
-
}
|
|
90
85
|
jsonSchema(parameters) {
|
|
91
86
|
let schema = code `${this.itemType.jsonSchema(parameters)}.array()`;
|
|
92
87
|
if (this.minCount > 0n) {
|
|
@@ -119,6 +114,9 @@ export class SetType extends AbstractCollectionType {
|
|
|
119
114
|
__decorate([
|
|
120
115
|
Memoize()
|
|
121
116
|
], SetType.prototype, "conversionFunction", null);
|
|
117
|
+
__decorate([
|
|
118
|
+
Memoize()
|
|
119
|
+
], SetType.prototype, "fromRdfResourceValuesFunction", null);
|
|
122
120
|
__decorate([
|
|
123
121
|
Memoize()
|
|
124
122
|
], SetType.prototype, "valueSparqlConstructTriplesFunction", null);
|
|
@@ -34,9 +34,9 @@ export declare class Snippets {
|
|
|
34
34
|
get IdentifierSet(): Snippet;
|
|
35
35
|
get IriFilter(): Snippet;
|
|
36
36
|
get IriSchema(): Snippet;
|
|
37
|
-
get
|
|
38
|
-
get
|
|
39
|
-
get
|
|
37
|
+
get Lazy(): Snippet;
|
|
38
|
+
get LazyOption(): Snippet;
|
|
39
|
+
get LazySet(): Snippet;
|
|
40
40
|
get LiteralFilter(): Snippet;
|
|
41
41
|
get LiteralSchema(): Snippet;
|
|
42
42
|
get MaybeFilter(): Snippet;
|
|
@@ -63,10 +63,14 @@ export declare class Snippets {
|
|
|
63
63
|
get _ToRdfResourceFunction(): Snippet;
|
|
64
64
|
get arrayEquals(): Snippet;
|
|
65
65
|
get arrayIntersection(): Snippet;
|
|
66
|
+
get bigDecimalFromRdfResourceValues(): Snippet;
|
|
66
67
|
get bigDecimalLiteral(): Snippet;
|
|
67
68
|
get bigDecimalSparqlWherePatterns(): Snippet;
|
|
69
|
+
get bigIntFromRdfResourceValues(): Snippet;
|
|
70
|
+
get blankNodeFromRdfResourceValues(): Snippet;
|
|
68
71
|
get blankNodeSparqlWherePatterns(): Snippet;
|
|
69
72
|
get booleanEquals(): Snippet;
|
|
73
|
+
get booleanFromRdfResourceValues(): Snippet;
|
|
70
74
|
get booleanSparqlWherePatterns(): Snippet;
|
|
71
75
|
get compactRecord(): Snippet;
|
|
72
76
|
get convertToArraySet(): Snippet;
|
|
@@ -76,18 +80,21 @@ export declare class Snippets {
|
|
|
76
80
|
get convertToIdentifierProperty(): Snippet;
|
|
77
81
|
get convertToIri(): Snippet;
|
|
78
82
|
get convertToIriIdentifierProperty(): Snippet;
|
|
79
|
-
get
|
|
80
|
-
get
|
|
81
|
-
get
|
|
83
|
+
get convertToLazy(): Snippet;
|
|
84
|
+
get convertToLazyOption(): Snippet;
|
|
85
|
+
get convertToLazySet(): Snippet;
|
|
82
86
|
get convertToList(): Snippet;
|
|
83
87
|
get convertToLiteral(): Snippet;
|
|
84
88
|
get convertToMaybe(): Snippet;
|
|
85
89
|
get convertToScalarSet(): Snippet;
|
|
86
90
|
get convertWithDefaultValue(): Snippet;
|
|
87
91
|
get dateEquals(): Snippet;
|
|
92
|
+
get dateFromRdfResourceValues(): Snippet;
|
|
88
93
|
get dateSparqlWherePatterns(): Snippet;
|
|
94
|
+
get dateTimeFromRdfResourceValues(): Snippet;
|
|
89
95
|
get decodeBigDecimalLiteral(): Snippet;
|
|
90
96
|
get deduplicateSparqlPatterns(): Snippet;
|
|
97
|
+
get defaultValueFromRdfResourceValues(): Snippet;
|
|
91
98
|
get defaultValueSparqlWherePatterns(): Snippet;
|
|
92
99
|
get ensureRdfResourceType(): Snippet;
|
|
93
100
|
get filterArray(): Snippet;
|
|
@@ -102,8 +109,7 @@ export declare class Snippets {
|
|
|
102
109
|
get filterNumeric(): Snippet;
|
|
103
110
|
get filterString(): Snippet;
|
|
104
111
|
get filterTerm(): Snippet;
|
|
105
|
-
get
|
|
106
|
-
get fromRdfPreferredLanguages(): Snippet;
|
|
112
|
+
get floatFromRdfResourceValues(): Snippet;
|
|
107
113
|
get hashArray(): Snippet;
|
|
108
114
|
get hashBigDecimal(): Snippet;
|
|
109
115
|
get hashBoolean(): Snippet;
|
|
@@ -113,27 +119,36 @@ export declare class Snippets {
|
|
|
113
119
|
get hashNumeric(): Snippet;
|
|
114
120
|
get hashString(): Snippet;
|
|
115
121
|
get hashTerm(): Snippet;
|
|
122
|
+
get identifierFromRdfResourceValues(): Snippet;
|
|
116
123
|
get identifierSparqlWherePatterns(): Snippet;
|
|
117
124
|
get identityConversionFunction(): Snippet;
|
|
118
125
|
get identityValidationFunction(): Snippet;
|
|
119
126
|
get ifUsed(): Code[];
|
|
127
|
+
get intFromRdfResourceValues(): Snippet;
|
|
128
|
+
get iriFromRdfResourceValues(): Snippet;
|
|
120
129
|
get iriSparqlWherePatterns(): Snippet;
|
|
121
130
|
get liftSparqlPatterns(): Snippet;
|
|
131
|
+
get listFromRdfResourceValues(): Snippet;
|
|
122
132
|
get listSparqlConstructTriples(): Snippet;
|
|
123
133
|
get listSparqlWherePatterns(): Snippet;
|
|
124
134
|
get literalFactory(): Snippet;
|
|
135
|
+
get literalFromRdfResourceValues(): Snippet;
|
|
125
136
|
get literalSchemaSparqlPatterns(): Snippet;
|
|
126
137
|
get literalSparqlWherePatterns(): Snippet;
|
|
127
138
|
get maybeEquals(): Snippet;
|
|
139
|
+
get maybeFromRdfResourceValues(): Snippet;
|
|
128
140
|
get maybeSparqlConstructTriples(): Snippet;
|
|
129
141
|
get maybeSparqlWherePatterns(): Snippet;
|
|
130
142
|
get monkeyPatchObject(): Snippet;
|
|
143
|
+
get mutableListFromRdfResourceValues(): Snippet;
|
|
144
|
+
get mutableSetFromRdfResourceValues(): Snippet;
|
|
131
145
|
get normalizeSparqlWherePatterns(): Snippet;
|
|
132
146
|
get numericSparqlWherePatterns(): Snippet;
|
|
133
147
|
get parseBlankNode(): Snippet;
|
|
134
148
|
get parseIdentifier(): Snippet;
|
|
135
149
|
get parseIri(): Snippet;
|
|
136
150
|
get sequenceRecord(): Snippet;
|
|
151
|
+
get setFromRdfResourceValues(): Snippet;
|
|
137
152
|
get setSparqlConstructTriples(): Snippet;
|
|
138
153
|
get setSparqlWherePatterns(): Snippet;
|
|
139
154
|
get shaclPropertyFromRdf(): Snippet;
|
|
@@ -144,8 +159,11 @@ export declare class Snippets {
|
|
|
144
159
|
get sparqlPropertyPath(): Snippet;
|
|
145
160
|
get sparqlValueInPattern(): Snippet;
|
|
146
161
|
get strictEquals(): Snippet;
|
|
162
|
+
get stringFromRdfResourceValues(): Snippet;
|
|
147
163
|
get stringSparqlWherePatterns(): Snippet;
|
|
148
164
|
get termFilterSparqlPatterns(): Snippet;
|
|
165
|
+
get termFromRdfResourceValues(): Snippet;
|
|
166
|
+
get termLikeFromRdfResourceValues(): Snippet;
|
|
149
167
|
get termSchemaSparqlPatterns(): Snippet;
|
|
150
168
|
get termSparqlWherePatterns(): Snippet;
|
|
151
169
|
get toIsoDateString(): Snippet;
|