@shaclmate/compiler 4.0.7 → 4.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Compiler.d.ts +1 -4
- package/dist/Compiler.js +1 -5
- package/dist/ShapesGraphToAstTransformer.d.ts +2 -11
- package/dist/ShapesGraphToAstTransformer.js +25 -27
- package/dist/_ShapesGraphToAstTransformer/defaultNodeShapeNodeKinds.d.ts +3 -0
- package/dist/_ShapesGraphToAstTransformer/defaultNodeShapeNodeKinds.js +5 -0
- package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.d.ts +4 -0
- package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.js +27 -0
- package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.js +74 -19
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.d.ts +1 -1
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.js +45 -91
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.d.ts +11 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.js +146 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstObjectType.d.ts +7 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstObjectType.js +182 -0
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.js +9 -7
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.d.ts +3 -5
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.js +33 -10
- package/dist/ast/AbstractCompoundType.d.ts +26 -8
- package/dist/ast/AbstractCompoundType.js +84 -16
- package/dist/ast/AbstractContainerType.d.ts +2 -4
- package/dist/ast/AbstractContainerType.js +3 -4
- package/dist/ast/AbstractLazyObjectType.d.ts +1 -0
- package/dist/ast/AbstractLazyObjectType.js +3 -0
- package/dist/ast/AbstractTermType.d.ts +1 -0
- package/dist/ast/AbstractTermType.js +1 -0
- package/dist/ast/AbstractType.d.ts +16 -1
- package/dist/ast/AbstractType.js +11 -1
- package/dist/ast/Ast.d.ts +4 -4
- package/dist/ast/BlankNodeType.d.ts +1 -1
- package/dist/ast/DefaultValueType.d.ts +1 -2
- package/dist/ast/DefaultValueType.js +2 -0
- package/dist/ast/IdentifierType.d.ts +1 -1
- package/dist/ast/IntersectionType.d.ts +7 -2
- package/dist/ast/IntersectionType.js +8 -0
- package/dist/ast/ListType.d.ts +2 -9
- package/dist/ast/ListType.js +1 -9
- package/dist/ast/LiteralType.d.ts +1 -0
- package/dist/ast/LiteralType.js +26 -0
- package/dist/ast/ObjectCompoundType.d.ts +12 -0
- package/dist/ast/ObjectCompoundType.js +88 -0
- package/dist/ast/ObjectIntersectionType.d.ts +3 -7
- package/dist/ast/ObjectIntersectionType.js +1 -7
- package/dist/ast/ObjectType.d.ts +14 -31
- package/dist/ast/ObjectType.js +41 -73
- package/dist/ast/ObjectUnionType.d.ts +3 -7
- package/dist/ast/ObjectUnionType.js +1 -7
- package/dist/ast/OptionType.d.ts +1 -2
- package/dist/ast/OptionType.js +2 -0
- package/dist/ast/SetType.d.ts +1 -2
- package/dist/ast/SetType.js +2 -0
- package/dist/ast/Type.d.ts +1 -4
- package/dist/ast/Type.js +0 -6
- package/dist/ast/UnionType.d.ts +11 -6
- package/dist/ast/UnionType.js +6 -4
- package/dist/ast/index.d.ts +1 -2
- package/dist/ast/index.js +1 -2
- package/dist/generators/json/AstJsonGenerator.js +16 -14
- package/dist/generators/ts/AbstractCollectionType.js +8 -10
- package/dist/generators/ts/AbstractContainerType.d.ts +8 -3
- package/dist/generators/ts/AbstractContainerType.js +9 -2
- package/dist/generators/ts/AbstractDateType.d.ts +2 -2
- package/dist/generators/ts/AbstractDateType.js +2 -2
- package/dist/generators/ts/AbstractIdentifierType.d.ts +1 -1
- package/dist/generators/ts/AbstractIdentifierType.js +1 -1
- package/dist/generators/ts/AbstractLazyObjectType.d.ts +11 -8
- package/dist/generators/ts/AbstractLazyObjectType.js +19 -14
- package/dist/generators/ts/AbstractNamedUnionType.d.ts +33 -0
- package/dist/generators/ts/AbstractNamedUnionType.js +193 -0
- package/dist/generators/ts/AbstractNumericType.d.ts +2 -2
- package/dist/generators/ts/AbstractNumericType.js +3 -3
- package/dist/generators/ts/AbstractTermType.d.ts +7 -4
- package/dist/generators/ts/AbstractTermType.js +7 -4
- package/dist/generators/ts/AbstractType.d.ts +29 -14
- package/dist/generators/ts/AbstractUnionType.d.ts +80 -0
- package/dist/generators/ts/AbstractUnionType.js +514 -0
- package/dist/generators/ts/AnonymousUnionType.d.ts +26 -0
- package/dist/generators/ts/AnonymousUnionType.js +56 -0
- package/dist/generators/ts/BigDecimalType.d.ts +3 -3
- package/dist/generators/ts/BigDecimalType.js +3 -3
- package/dist/generators/ts/BlankNodeType.d.ts +1 -1
- package/dist/generators/ts/BlankNodeType.js +1 -1
- package/dist/generators/ts/BooleanType.d.ts +2 -2
- package/dist/generators/ts/BooleanType.js +2 -2
- package/dist/generators/ts/DefaultValueType.d.ts +4 -4
- package/dist/generators/ts/DefaultValueType.js +14 -13
- package/dist/generators/ts/IdentifierType.d.ts +1 -1
- package/dist/generators/ts/IdentifierType.js +1 -1
- package/dist/generators/ts/IriType.d.ts +1 -1
- package/dist/generators/ts/IriType.js +1 -1
- package/dist/generators/ts/LazyObjectOptionType.d.ts +1 -1
- package/dist/generators/ts/LazyObjectOptionType.js +9 -9
- package/dist/generators/ts/LazyObjectSetType.d.ts +1 -1
- package/dist/generators/ts/LazyObjectSetType.js +7 -7
- package/dist/generators/ts/LazyObjectType.d.ts +1 -1
- package/dist/generators/ts/LazyObjectType.js +7 -8
- package/dist/generators/ts/ListType.d.ts +8 -7
- package/dist/generators/ts/ListType.js +14 -13
- package/dist/generators/ts/LiteralType.d.ts +1 -1
- package/dist/generators/ts/LiteralType.js +2 -2
- package/dist/generators/ts/NamedObjectUnionType.d.ts +35 -0
- package/dist/generators/ts/NamedObjectUnionType.js +221 -0
- package/dist/generators/ts/NamedUnionType.d.ts +11 -0
- package/dist/generators/ts/NamedUnionType.js +13 -0
- package/dist/generators/ts/ObjectType.d.ts +34 -25
- package/dist/generators/ts/ObjectType.js +62 -52
- package/dist/generators/ts/OptionType.d.ts +4 -4
- package/dist/generators/ts/OptionType.js +10 -10
- package/dist/generators/ts/SetType.d.ts +4 -4
- package/dist/generators/ts/SetType.js +13 -11
- package/dist/generators/ts/StringType.d.ts +2 -2
- package/dist/generators/ts/StringType.js +2 -2
- package/dist/generators/ts/TermType.d.ts +1 -1
- package/dist/generators/ts/TermType.js +2 -2
- package/dist/generators/ts/TsGenerator.js +23 -15
- package/dist/generators/ts/Type.d.ts +4 -3
- package/dist/generators/ts/TypeFactory.d.ts +7 -5
- package/dist/generators/ts/TypeFactory.js +117 -90
- package/dist/generators/ts/ZodGenerator.js +6 -6
- package/dist/generators/ts/_ObjectType/AbstractProperty.d.ts +3 -3
- package/dist/generators/ts/_ObjectType/{TypeDiscriminantProperty.d.ts → DiscriminantProperty.d.ts} +14 -14
- package/dist/generators/ts/_ObjectType/{TypeDiscriminantProperty.js → DiscriminantProperty.js} +10 -10
- package/dist/generators/ts/_ObjectType/IdentifierPrefixProperty.d.ts +2 -2
- package/dist/generators/ts/_ObjectType/IdentifierPrefixProperty.js +2 -2
- package/dist/generators/ts/_ObjectType/IdentifierProperty.d.ts +2 -2
- package/dist/generators/ts/_ObjectType/IdentifierProperty.js +7 -4
- package/dist/generators/ts/_ObjectType/ObjectType_classDeclaration.js +8 -8
- package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlConstructTriplesFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_sparqlConstructTriplesFunctionDeclaration.js → ObjectType_focusSparqlConstructTriplesFunctionDeclaration.js} +6 -5
- package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlWherePatternsFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_sparqlWherePatternsFunctionDeclarations.js → ObjectType_focusSparqlWherePatternsFunctionDeclaration.js} +5 -5
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.js +20 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_fromRdfFunctionDeclaration.js → ObjectType_fromRdfResourceFunctionDeclaration.js} +6 -7
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.js +20 -0
- package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.js +2 -2
- package/dist/generators/ts/_ObjectType/ObjectType_parseJsonFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_parseJsonFunctionDeclaration.js +19 -0
- package/dist/generators/ts/_ObjectType/ObjectType_propertiesFromJsonFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_propertiesFromJsonFunctionDeclaration.js +38 -0
- package/dist/generators/ts/_ObjectType/ObjectType_propertiesFromRdfResourceFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_propertiesFromRdfFunctionDeclaration.js → ObjectType_propertiesFromRdfResourceFunctionDeclaration.js} +16 -15
- package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.js +1 -2
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js +2 -2
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionOrMethodDeclaration.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/{ObjectType_toRdfFunctionOrMethodDeclaration.js → ObjectType_toRdfResourceFunctionOrMethodDeclaration.js} +10 -8
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionDeclaration.js +13 -0
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionDeclaration.d.ts +5 -0
- package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionDeclaration.js +15 -0
- package/dist/generators/ts/_ObjectType/Property.d.ts +2 -2
- package/dist/generators/ts/_ObjectType/ShaclProperty.d.ts +2 -2
- package/dist/generators/ts/_ObjectType/ShaclProperty.js +6 -6
- package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.d.ts +2 -0
- package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.js +12 -0
- package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.d.ts +2 -0
- package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.js +14 -0
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.d.ts +2 -0
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.js +15 -0
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.d.ts +2 -0
- package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.js +17 -0
- package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.d.ts +2 -0
- package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.js +15 -0
- package/dist/generators/ts/_snippets/snippets_PropertyPath.d.ts +5 -0
- package/dist/generators/ts/_snippets/snippets_PropertyPath.js +35 -0
- package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.js +2 -2
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.d.ts +2 -0
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.js +7 -0
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.d.ts +2 -0
- package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.js +16 -0
- package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.d.ts +2 -0
- package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.js +13 -0
- package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.d.ts +2 -0
- package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.js +16 -0
- package/dist/generators/ts/_snippets/snippets_bigDecimalSparqlWherePatterns.js +2 -2
- package/dist/generators/ts/_snippets/snippets_blankNodeSparqlWherePatterns.js +2 -2
- package/dist/generators/ts/_snippets/snippets_booleanEquals.js +1 -1
- package/dist/generators/ts/_snippets/snippets_booleanSparqlWherePatterns.js +2 -2
- package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.js +2 -2
- package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.js +2 -2
- package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.js +1 -1
- package/dist/generators/ts/_snippets/snippets_identifierSparqlWherePatterns.js +2 -2
- package/dist/generators/ts/_snippets/snippets_iriSparqlWherePatterns.js +2 -2
- package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.js +2 -2
- package/dist/generators/ts/_snippets/snippets_listSparqlWherePatterns.js +2 -2
- package/dist/generators/ts/_snippets/snippets_literalSparqlWherePatterns.js +2 -2
- package/dist/generators/ts/_snippets/snippets_maybeSparqlConstructTriples.js +2 -2
- package/dist/generators/ts/_snippets/snippets_maybeSparqlWherePatterns.js +2 -2
- package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.js +2 -3
- package/dist/generators/ts/_snippets/snippets_setSparqlConstructTriples.js +2 -2
- package/dist/generators/ts/_snippets/snippets_setSparqlWherePatterns.js +2 -2
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlConstructTriples.js +4 -3
- package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlWherePatterns.js +4 -3
- package/dist/generators/ts/_snippets/snippets_sparqlPropertyPath.js +3 -2
- package/dist/generators/ts/_snippets/snippets_stringSparqlWherePatterns.js +2 -2
- package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.js +2 -2
- package/dist/generators/ts/graphqlSchemaVariableStatement.d.ts +2 -2
- package/dist/generators/ts/graphqlSchemaVariableStatement.js +4 -4
- package/dist/generators/ts/imports.d.ts +1 -1
- package/dist/generators/ts/imports.js +1 -1
- package/dist/generators/ts/objectSetDeclarations.d.ts +3 -3
- package/dist/generators/ts/objectSetDeclarations.js +15 -15
- package/dist/generators/ts/objectSetInterfaceDeclaration.d.ts +3 -3
- package/dist/generators/ts/objectSetInterfaceDeclaration.js +2 -2
- package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.d.ts +3 -3
- package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.js +16 -17
- package/dist/generators/ts/snippets.d.ts +10 -6
- package/dist/generators/ts/snippets.js +20 -12
- package/dist/generators/ts/sparqlObjectSetClassDeclaration.d.ts +3 -3
- package/dist/generators/ts/sparqlObjectSetClassDeclaration.js +7 -8
- package/dist/generators/ts/synthesizeUberObjectUnionType.d.ts +2 -2
- package/dist/generators/ts/synthesizeUberObjectUnionType.js +9 -4
- package/dist/input/NodeShape.d.ts +5 -6
- package/dist/input/NodeShape.js +19 -22
- package/dist/input/Ontology.d.ts +4 -4
- package/dist/input/Ontology.js +10 -10
- package/dist/input/PropertyShape.d.ts +4 -4
- package/dist/input/PropertyShape.js +10 -10
- package/dist/input/ShapesGraph.d.ts +3 -2
- package/dist/input/ShapesGraph.js +13 -8
- package/dist/input/generated.d.ts +2551 -2040
- package/dist/input/generated.js +2806 -2346
- package/package.json +3 -5
- package/dist/_ShapesGraphToAstTransformer/CurieFactory.d.ts +0 -16
- package/dist/_ShapesGraphToAstTransformer/CurieFactory.js +0 -45
- package/dist/_ShapesGraphToAstTransformer/NodeShapeAstType.d.ts +0 -3
- package/dist/_ShapesGraphToAstTransformer/NodeShapeAstType.js +0 -2
- package/dist/_ShapesGraphToAstTransformer/index.d.ts +0 -6
- package/dist/_ShapesGraphToAstTransformer/index.js +0 -6
- package/dist/_ShapesGraphToAstTransformer/shapeIdentifier.d.ts +0 -5
- package/dist/_ShapesGraphToAstTransformer/shapeIdentifier.js +0 -9
- package/dist/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.d.ts +0 -11
- package/dist/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.js +0 -338
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstAbstractTypeProperties.d.ts +0 -12
- package/dist/_ShapesGraphToAstTransformer/transformShapeToAstAbstractTypeProperties.js +0 -31
- package/dist/ast/AbstractObjectCompoundType.d.ts +0 -45
- package/dist/ast/AbstractObjectCompoundType.js +0 -180
- package/dist/ast/Curie.d.ts +0 -21
- package/dist/ast/Curie.js +0 -29
- package/dist/ast/PlaceholderType.d.ts +0 -15
- package/dist/ast/PlaceholderType.js +0 -19
- package/dist/generators/codeName.d.ts +0 -6
- package/dist/generators/codeName.js +0 -66
- package/dist/generators/ts/AbstractDeclaredType.d.ts +0 -23
- package/dist/generators/ts/AbstractDeclaredType.js +0 -17
- package/dist/generators/ts/ObjectUnionType.d.ts +0 -65
- package/dist/generators/ts/ObjectUnionType.js +0 -257
- package/dist/generators/ts/UnionType.d.ts +0 -40
- package/dist/generators/ts/UnionType.js +0 -527
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclarations.d.ts +0 -4
- package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclarations.js +0 -66
- package/dist/generators/ts/_ObjectType/ObjectType_fromRdfFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_propertiesFromRdfFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructTriplesFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_sparqlWherePatternsFunctionDeclarations.d.ts +0 -5
- package/dist/generators/ts/_ObjectType/ObjectType_toRdfFunctionOrMethodDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectUnionType/MemberType.d.ts +0 -34
- package/dist/generators/ts/_ObjectUnionType/MemberType.js +0 -105
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_equalsFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_equalsFunctionDeclaration.js +0 -29
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterFunctionDeclaration.d.ts +0 -4
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterFunctionDeclaration.js +0 -19
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterTypeDeclaration.d.ts +0 -4
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterTypeDeclaration.js +0 -10
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromJsonFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromJsonFunctionDeclaration.js +0 -19
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromRdfFunctionDeclarations.d.ts +0 -5
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromRdfFunctionDeclarations.js +0 -20
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_graphqlTypeVariableStatement.d.ts +0 -5
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_graphqlTypeVariableStatement.js +0 -18
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_hashFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_hashFunctionDeclaration.js +0 -28
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_identifierTypeDeclarations.d.ts +0 -4
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_identifierTypeDeclarations.js +0 -9
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_isTypeFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_isTypeFunctionDeclaration.js +0 -13
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonTypeAliasDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonTypeAliasDeclaration.js +0 -10
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonZodSchemaFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonZodSchemaFunctionDeclaration.js +0 -14
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_schemaVariableStatement.d.ts +0 -4
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_schemaVariableStatement.js +0 -37
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlConstructTriplesFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlConstructTriplesFunctionDeclaration.js +0 -15
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlWherePatternsFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlWherePatternsFunctionDeclaration.js +0 -35
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toJsonFunctionDeclaration.d.ts +0 -5
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toJsonFunctionDeclaration.js +0 -26
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toRdfFunctionDeclarations.d.ts +0 -5
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toRdfFunctionDeclarations.js +0 -43
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_typeAliasDeclaration.d.ts +0 -4
- package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_typeAliasDeclaration.js +0 -10
- package/dist/generators/ts/_snippets/snippets_FromRdfOptions.d.ts +0 -2
- package/dist/generators/ts/_snippets/snippets_FromRdfOptions.js +0 -5
- package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfParameters.d.ts +0 -2
- package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfParameters.js +0 -5
- package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunction.d.ts +0 -2
- package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunction.js +0 -6
- package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunctionParameters.d.ts +0 -2
- package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunctionParameters.js +0 -12
- package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunction.d.ts +0 -2
- package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunction.js +0 -6
- package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunctionParameters.d.ts +0 -2
- package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunctionParameters.js +0 -15
package/dist/input/NodeShape.js
CHANGED
|
@@ -4,22 +4,22 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { NodeShape as
|
|
7
|
+
import { NodeShape as ShaclAstNodeShape } from "@shaclmate/shacl-ast";
|
|
8
8
|
import { rdf } from "@tpluscode/rdf-ns-builders";
|
|
9
9
|
import { Either, List } from "purify-ts";
|
|
10
10
|
import { invariant } from "ts-invariant";
|
|
11
11
|
import { Memoize } from "typescript-memoize";
|
|
12
|
-
export class NodeShape extends
|
|
12
|
+
export class NodeShape extends ShaclAstNodeShape {
|
|
13
13
|
ancestorClassIris;
|
|
14
14
|
childClassIris;
|
|
15
15
|
descendantClassIris;
|
|
16
|
-
|
|
16
|
+
generatedNodeShape;
|
|
17
17
|
parentClassIris;
|
|
18
18
|
isClass;
|
|
19
19
|
isList;
|
|
20
20
|
kind = "NodeShape";
|
|
21
|
-
constructor({ ancestorClassIris, childClassIris, descendantClassIris,
|
|
22
|
-
super(
|
|
21
|
+
constructor({ ancestorClassIris, childClassIris, descendantClassIris, generatedNodeShape, isClass, isList, parentClassIris, shapesGraph, }) {
|
|
22
|
+
super(generatedNodeShape, shapesGraph);
|
|
23
23
|
if (ancestorClassIris.length > 0 ||
|
|
24
24
|
childClassIris.length > 0 ||
|
|
25
25
|
descendantClassIris.length > 0 ||
|
|
@@ -30,13 +30,13 @@ export class NodeShape extends ShaclCoreNodeShape {
|
|
|
30
30
|
this.ancestorClassIris = ancestorClassIris;
|
|
31
31
|
this.childClassIris = childClassIris;
|
|
32
32
|
this.descendantClassIris = descendantClassIris;
|
|
33
|
-
this.
|
|
33
|
+
this.generatedNodeShape = generatedNodeShape;
|
|
34
34
|
this.isClass = isClass;
|
|
35
35
|
this.isList = isList;
|
|
36
36
|
this.parentClassIris = parentClassIris;
|
|
37
37
|
}
|
|
38
38
|
get abstract() {
|
|
39
|
-
return this.
|
|
39
|
+
return this.generatedNodeShape.abstract;
|
|
40
40
|
}
|
|
41
41
|
get ancestorNodeShapes() {
|
|
42
42
|
return Either.sequence(this.ancestorClassIris
|
|
@@ -53,22 +53,19 @@ export class NodeShape extends ShaclCoreNodeShape {
|
|
|
53
53
|
return Either.sequence(this.descendantClassIris.flatMap((classIri) => this.shapesGraph.nodeShapeByIdentifier(classIri)));
|
|
54
54
|
}
|
|
55
55
|
get discriminantValue() {
|
|
56
|
-
return this.
|
|
57
|
-
}
|
|
58
|
-
get export() {
|
|
59
|
-
return this.generatedShaclmateNodeShape.export_;
|
|
56
|
+
return this.generatedNodeShape.discriminantValue;
|
|
60
57
|
}
|
|
61
58
|
get extern() {
|
|
62
|
-
return this.
|
|
59
|
+
return this.generatedNodeShape.extern;
|
|
63
60
|
}
|
|
64
61
|
get fromRdfType() {
|
|
65
|
-
return this.
|
|
62
|
+
return this.generatedNodeShape.fromRdfType;
|
|
66
63
|
}
|
|
67
64
|
get identifierIn() {
|
|
68
65
|
return this.constraints.in_.filter((value) => value.termType === "NamedNode");
|
|
69
66
|
}
|
|
70
67
|
get identifierMintingStrategy() {
|
|
71
|
-
return this.
|
|
68
|
+
return this.generatedNodeShape.identifierMintingStrategy.map((iri) => {
|
|
72
69
|
switch (iri.value) {
|
|
73
70
|
case "http://purl.org/shaclmate/ontology#_IdentifierMintingStrategy_BlankNode":
|
|
74
71
|
return "blankNode";
|
|
@@ -86,7 +83,7 @@ export class NodeShape extends ShaclCoreNodeShape {
|
|
|
86
83
|
return List.head(this.labels);
|
|
87
84
|
}
|
|
88
85
|
get mutable() {
|
|
89
|
-
return this.
|
|
86
|
+
return this.generatedNodeShape.mutable;
|
|
90
87
|
}
|
|
91
88
|
get parentNodeShapes() {
|
|
92
89
|
return Either.sequence(this.parentClassIris
|
|
@@ -94,25 +91,25 @@ export class NodeShape extends ShaclCoreNodeShape {
|
|
|
94
91
|
.map((classIri) => this.shapesGraph.nodeShapeByIdentifier(classIri)));
|
|
95
92
|
}
|
|
96
93
|
get rdfType() {
|
|
97
|
-
return this.
|
|
94
|
+
return this.generatedNodeShape.rdfType;
|
|
98
95
|
}
|
|
99
96
|
get shaclmateName() {
|
|
100
|
-
return this.
|
|
97
|
+
return this.generatedNodeShape.name;
|
|
101
98
|
}
|
|
102
99
|
get toRdfTypes() {
|
|
103
|
-
return this.
|
|
100
|
+
return this.generatedNodeShape.toRdfTypes;
|
|
104
101
|
}
|
|
105
102
|
get tsFeatureExcludes() {
|
|
106
|
-
return this.
|
|
103
|
+
return this.generatedNodeShape.tsFeatureExcludes;
|
|
107
104
|
}
|
|
108
105
|
get tsFeatureIncludes() {
|
|
109
|
-
return this.
|
|
106
|
+
return this.generatedNodeShape.tsFeatureIncludes;
|
|
110
107
|
}
|
|
111
108
|
get tsImports() {
|
|
112
|
-
return this.
|
|
109
|
+
return this.generatedNodeShape.tsImports;
|
|
113
110
|
}
|
|
114
111
|
get tsObjectDeclarationType() {
|
|
115
|
-
return this.
|
|
112
|
+
return this.generatedNodeShape.tsObjectDeclarationType.map((iri) => {
|
|
116
113
|
switch (iri.value) {
|
|
117
114
|
case "http://purl.org/shaclmate/ontology#_TsObjectDeclarationType_Class":
|
|
118
115
|
return "class";
|
package/dist/input/Ontology.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Ontology as
|
|
1
|
+
import { Ontology as ShaclAstOntology } from "@shaclmate/shacl-ast";
|
|
2
2
|
import type { Maybe } from "purify-ts";
|
|
3
3
|
import type { TsObjectDeclarationType } from "../enums/TsObjectDeclarationType.js";
|
|
4
4
|
import type * as generated from "./generated.js";
|
|
5
|
-
export declare class Ontology extends
|
|
6
|
-
private readonly
|
|
7
|
-
constructor(
|
|
5
|
+
export declare class Ontology extends ShaclAstOntology {
|
|
6
|
+
private readonly _generatedOntology;
|
|
7
|
+
constructor(_generatedOntology: generated.Ontology);
|
|
8
8
|
get tsFeatureExcludes(): readonly import("@rdfjs/types").NamedNode<"http://purl.org/shaclmate/ontology#_TsFeatures_All" | "http://purl.org/shaclmate/ontology#_TsFeature_Create" | "http://purl.org/shaclmate/ontology#_TsFeatures_Default" | "http://purl.org/shaclmate/ontology#_TsFeature_Equals" | "http://purl.org/shaclmate/ontology#_TsFeature_Graphql" | "http://purl.org/shaclmate/ontology#_TsFeature_Hash" | "http://purl.org/shaclmate/ontology#_TsFeature_Json" | "http://purl.org/shaclmate/ontology#_TsFeatures_None" | "http://purl.org/shaclmate/ontology#_TsFeature_Rdf" | "http://purl.org/shaclmate/ontology#_TsFeature_Sparql">[];
|
|
9
9
|
get tsFeatureIncludes(): readonly import("@rdfjs/types").NamedNode<"http://purl.org/shaclmate/ontology#_TsFeatures_All" | "http://purl.org/shaclmate/ontology#_TsFeature_Create" | "http://purl.org/shaclmate/ontology#_TsFeatures_Default" | "http://purl.org/shaclmate/ontology#_TsFeature_Equals" | "http://purl.org/shaclmate/ontology#_TsFeature_Graphql" | "http://purl.org/shaclmate/ontology#_TsFeature_Hash" | "http://purl.org/shaclmate/ontology#_TsFeature_Json" | "http://purl.org/shaclmate/ontology#_TsFeatures_None" | "http://purl.org/shaclmate/ontology#_TsFeature_Rdf" | "http://purl.org/shaclmate/ontology#_TsFeature_Sparql">[];
|
|
10
10
|
get tsImports(): readonly string[];
|
package/dist/input/Ontology.js
CHANGED
|
@@ -4,25 +4,25 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { Ontology as
|
|
7
|
+
import { Ontology as ShaclAstOntology } from "@shaclmate/shacl-ast";
|
|
8
8
|
import { Memoize } from "typescript-memoize";
|
|
9
|
-
export class Ontology extends
|
|
10
|
-
|
|
11
|
-
constructor(
|
|
12
|
-
super(
|
|
13
|
-
this.
|
|
9
|
+
export class Ontology extends ShaclAstOntology {
|
|
10
|
+
_generatedOntology;
|
|
11
|
+
constructor(_generatedOntology) {
|
|
12
|
+
super(_generatedOntology);
|
|
13
|
+
this._generatedOntology = _generatedOntology;
|
|
14
14
|
}
|
|
15
15
|
get tsFeatureExcludes() {
|
|
16
|
-
return this.
|
|
16
|
+
return this._generatedOntology.tsFeatureExcludes;
|
|
17
17
|
}
|
|
18
18
|
get tsFeatureIncludes() {
|
|
19
|
-
return this.
|
|
19
|
+
return this._generatedOntology.tsFeatureIncludes;
|
|
20
20
|
}
|
|
21
21
|
get tsImports() {
|
|
22
|
-
return this.
|
|
22
|
+
return this._generatedOntology.tsImports;
|
|
23
23
|
}
|
|
24
24
|
get tsObjectDeclarationType() {
|
|
25
|
-
return this.
|
|
25
|
+
return this._generatedOntology.tsObjectDeclarationType.map((iri) => {
|
|
26
26
|
switch (iri.value) {
|
|
27
27
|
case "http://purl.org/shaclmate/ontology#_TsObjectDeclarationType_Class":
|
|
28
28
|
return "class";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { PropertyShape as
|
|
1
|
+
import { PropertyShape as ShaclAstPropertyShape } from "@shaclmate/shacl-ast";
|
|
2
2
|
import { Either, Maybe } from "purify-ts";
|
|
3
3
|
import type { PropertyVisibility } from "../enums/PropertyVisibility.js";
|
|
4
4
|
import type * as generated from "./generated.js";
|
|
5
5
|
import type { NodeShape, Ontology, PropertyGroup, ShapesGraph } from "./index.js";
|
|
6
6
|
import type { Shape } from "./Shape.js";
|
|
7
|
-
export declare class PropertyShape extends
|
|
8
|
-
private readonly
|
|
7
|
+
export declare class PropertyShape extends ShaclAstPropertyShape<NodeShape, Ontology, PropertyGroup, any, Shape> {
|
|
8
|
+
private readonly _generatedPropertyShape;
|
|
9
9
|
readonly kind = "PropertyShape";
|
|
10
|
-
constructor(
|
|
10
|
+
constructor(_generatedPropertyShape: generated.PropertyShape, shapesGraph: ShapesGraph);
|
|
11
11
|
get comment(): Maybe<string>;
|
|
12
12
|
get description(): Maybe<string>;
|
|
13
13
|
get label(): Maybe<string>;
|
|
@@ -4,15 +4,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { PropertyShape as
|
|
7
|
+
import { PropertyShape as ShaclAstPropertyShape } from "@shaclmate/shacl-ast";
|
|
8
8
|
import { Either, List, Maybe } from "purify-ts";
|
|
9
9
|
import { Memoize } from "typescript-memoize";
|
|
10
|
-
export class PropertyShape extends
|
|
11
|
-
|
|
10
|
+
export class PropertyShape extends ShaclAstPropertyShape {
|
|
11
|
+
_generatedPropertyShape;
|
|
12
12
|
kind = "PropertyShape";
|
|
13
|
-
constructor(
|
|
14
|
-
super({ ...
|
|
15
|
-
this.
|
|
13
|
+
constructor(_generatedPropertyShape, shapesGraph) {
|
|
14
|
+
super({ ..._generatedPropertyShape, uniqueLang: Maybe.empty() }, shapesGraph);
|
|
15
|
+
this._generatedPropertyShape = _generatedPropertyShape;
|
|
16
16
|
}
|
|
17
17
|
get comment() {
|
|
18
18
|
return List.head(this.comments);
|
|
@@ -24,13 +24,13 @@ export class PropertyShape extends ShaclCorePropertyShape {
|
|
|
24
24
|
return List.head(this.labels);
|
|
25
25
|
}
|
|
26
26
|
get mutable() {
|
|
27
|
-
return this.
|
|
27
|
+
return this._generatedPropertyShape.mutable;
|
|
28
28
|
}
|
|
29
29
|
get name() {
|
|
30
30
|
return List.head(this.names);
|
|
31
31
|
}
|
|
32
32
|
get resolve() {
|
|
33
|
-
const identifier = this.
|
|
33
|
+
const identifier = this._generatedPropertyShape.resolve.extract();
|
|
34
34
|
return identifier
|
|
35
35
|
? this.shapesGraph
|
|
36
36
|
.nodeShapeByIdentifier(identifier)
|
|
@@ -38,10 +38,10 @@ export class PropertyShape extends ShaclCorePropertyShape {
|
|
|
38
38
|
: Either.of(Maybe.empty());
|
|
39
39
|
}
|
|
40
40
|
get shaclmateName() {
|
|
41
|
-
return this.
|
|
41
|
+
return this._generatedPropertyShape.name;
|
|
42
42
|
}
|
|
43
43
|
get visibility() {
|
|
44
|
-
return this.
|
|
44
|
+
return this._generatedPropertyShape.visibility
|
|
45
45
|
.map((iri) => {
|
|
46
46
|
switch (iri.value) {
|
|
47
47
|
case "http://purl.org/shaclmate/ontology#_Visibility_Private":
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShapesGraph as _ShapesGraph } from "@shaclmate/shacl-ast";
|
|
1
|
+
import { ShapesGraph as _ShapesGraph, type CurieFactory } from "@shaclmate/shacl-ast";
|
|
2
2
|
import type { Either } from "purify-ts";
|
|
3
3
|
import type { Resource } from "rdfjs-resource";
|
|
4
4
|
import { NodeShape, Ontology, PropertyGroup, PropertyShape, type Shape } from "./index.js";
|
|
@@ -15,7 +15,8 @@ export declare namespace ShapesGraph {
|
|
|
15
15
|
protected createPropertyGroup({ resource, }: {
|
|
16
16
|
resource: Resource;
|
|
17
17
|
}): Either<Error, PropertyGroup>;
|
|
18
|
-
protected createPropertyShape({ resource, shapesGraph, }: {
|
|
18
|
+
protected createPropertyShape({ curieFactory, resource, shapesGraph, }: {
|
|
19
|
+
curieFactory: CurieFactory;
|
|
19
20
|
resource: Resource;
|
|
20
21
|
shapesGraph: ShapesGraph;
|
|
21
22
|
}): Either<Error, PropertyShape>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShapesGraph as _ShapesGraph } from "@shaclmate/shacl-ast";
|
|
1
|
+
import { ShapesGraph as _ShapesGraph, } from "@shaclmate/shacl-ast";
|
|
2
2
|
import { owl, rdf, rdfs } from "@tpluscode/rdf-ns-builders";
|
|
3
3
|
import { ancestorClassIris } from "./ancestorClassIris.js";
|
|
4
4
|
import { descendantClassIris } from "./descendantClassIris.js";
|
|
@@ -8,7 +8,7 @@ export var ShapesGraph;
|
|
|
8
8
|
(function (ShapesGraph) {
|
|
9
9
|
class Factory extends _ShapesGraph.Factory {
|
|
10
10
|
createNodeShape({ resource, shapesGraph, }) {
|
|
11
|
-
return generated.
|
|
11
|
+
return generated.NodeShape.$fromRdfResource(resource, {
|
|
12
12
|
ignoreRdfType: true,
|
|
13
13
|
preferredLanguages: this.preferredLanguages,
|
|
14
14
|
}).map((generatedShape) => {
|
|
@@ -29,7 +29,7 @@ export var ShapesGraph;
|
|
|
29
29
|
ancestorClassIris: ancestorClassIris_,
|
|
30
30
|
childClassIris: descendantClassIris(resource, 1),
|
|
31
31
|
descendantClassIris: descendantClassIris_,
|
|
32
|
-
|
|
32
|
+
generatedNodeShape: generatedShape,
|
|
33
33
|
isClass,
|
|
34
34
|
isList,
|
|
35
35
|
parentClassIris: ancestorClassIris(resource, 1),
|
|
@@ -38,22 +38,27 @@ export var ShapesGraph;
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
createOntology({ resource, }) {
|
|
41
|
-
return generated.
|
|
41
|
+
return generated.Ontology.$fromRdfResource(resource, {
|
|
42
42
|
ignoreRdfType: true,
|
|
43
43
|
preferredLanguages: this.preferredLanguages,
|
|
44
44
|
}).map((generatedOntology) => new Ontology(generatedOntology));
|
|
45
45
|
}
|
|
46
46
|
createPropertyGroup({ resource, }) {
|
|
47
|
-
return generated.
|
|
47
|
+
return generated.PropertyGroup.$fromRdfResource(resource, {
|
|
48
48
|
ignoreRdfType: true,
|
|
49
49
|
preferredLanguages: this.preferredLanguages,
|
|
50
50
|
}).map((generatedPropertyGroup) => new PropertyGroup(generatedPropertyGroup));
|
|
51
51
|
}
|
|
52
|
-
createPropertyShape({ resource, shapesGraph, }) {
|
|
53
|
-
return generated.
|
|
52
|
+
createPropertyShape({ curieFactory, resource, shapesGraph, }) {
|
|
53
|
+
return generated.PropertyShape.$fromRdfResource(resource, {
|
|
54
54
|
ignoreRdfType: true,
|
|
55
55
|
preferredLanguages: this.preferredLanguages,
|
|
56
|
-
}).map((generatedShape) => new PropertyShape(
|
|
56
|
+
}).map((generatedShape) => new PropertyShape({
|
|
57
|
+
...generatedShape,
|
|
58
|
+
path: (generatedShape.path.termType === "NamedNode"
|
|
59
|
+
? curieFactory.create(generatedShape.path).extract()
|
|
60
|
+
: undefined) ?? generatedShape.path,
|
|
61
|
+
}, shapesGraph));
|
|
57
62
|
}
|
|
58
63
|
}
|
|
59
64
|
const factory = new Factory();
|