@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
package/dist/input/generated.js
CHANGED
|
@@ -205,16 +205,16 @@ const $literalFactory = new LiteralFactory({ dataFactory: dataFactory });
|
|
|
205
205
|
const $parseIdentifier = NTriplesIdentifier.parser(dataFactory);
|
|
206
206
|
export var $PropertyPath;
|
|
207
207
|
(function ($PropertyPath) {
|
|
208
|
-
function
|
|
208
|
+
function filter(_filter, _value) {
|
|
209
209
|
return true;
|
|
210
210
|
}
|
|
211
|
-
$PropertyPath
|
|
212
|
-
$PropertyPath
|
|
213
|
-
$PropertyPath
|
|
211
|
+
$PropertyPath.filter = filter;
|
|
212
|
+
$PropertyPath.fromRdfResource = RdfxResourcePropertyPath.fromResource;
|
|
213
|
+
$PropertyPath.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
214
214
|
.toResource()
|
|
215
|
-
.chain((resource) => $PropertyPath
|
|
216
|
-
$PropertyPath
|
|
217
|
-
$PropertyPath
|
|
215
|
+
.chain((resource) => $PropertyPath.fromRdfResource(resource, options))));
|
|
216
|
+
$PropertyPath.schema = {};
|
|
217
|
+
$PropertyPath.toRdfResource = RdfxResourcePropertyPath.toResource;
|
|
218
218
|
$PropertyPath.$toString = RdfxResourcePropertyPath.toString;
|
|
219
219
|
})($PropertyPath || ($PropertyPath = {}));
|
|
220
220
|
var $RdfVocabularies;
|
|
@@ -266,7 +266,7 @@ function $strictEquals(left, right) {
|
|
|
266
266
|
}
|
|
267
267
|
export var PropertyShape;
|
|
268
268
|
(function (PropertyShape) {
|
|
269
|
-
function
|
|
269
|
+
function create(parameters) {
|
|
270
270
|
const $identifierParameter = parameters.$identifier;
|
|
271
271
|
let $identifier;
|
|
272
272
|
if (typeof $identifierParameter === "function") {
|
|
@@ -911,13 +911,13 @@ export var PropertyShape;
|
|
|
911
911
|
xone,
|
|
912
912
|
};
|
|
913
913
|
}
|
|
914
|
-
PropertyShape
|
|
915
|
-
let
|
|
916
|
-
(function (
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
})(
|
|
920
|
-
function
|
|
914
|
+
PropertyShape.create = create;
|
|
915
|
+
let Identifier;
|
|
916
|
+
(function (Identifier) {
|
|
917
|
+
Identifier.parse = $parseIdentifier;
|
|
918
|
+
Identifier.stringify = NTriplesTerm.stringify;
|
|
919
|
+
})(Identifier = PropertyShape.Identifier || (PropertyShape.Identifier = {}));
|
|
920
|
+
function filter(filter, value) {
|
|
921
921
|
if (filter.$identifier !== undefined &&
|
|
922
922
|
!$filterIdentifier(filter.$identifier, value.$identifier())) {
|
|
923
923
|
return false;
|
|
@@ -1043,7 +1043,7 @@ export var PropertyShape;
|
|
|
1043
1043
|
return false;
|
|
1044
1044
|
}
|
|
1045
1045
|
if (filter.path !== undefined &&
|
|
1046
|
-
!$PropertyPath
|
|
1046
|
+
!$PropertyPath.filter(filter.path, value.path)) {
|
|
1047
1047
|
return false;
|
|
1048
1048
|
}
|
|
1049
1049
|
if (filter.patterns !== undefined &&
|
|
@@ -1068,24 +1068,24 @@ export var PropertyShape;
|
|
|
1068
1068
|
}
|
|
1069
1069
|
return true;
|
|
1070
1070
|
}
|
|
1071
|
-
PropertyShape
|
|
1072
|
-
PropertyShape
|
|
1071
|
+
PropertyShape.filter = filter;
|
|
1072
|
+
PropertyShape.fromRdfResource = (resource, options) => {
|
|
1073
1073
|
let { context, graph, ignoreRdfType = false, objectSet, preferredLanguages, } = options ?? {};
|
|
1074
1074
|
if (!objectSet) {
|
|
1075
1075
|
objectSet = new $RdfjsDatasetObjectSet(resource.dataset);
|
|
1076
1076
|
}
|
|
1077
|
-
return PropertyShape
|
|
1077
|
+
return PropertyShape.propertiesFromRdfResource(resource, {
|
|
1078
1078
|
context,
|
|
1079
1079
|
graph,
|
|
1080
1080
|
ignoreRdfType,
|
|
1081
1081
|
objectSet,
|
|
1082
1082
|
preferredLanguages,
|
|
1083
|
-
}).map(
|
|
1083
|
+
}).map(create);
|
|
1084
1084
|
};
|
|
1085
|
-
PropertyShape
|
|
1085
|
+
PropertyShape.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
1086
1086
|
.toResource()
|
|
1087
|
-
.chain((resource) => PropertyShape
|
|
1088
|
-
PropertyShape
|
|
1087
|
+
.chain((resource) => PropertyShape.fromRdfResource(resource, options))));
|
|
1088
|
+
PropertyShape.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape");
|
|
1089
1089
|
function isPropertyShape(object) {
|
|
1090
1090
|
switch (object.$type) {
|
|
1091
1091
|
case "PropertyShape":
|
|
@@ -1095,7 +1095,7 @@ export var PropertyShape;
|
|
|
1095
1095
|
}
|
|
1096
1096
|
}
|
|
1097
1097
|
PropertyShape.isPropertyShape = isPropertyShape;
|
|
1098
|
-
PropertyShape
|
|
1098
|
+
PropertyShape.propertiesFromRdfResource = ($resource, _$options) => {
|
|
1099
1099
|
return (!_$options.ignoreRdfType
|
|
1100
1100
|
? $resource
|
|
1101
1101
|
.value($RdfVocabularies.rdf.type, { graph: _$options.graph })
|
|
@@ -1107,7 +1107,7 @@ export var PropertyShape;
|
|
|
1107
1107
|
return Right(true);
|
|
1108
1108
|
}
|
|
1109
1109
|
// Check arbitrary rdfs:subClassOf's of the expected type
|
|
1110
|
-
if ($resource.isInstanceOf(PropertyShape
|
|
1110
|
+
if ($resource.isInstanceOf(PropertyShape.fromRdfType, {
|
|
1111
1111
|
graph: _$options.graph,
|
|
1112
1112
|
})) {
|
|
1113
1113
|
return Right(true);
|
|
@@ -1125,12 +1125,12 @@ export var PropertyShape;
|
|
|
1125
1125
|
.chain(($identifier) => Right("PropertyShape").chain(($type) => $shaclPropertyFromRdf({
|
|
1126
1126
|
graph: _$options.graph,
|
|
1127
1127
|
resource: $resource,
|
|
1128
|
-
propertySchema: PropertyShape
|
|
1128
|
+
propertySchema: PropertyShape.schema.properties.and,
|
|
1129
1129
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1130
1130
|
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
1131
1131
|
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
1132
1132
|
focusResource: $resource,
|
|
1133
|
-
propertyPath: PropertyShape
|
|
1133
|
+
propertyPath: PropertyShape.schema.properties.and.path,
|
|
1134
1134
|
values: valueList.toArray(),
|
|
1135
1135
|
})).chain((values) => values.chainMap((value) => value.toIdentifier()))))
|
|
1136
1136
|
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
@@ -1138,25 +1138,25 @@ export var PropertyShape;
|
|
|
1138
1138
|
? values.map((value) => Maybe.of(value))
|
|
1139
1139
|
: Resource.Values.fromValue({
|
|
1140
1140
|
focusResource: $resource,
|
|
1141
|
-
propertyPath: PropertyShape
|
|
1141
|
+
propertyPath: PropertyShape.schema.properties.and.path,
|
|
1142
1142
|
value: Maybe.empty(),
|
|
1143
1143
|
})),
|
|
1144
1144
|
}).chain((and) => $shaclPropertyFromRdf({
|
|
1145
1145
|
graph: _$options.graph,
|
|
1146
1146
|
resource: $resource,
|
|
1147
|
-
propertySchema: PropertyShape
|
|
1147
|
+
propertySchema: PropertyShape.schema.properties.classes,
|
|
1148
1148
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1149
1149
|
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
1150
1150
|
.map((values) => values.toArray())
|
|
1151
1151
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
1152
1152
|
focusResource: $resource,
|
|
1153
|
-
propertyPath: PropertyShape
|
|
1153
|
+
propertyPath: PropertyShape.schema.properties.classes.path,
|
|
1154
1154
|
value: valuesArray,
|
|
1155
1155
|
})),
|
|
1156
1156
|
}).chain((classes) => $shaclPropertyFromRdf({
|
|
1157
1157
|
graph: _$options.graph,
|
|
1158
1158
|
resource: $resource,
|
|
1159
|
-
propertySchema: PropertyShape
|
|
1159
|
+
propertySchema: PropertyShape.schema.properties.comment,
|
|
1160
1160
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1161
1161
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1162
1162
|
.chain((values) => values.chainMap((value) => value.toString()))
|
|
@@ -1164,41 +1164,40 @@ export var PropertyShape;
|
|
|
1164
1164
|
? values.map((value) => Maybe.of(value))
|
|
1165
1165
|
: Resource.Values.fromValue({
|
|
1166
1166
|
focusResource: $resource,
|
|
1167
|
-
propertyPath: PropertyShape
|
|
1167
|
+
propertyPath: PropertyShape.schema.properties.comment.path,
|
|
1168
1168
|
value: Maybe.empty(),
|
|
1169
1169
|
})),
|
|
1170
1170
|
}).chain((comment) => $shaclPropertyFromRdf({
|
|
1171
1171
|
graph: _$options.graph,
|
|
1172
1172
|
resource: $resource,
|
|
1173
|
-
propertySchema: PropertyShape
|
|
1173
|
+
propertySchema: PropertyShape.schema.properties.datatype,
|
|
1174
1174
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1175
1175
|
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
1176
1176
|
.map((values) => values.length > 0
|
|
1177
1177
|
? values.map((value) => Maybe.of(value))
|
|
1178
1178
|
: Resource.Values.fromValue({
|
|
1179
1179
|
focusResource: $resource,
|
|
1180
|
-
propertyPath: PropertyShape
|
|
1181
|
-
.path,
|
|
1180
|
+
propertyPath: PropertyShape.schema.properties.datatype.path,
|
|
1182
1181
|
value: Maybe.empty(),
|
|
1183
1182
|
})),
|
|
1184
1183
|
}).chain((datatype) => $shaclPropertyFromRdf({
|
|
1185
1184
|
graph: _$options.graph,
|
|
1186
1185
|
resource: $resource,
|
|
1187
|
-
propertySchema: PropertyShape
|
|
1186
|
+
propertySchema: PropertyShape.schema.properties.deactivated,
|
|
1188
1187
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1189
1188
|
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
1190
1189
|
.map((values) => values.length > 0
|
|
1191
1190
|
? values.map((value) => Maybe.of(value))
|
|
1192
1191
|
: Resource.Values.fromValue({
|
|
1193
1192
|
focusResource: $resource,
|
|
1194
|
-
propertyPath: PropertyShape
|
|
1193
|
+
propertyPath: PropertyShape.schema.properties.deactivated
|
|
1195
1194
|
.path,
|
|
1196
1195
|
value: Maybe.empty(),
|
|
1197
1196
|
})),
|
|
1198
1197
|
}).chain((deactivated) => $shaclPropertyFromRdf({
|
|
1199
1198
|
graph: _$options.graph,
|
|
1200
1199
|
resource: $resource,
|
|
1201
|
-
propertySchema: PropertyShape
|
|
1200
|
+
propertySchema: PropertyShape.schema.properties.defaultValue,
|
|
1202
1201
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1203
1202
|
.chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
|
|
1204
1203
|
switch (term.termType) {
|
|
@@ -1210,7 +1209,7 @@ export var PropertyShape;
|
|
|
1210
1209
|
actualValue: term,
|
|
1211
1210
|
expectedValueType: "(NamedNode | Literal)",
|
|
1212
1211
|
focusResource: $resource,
|
|
1213
|
-
propertyPath: PropertyShape
|
|
1212
|
+
propertyPath: PropertyShape.schema.properties
|
|
1214
1213
|
.defaultValue.path,
|
|
1215
1214
|
}));
|
|
1216
1215
|
}
|
|
@@ -1219,14 +1218,14 @@ export var PropertyShape;
|
|
|
1219
1218
|
? values.map((value) => Maybe.of(value))
|
|
1220
1219
|
: Resource.Values.fromValue({
|
|
1221
1220
|
focusResource: $resource,
|
|
1222
|
-
propertyPath: PropertyShape
|
|
1221
|
+
propertyPath: PropertyShape.schema.properties
|
|
1223
1222
|
.defaultValue.path,
|
|
1224
1223
|
value: Maybe.empty(),
|
|
1225
1224
|
})),
|
|
1226
1225
|
}).chain((defaultValue) => $shaclPropertyFromRdf({
|
|
1227
1226
|
graph: _$options.graph,
|
|
1228
1227
|
resource: $resource,
|
|
1229
|
-
propertySchema: PropertyShape
|
|
1228
|
+
propertySchema: PropertyShape.schema.properties.description,
|
|
1230
1229
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1231
1230
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1232
1231
|
.chain((values) => values.chainMap((value) => value.toString()))
|
|
@@ -1234,21 +1233,21 @@ export var PropertyShape;
|
|
|
1234
1233
|
? values.map((value) => Maybe.of(value))
|
|
1235
1234
|
: Resource.Values.fromValue({
|
|
1236
1235
|
focusResource: $resource,
|
|
1237
|
-
propertyPath: PropertyShape
|
|
1236
|
+
propertyPath: PropertyShape.schema.properties
|
|
1238
1237
|
.description.path,
|
|
1239
1238
|
value: Maybe.empty(),
|
|
1240
1239
|
})),
|
|
1241
1240
|
}).chain((description) => $shaclPropertyFromRdf({
|
|
1242
1241
|
graph: _$options.graph,
|
|
1243
1242
|
resource: $resource,
|
|
1244
|
-
propertySchema: PropertyShape
|
|
1243
|
+
propertySchema: PropertyShape.schema.properties.display,
|
|
1245
1244
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1246
1245
|
.map((values) => values.length > 0
|
|
1247
1246
|
? values
|
|
1248
1247
|
: new Resource.Value({
|
|
1249
1248
|
dataFactory: dataFactory,
|
|
1250
1249
|
focusResource: $resource,
|
|
1251
|
-
propertyPath: PropertyShape
|
|
1250
|
+
propertyPath: PropertyShape.schema.properties
|
|
1252
1251
|
.display.path,
|
|
1253
1252
|
term: dataFactory.literal("false", $RdfVocabularies.xsd.boolean),
|
|
1254
1253
|
}).toValues())
|
|
@@ -1256,34 +1255,34 @@ export var PropertyShape;
|
|
|
1256
1255
|
}).chain((display) => $shaclPropertyFromRdf({
|
|
1257
1256
|
graph: _$options.graph,
|
|
1258
1257
|
resource: $resource,
|
|
1259
|
-
propertySchema: PropertyShape
|
|
1258
|
+
propertySchema: PropertyShape.schema.properties.flags,
|
|
1260
1259
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1261
1260
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1262
1261
|
.chain((values) => values.chainMap((value) => value.toString()))
|
|
1263
1262
|
.map((values) => values.toArray())
|
|
1264
1263
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
1265
1264
|
focusResource: $resource,
|
|
1266
|
-
propertyPath: PropertyShape
|
|
1265
|
+
propertyPath: PropertyShape.schema.properties.flags
|
|
1267
1266
|
.path,
|
|
1268
1267
|
value: valuesArray,
|
|
1269
1268
|
})),
|
|
1270
1269
|
}).chain((flags) => $shaclPropertyFromRdf({
|
|
1271
1270
|
graph: _$options.graph,
|
|
1272
1271
|
resource: $resource,
|
|
1273
|
-
propertySchema: PropertyShape
|
|
1272
|
+
propertySchema: PropertyShape.schema.properties.groups,
|
|
1274
1273
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1275
1274
|
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
1276
1275
|
.map((values) => values.toArray())
|
|
1277
1276
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
1278
1277
|
focusResource: $resource,
|
|
1279
|
-
propertyPath: PropertyShape
|
|
1280
|
-
.
|
|
1278
|
+
propertyPath: PropertyShape.schema.properties.groups
|
|
1279
|
+
.path,
|
|
1281
1280
|
value: valuesArray,
|
|
1282
1281
|
})),
|
|
1283
1282
|
}).chain((groups) => $shaclPropertyFromRdf({
|
|
1284
1283
|
graph: _$options.graph,
|
|
1285
1284
|
resource: $resource,
|
|
1286
|
-
propertySchema: PropertyShape
|
|
1285
|
+
propertySchema: PropertyShape.schema.properties.hasValues,
|
|
1287
1286
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1288
1287
|
.chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
|
|
1289
1288
|
switch (term.termType) {
|
|
@@ -1295,7 +1294,7 @@ export var PropertyShape;
|
|
|
1295
1294
|
actualValue: term,
|
|
1296
1295
|
expectedValueType: "(NamedNode | Literal)",
|
|
1297
1296
|
focusResource: $resource,
|
|
1298
|
-
propertyPath: PropertyShape
|
|
1297
|
+
propertyPath: PropertyShape.schema
|
|
1299
1298
|
.properties.hasValues
|
|
1300
1299
|
.path,
|
|
1301
1300
|
}));
|
|
@@ -1304,21 +1303,21 @@ export var PropertyShape;
|
|
|
1304
1303
|
.map((values) => values.toArray())
|
|
1305
1304
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
1306
1305
|
focusResource: $resource,
|
|
1307
|
-
propertyPath: PropertyShape
|
|
1306
|
+
propertyPath: PropertyShape.schema.properties
|
|
1308
1307
|
.hasValues.path,
|
|
1309
1308
|
value: valuesArray,
|
|
1310
1309
|
})),
|
|
1311
1310
|
}).chain((hasValues) => $shaclPropertyFromRdf({
|
|
1312
1311
|
graph: _$options.graph,
|
|
1313
1312
|
resource: $resource,
|
|
1314
|
-
propertySchema: PropertyShape
|
|
1313
|
+
propertySchema: PropertyShape.schema.properties.in_,
|
|
1315
1314
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1316
1315
|
.chain((values) => values.chainMap((value) => value.toList({
|
|
1317
1316
|
graph: _$options.graph,
|
|
1318
1317
|
})))
|
|
1319
1318
|
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
1320
1319
|
focusResource: $resource,
|
|
1321
|
-
propertyPath: PropertyShape
|
|
1320
|
+
propertyPath: PropertyShape.schema
|
|
1322
1321
|
.properties.in_.path,
|
|
1323
1322
|
values: valueList.toArray(),
|
|
1324
1323
|
})).chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
|
|
@@ -1332,7 +1331,7 @@ export var PropertyShape;
|
|
|
1332
1331
|
expectedValueType: "(NamedNode | Literal)",
|
|
1333
1332
|
focusResource: $resource,
|
|
1334
1333
|
propertyPath: PropertyShape
|
|
1335
|
-
|
|
1334
|
+
.schema
|
|
1336
1335
|
.properties.in_
|
|
1337
1336
|
.path,
|
|
1338
1337
|
}));
|
|
@@ -1343,21 +1342,21 @@ export var PropertyShape;
|
|
|
1343
1342
|
? values.map((value) => Maybe.of(value))
|
|
1344
1343
|
: Resource.Values.fromValue({
|
|
1345
1344
|
focusResource: $resource,
|
|
1346
|
-
propertyPath: PropertyShape
|
|
1345
|
+
propertyPath: PropertyShape.schema
|
|
1347
1346
|
.properties.in_.path,
|
|
1348
1347
|
value: Maybe.empty(),
|
|
1349
1348
|
})),
|
|
1350
1349
|
}).chain((in_) => $shaclPropertyFromRdf({
|
|
1351
1350
|
graph: _$options.graph,
|
|
1352
1351
|
resource: $resource,
|
|
1353
|
-
propertySchema: PropertyShape
|
|
1352
|
+
propertySchema: PropertyShape.schema.properties.isDefinedBy,
|
|
1354
1353
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1355
1354
|
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
1356
1355
|
.map((values) => values.length > 0
|
|
1357
1356
|
? values.map((value) => Maybe.of(value))
|
|
1358
1357
|
: Resource.Values.fromValue({
|
|
1359
1358
|
focusResource: $resource,
|
|
1360
|
-
propertyPath: PropertyShape
|
|
1359
|
+
propertyPath: PropertyShape.schema
|
|
1361
1360
|
.properties.isDefinedBy
|
|
1362
1361
|
.path,
|
|
1363
1362
|
value: Maybe.empty(),
|
|
@@ -1365,7 +1364,7 @@ export var PropertyShape;
|
|
|
1365
1364
|
}).chain((isDefinedBy) => $shaclPropertyFromRdf({
|
|
1366
1365
|
graph: _$options.graph,
|
|
1367
1366
|
resource: $resource,
|
|
1368
|
-
propertySchema: PropertyShape
|
|
1367
|
+
propertySchema: PropertyShape.schema.properties.label,
|
|
1369
1368
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1370
1369
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1371
1370
|
.chain((values) => values.chainMap((value) => value.toString()))
|
|
@@ -1373,22 +1372,21 @@ export var PropertyShape;
|
|
|
1373
1372
|
? values.map((value) => Maybe.of(value))
|
|
1374
1373
|
: Resource.Values.fromValue({
|
|
1375
1374
|
focusResource: $resource,
|
|
1376
|
-
propertyPath: PropertyShape
|
|
1375
|
+
propertyPath: PropertyShape.schema
|
|
1377
1376
|
.properties.label.path,
|
|
1378
1377
|
value: Maybe.empty(),
|
|
1379
1378
|
})),
|
|
1380
1379
|
}).chain((label) => $shaclPropertyFromRdf({
|
|
1381
1380
|
graph: _$options.graph,
|
|
1382
1381
|
resource: $resource,
|
|
1383
|
-
propertySchema: PropertyShape
|
|
1382
|
+
propertySchema: PropertyShape.schema.properties.languageIn,
|
|
1384
1383
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1385
1384
|
.chain((values) => values.chainMap((value) => value.toList({
|
|
1386
1385
|
graph: _$options.graph,
|
|
1387
1386
|
})))
|
|
1388
1387
|
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
1389
1388
|
focusResource: $resource,
|
|
1390
|
-
propertyPath: PropertyShape
|
|
1391
|
-
.$schema
|
|
1389
|
+
propertyPath: PropertyShape.schema
|
|
1392
1390
|
.properties
|
|
1393
1391
|
.languageIn.path,
|
|
1394
1392
|
values: valueList.toArray(),
|
|
@@ -1400,7 +1398,7 @@ export var PropertyShape;
|
|
|
1400
1398
|
? values.map((value) => Maybe.of(value))
|
|
1401
1399
|
: Resource.Values.fromValue({
|
|
1402
1400
|
focusResource: $resource,
|
|
1403
|
-
propertyPath: PropertyShape
|
|
1401
|
+
propertyPath: PropertyShape.schema
|
|
1404
1402
|
.properties.languageIn
|
|
1405
1403
|
.path,
|
|
1406
1404
|
value: Maybe.empty(),
|
|
@@ -1408,14 +1406,14 @@ export var PropertyShape;
|
|
|
1408
1406
|
}).chain((languageIn) => $shaclPropertyFromRdf({
|
|
1409
1407
|
graph: _$options.graph,
|
|
1410
1408
|
resource: $resource,
|
|
1411
|
-
propertySchema: PropertyShape
|
|
1409
|
+
propertySchema: PropertyShape.schema.properties.maxCount,
|
|
1412
1410
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1413
1411
|
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
1414
1412
|
.map((values) => values.length > 0
|
|
1415
1413
|
? values.map((value) => Maybe.of(value))
|
|
1416
1414
|
: Resource.Values.fromValue({
|
|
1417
1415
|
focusResource: $resource,
|
|
1418
|
-
propertyPath: PropertyShape
|
|
1416
|
+
propertyPath: PropertyShape.schema
|
|
1419
1417
|
.properties.maxCount
|
|
1420
1418
|
.path,
|
|
1421
1419
|
value: Maybe.empty(),
|
|
@@ -1423,7 +1421,7 @@ export var PropertyShape;
|
|
|
1423
1421
|
}).chain((maxCount) => $shaclPropertyFromRdf({
|
|
1424
1422
|
graph: _$options.graph,
|
|
1425
1423
|
resource: $resource,
|
|
1426
|
-
propertySchema: PropertyShape
|
|
1424
|
+
propertySchema: PropertyShape.schema.properties.maxExclusive,
|
|
1427
1425
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1428
1426
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
1429
1427
|
.chain((values) => values.chainMap((value) => value.toLiteral()))
|
|
@@ -1431,8 +1429,7 @@ export var PropertyShape;
|
|
|
1431
1429
|
? values.map((value) => Maybe.of(value))
|
|
1432
1430
|
: Resource.Values.fromValue({
|
|
1433
1431
|
focusResource: $resource,
|
|
1434
|
-
propertyPath: PropertyShape
|
|
1435
|
-
.$schema
|
|
1432
|
+
propertyPath: PropertyShape.schema
|
|
1436
1433
|
.properties
|
|
1437
1434
|
.maxExclusive
|
|
1438
1435
|
.path,
|
|
@@ -1441,7 +1438,7 @@ export var PropertyShape;
|
|
|
1441
1438
|
}).chain((maxExclusive) => $shaclPropertyFromRdf({
|
|
1442
1439
|
graph: _$options.graph,
|
|
1443
1440
|
resource: $resource,
|
|
1444
|
-
propertySchema: PropertyShape
|
|
1441
|
+
propertySchema: PropertyShape.schema.properties
|
|
1445
1442
|
.maxInclusive,
|
|
1446
1443
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1447
1444
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
@@ -1451,7 +1448,7 @@ export var PropertyShape;
|
|
|
1451
1448
|
: Resource.Values.fromValue({
|
|
1452
1449
|
focusResource: $resource,
|
|
1453
1450
|
propertyPath: PropertyShape
|
|
1454
|
-
|
|
1451
|
+
.schema
|
|
1455
1452
|
.properties
|
|
1456
1453
|
.maxInclusive
|
|
1457
1454
|
.path,
|
|
@@ -1460,8 +1457,7 @@ export var PropertyShape;
|
|
|
1460
1457
|
}).chain((maxInclusive) => $shaclPropertyFromRdf({
|
|
1461
1458
|
graph: _$options.graph,
|
|
1462
1459
|
resource: $resource,
|
|
1463
|
-
propertySchema: PropertyShape
|
|
1464
|
-
.maxLength,
|
|
1460
|
+
propertySchema: PropertyShape.schema.properties.maxLength,
|
|
1465
1461
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1466
1462
|
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
1467
1463
|
.map((values) => values.length > 0
|
|
@@ -1469,7 +1465,7 @@ export var PropertyShape;
|
|
|
1469
1465
|
: Resource.Values.fromValue({
|
|
1470
1466
|
focusResource: $resource,
|
|
1471
1467
|
propertyPath: PropertyShape
|
|
1472
|
-
|
|
1468
|
+
.schema
|
|
1473
1469
|
.properties
|
|
1474
1470
|
.maxLength
|
|
1475
1471
|
.path,
|
|
@@ -1478,7 +1474,7 @@ export var PropertyShape;
|
|
|
1478
1474
|
}).chain((maxLength) => $shaclPropertyFromRdf({
|
|
1479
1475
|
graph: _$options.graph,
|
|
1480
1476
|
resource: $resource,
|
|
1481
|
-
propertySchema: PropertyShape
|
|
1477
|
+
propertySchema: PropertyShape.schema.properties
|
|
1482
1478
|
.minCount,
|
|
1483
1479
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1484
1480
|
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
@@ -1487,7 +1483,7 @@ export var PropertyShape;
|
|
|
1487
1483
|
: Resource.Values.fromValue({
|
|
1488
1484
|
focusResource: $resource,
|
|
1489
1485
|
propertyPath: PropertyShape
|
|
1490
|
-
|
|
1486
|
+
.schema
|
|
1491
1487
|
.properties
|
|
1492
1488
|
.minCount
|
|
1493
1489
|
.path,
|
|
@@ -1496,7 +1492,7 @@ export var PropertyShape;
|
|
|
1496
1492
|
}).chain((minCount) => $shaclPropertyFromRdf({
|
|
1497
1493
|
graph: _$options.graph,
|
|
1498
1494
|
resource: $resource,
|
|
1499
|
-
propertySchema: PropertyShape
|
|
1495
|
+
propertySchema: PropertyShape.schema.properties
|
|
1500
1496
|
.minExclusive,
|
|
1501
1497
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1502
1498
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
@@ -1506,7 +1502,7 @@ export var PropertyShape;
|
|
|
1506
1502
|
: Resource.Values.fromValue({
|
|
1507
1503
|
focusResource: $resource,
|
|
1508
1504
|
propertyPath: PropertyShape
|
|
1509
|
-
|
|
1505
|
+
.schema
|
|
1510
1506
|
.properties
|
|
1511
1507
|
.minExclusive
|
|
1512
1508
|
.path,
|
|
@@ -1515,7 +1511,7 @@ export var PropertyShape;
|
|
|
1515
1511
|
}).chain((minExclusive) => $shaclPropertyFromRdf({
|
|
1516
1512
|
graph: _$options.graph,
|
|
1517
1513
|
resource: $resource,
|
|
1518
|
-
propertySchema: PropertyShape
|
|
1514
|
+
propertySchema: PropertyShape.schema.properties
|
|
1519
1515
|
.minInclusive,
|
|
1520
1516
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1521
1517
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
@@ -1525,7 +1521,7 @@ export var PropertyShape;
|
|
|
1525
1521
|
: Resource.Values.fromValue({
|
|
1526
1522
|
focusResource: $resource,
|
|
1527
1523
|
propertyPath: PropertyShape
|
|
1528
|
-
|
|
1524
|
+
.schema
|
|
1529
1525
|
.properties
|
|
1530
1526
|
.minInclusive
|
|
1531
1527
|
.path,
|
|
@@ -1534,7 +1530,7 @@ export var PropertyShape;
|
|
|
1534
1530
|
}).chain((minInclusive) => $shaclPropertyFromRdf({
|
|
1535
1531
|
graph: _$options.graph,
|
|
1536
1532
|
resource: $resource,
|
|
1537
|
-
propertySchema: PropertyShape
|
|
1533
|
+
propertySchema: PropertyShape.schema.properties
|
|
1538
1534
|
.minLength,
|
|
1539
1535
|
typeFromRdf: (resourceValues) => resourceValues
|
|
1540
1536
|
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
@@ -1544,7 +1540,7 @@ export var PropertyShape;
|
|
|
1544
1540
|
: Resource.Values.fromValue({
|
|
1545
1541
|
focusResource: $resource,
|
|
1546
1542
|
propertyPath: PropertyShape
|
|
1547
|
-
|
|
1543
|
+
.schema
|
|
1548
1544
|
.properties
|
|
1549
1545
|
.minLength
|
|
1550
1546
|
.path,
|
|
@@ -1553,7 +1549,7 @@ export var PropertyShape;
|
|
|
1553
1549
|
}).chain((minLength) => $shaclPropertyFromRdf({
|
|
1554
1550
|
graph: _$options.graph,
|
|
1555
1551
|
resource: $resource,
|
|
1556
|
-
propertySchema: PropertyShape
|
|
1552
|
+
propertySchema: PropertyShape.schema
|
|
1557
1553
|
.properties
|
|
1558
1554
|
.mutable,
|
|
1559
1555
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -1564,7 +1560,7 @@ export var PropertyShape;
|
|
|
1564
1560
|
: Resource.Values.fromValue({
|
|
1565
1561
|
focusResource: $resource,
|
|
1566
1562
|
propertyPath: PropertyShape
|
|
1567
|
-
|
|
1563
|
+
.schema
|
|
1568
1564
|
.properties
|
|
1569
1565
|
.mutable
|
|
1570
1566
|
.path,
|
|
@@ -1573,7 +1569,7 @@ export var PropertyShape;
|
|
|
1573
1569
|
}).chain((mutable) => $shaclPropertyFromRdf({
|
|
1574
1570
|
graph: _$options.graph,
|
|
1575
1571
|
resource: $resource,
|
|
1576
|
-
propertySchema: PropertyShape
|
|
1572
|
+
propertySchema: PropertyShape.schema
|
|
1577
1573
|
.properties
|
|
1578
1574
|
.name,
|
|
1579
1575
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -1585,7 +1581,7 @@ export var PropertyShape;
|
|
|
1585
1581
|
: Resource.Values.fromValue({
|
|
1586
1582
|
focusResource: $resource,
|
|
1587
1583
|
propertyPath: PropertyShape
|
|
1588
|
-
|
|
1584
|
+
.schema
|
|
1589
1585
|
.properties
|
|
1590
1586
|
.name
|
|
1591
1587
|
.path,
|
|
@@ -1594,7 +1590,7 @@ export var PropertyShape;
|
|
|
1594
1590
|
}).chain((name) => $shaclPropertyFromRdf({
|
|
1595
1591
|
graph: _$options.graph,
|
|
1596
1592
|
resource: $resource,
|
|
1597
|
-
propertySchema: PropertyShape
|
|
1593
|
+
propertySchema: PropertyShape.schema
|
|
1598
1594
|
.properties
|
|
1599
1595
|
.node,
|
|
1600
1596
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -1605,7 +1601,7 @@ export var PropertyShape;
|
|
|
1605
1601
|
: Resource.Values.fromValue({
|
|
1606
1602
|
focusResource: $resource,
|
|
1607
1603
|
propertyPath: PropertyShape
|
|
1608
|
-
|
|
1604
|
+
.schema
|
|
1609
1605
|
.properties
|
|
1610
1606
|
.node
|
|
1611
1607
|
.path,
|
|
@@ -1614,7 +1610,7 @@ export var PropertyShape;
|
|
|
1614
1610
|
}).chain((node) => $shaclPropertyFromRdf({
|
|
1615
1611
|
graph: _$options.graph,
|
|
1616
1612
|
resource: $resource,
|
|
1617
|
-
propertySchema: PropertyShape
|
|
1613
|
+
propertySchema: PropertyShape.schema
|
|
1618
1614
|
.properties
|
|
1619
1615
|
.nodeKind,
|
|
1620
1616
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -1632,7 +1628,7 @@ export var PropertyShape;
|
|
|
1632
1628
|
: Resource.Values.fromValue({
|
|
1633
1629
|
focusResource: $resource,
|
|
1634
1630
|
propertyPath: PropertyShape
|
|
1635
|
-
|
|
1631
|
+
.schema
|
|
1636
1632
|
.properties
|
|
1637
1633
|
.nodeKind
|
|
1638
1634
|
.path,
|
|
@@ -1641,7 +1637,7 @@ export var PropertyShape;
|
|
|
1641
1637
|
}).chain((nodeKind) => $shaclPropertyFromRdf({
|
|
1642
1638
|
graph: _$options.graph,
|
|
1643
1639
|
resource: $resource,
|
|
1644
|
-
propertySchema: PropertyShape
|
|
1640
|
+
propertySchema: PropertyShape.schema
|
|
1645
1641
|
.properties
|
|
1646
1642
|
.not,
|
|
1647
1643
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -1650,7 +1646,7 @@ export var PropertyShape;
|
|
|
1650
1646
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
1651
1647
|
focusResource: $resource,
|
|
1652
1648
|
propertyPath: PropertyShape
|
|
1653
|
-
|
|
1649
|
+
.schema
|
|
1654
1650
|
.properties
|
|
1655
1651
|
.not
|
|
1656
1652
|
.path,
|
|
@@ -1659,7 +1655,7 @@ export var PropertyShape;
|
|
|
1659
1655
|
}).chain((not) => $shaclPropertyFromRdf({
|
|
1660
1656
|
graph: _$options.graph,
|
|
1661
1657
|
resource: $resource,
|
|
1662
|
-
propertySchema: PropertyShape
|
|
1658
|
+
propertySchema: PropertyShape.schema
|
|
1663
1659
|
.properties
|
|
1664
1660
|
.or,
|
|
1665
1661
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -1669,7 +1665,7 @@ export var PropertyShape;
|
|
|
1669
1665
|
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
1670
1666
|
focusResource: $resource,
|
|
1671
1667
|
propertyPath: PropertyShape
|
|
1672
|
-
|
|
1668
|
+
.schema
|
|
1673
1669
|
.properties
|
|
1674
1670
|
.or
|
|
1675
1671
|
.path,
|
|
@@ -1682,7 +1678,7 @@ export var PropertyShape;
|
|
|
1682
1678
|
: Resource.Values.fromValue({
|
|
1683
1679
|
focusResource: $resource,
|
|
1684
1680
|
propertyPath: PropertyShape
|
|
1685
|
-
|
|
1681
|
+
.schema
|
|
1686
1682
|
.properties
|
|
1687
1683
|
.or
|
|
1688
1684
|
.path,
|
|
@@ -1691,7 +1687,7 @@ export var PropertyShape;
|
|
|
1691
1687
|
}).chain((or) => $shaclPropertyFromRdf({
|
|
1692
1688
|
graph: _$options.graph,
|
|
1693
1689
|
resource: $resource,
|
|
1694
|
-
propertySchema: PropertyShape
|
|
1690
|
+
propertySchema: PropertyShape.schema
|
|
1695
1691
|
.properties
|
|
1696
1692
|
.order,
|
|
1697
1693
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -1702,7 +1698,7 @@ export var PropertyShape;
|
|
|
1702
1698
|
: Resource.Values.fromValue({
|
|
1703
1699
|
focusResource: $resource,
|
|
1704
1700
|
propertyPath: PropertyShape
|
|
1705
|
-
|
|
1701
|
+
.schema
|
|
1706
1702
|
.properties
|
|
1707
1703
|
.order
|
|
1708
1704
|
.path,
|
|
@@ -1711,10 +1707,10 @@ export var PropertyShape;
|
|
|
1711
1707
|
}).chain((order) => $shaclPropertyFromRdf({
|
|
1712
1708
|
graph: _$options.graph,
|
|
1713
1709
|
resource: $resource,
|
|
1714
|
-
propertySchema: PropertyShape
|
|
1710
|
+
propertySchema: PropertyShape.schema
|
|
1715
1711
|
.properties
|
|
1716
1712
|
.path,
|
|
1717
|
-
typeFromRdf: (resourceValues) => $PropertyPath
|
|
1713
|
+
typeFromRdf: (resourceValues) => $PropertyPath.fromRdfResourceValues(resourceValues, {
|
|
1718
1714
|
context: _$options.context,
|
|
1719
1715
|
graph: _$options.graph,
|
|
1720
1716
|
preferredLanguages: _$options.preferredLanguages,
|
|
@@ -1722,7 +1718,7 @@ export var PropertyShape;
|
|
|
1722
1718
|
resource: $resource,
|
|
1723
1719
|
ignoreRdfType: true,
|
|
1724
1720
|
propertyPath: PropertyShape
|
|
1725
|
-
|
|
1721
|
+
.schema
|
|
1726
1722
|
.properties
|
|
1727
1723
|
.path
|
|
1728
1724
|
.path,
|
|
@@ -1730,7 +1726,7 @@ export var PropertyShape;
|
|
|
1730
1726
|
}).chain((path) => $shaclPropertyFromRdf({
|
|
1731
1727
|
graph: _$options.graph,
|
|
1732
1728
|
resource: $resource,
|
|
1733
|
-
propertySchema: PropertyShape
|
|
1729
|
+
propertySchema: PropertyShape.schema
|
|
1734
1730
|
.properties
|
|
1735
1731
|
.patterns,
|
|
1736
1732
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -1740,7 +1736,7 @@ export var PropertyShape;
|
|
|
1740
1736
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
1741
1737
|
focusResource: $resource,
|
|
1742
1738
|
propertyPath: PropertyShape
|
|
1743
|
-
|
|
1739
|
+
.schema
|
|
1744
1740
|
.properties
|
|
1745
1741
|
.patterns
|
|
1746
1742
|
.path,
|
|
@@ -1749,7 +1745,7 @@ export var PropertyShape;
|
|
|
1749
1745
|
}).chain((patterns) => $shaclPropertyFromRdf({
|
|
1750
1746
|
graph: _$options.graph,
|
|
1751
1747
|
resource: $resource,
|
|
1752
|
-
propertySchema: PropertyShape
|
|
1748
|
+
propertySchema: PropertyShape.schema
|
|
1753
1749
|
.properties
|
|
1754
1750
|
.resolve,
|
|
1755
1751
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -1760,7 +1756,7 @@ export var PropertyShape;
|
|
|
1760
1756
|
: Resource.Values.fromValue({
|
|
1761
1757
|
focusResource: $resource,
|
|
1762
1758
|
propertyPath: PropertyShape
|
|
1763
|
-
|
|
1759
|
+
.schema
|
|
1764
1760
|
.properties
|
|
1765
1761
|
.resolve
|
|
1766
1762
|
.path,
|
|
@@ -1769,7 +1765,7 @@ export var PropertyShape;
|
|
|
1769
1765
|
}).chain((resolve) => $shaclPropertyFromRdf({
|
|
1770
1766
|
graph: _$options.graph,
|
|
1771
1767
|
resource: $resource,
|
|
1772
|
-
propertySchema: PropertyShape
|
|
1768
|
+
propertySchema: PropertyShape.schema
|
|
1773
1769
|
.properties
|
|
1774
1770
|
.shaclmateName,
|
|
1775
1771
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -1781,7 +1777,7 @@ export var PropertyShape;
|
|
|
1781
1777
|
: Resource.Values.fromValue({
|
|
1782
1778
|
focusResource: $resource,
|
|
1783
1779
|
propertyPath: PropertyShape
|
|
1784
|
-
|
|
1780
|
+
.schema
|
|
1785
1781
|
.properties
|
|
1786
1782
|
.shaclmateName
|
|
1787
1783
|
.path,
|
|
@@ -1790,7 +1786,7 @@ export var PropertyShape;
|
|
|
1790
1786
|
}).chain((shaclmateName) => $shaclPropertyFromRdf({
|
|
1791
1787
|
graph: _$options.graph,
|
|
1792
1788
|
resource: $resource,
|
|
1793
|
-
propertySchema: PropertyShape
|
|
1789
|
+
propertySchema: PropertyShape.schema
|
|
1794
1790
|
.properties
|
|
1795
1791
|
.uniqueLang,
|
|
1796
1792
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -1801,7 +1797,7 @@ export var PropertyShape;
|
|
|
1801
1797
|
: Resource.Values.fromValue({
|
|
1802
1798
|
focusResource: $resource,
|
|
1803
1799
|
propertyPath: PropertyShape
|
|
1804
|
-
|
|
1800
|
+
.schema
|
|
1805
1801
|
.properties
|
|
1806
1802
|
.uniqueLang
|
|
1807
1803
|
.path,
|
|
@@ -1810,7 +1806,7 @@ export var PropertyShape;
|
|
|
1810
1806
|
}).chain((uniqueLang) => $shaclPropertyFromRdf({
|
|
1811
1807
|
graph: _$options.graph,
|
|
1812
1808
|
resource: $resource,
|
|
1813
|
-
propertySchema: PropertyShape
|
|
1809
|
+
propertySchema: PropertyShape.schema
|
|
1814
1810
|
.properties
|
|
1815
1811
|
.xone,
|
|
1816
1812
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -1820,7 +1816,7 @@ export var PropertyShape;
|
|
|
1820
1816
|
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
1821
1817
|
focusResource: $resource,
|
|
1822
1818
|
propertyPath: PropertyShape
|
|
1823
|
-
|
|
1819
|
+
.schema
|
|
1824
1820
|
.properties
|
|
1825
1821
|
.xone
|
|
1826
1822
|
.path,
|
|
@@ -1833,7 +1829,7 @@ export var PropertyShape;
|
|
|
1833
1829
|
: Resource.Values.fromValue({
|
|
1834
1830
|
focusResource: $resource,
|
|
1835
1831
|
propertyPath: PropertyShape
|
|
1836
|
-
|
|
1832
|
+
.schema
|
|
1837
1833
|
.properties
|
|
1838
1834
|
.xone
|
|
1839
1835
|
.path,
|
|
@@ -1880,7 +1876,7 @@ export var PropertyShape;
|
|
|
1880
1876
|
xone,
|
|
1881
1877
|
}))))))))))))))))))))))))))))))))))))))));
|
|
1882
1878
|
};
|
|
1883
|
-
PropertyShape
|
|
1879
|
+
PropertyShape.schema = {
|
|
1884
1880
|
properties: {
|
|
1885
1881
|
$identifier: {
|
|
1886
1882
|
kind: "Identifier",
|
|
@@ -2158,7 +2154,7 @@ export var PropertyShape;
|
|
|
2158
2154
|
},
|
|
2159
2155
|
path: {
|
|
2160
2156
|
kind: "Shacl",
|
|
2161
|
-
type: () => $PropertyPath
|
|
2157
|
+
type: () => $PropertyPath.schema,
|
|
2162
2158
|
path: dataFactory.namedNode("http://www.w3.org/ns/shacl#path"),
|
|
2163
2159
|
},
|
|
2164
2160
|
patterns: {
|
|
@@ -2206,7 +2202,7 @@ export var PropertyShape;
|
|
|
2206
2202
|
},
|
|
2207
2203
|
},
|
|
2208
2204
|
};
|
|
2209
|
-
function
|
|
2205
|
+
function toRdfResource(_propertyShape, options) {
|
|
2210
2206
|
const resourceSet = options?.resourceSet ??
|
|
2211
2207
|
new ResourceSet({
|
|
2212
2208
|
dataFactory: dataFactory,
|
|
@@ -2371,7 +2367,7 @@ export var PropertyShape;
|
|
|
2371
2367
|
$literalFactory.number(value, $RdfVocabularies.xsd.double),
|
|
2372
2368
|
]), options?.graph);
|
|
2373
2369
|
resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#path"), [
|
|
2374
|
-
$PropertyPath
|
|
2370
|
+
$PropertyPath.toRdfResource(_propertyShape.path, {
|
|
2375
2371
|
graph: options?.graph,
|
|
2376
2372
|
resourceSet: resourceSet,
|
|
2377
2373
|
}).identifier,
|
|
@@ -2410,8 +2406,8 @@ export var PropertyShape;
|
|
|
2410
2406
|
]), options?.graph);
|
|
2411
2407
|
return resource;
|
|
2412
2408
|
}
|
|
2413
|
-
PropertyShape
|
|
2414
|
-
function
|
|
2409
|
+
PropertyShape.toRdfResource = toRdfResource;
|
|
2410
|
+
function propertiesToStrings(_propertyShape) {
|
|
2415
2411
|
return $compactRecord({
|
|
2416
2412
|
$identifier: _propertyShape.$identifier().toString(),
|
|
2417
2413
|
label: _propertyShape.label.map((item) => item.toString()).extract(),
|
|
@@ -2422,15 +2418,15 @@ export var PropertyShape;
|
|
|
2422
2418
|
.extract(),
|
|
2423
2419
|
});
|
|
2424
2420
|
}
|
|
2425
|
-
PropertyShape
|
|
2421
|
+
PropertyShape.propertiesToStrings = propertiesToStrings;
|
|
2426
2422
|
function $toString(_propertyShape) {
|
|
2427
|
-
return `PropertyShape(${JSON.stringify(
|
|
2423
|
+
return `PropertyShape(${JSON.stringify(propertiesToStrings((_propertyShape ?? this)))})`;
|
|
2428
2424
|
}
|
|
2429
2425
|
PropertyShape.$toString = $toString;
|
|
2430
2426
|
})(PropertyShape || (PropertyShape = {}));
|
|
2431
2427
|
export var PropertyGroup;
|
|
2432
2428
|
(function (PropertyGroup) {
|
|
2433
|
-
function
|
|
2429
|
+
function create(parameters) {
|
|
2434
2430
|
const $identifierParameter = parameters?.$identifier;
|
|
2435
2431
|
let $identifier;
|
|
2436
2432
|
if (typeof $identifierParameter === "function") {
|
|
@@ -2478,13 +2474,13 @@ export var PropertyGroup;
|
|
|
2478
2474
|
}
|
|
2479
2475
|
return { $identifier, $type, comment, label };
|
|
2480
2476
|
}
|
|
2481
|
-
PropertyGroup
|
|
2482
|
-
let
|
|
2483
|
-
(function (
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
})(
|
|
2487
|
-
function
|
|
2477
|
+
PropertyGroup.create = create;
|
|
2478
|
+
let Identifier;
|
|
2479
|
+
(function (Identifier) {
|
|
2480
|
+
Identifier.parse = $parseIdentifier;
|
|
2481
|
+
Identifier.stringify = NTriplesTerm.stringify;
|
|
2482
|
+
})(Identifier = PropertyGroup.Identifier || (PropertyGroup.Identifier = {}));
|
|
2483
|
+
function filter(filter, value) {
|
|
2488
2484
|
if (filter.$identifier !== undefined &&
|
|
2489
2485
|
!$filterIdentifier(filter.$identifier, value.$identifier())) {
|
|
2490
2486
|
return false;
|
|
@@ -2499,24 +2495,24 @@ export var PropertyGroup;
|
|
|
2499
2495
|
}
|
|
2500
2496
|
return true;
|
|
2501
2497
|
}
|
|
2502
|
-
PropertyGroup
|
|
2503
|
-
PropertyGroup
|
|
2498
|
+
PropertyGroup.filter = filter;
|
|
2499
|
+
PropertyGroup.fromRdfResource = (resource, options) => {
|
|
2504
2500
|
let { context, graph, ignoreRdfType = false, objectSet, preferredLanguages, } = options ?? {};
|
|
2505
2501
|
if (!objectSet) {
|
|
2506
2502
|
objectSet = new $RdfjsDatasetObjectSet(resource.dataset);
|
|
2507
2503
|
}
|
|
2508
|
-
return PropertyGroup
|
|
2504
|
+
return PropertyGroup.propertiesFromRdfResource(resource, {
|
|
2509
2505
|
context,
|
|
2510
2506
|
graph,
|
|
2511
2507
|
ignoreRdfType,
|
|
2512
2508
|
objectSet,
|
|
2513
2509
|
preferredLanguages,
|
|
2514
|
-
}).map(
|
|
2510
|
+
}).map(create);
|
|
2515
2511
|
};
|
|
2516
|
-
PropertyGroup
|
|
2512
|
+
PropertyGroup.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
2517
2513
|
.toResource()
|
|
2518
|
-
.chain((resource) => PropertyGroup
|
|
2519
|
-
PropertyGroup
|
|
2514
|
+
.chain((resource) => PropertyGroup.fromRdfResource(resource, options))));
|
|
2515
|
+
PropertyGroup.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup");
|
|
2520
2516
|
function isPropertyGroup(object) {
|
|
2521
2517
|
switch (object.$type) {
|
|
2522
2518
|
case "PropertyGroup":
|
|
@@ -2526,7 +2522,7 @@ export var PropertyGroup;
|
|
|
2526
2522
|
}
|
|
2527
2523
|
}
|
|
2528
2524
|
PropertyGroup.isPropertyGroup = isPropertyGroup;
|
|
2529
|
-
PropertyGroup
|
|
2525
|
+
PropertyGroup.propertiesFromRdfResource = ($resource, _$options) => {
|
|
2530
2526
|
return (!_$options.ignoreRdfType
|
|
2531
2527
|
? $resource
|
|
2532
2528
|
.value($RdfVocabularies.rdf.type, { graph: _$options.graph })
|
|
@@ -2538,7 +2534,7 @@ export var PropertyGroup;
|
|
|
2538
2534
|
return Right(true);
|
|
2539
2535
|
}
|
|
2540
2536
|
// Check arbitrary rdfs:subClassOf's of the expected type
|
|
2541
|
-
if ($resource.isInstanceOf(PropertyGroup
|
|
2537
|
+
if ($resource.isInstanceOf(PropertyGroup.fromRdfType, {
|
|
2542
2538
|
graph: _$options.graph,
|
|
2543
2539
|
})) {
|
|
2544
2540
|
return Right(true);
|
|
@@ -2556,7 +2552,7 @@ export var PropertyGroup;
|
|
|
2556
2552
|
.chain(($identifier) => Right("PropertyGroup").chain(($type) => $shaclPropertyFromRdf({
|
|
2557
2553
|
graph: _$options.graph,
|
|
2558
2554
|
resource: $resource,
|
|
2559
|
-
propertySchema: PropertyGroup
|
|
2555
|
+
propertySchema: PropertyGroup.schema.properties.comment,
|
|
2560
2556
|
typeFromRdf: (resourceValues) => resourceValues
|
|
2561
2557
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
2562
2558
|
.chain((values) => values.chainMap((value) => value.toString()))
|
|
@@ -2564,13 +2560,13 @@ export var PropertyGroup;
|
|
|
2564
2560
|
? values.map((value) => Maybe.of(value))
|
|
2565
2561
|
: Resource.Values.fromValue({
|
|
2566
2562
|
focusResource: $resource,
|
|
2567
|
-
propertyPath: PropertyShape
|
|
2563
|
+
propertyPath: PropertyShape.schema.properties.comment.path,
|
|
2568
2564
|
value: Maybe.empty(),
|
|
2569
2565
|
})),
|
|
2570
2566
|
}).chain((comment) => $shaclPropertyFromRdf({
|
|
2571
2567
|
graph: _$options.graph,
|
|
2572
2568
|
resource: $resource,
|
|
2573
|
-
propertySchema: PropertyGroup
|
|
2569
|
+
propertySchema: PropertyGroup.schema.properties.label,
|
|
2574
2570
|
typeFromRdf: (resourceValues) => resourceValues
|
|
2575
2571
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
2576
2572
|
.chain((values) => values.chainMap((value) => value.toString()))
|
|
@@ -2578,12 +2574,12 @@ export var PropertyGroup;
|
|
|
2578
2574
|
? values.map((value) => Maybe.of(value))
|
|
2579
2575
|
: Resource.Values.fromValue({
|
|
2580
2576
|
focusResource: $resource,
|
|
2581
|
-
propertyPath: PropertyShape
|
|
2577
|
+
propertyPath: PropertyShape.schema.properties.label.path,
|
|
2582
2578
|
value: Maybe.empty(),
|
|
2583
2579
|
})),
|
|
2584
2580
|
}).map((label) => ({ $identifier, $type, comment, label }))))));
|
|
2585
2581
|
};
|
|
2586
|
-
PropertyGroup
|
|
2582
|
+
PropertyGroup.schema = {
|
|
2587
2583
|
properties: {
|
|
2588
2584
|
$identifier: {
|
|
2589
2585
|
kind: "Identifier",
|
|
@@ -2614,7 +2610,7 @@ export var PropertyGroup;
|
|
|
2614
2610
|
},
|
|
2615
2611
|
},
|
|
2616
2612
|
};
|
|
2617
|
-
function
|
|
2613
|
+
function toRdfResource(_propertyGroup, options) {
|
|
2618
2614
|
const resourceSet = options?.resourceSet ??
|
|
2619
2615
|
new ResourceSet({
|
|
2620
2616
|
dataFactory: dataFactory,
|
|
@@ -2632,22 +2628,22 @@ export var PropertyGroup;
|
|
|
2632
2628
|
.flatMap((value) => [$literalFactory.string(value)]), options?.graph);
|
|
2633
2629
|
return resource;
|
|
2634
2630
|
}
|
|
2635
|
-
PropertyGroup
|
|
2636
|
-
function
|
|
2631
|
+
PropertyGroup.toRdfResource = toRdfResource;
|
|
2632
|
+
function propertiesToStrings(_propertyGroup) {
|
|
2637
2633
|
return $compactRecord({
|
|
2638
2634
|
$identifier: _propertyGroup.$identifier().toString(),
|
|
2639
2635
|
label: _propertyGroup.label.map((item) => item.toString()).extract(),
|
|
2640
2636
|
});
|
|
2641
2637
|
}
|
|
2642
|
-
PropertyGroup
|
|
2638
|
+
PropertyGroup.propertiesToStrings = propertiesToStrings;
|
|
2643
2639
|
function $toString(_propertyGroup) {
|
|
2644
|
-
return `PropertyGroup(${JSON.stringify(
|
|
2640
|
+
return `PropertyGroup(${JSON.stringify(propertiesToStrings((_propertyGroup ?? this)))})`;
|
|
2645
2641
|
}
|
|
2646
2642
|
PropertyGroup.$toString = $toString;
|
|
2647
2643
|
})(PropertyGroup || (PropertyGroup = {}));
|
|
2648
2644
|
export var Ontology;
|
|
2649
2645
|
(function (Ontology) {
|
|
2650
|
-
function
|
|
2646
|
+
function create(parameters) {
|
|
2651
2647
|
const $identifierParameter = parameters?.$identifier;
|
|
2652
2648
|
let $identifier;
|
|
2653
2649
|
if (typeof $identifierParameter === "function") {
|
|
@@ -2739,13 +2735,13 @@ export var Ontology;
|
|
|
2739
2735
|
tsImports,
|
|
2740
2736
|
};
|
|
2741
2737
|
}
|
|
2742
|
-
Ontology
|
|
2743
|
-
let
|
|
2744
|
-
(function (
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
})(
|
|
2748
|
-
function
|
|
2738
|
+
Ontology.create = create;
|
|
2739
|
+
let Identifier;
|
|
2740
|
+
(function (Identifier) {
|
|
2741
|
+
Identifier.parse = $parseIdentifier;
|
|
2742
|
+
Identifier.stringify = NTriplesTerm.stringify;
|
|
2743
|
+
})(Identifier = Ontology.Identifier || (Ontology.Identifier = {}));
|
|
2744
|
+
function filter(filter, value) {
|
|
2749
2745
|
if (filter.$identifier !== undefined &&
|
|
2750
2746
|
!$filterIdentifier(filter.$identifier, value.$identifier())) {
|
|
2751
2747
|
return false;
|
|
@@ -2772,24 +2768,24 @@ export var Ontology;
|
|
|
2772
2768
|
}
|
|
2773
2769
|
return true;
|
|
2774
2770
|
}
|
|
2775
|
-
Ontology
|
|
2776
|
-
Ontology
|
|
2771
|
+
Ontology.filter = filter;
|
|
2772
|
+
Ontology.fromRdfResource = (resource, options) => {
|
|
2777
2773
|
let { context, graph, ignoreRdfType = false, objectSet, preferredLanguages, } = options ?? {};
|
|
2778
2774
|
if (!objectSet) {
|
|
2779
2775
|
objectSet = new $RdfjsDatasetObjectSet(resource.dataset);
|
|
2780
2776
|
}
|
|
2781
|
-
return Ontology
|
|
2777
|
+
return Ontology.propertiesFromRdfResource(resource, {
|
|
2782
2778
|
context,
|
|
2783
2779
|
graph,
|
|
2784
2780
|
ignoreRdfType,
|
|
2785
2781
|
objectSet,
|
|
2786
2782
|
preferredLanguages,
|
|
2787
|
-
}).map(
|
|
2783
|
+
}).map(create);
|
|
2788
2784
|
};
|
|
2789
|
-
Ontology
|
|
2785
|
+
Ontology.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
2790
2786
|
.toResource()
|
|
2791
|
-
.chain((resource) => Ontology
|
|
2792
|
-
Ontology
|
|
2787
|
+
.chain((resource) => Ontology.fromRdfResource(resource, options))));
|
|
2788
|
+
Ontology.fromRdfType = dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology");
|
|
2793
2789
|
function isOntology(object) {
|
|
2794
2790
|
switch (object.$type) {
|
|
2795
2791
|
case "Ontology":
|
|
@@ -2799,7 +2795,7 @@ export var Ontology;
|
|
|
2799
2795
|
}
|
|
2800
2796
|
}
|
|
2801
2797
|
Ontology.isOntology = isOntology;
|
|
2802
|
-
Ontology
|
|
2798
|
+
Ontology.propertiesFromRdfResource = ($resource, _$options) => {
|
|
2803
2799
|
return (!_$options.ignoreRdfType
|
|
2804
2800
|
? $resource
|
|
2805
2801
|
.value($RdfVocabularies.rdf.type, { graph: _$options.graph })
|
|
@@ -2811,7 +2807,7 @@ export var Ontology;
|
|
|
2811
2807
|
return Right(true);
|
|
2812
2808
|
}
|
|
2813
2809
|
// Check arbitrary rdfs:subClassOf's of the expected type
|
|
2814
|
-
if ($resource.isInstanceOf(Ontology
|
|
2810
|
+
if ($resource.isInstanceOf(Ontology.fromRdfType, {
|
|
2815
2811
|
graph: _$options.graph,
|
|
2816
2812
|
})) {
|
|
2817
2813
|
return Right(true);
|
|
@@ -2829,7 +2825,7 @@ export var Ontology;
|
|
|
2829
2825
|
.chain(($identifier) => Right("Ontology").chain(($type) => $shaclPropertyFromRdf({
|
|
2830
2826
|
graph: _$options.graph,
|
|
2831
2827
|
resource: $resource,
|
|
2832
|
-
propertySchema: Ontology
|
|
2828
|
+
propertySchema: Ontology.schema.properties.comment,
|
|
2833
2829
|
typeFromRdf: (resourceValues) => resourceValues
|
|
2834
2830
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
2835
2831
|
.chain((values) => values.chainMap((value) => value.toString()))
|
|
@@ -2837,13 +2833,13 @@ export var Ontology;
|
|
|
2837
2833
|
? values.map((value) => Maybe.of(value))
|
|
2838
2834
|
: Resource.Values.fromValue({
|
|
2839
2835
|
focusResource: $resource,
|
|
2840
|
-
propertyPath: PropertyShape
|
|
2836
|
+
propertyPath: PropertyShape.schema.properties.comment.path,
|
|
2841
2837
|
value: Maybe.empty(),
|
|
2842
2838
|
})),
|
|
2843
2839
|
}).chain((comment) => $shaclPropertyFromRdf({
|
|
2844
2840
|
graph: _$options.graph,
|
|
2845
2841
|
resource: $resource,
|
|
2846
|
-
propertySchema: Ontology
|
|
2842
|
+
propertySchema: Ontology.schema.properties.label,
|
|
2847
2843
|
typeFromRdf: (resourceValues) => resourceValues
|
|
2848
2844
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
2849
2845
|
.chain((values) => values.chainMap((value) => value.toString()))
|
|
@@ -2851,13 +2847,13 @@ export var Ontology;
|
|
|
2851
2847
|
? values.map((value) => Maybe.of(value))
|
|
2852
2848
|
: Resource.Values.fromValue({
|
|
2853
2849
|
focusResource: $resource,
|
|
2854
|
-
propertyPath: PropertyShape
|
|
2850
|
+
propertyPath: PropertyShape.schema.properties.label.path,
|
|
2855
2851
|
value: Maybe.empty(),
|
|
2856
2852
|
})),
|
|
2857
2853
|
}).chain((label) => $shaclPropertyFromRdf({
|
|
2858
2854
|
graph: _$options.graph,
|
|
2859
2855
|
resource: $resource,
|
|
2860
|
-
propertySchema: Ontology
|
|
2856
|
+
propertySchema: Ontology.schema.properties.tsFeatureExcludes,
|
|
2861
2857
|
typeFromRdf: (resourceValues) => resourceValues
|
|
2862
2858
|
.chain((values) => values.chainMap((value) => value.toIri([
|
|
2863
2859
|
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_All"),
|
|
@@ -2874,13 +2870,13 @@ export var Ontology;
|
|
|
2874
2870
|
.map((values) => values.toArray())
|
|
2875
2871
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
2876
2872
|
focusResource: $resource,
|
|
2877
|
-
propertyPath: Ontology
|
|
2873
|
+
propertyPath: Ontology.schema.properties.tsFeatureExcludes.path,
|
|
2878
2874
|
value: valuesArray,
|
|
2879
2875
|
})),
|
|
2880
2876
|
}).chain((tsFeatureExcludes) => $shaclPropertyFromRdf({
|
|
2881
2877
|
graph: _$options.graph,
|
|
2882
2878
|
resource: $resource,
|
|
2883
|
-
propertySchema: Ontology
|
|
2879
|
+
propertySchema: Ontology.schema.properties.tsFeatureIncludes,
|
|
2884
2880
|
typeFromRdf: (resourceValues) => resourceValues
|
|
2885
2881
|
.chain((values) => values.chainMap((value) => value.toIri([
|
|
2886
2882
|
dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_All"),
|
|
@@ -2897,21 +2893,20 @@ export var Ontology;
|
|
|
2897
2893
|
.map((values) => values.toArray())
|
|
2898
2894
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
2899
2895
|
focusResource: $resource,
|
|
2900
|
-
propertyPath: Ontology
|
|
2901
|
-
.path,
|
|
2896
|
+
propertyPath: Ontology.schema.properties.tsFeatureIncludes.path,
|
|
2902
2897
|
value: valuesArray,
|
|
2903
2898
|
})),
|
|
2904
2899
|
}).chain((tsFeatureIncludes) => $shaclPropertyFromRdf({
|
|
2905
2900
|
graph: _$options.graph,
|
|
2906
2901
|
resource: $resource,
|
|
2907
|
-
propertySchema: Ontology
|
|
2902
|
+
propertySchema: Ontology.schema.properties.tsImports,
|
|
2908
2903
|
typeFromRdf: (resourceValues) => resourceValues
|
|
2909
2904
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
2910
2905
|
.chain((values) => values.chainMap((value) => value.toString()))
|
|
2911
2906
|
.map((values) => values.toArray())
|
|
2912
2907
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
2913
2908
|
focusResource: $resource,
|
|
2914
|
-
propertyPath: Ontology
|
|
2909
|
+
propertyPath: Ontology.schema.properties.tsImports.path,
|
|
2915
2910
|
value: valuesArray,
|
|
2916
2911
|
})),
|
|
2917
2912
|
}).map((tsImports) => ({
|
|
@@ -2924,7 +2919,7 @@ export var Ontology;
|
|
|
2924
2919
|
tsImports,
|
|
2925
2920
|
})))))))));
|
|
2926
2921
|
};
|
|
2927
|
-
Ontology
|
|
2922
|
+
Ontology.schema = {
|
|
2928
2923
|
properties: {
|
|
2929
2924
|
$identifier: {
|
|
2930
2925
|
kind: "Identifier",
|
|
@@ -3007,7 +3002,7 @@ export var Ontology;
|
|
|
3007
3002
|
},
|
|
3008
3003
|
},
|
|
3009
3004
|
};
|
|
3010
|
-
function
|
|
3005
|
+
function toRdfResource(_ontology, options) {
|
|
3011
3006
|
const resourceSet = options?.resourceSet ??
|
|
3012
3007
|
new ResourceSet({
|
|
3013
3008
|
dataFactory: dataFactory,
|
|
@@ -3028,22 +3023,22 @@ export var Ontology;
|
|
|
3028
3023
|
resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsImport"), _ontology.tsImports.flatMap((item) => [$literalFactory.string(item)]), options?.graph);
|
|
3029
3024
|
return resource;
|
|
3030
3025
|
}
|
|
3031
|
-
Ontology
|
|
3032
|
-
function
|
|
3026
|
+
Ontology.toRdfResource = toRdfResource;
|
|
3027
|
+
function propertiesToStrings(_ontology) {
|
|
3033
3028
|
return $compactRecord({
|
|
3034
3029
|
$identifier: _ontology.$identifier().toString(),
|
|
3035
3030
|
label: _ontology.label.map((item) => item.toString()).extract(),
|
|
3036
3031
|
});
|
|
3037
3032
|
}
|
|
3038
|
-
Ontology
|
|
3033
|
+
Ontology.propertiesToStrings = propertiesToStrings;
|
|
3039
3034
|
function $toString(_ontology) {
|
|
3040
|
-
return `Ontology(${JSON.stringify(
|
|
3035
|
+
return `Ontology(${JSON.stringify(propertiesToStrings((_ontology ?? this)))})`;
|
|
3041
3036
|
}
|
|
3042
3037
|
Ontology.$toString = $toString;
|
|
3043
3038
|
})(Ontology || (Ontology = {}));
|
|
3044
3039
|
export var NodeShape;
|
|
3045
3040
|
(function (NodeShape) {
|
|
3046
|
-
function
|
|
3041
|
+
function create(parameters) {
|
|
3047
3042
|
const $identifierParameter = parameters?.$identifier;
|
|
3048
3043
|
let $identifier;
|
|
3049
3044
|
if (typeof $identifierParameter === "function") {
|
|
@@ -3746,13 +3741,13 @@ export var NodeShape;
|
|
|
3746
3741
|
xone,
|
|
3747
3742
|
};
|
|
3748
3743
|
}
|
|
3749
|
-
NodeShape
|
|
3750
|
-
let
|
|
3751
|
-
(function (
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
})(
|
|
3755
|
-
function
|
|
3744
|
+
NodeShape.create = create;
|
|
3745
|
+
let Identifier;
|
|
3746
|
+
(function (Identifier) {
|
|
3747
|
+
Identifier.parse = $parseIdentifier;
|
|
3748
|
+
Identifier.stringify = NTriplesTerm.stringify;
|
|
3749
|
+
})(Identifier = NodeShape.Identifier || (NodeShape.Identifier = {}));
|
|
3750
|
+
function filter(filter, value) {
|
|
3756
3751
|
if (filter.$identifier !== undefined &&
|
|
3757
3752
|
!$filterIdentifier(filter.$identifier, value.$identifier())) {
|
|
3758
3753
|
return false;
|
|
@@ -3919,24 +3914,24 @@ export var NodeShape;
|
|
|
3919
3914
|
}
|
|
3920
3915
|
return true;
|
|
3921
3916
|
}
|
|
3922
|
-
NodeShape
|
|
3923
|
-
NodeShape
|
|
3917
|
+
NodeShape.filter = filter;
|
|
3918
|
+
NodeShape.fromRdfResource = (resource, options) => {
|
|
3924
3919
|
let { context, graph, ignoreRdfType = false, objectSet, preferredLanguages, } = options ?? {};
|
|
3925
3920
|
if (!objectSet) {
|
|
3926
3921
|
objectSet = new $RdfjsDatasetObjectSet(resource.dataset);
|
|
3927
3922
|
}
|
|
3928
|
-
return NodeShape
|
|
3923
|
+
return NodeShape.propertiesFromRdfResource(resource, {
|
|
3929
3924
|
context,
|
|
3930
3925
|
graph,
|
|
3931
3926
|
ignoreRdfType,
|
|
3932
3927
|
objectSet,
|
|
3933
3928
|
preferredLanguages,
|
|
3934
|
-
}).map(
|
|
3929
|
+
}).map(create);
|
|
3935
3930
|
};
|
|
3936
|
-
NodeShape
|
|
3931
|
+
NodeShape.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
3937
3932
|
.toResource()
|
|
3938
|
-
.chain((resource) => NodeShape
|
|
3939
|
-
NodeShape
|
|
3933
|
+
.chain((resource) => NodeShape.fromRdfResource(resource, options))));
|
|
3934
|
+
NodeShape.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape");
|
|
3940
3935
|
function isNodeShape(object) {
|
|
3941
3936
|
switch (object.$type) {
|
|
3942
3937
|
case "NodeShape":
|
|
@@ -3946,7 +3941,7 @@ export var NodeShape;
|
|
|
3946
3941
|
}
|
|
3947
3942
|
}
|
|
3948
3943
|
NodeShape.isNodeShape = isNodeShape;
|
|
3949
|
-
NodeShape
|
|
3944
|
+
NodeShape.propertiesFromRdfResource = ($resource, _$options) => {
|
|
3950
3945
|
return (!_$options.ignoreRdfType
|
|
3951
3946
|
? $resource
|
|
3952
3947
|
.value($RdfVocabularies.rdf.type, { graph: _$options.graph })
|
|
@@ -3958,7 +3953,7 @@ export var NodeShape;
|
|
|
3958
3953
|
return Right(true);
|
|
3959
3954
|
}
|
|
3960
3955
|
// Check arbitrary rdfs:subClassOf's of the expected type
|
|
3961
|
-
if ($resource.isInstanceOf(NodeShape
|
|
3956
|
+
if ($resource.isInstanceOf(NodeShape.fromRdfType, {
|
|
3962
3957
|
graph: _$options.graph,
|
|
3963
3958
|
})) {
|
|
3964
3959
|
return Right(true);
|
|
@@ -3976,12 +3971,12 @@ export var NodeShape;
|
|
|
3976
3971
|
.chain(($identifier) => Right("NodeShape").chain(($type) => $shaclPropertyFromRdf({
|
|
3977
3972
|
graph: _$options.graph,
|
|
3978
3973
|
resource: $resource,
|
|
3979
|
-
propertySchema: NodeShape
|
|
3974
|
+
propertySchema: NodeShape.schema.properties.and,
|
|
3980
3975
|
typeFromRdf: (resourceValues) => resourceValues
|
|
3981
3976
|
.chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
|
|
3982
3977
|
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
3983
3978
|
focusResource: $resource,
|
|
3984
|
-
propertyPath: PropertyShape
|
|
3979
|
+
propertyPath: PropertyShape.schema.properties.and.path,
|
|
3985
3980
|
values: valueList.toArray(),
|
|
3986
3981
|
})).chain((values) => values.chainMap((value) => value.toIdentifier()))))
|
|
3987
3982
|
.map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
|
|
@@ -3989,38 +3984,38 @@ export var NodeShape;
|
|
|
3989
3984
|
? values.map((value) => Maybe.of(value))
|
|
3990
3985
|
: Resource.Values.fromValue({
|
|
3991
3986
|
focusResource: $resource,
|
|
3992
|
-
propertyPath: PropertyShape
|
|
3987
|
+
propertyPath: PropertyShape.schema.properties.and.path,
|
|
3993
3988
|
value: Maybe.empty(),
|
|
3994
3989
|
})),
|
|
3995
3990
|
}).chain((and) => $shaclPropertyFromRdf({
|
|
3996
3991
|
graph: _$options.graph,
|
|
3997
3992
|
resource: $resource,
|
|
3998
|
-
propertySchema: NodeShape
|
|
3993
|
+
propertySchema: NodeShape.schema.properties.classes,
|
|
3999
3994
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4000
3995
|
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
4001
3996
|
.map((values) => values.toArray())
|
|
4002
3997
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
4003
3998
|
focusResource: $resource,
|
|
4004
|
-
propertyPath: PropertyShape
|
|
3999
|
+
propertyPath: PropertyShape.schema.properties.classes.path,
|
|
4005
4000
|
value: valuesArray,
|
|
4006
4001
|
})),
|
|
4007
4002
|
}).chain((classes) => $shaclPropertyFromRdf({
|
|
4008
4003
|
graph: _$options.graph,
|
|
4009
4004
|
resource: $resource,
|
|
4010
|
-
propertySchema: NodeShape
|
|
4005
|
+
propertySchema: NodeShape.schema.properties.closed,
|
|
4011
4006
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4012
4007
|
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
4013
4008
|
.map((values) => values.length > 0
|
|
4014
4009
|
? values.map((value) => Maybe.of(value))
|
|
4015
4010
|
: Resource.Values.fromValue({
|
|
4016
4011
|
focusResource: $resource,
|
|
4017
|
-
propertyPath: NodeShape
|
|
4012
|
+
propertyPath: NodeShape.schema.properties.closed.path,
|
|
4018
4013
|
value: Maybe.empty(),
|
|
4019
4014
|
})),
|
|
4020
4015
|
}).chain((closed) => $shaclPropertyFromRdf({
|
|
4021
4016
|
graph: _$options.graph,
|
|
4022
4017
|
resource: $resource,
|
|
4023
|
-
propertySchema: NodeShape
|
|
4018
|
+
propertySchema: NodeShape.schema.properties.comment,
|
|
4024
4019
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4025
4020
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4026
4021
|
.chain((values) => values.chainMap((value) => value.toString()))
|
|
@@ -4028,41 +4023,41 @@ export var NodeShape;
|
|
|
4028
4023
|
? values.map((value) => Maybe.of(value))
|
|
4029
4024
|
: Resource.Values.fromValue({
|
|
4030
4025
|
focusResource: $resource,
|
|
4031
|
-
propertyPath: PropertyShape
|
|
4026
|
+
propertyPath: PropertyShape.schema.properties.comment.path,
|
|
4032
4027
|
value: Maybe.empty(),
|
|
4033
4028
|
})),
|
|
4034
4029
|
}).chain((comment) => $shaclPropertyFromRdf({
|
|
4035
4030
|
graph: _$options.graph,
|
|
4036
4031
|
resource: $resource,
|
|
4037
|
-
propertySchema: NodeShape
|
|
4032
|
+
propertySchema: NodeShape.schema.properties.datatype,
|
|
4038
4033
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4039
4034
|
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
4040
4035
|
.map((values) => values.length > 0
|
|
4041
4036
|
? values.map((value) => Maybe.of(value))
|
|
4042
4037
|
: Resource.Values.fromValue({
|
|
4043
4038
|
focusResource: $resource,
|
|
4044
|
-
propertyPath: PropertyShape
|
|
4039
|
+
propertyPath: PropertyShape.schema.properties.datatype
|
|
4045
4040
|
.path,
|
|
4046
4041
|
value: Maybe.empty(),
|
|
4047
4042
|
})),
|
|
4048
4043
|
}).chain((datatype) => $shaclPropertyFromRdf({
|
|
4049
4044
|
graph: _$options.graph,
|
|
4050
4045
|
resource: $resource,
|
|
4051
|
-
propertySchema: NodeShape
|
|
4046
|
+
propertySchema: NodeShape.schema.properties.deactivated,
|
|
4052
4047
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4053
4048
|
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
4054
4049
|
.map((values) => values.length > 0
|
|
4055
4050
|
? values.map((value) => Maybe.of(value))
|
|
4056
4051
|
: Resource.Values.fromValue({
|
|
4057
4052
|
focusResource: $resource,
|
|
4058
|
-
propertyPath: PropertyShape
|
|
4053
|
+
propertyPath: PropertyShape.schema.properties
|
|
4059
4054
|
.deactivated.path,
|
|
4060
4055
|
value: Maybe.empty(),
|
|
4061
4056
|
})),
|
|
4062
4057
|
}).chain((deactivated) => $shaclPropertyFromRdf({
|
|
4063
4058
|
graph: _$options.graph,
|
|
4064
4059
|
resource: $resource,
|
|
4065
|
-
propertySchema: NodeShape
|
|
4060
|
+
propertySchema: NodeShape.schema.properties.discriminantValue,
|
|
4066
4061
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4067
4062
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4068
4063
|
.chain((values) => values.chainMap((value) => value.toString()))
|
|
@@ -4070,56 +4065,56 @@ export var NodeShape;
|
|
|
4070
4065
|
? values.map((value) => Maybe.of(value))
|
|
4071
4066
|
: Resource.Values.fromValue({
|
|
4072
4067
|
focusResource: $resource,
|
|
4073
|
-
propertyPath: NodeShape
|
|
4068
|
+
propertyPath: NodeShape.schema.properties
|
|
4074
4069
|
.discriminantValue.path,
|
|
4075
4070
|
value: Maybe.empty(),
|
|
4076
4071
|
})),
|
|
4077
4072
|
}).chain((discriminantValue) => $shaclPropertyFromRdf({
|
|
4078
4073
|
graph: _$options.graph,
|
|
4079
4074
|
resource: $resource,
|
|
4080
|
-
propertySchema: NodeShape
|
|
4075
|
+
propertySchema: NodeShape.schema.properties.extern,
|
|
4081
4076
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4082
4077
|
.chain((values) => values.chainMap((value) => value.toBoolean()))
|
|
4083
4078
|
.map((values) => values.length > 0
|
|
4084
4079
|
? values.map((value) => Maybe.of(value))
|
|
4085
4080
|
: Resource.Values.fromValue({
|
|
4086
4081
|
focusResource: $resource,
|
|
4087
|
-
propertyPath: NodeShape
|
|
4082
|
+
propertyPath: NodeShape.schema.properties.extern
|
|
4088
4083
|
.path,
|
|
4089
4084
|
value: Maybe.empty(),
|
|
4090
4085
|
})),
|
|
4091
4086
|
}).chain((extern) => $shaclPropertyFromRdf({
|
|
4092
4087
|
graph: _$options.graph,
|
|
4093
4088
|
resource: $resource,
|
|
4094
|
-
propertySchema: NodeShape
|
|
4089
|
+
propertySchema: NodeShape.schema.properties.flags,
|
|
4095
4090
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4096
4091
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4097
4092
|
.chain((values) => values.chainMap((value) => value.toString()))
|
|
4098
4093
|
.map((values) => values.toArray())
|
|
4099
4094
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
4100
4095
|
focusResource: $resource,
|
|
4101
|
-
propertyPath: PropertyShape
|
|
4096
|
+
propertyPath: PropertyShape.schema.properties.flags
|
|
4102
4097
|
.path,
|
|
4103
4098
|
value: valuesArray,
|
|
4104
4099
|
})),
|
|
4105
4100
|
}).chain((flags) => $shaclPropertyFromRdf({
|
|
4106
4101
|
graph: _$options.graph,
|
|
4107
4102
|
resource: $resource,
|
|
4108
|
-
propertySchema: NodeShape
|
|
4103
|
+
propertySchema: NodeShape.schema.properties.fromRdfType,
|
|
4109
4104
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4110
4105
|
.chain((values) => values.chainMap((value) => value.toIri()))
|
|
4111
4106
|
.map((values) => values.length > 0
|
|
4112
4107
|
? values.map((value) => Maybe.of(value))
|
|
4113
4108
|
: Resource.Values.fromValue({
|
|
4114
4109
|
focusResource: $resource,
|
|
4115
|
-
propertyPath: NodeShape
|
|
4110
|
+
propertyPath: NodeShape.schema.properties
|
|
4116
4111
|
.fromRdfType.path,
|
|
4117
4112
|
value: Maybe.empty(),
|
|
4118
4113
|
})),
|
|
4119
4114
|
}).chain((fromRdfType) => $shaclPropertyFromRdf({
|
|
4120
4115
|
graph: _$options.graph,
|
|
4121
4116
|
resource: $resource,
|
|
4122
|
-
propertySchema: NodeShape
|
|
4117
|
+
propertySchema: NodeShape.schema.properties.hasValues,
|
|
4123
4118
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4124
4119
|
.chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
|
|
4125
4120
|
switch (term.termType) {
|
|
@@ -4131,7 +4126,7 @@ export var NodeShape;
|
|
|
4131
4126
|
actualValue: term,
|
|
4132
4127
|
expectedValueType: "(NamedNode | Literal)",
|
|
4133
4128
|
focusResource: $resource,
|
|
4134
|
-
propertyPath: PropertyShape
|
|
4129
|
+
propertyPath: PropertyShape.schema
|
|
4135
4130
|
.properties.hasValues
|
|
4136
4131
|
.path,
|
|
4137
4132
|
}));
|
|
@@ -4140,21 +4135,21 @@ export var NodeShape;
|
|
|
4140
4135
|
.map((values) => values.toArray())
|
|
4141
4136
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
4142
4137
|
focusResource: $resource,
|
|
4143
|
-
propertyPath: PropertyShape
|
|
4138
|
+
propertyPath: PropertyShape.schema.properties
|
|
4144
4139
|
.hasValues.path,
|
|
4145
4140
|
value: valuesArray,
|
|
4146
4141
|
})),
|
|
4147
4142
|
}).chain((hasValues) => $shaclPropertyFromRdf({
|
|
4148
4143
|
graph: _$options.graph,
|
|
4149
4144
|
resource: $resource,
|
|
4150
|
-
propertySchema: NodeShape
|
|
4145
|
+
propertySchema: NodeShape.schema.properties.ignoredProperties,
|
|
4151
4146
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4152
4147
|
.chain((values) => values.chainMap((value) => value.toList({
|
|
4153
4148
|
graph: _$options.graph,
|
|
4154
4149
|
})))
|
|
4155
4150
|
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
4156
4151
|
focusResource: $resource,
|
|
4157
|
-
propertyPath: NodeShape
|
|
4152
|
+
propertyPath: NodeShape.schema.properties
|
|
4158
4153
|
.ignoredProperties.path,
|
|
4159
4154
|
values: valueList.toArray(),
|
|
4160
4155
|
})).chain((values) => values.chainMap((value) => value.toIri()))))
|
|
@@ -4163,21 +4158,21 @@ export var NodeShape;
|
|
|
4163
4158
|
? values.map((value) => Maybe.of(value))
|
|
4164
4159
|
: Resource.Values.fromValue({
|
|
4165
4160
|
focusResource: $resource,
|
|
4166
|
-
propertyPath: NodeShape
|
|
4161
|
+
propertyPath: NodeShape.schema.properties
|
|
4167
4162
|
.ignoredProperties.path,
|
|
4168
4163
|
value: Maybe.empty(),
|
|
4169
4164
|
})),
|
|
4170
4165
|
}).chain((ignoredProperties) => $shaclPropertyFromRdf({
|
|
4171
4166
|
graph: _$options.graph,
|
|
4172
4167
|
resource: $resource,
|
|
4173
|
-
propertySchema: NodeShape
|
|
4168
|
+
propertySchema: NodeShape.schema.properties.in_,
|
|
4174
4169
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4175
4170
|
.chain((values) => values.chainMap((value) => value.toList({
|
|
4176
4171
|
graph: _$options.graph,
|
|
4177
4172
|
})))
|
|
4178
4173
|
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
4179
4174
|
focusResource: $resource,
|
|
4180
|
-
propertyPath: PropertyShape
|
|
4175
|
+
propertyPath: PropertyShape.schema
|
|
4181
4176
|
.properties.in_.path,
|
|
4182
4177
|
values: valueList.toArray(),
|
|
4183
4178
|
})).chain((values) => values.chainMap((value) => value
|
|
@@ -4193,7 +4188,7 @@ export var NodeShape;
|
|
|
4193
4188
|
expectedValueType: "(NamedNode | Literal)",
|
|
4194
4189
|
focusResource: $resource,
|
|
4195
4190
|
propertyPath: PropertyShape
|
|
4196
|
-
|
|
4191
|
+
.schema
|
|
4197
4192
|
.properties
|
|
4198
4193
|
.in_.path,
|
|
4199
4194
|
}));
|
|
@@ -4204,21 +4199,21 @@ export var NodeShape;
|
|
|
4204
4199
|
? values.map((value) => Maybe.of(value))
|
|
4205
4200
|
: Resource.Values.fromValue({
|
|
4206
4201
|
focusResource: $resource,
|
|
4207
|
-
propertyPath: PropertyShape
|
|
4202
|
+
propertyPath: PropertyShape.schema
|
|
4208
4203
|
.properties.in_.path,
|
|
4209
4204
|
value: Maybe.empty(),
|
|
4210
4205
|
})),
|
|
4211
4206
|
}).chain((in_) => $shaclPropertyFromRdf({
|
|
4212
4207
|
graph: _$options.graph,
|
|
4213
4208
|
resource: $resource,
|
|
4214
|
-
propertySchema: NodeShape
|
|
4209
|
+
propertySchema: NodeShape.schema.properties.isDefinedBy,
|
|
4215
4210
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4216
4211
|
.chain((values) => values.chainMap((value) => value.toIdentifier()))
|
|
4217
4212
|
.map((values) => values.length > 0
|
|
4218
4213
|
? values.map((value) => Maybe.of(value))
|
|
4219
4214
|
: Resource.Values.fromValue({
|
|
4220
4215
|
focusResource: $resource,
|
|
4221
|
-
propertyPath: PropertyShape
|
|
4216
|
+
propertyPath: PropertyShape.schema
|
|
4222
4217
|
.properties.isDefinedBy
|
|
4223
4218
|
.path,
|
|
4224
4219
|
value: Maybe.empty(),
|
|
@@ -4226,7 +4221,7 @@ export var NodeShape;
|
|
|
4226
4221
|
}).chain((isDefinedBy) => $shaclPropertyFromRdf({
|
|
4227
4222
|
graph: _$options.graph,
|
|
4228
4223
|
resource: $resource,
|
|
4229
|
-
propertySchema: NodeShape
|
|
4224
|
+
propertySchema: NodeShape.schema.properties.label,
|
|
4230
4225
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4231
4226
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
4232
4227
|
.chain((values) => values.chainMap((value) => value.toString()))
|
|
@@ -4234,7 +4229,7 @@ export var NodeShape;
|
|
|
4234
4229
|
? values.map((value) => Maybe.of(value))
|
|
4235
4230
|
: Resource.Values.fromValue({
|
|
4236
4231
|
focusResource: $resource,
|
|
4237
|
-
propertyPath: PropertyShape
|
|
4232
|
+
propertyPath: PropertyShape.schema
|
|
4238
4233
|
.properties.label
|
|
4239
4234
|
.path,
|
|
4240
4235
|
value: Maybe.empty(),
|
|
@@ -4242,7 +4237,7 @@ export var NodeShape;
|
|
|
4242
4237
|
}).chain((label) => $shaclPropertyFromRdf({
|
|
4243
4238
|
graph: _$options.graph,
|
|
4244
4239
|
resource: $resource,
|
|
4245
|
-
propertySchema: NodeShape
|
|
4240
|
+
propertySchema: NodeShape.schema.properties.languageIn,
|
|
4246
4241
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4247
4242
|
.chain((values) => values.chainMap((value) => value.toList({
|
|
4248
4243
|
graph: _$options.graph,
|
|
@@ -4250,7 +4245,7 @@ export var NodeShape;
|
|
|
4250
4245
|
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
4251
4246
|
focusResource: $resource,
|
|
4252
4247
|
propertyPath: PropertyShape
|
|
4253
|
-
|
|
4248
|
+
.schema
|
|
4254
4249
|
.properties
|
|
4255
4250
|
.languageIn
|
|
4256
4251
|
.path,
|
|
@@ -4263,7 +4258,7 @@ export var NodeShape;
|
|
|
4263
4258
|
? values.map((value) => Maybe.of(value))
|
|
4264
4259
|
: Resource.Values.fromValue({
|
|
4265
4260
|
focusResource: $resource,
|
|
4266
|
-
propertyPath: PropertyShape
|
|
4261
|
+
propertyPath: PropertyShape.schema
|
|
4267
4262
|
.properties
|
|
4268
4263
|
.languageIn.path,
|
|
4269
4264
|
value: Maybe.empty(),
|
|
@@ -4271,15 +4266,14 @@ export var NodeShape;
|
|
|
4271
4266
|
}).chain((languageIn) => $shaclPropertyFromRdf({
|
|
4272
4267
|
graph: _$options.graph,
|
|
4273
4268
|
resource: $resource,
|
|
4274
|
-
propertySchema: NodeShape
|
|
4269
|
+
propertySchema: NodeShape.schema.properties.maxCount,
|
|
4275
4270
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4276
4271
|
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
4277
4272
|
.map((values) => values.length > 0
|
|
4278
4273
|
? values.map((value) => Maybe.of(value))
|
|
4279
4274
|
: Resource.Values.fromValue({
|
|
4280
4275
|
focusResource: $resource,
|
|
4281
|
-
propertyPath: PropertyShape
|
|
4282
|
-
.$schema
|
|
4276
|
+
propertyPath: PropertyShape.schema
|
|
4283
4277
|
.properties
|
|
4284
4278
|
.maxCount.path,
|
|
4285
4279
|
value: Maybe.empty(),
|
|
@@ -4287,7 +4281,7 @@ export var NodeShape;
|
|
|
4287
4281
|
}).chain((maxCount) => $shaclPropertyFromRdf({
|
|
4288
4282
|
graph: _$options.graph,
|
|
4289
4283
|
resource: $resource,
|
|
4290
|
-
propertySchema: NodeShape
|
|
4284
|
+
propertySchema: NodeShape.schema.properties
|
|
4291
4285
|
.maxExclusive,
|
|
4292
4286
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4293
4287
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
@@ -4297,7 +4291,7 @@ export var NodeShape;
|
|
|
4297
4291
|
: Resource.Values.fromValue({
|
|
4298
4292
|
focusResource: $resource,
|
|
4299
4293
|
propertyPath: PropertyShape
|
|
4300
|
-
|
|
4294
|
+
.schema
|
|
4301
4295
|
.properties
|
|
4302
4296
|
.maxExclusive
|
|
4303
4297
|
.path,
|
|
@@ -4306,7 +4300,7 @@ export var NodeShape;
|
|
|
4306
4300
|
}).chain((maxExclusive) => $shaclPropertyFromRdf({
|
|
4307
4301
|
graph: _$options.graph,
|
|
4308
4302
|
resource: $resource,
|
|
4309
|
-
propertySchema: NodeShape
|
|
4303
|
+
propertySchema: NodeShape.schema.properties
|
|
4310
4304
|
.maxInclusive,
|
|
4311
4305
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4312
4306
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
@@ -4316,7 +4310,7 @@ export var NodeShape;
|
|
|
4316
4310
|
: Resource.Values.fromValue({
|
|
4317
4311
|
focusResource: $resource,
|
|
4318
4312
|
propertyPath: PropertyShape
|
|
4319
|
-
|
|
4313
|
+
.schema
|
|
4320
4314
|
.properties
|
|
4321
4315
|
.maxInclusive
|
|
4322
4316
|
.path,
|
|
@@ -4325,7 +4319,7 @@ export var NodeShape;
|
|
|
4325
4319
|
}).chain((maxInclusive) => $shaclPropertyFromRdf({
|
|
4326
4320
|
graph: _$options.graph,
|
|
4327
4321
|
resource: $resource,
|
|
4328
|
-
propertySchema: NodeShape
|
|
4322
|
+
propertySchema: NodeShape.schema.properties
|
|
4329
4323
|
.maxLength,
|
|
4330
4324
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4331
4325
|
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
@@ -4334,7 +4328,7 @@ export var NodeShape;
|
|
|
4334
4328
|
: Resource.Values.fromValue({
|
|
4335
4329
|
focusResource: $resource,
|
|
4336
4330
|
propertyPath: PropertyShape
|
|
4337
|
-
|
|
4331
|
+
.schema
|
|
4338
4332
|
.properties
|
|
4339
4333
|
.maxLength
|
|
4340
4334
|
.path,
|
|
@@ -4343,7 +4337,7 @@ export var NodeShape;
|
|
|
4343
4337
|
}).chain((maxLength) => $shaclPropertyFromRdf({
|
|
4344
4338
|
graph: _$options.graph,
|
|
4345
4339
|
resource: $resource,
|
|
4346
|
-
propertySchema: NodeShape
|
|
4340
|
+
propertySchema: NodeShape.schema.properties
|
|
4347
4341
|
.minCount,
|
|
4348
4342
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4349
4343
|
.chain((values) => values.chainMap((value) => value.toBigInt()))
|
|
@@ -4352,7 +4346,7 @@ export var NodeShape;
|
|
|
4352
4346
|
: Resource.Values.fromValue({
|
|
4353
4347
|
focusResource: $resource,
|
|
4354
4348
|
propertyPath: PropertyShape
|
|
4355
|
-
|
|
4349
|
+
.schema
|
|
4356
4350
|
.properties
|
|
4357
4351
|
.minCount
|
|
4358
4352
|
.path,
|
|
@@ -4361,7 +4355,7 @@ export var NodeShape;
|
|
|
4361
4355
|
}).chain((minCount) => $shaclPropertyFromRdf({
|
|
4362
4356
|
graph: _$options.graph,
|
|
4363
4357
|
resource: $resource,
|
|
4364
|
-
propertySchema: NodeShape
|
|
4358
|
+
propertySchema: NodeShape.schema.properties
|
|
4365
4359
|
.minExclusive,
|
|
4366
4360
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4367
4361
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
@@ -4371,7 +4365,7 @@ export var NodeShape;
|
|
|
4371
4365
|
: Resource.Values.fromValue({
|
|
4372
4366
|
focusResource: $resource,
|
|
4373
4367
|
propertyPath: PropertyShape
|
|
4374
|
-
|
|
4368
|
+
.schema
|
|
4375
4369
|
.properties
|
|
4376
4370
|
.minExclusive
|
|
4377
4371
|
.path,
|
|
@@ -4380,7 +4374,7 @@ export var NodeShape;
|
|
|
4380
4374
|
}).chain((minExclusive) => $shaclPropertyFromRdf({
|
|
4381
4375
|
graph: _$options.graph,
|
|
4382
4376
|
resource: $resource,
|
|
4383
|
-
propertySchema: NodeShape
|
|
4377
|
+
propertySchema: NodeShape.schema.properties
|
|
4384
4378
|
.minInclusive,
|
|
4385
4379
|
typeFromRdf: (resourceValues) => resourceValues
|
|
4386
4380
|
.chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
|
|
@@ -4391,7 +4385,7 @@ export var NodeShape;
|
|
|
4391
4385
|
: Resource.Values.fromValue({
|
|
4392
4386
|
focusResource: $resource,
|
|
4393
4387
|
propertyPath: PropertyShape
|
|
4394
|
-
|
|
4388
|
+
.schema
|
|
4395
4389
|
.properties
|
|
4396
4390
|
.minInclusive
|
|
4397
4391
|
.path,
|
|
@@ -4400,7 +4394,7 @@ export var NodeShape;
|
|
|
4400
4394
|
}).chain((minInclusive) => $shaclPropertyFromRdf({
|
|
4401
4395
|
graph: _$options.graph,
|
|
4402
4396
|
resource: $resource,
|
|
4403
|
-
propertySchema: NodeShape
|
|
4397
|
+
propertySchema: NodeShape.schema
|
|
4404
4398
|
.properties
|
|
4405
4399
|
.minLength,
|
|
4406
4400
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4411,7 +4405,7 @@ export var NodeShape;
|
|
|
4411
4405
|
: Resource.Values.fromValue({
|
|
4412
4406
|
focusResource: $resource,
|
|
4413
4407
|
propertyPath: PropertyShape
|
|
4414
|
-
|
|
4408
|
+
.schema
|
|
4415
4409
|
.properties
|
|
4416
4410
|
.minLength
|
|
4417
4411
|
.path,
|
|
@@ -4420,7 +4414,7 @@ export var NodeShape;
|
|
|
4420
4414
|
}).chain((minLength) => $shaclPropertyFromRdf({
|
|
4421
4415
|
graph: _$options.graph,
|
|
4422
4416
|
resource: $resource,
|
|
4423
|
-
propertySchema: NodeShape
|
|
4417
|
+
propertySchema: NodeShape.schema
|
|
4424
4418
|
.properties
|
|
4425
4419
|
.mutable,
|
|
4426
4420
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4431,7 +4425,7 @@ export var NodeShape;
|
|
|
4431
4425
|
: Resource.Values.fromValue({
|
|
4432
4426
|
focusResource: $resource,
|
|
4433
4427
|
propertyPath: PropertyShape
|
|
4434
|
-
|
|
4428
|
+
.schema
|
|
4435
4429
|
.properties
|
|
4436
4430
|
.mutable
|
|
4437
4431
|
.path,
|
|
@@ -4440,7 +4434,7 @@ export var NodeShape;
|
|
|
4440
4434
|
}).chain((mutable) => $shaclPropertyFromRdf({
|
|
4441
4435
|
graph: _$options.graph,
|
|
4442
4436
|
resource: $resource,
|
|
4443
|
-
propertySchema: NodeShape
|
|
4437
|
+
propertySchema: NodeShape.schema
|
|
4444
4438
|
.properties
|
|
4445
4439
|
.node,
|
|
4446
4440
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4451,7 +4445,7 @@ export var NodeShape;
|
|
|
4451
4445
|
: Resource.Values.fromValue({
|
|
4452
4446
|
focusResource: $resource,
|
|
4453
4447
|
propertyPath: PropertyShape
|
|
4454
|
-
|
|
4448
|
+
.schema
|
|
4455
4449
|
.properties
|
|
4456
4450
|
.node
|
|
4457
4451
|
.path,
|
|
@@ -4460,7 +4454,7 @@ export var NodeShape;
|
|
|
4460
4454
|
}).chain((node) => $shaclPropertyFromRdf({
|
|
4461
4455
|
graph: _$options.graph,
|
|
4462
4456
|
resource: $resource,
|
|
4463
|
-
propertySchema: NodeShape
|
|
4457
|
+
propertySchema: NodeShape.schema
|
|
4464
4458
|
.properties
|
|
4465
4459
|
.nodeKind,
|
|
4466
4460
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4478,7 +4472,7 @@ export var NodeShape;
|
|
|
4478
4472
|
: Resource.Values.fromValue({
|
|
4479
4473
|
focusResource: $resource,
|
|
4480
4474
|
propertyPath: PropertyShape
|
|
4481
|
-
|
|
4475
|
+
.schema
|
|
4482
4476
|
.properties
|
|
4483
4477
|
.nodeKind
|
|
4484
4478
|
.path,
|
|
@@ -4487,7 +4481,7 @@ export var NodeShape;
|
|
|
4487
4481
|
}).chain((nodeKind) => $shaclPropertyFromRdf({
|
|
4488
4482
|
graph: _$options.graph,
|
|
4489
4483
|
resource: $resource,
|
|
4490
|
-
propertySchema: NodeShape
|
|
4484
|
+
propertySchema: NodeShape.schema
|
|
4491
4485
|
.properties
|
|
4492
4486
|
.not,
|
|
4493
4487
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4496,7 +4490,7 @@ export var NodeShape;
|
|
|
4496
4490
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
4497
4491
|
focusResource: $resource,
|
|
4498
4492
|
propertyPath: PropertyShape
|
|
4499
|
-
|
|
4493
|
+
.schema
|
|
4500
4494
|
.properties
|
|
4501
4495
|
.not
|
|
4502
4496
|
.path,
|
|
@@ -4505,7 +4499,7 @@ export var NodeShape;
|
|
|
4505
4499
|
}).chain((not) => $shaclPropertyFromRdf({
|
|
4506
4500
|
graph: _$options.graph,
|
|
4507
4501
|
resource: $resource,
|
|
4508
|
-
propertySchema: NodeShape
|
|
4502
|
+
propertySchema: NodeShape.schema
|
|
4509
4503
|
.properties
|
|
4510
4504
|
.or,
|
|
4511
4505
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4515,7 +4509,7 @@ export var NodeShape;
|
|
|
4515
4509
|
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
4516
4510
|
focusResource: $resource,
|
|
4517
4511
|
propertyPath: PropertyShape
|
|
4518
|
-
|
|
4512
|
+
.schema
|
|
4519
4513
|
.properties
|
|
4520
4514
|
.or
|
|
4521
4515
|
.path,
|
|
@@ -4528,7 +4522,7 @@ export var NodeShape;
|
|
|
4528
4522
|
: Resource.Values.fromValue({
|
|
4529
4523
|
focusResource: $resource,
|
|
4530
4524
|
propertyPath: PropertyShape
|
|
4531
|
-
|
|
4525
|
+
.schema
|
|
4532
4526
|
.properties
|
|
4533
4527
|
.or
|
|
4534
4528
|
.path,
|
|
@@ -4537,7 +4531,7 @@ export var NodeShape;
|
|
|
4537
4531
|
}).chain((or) => $shaclPropertyFromRdf({
|
|
4538
4532
|
graph: _$options.graph,
|
|
4539
4533
|
resource: $resource,
|
|
4540
|
-
propertySchema: NodeShape
|
|
4534
|
+
propertySchema: NodeShape.schema
|
|
4541
4535
|
.properties
|
|
4542
4536
|
.patterns,
|
|
4543
4537
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4547,7 +4541,7 @@ export var NodeShape;
|
|
|
4547
4541
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
4548
4542
|
focusResource: $resource,
|
|
4549
4543
|
propertyPath: PropertyShape
|
|
4550
|
-
|
|
4544
|
+
.schema
|
|
4551
4545
|
.properties
|
|
4552
4546
|
.patterns
|
|
4553
4547
|
.path,
|
|
@@ -4556,7 +4550,7 @@ export var NodeShape;
|
|
|
4556
4550
|
}).chain((patterns) => $shaclPropertyFromRdf({
|
|
4557
4551
|
graph: _$options.graph,
|
|
4558
4552
|
resource: $resource,
|
|
4559
|
-
propertySchema: NodeShape
|
|
4553
|
+
propertySchema: NodeShape.schema
|
|
4560
4554
|
.properties
|
|
4561
4555
|
.properties,
|
|
4562
4556
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4565,7 +4559,7 @@ export var NodeShape;
|
|
|
4565
4559
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
4566
4560
|
focusResource: $resource,
|
|
4567
4561
|
propertyPath: NodeShape
|
|
4568
|
-
|
|
4562
|
+
.schema
|
|
4569
4563
|
.properties
|
|
4570
4564
|
.properties
|
|
4571
4565
|
.path,
|
|
@@ -4574,7 +4568,7 @@ export var NodeShape;
|
|
|
4574
4568
|
}).chain((properties) => $shaclPropertyFromRdf({
|
|
4575
4569
|
graph: _$options.graph,
|
|
4576
4570
|
resource: $resource,
|
|
4577
|
-
propertySchema: NodeShape
|
|
4571
|
+
propertySchema: NodeShape.schema
|
|
4578
4572
|
.properties
|
|
4579
4573
|
.rdfType,
|
|
4580
4574
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4585,7 +4579,7 @@ export var NodeShape;
|
|
|
4585
4579
|
: Resource.Values.fromValue({
|
|
4586
4580
|
focusResource: $resource,
|
|
4587
4581
|
propertyPath: NodeShape
|
|
4588
|
-
|
|
4582
|
+
.schema
|
|
4589
4583
|
.properties
|
|
4590
4584
|
.rdfType
|
|
4591
4585
|
.path,
|
|
@@ -4594,7 +4588,7 @@ export var NodeShape;
|
|
|
4594
4588
|
}).chain((rdfType) => $shaclPropertyFromRdf({
|
|
4595
4589
|
graph: _$options.graph,
|
|
4596
4590
|
resource: $resource,
|
|
4597
|
-
propertySchema: NodeShape
|
|
4591
|
+
propertySchema: NodeShape.schema
|
|
4598
4592
|
.properties
|
|
4599
4593
|
.shaclmateName,
|
|
4600
4594
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4606,7 +4600,7 @@ export var NodeShape;
|
|
|
4606
4600
|
: Resource.Values.fromValue({
|
|
4607
4601
|
focusResource: $resource,
|
|
4608
4602
|
propertyPath: PropertyShape
|
|
4609
|
-
|
|
4603
|
+
.schema
|
|
4610
4604
|
.properties
|
|
4611
4605
|
.shaclmateName
|
|
4612
4606
|
.path,
|
|
@@ -4615,7 +4609,7 @@ export var NodeShape;
|
|
|
4615
4609
|
}).chain((shaclmateName) => $shaclPropertyFromRdf({
|
|
4616
4610
|
graph: _$options.graph,
|
|
4617
4611
|
resource: $resource,
|
|
4618
|
-
propertySchema: NodeShape
|
|
4612
|
+
propertySchema: NodeShape.schema
|
|
4619
4613
|
.properties
|
|
4620
4614
|
.subClassOf,
|
|
4621
4615
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4624,7 +4618,7 @@ export var NodeShape;
|
|
|
4624
4618
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
4625
4619
|
focusResource: $resource,
|
|
4626
4620
|
propertyPath: NodeShape
|
|
4627
|
-
|
|
4621
|
+
.schema
|
|
4628
4622
|
.properties
|
|
4629
4623
|
.subClassOf
|
|
4630
4624
|
.path,
|
|
@@ -4633,7 +4627,7 @@ export var NodeShape;
|
|
|
4633
4627
|
}).chain((subClassOf) => $shaclPropertyFromRdf({
|
|
4634
4628
|
graph: _$options.graph,
|
|
4635
4629
|
resource: $resource,
|
|
4636
|
-
propertySchema: NodeShape
|
|
4630
|
+
propertySchema: NodeShape.schema
|
|
4637
4631
|
.properties
|
|
4638
4632
|
.toRdfTypes,
|
|
4639
4633
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4642,7 +4636,7 @@ export var NodeShape;
|
|
|
4642
4636
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
4643
4637
|
focusResource: $resource,
|
|
4644
4638
|
propertyPath: NodeShape
|
|
4645
|
-
|
|
4639
|
+
.schema
|
|
4646
4640
|
.properties
|
|
4647
4641
|
.toRdfTypes
|
|
4648
4642
|
.path,
|
|
@@ -4651,7 +4645,7 @@ export var NodeShape;
|
|
|
4651
4645
|
}).chain((toRdfTypes) => $shaclPropertyFromRdf({
|
|
4652
4646
|
graph: _$options.graph,
|
|
4653
4647
|
resource: $resource,
|
|
4654
|
-
propertySchema: NodeShape
|
|
4648
|
+
propertySchema: NodeShape.schema
|
|
4655
4649
|
.properties
|
|
4656
4650
|
.tsFeatureExcludes,
|
|
4657
4651
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4671,7 +4665,7 @@ export var NodeShape;
|
|
|
4671
4665
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
4672
4666
|
focusResource: $resource,
|
|
4673
4667
|
propertyPath: Ontology
|
|
4674
|
-
|
|
4668
|
+
.schema
|
|
4675
4669
|
.properties
|
|
4676
4670
|
.tsFeatureExcludes
|
|
4677
4671
|
.path,
|
|
@@ -4680,7 +4674,7 @@ export var NodeShape;
|
|
|
4680
4674
|
}).chain((tsFeatureExcludes) => $shaclPropertyFromRdf({
|
|
4681
4675
|
graph: _$options.graph,
|
|
4682
4676
|
resource: $resource,
|
|
4683
|
-
propertySchema: NodeShape
|
|
4677
|
+
propertySchema: NodeShape.schema
|
|
4684
4678
|
.properties
|
|
4685
4679
|
.tsFeatureIncludes,
|
|
4686
4680
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4700,7 +4694,7 @@ export var NodeShape;
|
|
|
4700
4694
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
4701
4695
|
focusResource: $resource,
|
|
4702
4696
|
propertyPath: Ontology
|
|
4703
|
-
|
|
4697
|
+
.schema
|
|
4704
4698
|
.properties
|
|
4705
4699
|
.tsFeatureIncludes
|
|
4706
4700
|
.path,
|
|
@@ -4709,7 +4703,7 @@ export var NodeShape;
|
|
|
4709
4703
|
}).chain((tsFeatureIncludes) => $shaclPropertyFromRdf({
|
|
4710
4704
|
graph: _$options.graph,
|
|
4711
4705
|
resource: $resource,
|
|
4712
|
-
propertySchema: NodeShape
|
|
4706
|
+
propertySchema: NodeShape.schema
|
|
4713
4707
|
.properties
|
|
4714
4708
|
.tsImports,
|
|
4715
4709
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4719,7 +4713,7 @@ export var NodeShape;
|
|
|
4719
4713
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
4720
4714
|
focusResource: $resource,
|
|
4721
4715
|
propertyPath: Ontology
|
|
4722
|
-
|
|
4716
|
+
.schema
|
|
4723
4717
|
.properties
|
|
4724
4718
|
.tsImports
|
|
4725
4719
|
.path,
|
|
@@ -4728,7 +4722,7 @@ export var NodeShape;
|
|
|
4728
4722
|
}).chain((tsImports) => $shaclPropertyFromRdf({
|
|
4729
4723
|
graph: _$options.graph,
|
|
4730
4724
|
resource: $resource,
|
|
4731
|
-
propertySchema: NodeShape
|
|
4725
|
+
propertySchema: NodeShape.schema
|
|
4732
4726
|
.properties
|
|
4733
4727
|
.types,
|
|
4734
4728
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4737,7 +4731,7 @@ export var NodeShape;
|
|
|
4737
4731
|
.map((valuesArray) => Resource.Values.fromValue({
|
|
4738
4732
|
focusResource: $resource,
|
|
4739
4733
|
propertyPath: NodeShape
|
|
4740
|
-
|
|
4734
|
+
.schema
|
|
4741
4735
|
.properties
|
|
4742
4736
|
.types
|
|
4743
4737
|
.path,
|
|
@@ -4746,7 +4740,7 @@ export var NodeShape;
|
|
|
4746
4740
|
}).chain((types) => $shaclPropertyFromRdf({
|
|
4747
4741
|
graph: _$options.graph,
|
|
4748
4742
|
resource: $resource,
|
|
4749
|
-
propertySchema: NodeShape
|
|
4743
|
+
propertySchema: NodeShape.schema
|
|
4750
4744
|
.properties
|
|
4751
4745
|
.xone,
|
|
4752
4746
|
typeFromRdf: (resourceValues) => resourceValues
|
|
@@ -4756,7 +4750,7 @@ export var NodeShape;
|
|
|
4756
4750
|
.chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
|
|
4757
4751
|
focusResource: $resource,
|
|
4758
4752
|
propertyPath: PropertyShape
|
|
4759
|
-
|
|
4753
|
+
.schema
|
|
4760
4754
|
.properties
|
|
4761
4755
|
.xone
|
|
4762
4756
|
.path,
|
|
@@ -4769,7 +4763,7 @@ export var NodeShape;
|
|
|
4769
4763
|
: Resource.Values.fromValue({
|
|
4770
4764
|
focusResource: $resource,
|
|
4771
4765
|
propertyPath: PropertyShape
|
|
4772
|
-
|
|
4766
|
+
.schema
|
|
4773
4767
|
.properties
|
|
4774
4768
|
.xone
|
|
4775
4769
|
.path,
|
|
@@ -4820,7 +4814,7 @@ export var NodeShape;
|
|
|
4820
4814
|
xone,
|
|
4821
4815
|
}))))))))))))))))))))))))))))))))))))))))))));
|
|
4822
4816
|
};
|
|
4823
|
-
NodeShape
|
|
4817
|
+
NodeShape.schema = {
|
|
4824
4818
|
properties: {
|
|
4825
4819
|
$identifier: {
|
|
4826
4820
|
kind: "Identifier",
|
|
@@ -5211,7 +5205,7 @@ export var NodeShape;
|
|
|
5211
5205
|
},
|
|
5212
5206
|
},
|
|
5213
5207
|
};
|
|
5214
|
-
function
|
|
5208
|
+
function toRdfResource(_nodeShape, options) {
|
|
5215
5209
|
const resourceSet = options?.resourceSet ??
|
|
5216
5210
|
new ResourceSet({
|
|
5217
5211
|
dataFactory: dataFactory,
|
|
@@ -5429,8 +5423,8 @@ export var NodeShape;
|
|
|
5429
5423
|
]), options?.graph);
|
|
5430
5424
|
return resource;
|
|
5431
5425
|
}
|
|
5432
|
-
NodeShape
|
|
5433
|
-
function
|
|
5426
|
+
NodeShape.toRdfResource = toRdfResource;
|
|
5427
|
+
function propertiesToStrings(_nodeShape) {
|
|
5434
5428
|
return $compactRecord({
|
|
5435
5429
|
$identifier: _nodeShape.$identifier().toString(),
|
|
5436
5430
|
label: _nodeShape.label.map((item) => item.toString()).extract(),
|
|
@@ -5439,43 +5433,52 @@ export var NodeShape;
|
|
|
5439
5433
|
.extract(),
|
|
5440
5434
|
});
|
|
5441
5435
|
}
|
|
5442
|
-
NodeShape
|
|
5436
|
+
NodeShape.propertiesToStrings = propertiesToStrings;
|
|
5443
5437
|
function $toString(_nodeShape) {
|
|
5444
|
-
return `NodeShape(${JSON.stringify(
|
|
5438
|
+
return `NodeShape(${JSON.stringify(propertiesToStrings((_nodeShape ?? this)))})`;
|
|
5445
5439
|
}
|
|
5446
5440
|
NodeShape.$toString = $toString;
|
|
5447
5441
|
})(NodeShape || (NodeShape = {}));
|
|
5448
5442
|
export var Shape;
|
|
5449
5443
|
(function (Shape) {
|
|
5450
|
-
Shape.$
|
|
5444
|
+
Shape.$toString = (value) => {
|
|
5445
|
+
if (NodeShape.isNodeShape(value)) {
|
|
5446
|
+
return NodeShape.$toString(value);
|
|
5447
|
+
}
|
|
5448
|
+
if (PropertyShape.isPropertyShape(value)) {
|
|
5449
|
+
return PropertyShape.$toString(value);
|
|
5450
|
+
}
|
|
5451
|
+
throw new Error("unable to serialize to string");
|
|
5452
|
+
};
|
|
5453
|
+
Shape.filter = (filter, value) => {
|
|
5451
5454
|
if (filter.$identifier !== undefined &&
|
|
5452
5455
|
!$filterIdentifier(filter.$identifier, value.$identifier())) {
|
|
5453
5456
|
return false;
|
|
5454
5457
|
}
|
|
5455
5458
|
if (filter.on?.["NodeShape"] !== undefined &&
|
|
5456
5459
|
NodeShape.isNodeShape(value)) {
|
|
5457
|
-
if (!NodeShape
|
|
5460
|
+
if (!NodeShape.filter(filter.on["NodeShape"], value)) {
|
|
5458
5461
|
return false;
|
|
5459
5462
|
}
|
|
5460
5463
|
}
|
|
5461
5464
|
if (filter.on?.["PropertyShape"] !== undefined &&
|
|
5462
5465
|
PropertyShape.isPropertyShape(value)) {
|
|
5463
|
-
if (!PropertyShape
|
|
5466
|
+
if (!PropertyShape.filter(filter.on["PropertyShape"], value)) {
|
|
5464
5467
|
return false;
|
|
5465
5468
|
}
|
|
5466
5469
|
}
|
|
5467
5470
|
return true;
|
|
5468
5471
|
};
|
|
5469
|
-
Shape
|
|
5472
|
+
Shape.fromRdfResource = (resource, options) => NodeShape.fromRdfResource(resource, {
|
|
5470
5473
|
...options,
|
|
5471
5474
|
ignoreRdfType: false,
|
|
5472
|
-
}).altLazy(() => PropertyShape
|
|
5475
|
+
}).altLazy(() => PropertyShape.fromRdfResource(resource, {
|
|
5473
5476
|
...options,
|
|
5474
5477
|
ignoreRdfType: false,
|
|
5475
5478
|
}));
|
|
5476
|
-
Shape
|
|
5479
|
+
Shape.fromRdfResourceValues = ((values, _options) => values.chain((values) => values.chainMap((value) => {
|
|
5477
5480
|
const valueAsValues = Right(value.toValues());
|
|
5478
|
-
return NodeShape
|
|
5481
|
+
return NodeShape.fromRdfResourceValues(valueAsValues, {
|
|
5479
5482
|
context: _options.context,
|
|
5480
5483
|
graph: _options.graph,
|
|
5481
5484
|
ignoreRdfType: false,
|
|
@@ -5484,7 +5487,7 @@ export var Shape;
|
|
|
5484
5487
|
propertyPath: _options.propertyPath,
|
|
5485
5488
|
resource: _options.resource,
|
|
5486
5489
|
})
|
|
5487
|
-
.altLazy(() => PropertyShape
|
|
5490
|
+
.altLazy(() => PropertyShape.fromRdfResourceValues(valueAsValues, {
|
|
5488
5491
|
context: _options.context,
|
|
5489
5492
|
graph: _options.graph,
|
|
5490
5493
|
ignoreRdfType: false,
|
|
@@ -5495,18 +5498,22 @@ export var Shape;
|
|
|
5495
5498
|
}))
|
|
5496
5499
|
.chain((values) => values.head());
|
|
5497
5500
|
})));
|
|
5498
|
-
let
|
|
5499
|
-
(function (
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
})(
|
|
5503
|
-
|
|
5501
|
+
let Identifier;
|
|
5502
|
+
(function (Identifier) {
|
|
5503
|
+
Identifier.parse = $parseIdentifier;
|
|
5504
|
+
Identifier.stringify = NTriplesTerm.stringify;
|
|
5505
|
+
})(Identifier = Shape.Identifier || (Shape.Identifier = {}));
|
|
5506
|
+
function isShape(object) {
|
|
5507
|
+
return (NodeShape.isNodeShape(object) || PropertyShape.isPropertyShape(object));
|
|
5508
|
+
}
|
|
5509
|
+
Shape.isShape = isShape;
|
|
5510
|
+
Shape.schema = {
|
|
5504
5511
|
kind: "NamedObjectUnion",
|
|
5505
5512
|
members: {
|
|
5506
|
-
NodeShape: { discriminantValues: ["NodeShape"], type: NodeShape
|
|
5513
|
+
NodeShape: { discriminantValues: ["NodeShape"], type: NodeShape.schema },
|
|
5507
5514
|
PropertyShape: {
|
|
5508
5515
|
discriminantValues: ["PropertyShape"],
|
|
5509
|
-
type: PropertyShape
|
|
5516
|
+
type: PropertyShape.schema,
|
|
5510
5517
|
},
|
|
5511
5518
|
},
|
|
5512
5519
|
properties: {
|
|
@@ -5753,19 +5760,19 @@ export var Shape;
|
|
|
5753
5760
|
},
|
|
5754
5761
|
},
|
|
5755
5762
|
};
|
|
5756
|
-
Shape
|
|
5763
|
+
Shape.toRdfResource = (value, options) => {
|
|
5757
5764
|
if (NodeShape.isNodeShape(value)) {
|
|
5758
|
-
return NodeShape
|
|
5765
|
+
return NodeShape.toRdfResource(value, options);
|
|
5759
5766
|
}
|
|
5760
5767
|
if (PropertyShape.isPropertyShape(value)) {
|
|
5761
|
-
return PropertyShape
|
|
5768
|
+
return PropertyShape.toRdfResource(value, options);
|
|
5762
5769
|
}
|
|
5763
5770
|
throw new Error("unrecognized type");
|
|
5764
5771
|
};
|
|
5765
|
-
Shape
|
|
5772
|
+
Shape.toRdfResourceValues = ((value, _options) => {
|
|
5766
5773
|
if (NodeShape.isNodeShape(value)) {
|
|
5767
5774
|
return [
|
|
5768
|
-
NodeShape
|
|
5775
|
+
NodeShape.toRdfResource(value, {
|
|
5769
5776
|
graph: _options.graph,
|
|
5770
5777
|
resourceSet: _options.resourceSet,
|
|
5771
5778
|
}).identifier,
|
|
@@ -5773,7 +5780,7 @@ export var Shape;
|
|
|
5773
5780
|
}
|
|
5774
5781
|
if (PropertyShape.isPropertyShape(value)) {
|
|
5775
5782
|
return [
|
|
5776
|
-
PropertyShape
|
|
5783
|
+
PropertyShape.toRdfResource(value, {
|
|
5777
5784
|
graph: _options.graph,
|
|
5778
5785
|
resourceSet: _options.resourceSet,
|
|
5779
5786
|
}).identifier,
|
|
@@ -5781,71 +5788,73 @@ export var Shape;
|
|
|
5781
5788
|
}
|
|
5782
5789
|
throw new Error("unable to serialize to RDF");
|
|
5783
5790
|
});
|
|
5784
|
-
|
|
5791
|
+
})(Shape || (Shape = {}));
|
|
5792
|
+
export var $Object;
|
|
5793
|
+
(function ($Object) {
|
|
5794
|
+
$Object.$toString = (value) => {
|
|
5785
5795
|
if (NodeShape.isNodeShape(value)) {
|
|
5786
5796
|
return NodeShape.$toString(value);
|
|
5787
5797
|
}
|
|
5798
|
+
if (Ontology.isOntology(value)) {
|
|
5799
|
+
return Ontology.$toString(value);
|
|
5800
|
+
}
|
|
5801
|
+
if (PropertyGroup.isPropertyGroup(value)) {
|
|
5802
|
+
return PropertyGroup.$toString(value);
|
|
5803
|
+
}
|
|
5788
5804
|
if (PropertyShape.isPropertyShape(value)) {
|
|
5789
5805
|
return PropertyShape.$toString(value);
|
|
5790
5806
|
}
|
|
5791
5807
|
throw new Error("unable to serialize to string");
|
|
5792
5808
|
};
|
|
5793
|
-
|
|
5794
|
-
return (NodeShape.isNodeShape(object) || PropertyShape.isPropertyShape(object));
|
|
5795
|
-
}
|
|
5796
|
-
Shape.isShape = isShape;
|
|
5797
|
-
})(Shape || (Shape = {}));
|
|
5798
|
-
export var $Object;
|
|
5799
|
-
(function ($Object) {
|
|
5800
|
-
$Object.$filter = (filter, value) => {
|
|
5809
|
+
$Object.filter = (filter, value) => {
|
|
5801
5810
|
if (filter.$identifier !== undefined &&
|
|
5802
5811
|
!$filterIdentifier(filter.$identifier, value.$identifier())) {
|
|
5803
5812
|
return false;
|
|
5804
5813
|
}
|
|
5805
5814
|
if (filter.on?.["NodeShape"] !== undefined &&
|
|
5806
5815
|
NodeShape.isNodeShape(value)) {
|
|
5807
|
-
if (!NodeShape
|
|
5816
|
+
if (!NodeShape.filter(filter.on["NodeShape"], value)) {
|
|
5808
5817
|
return false;
|
|
5809
5818
|
}
|
|
5810
5819
|
}
|
|
5811
5820
|
if (filter.on?.["Ontology"] !== undefined && Ontology.isOntology(value)) {
|
|
5812
|
-
if (!Ontology
|
|
5821
|
+
if (!Ontology.filter(filter.on["Ontology"], value)) {
|
|
5813
5822
|
return false;
|
|
5814
5823
|
}
|
|
5815
5824
|
}
|
|
5816
5825
|
if (filter.on?.["PropertyGroup"] !== undefined &&
|
|
5817
5826
|
PropertyGroup.isPropertyGroup(value)) {
|
|
5818
|
-
if (!PropertyGroup
|
|
5827
|
+
if (!PropertyGroup.filter(filter.on["PropertyGroup"], value)) {
|
|
5819
5828
|
return false;
|
|
5820
5829
|
}
|
|
5821
5830
|
}
|
|
5822
5831
|
if (filter.on?.["PropertyShape"] !== undefined &&
|
|
5823
5832
|
PropertyShape.isPropertyShape(value)) {
|
|
5824
|
-
if (!PropertyShape
|
|
5833
|
+
if (!PropertyShape.filter(filter.on["PropertyShape"], value)) {
|
|
5825
5834
|
return false;
|
|
5826
5835
|
}
|
|
5827
5836
|
}
|
|
5828
5837
|
return true;
|
|
5829
5838
|
};
|
|
5830
|
-
$Object
|
|
5839
|
+
$Object.fromRdfResource = (resource, options) => NodeShape.fromRdfResource(resource, {
|
|
5831
5840
|
...options,
|
|
5832
5841
|
ignoreRdfType: false,
|
|
5833
5842
|
})
|
|
5834
|
-
.altLazy(() => Ontology
|
|
5843
|
+
.altLazy(() => Ontology.fromRdfResource(resource, {
|
|
5835
5844
|
...options,
|
|
5836
5845
|
ignoreRdfType: false,
|
|
5837
5846
|
}))
|
|
5838
|
-
.altLazy(() => PropertyGroup
|
|
5847
|
+
.altLazy(() => PropertyGroup.fromRdfResource(resource, {
|
|
5839
5848
|
...options,
|
|
5840
5849
|
ignoreRdfType: false,
|
|
5841
5850
|
}))
|
|
5842
|
-
.altLazy(() => PropertyShape
|
|
5851
|
+
.altLazy(() => PropertyShape.fromRdfResource(resource, {
|
|
5843
5852
|
...options,
|
|
5844
5853
|
ignoreRdfType: false,
|
|
5845
5854
|
}));
|
|
5846
|
-
$Object
|
|
5855
|
+
$Object.fromRdfResourceValues = ((values, _options) => values.chain((values) => values.chainMap((value) => {
|
|
5847
5856
|
const valueAsValues = Right(value.toValues());
|
|
5848
|
-
return NodeShape
|
|
5857
|
+
return NodeShape.fromRdfResourceValues(valueAsValues, {
|
|
5849
5858
|
context: _options.context,
|
|
5850
5859
|
graph: _options.graph,
|
|
5851
5860
|
ignoreRdfType: false,
|
|
@@ -5854,7 +5863,7 @@ export var $Object;
|
|
|
5854
5863
|
propertyPath: _options.propertyPath,
|
|
5855
5864
|
resource: _options.resource,
|
|
5856
5865
|
})
|
|
5857
|
-
.altLazy(() => Ontology
|
|
5866
|
+
.altLazy(() => Ontology.fromRdfResourceValues(valueAsValues, {
|
|
5858
5867
|
context: _options.context,
|
|
5859
5868
|
graph: _options.graph,
|
|
5860
5869
|
ignoreRdfType: false,
|
|
@@ -5863,7 +5872,7 @@ export var $Object;
|
|
|
5863
5872
|
propertyPath: _options.propertyPath,
|
|
5864
5873
|
resource: _options.resource,
|
|
5865
5874
|
}))
|
|
5866
|
-
.altLazy(() => PropertyGroup
|
|
5875
|
+
.altLazy(() => PropertyGroup.fromRdfResourceValues(valueAsValues, {
|
|
5867
5876
|
context: _options.context,
|
|
5868
5877
|
graph: _options.graph,
|
|
5869
5878
|
ignoreRdfType: false,
|
|
@@ -5872,7 +5881,7 @@ export var $Object;
|
|
|
5872
5881
|
propertyPath: _options.propertyPath,
|
|
5873
5882
|
resource: _options.resource,
|
|
5874
5883
|
}))
|
|
5875
|
-
.altLazy(() => PropertyShape
|
|
5884
|
+
.altLazy(() => PropertyShape.fromRdfResourceValues(valueAsValues, {
|
|
5876
5885
|
context: _options.context,
|
|
5877
5886
|
graph: _options.graph,
|
|
5878
5887
|
ignoreRdfType: false,
|
|
@@ -5883,23 +5892,23 @@ export var $Object;
|
|
|
5883
5892
|
}))
|
|
5884
5893
|
.chain((values) => values.head());
|
|
5885
5894
|
})));
|
|
5886
|
-
let
|
|
5887
|
-
(function (
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
})(
|
|
5891
|
-
$Object
|
|
5895
|
+
let Identifier;
|
|
5896
|
+
(function (Identifier) {
|
|
5897
|
+
Identifier.parse = $parseIdentifier;
|
|
5898
|
+
Identifier.stringify = NTriplesTerm.stringify;
|
|
5899
|
+
})(Identifier = $Object.Identifier || ($Object.Identifier = {}));
|
|
5900
|
+
$Object.schema = {
|
|
5892
5901
|
kind: "NamedObjectUnion",
|
|
5893
5902
|
members: {
|
|
5894
|
-
NodeShape: { discriminantValues: ["NodeShape"], type: NodeShape
|
|
5895
|
-
Ontology: { discriminantValues: ["Ontology"], type: Ontology
|
|
5903
|
+
NodeShape: { discriminantValues: ["NodeShape"], type: NodeShape.schema },
|
|
5904
|
+
Ontology: { discriminantValues: ["Ontology"], type: Ontology.schema },
|
|
5896
5905
|
PropertyGroup: {
|
|
5897
5906
|
discriminantValues: ["PropertyGroup"],
|
|
5898
|
-
type: PropertyGroup
|
|
5907
|
+
type: PropertyGroup.schema,
|
|
5899
5908
|
},
|
|
5900
5909
|
PropertyShape: {
|
|
5901
5910
|
discriminantValues: ["PropertyShape"],
|
|
5902
|
-
type: PropertyShape
|
|
5911
|
+
type: PropertyShape.schema,
|
|
5903
5912
|
},
|
|
5904
5913
|
},
|
|
5905
5914
|
properties: {
|
|
@@ -5921,25 +5930,25 @@ export var $Object;
|
|
|
5921
5930
|
},
|
|
5922
5931
|
},
|
|
5923
5932
|
};
|
|
5924
|
-
$Object
|
|
5933
|
+
$Object.toRdfResource = (value, options) => {
|
|
5925
5934
|
if (NodeShape.isNodeShape(value)) {
|
|
5926
|
-
return NodeShape
|
|
5935
|
+
return NodeShape.toRdfResource(value, options);
|
|
5927
5936
|
}
|
|
5928
5937
|
if (Ontology.isOntology(value)) {
|
|
5929
|
-
return Ontology
|
|
5938
|
+
return Ontology.toRdfResource(value, options);
|
|
5930
5939
|
}
|
|
5931
5940
|
if (PropertyGroup.isPropertyGroup(value)) {
|
|
5932
|
-
return PropertyGroup
|
|
5941
|
+
return PropertyGroup.toRdfResource(value, options);
|
|
5933
5942
|
}
|
|
5934
5943
|
if (PropertyShape.isPropertyShape(value)) {
|
|
5935
|
-
return PropertyShape
|
|
5944
|
+
return PropertyShape.toRdfResource(value, options);
|
|
5936
5945
|
}
|
|
5937
5946
|
throw new Error("unrecognized type");
|
|
5938
5947
|
};
|
|
5939
|
-
$Object
|
|
5948
|
+
$Object.toRdfResourceValues = ((value, _options) => {
|
|
5940
5949
|
if (NodeShape.isNodeShape(value)) {
|
|
5941
5950
|
return [
|
|
5942
|
-
NodeShape
|
|
5951
|
+
NodeShape.toRdfResource(value, {
|
|
5943
5952
|
graph: _options.graph,
|
|
5944
5953
|
resourceSet: _options.resourceSet,
|
|
5945
5954
|
}).identifier,
|
|
@@ -5947,7 +5956,7 @@ export var $Object;
|
|
|
5947
5956
|
}
|
|
5948
5957
|
if (Ontology.isOntology(value)) {
|
|
5949
5958
|
return [
|
|
5950
|
-
Ontology
|
|
5959
|
+
Ontology.toRdfResource(value, {
|
|
5951
5960
|
graph: _options.graph,
|
|
5952
5961
|
resourceSet: _options.resourceSet,
|
|
5953
5962
|
}).identifier,
|
|
@@ -5955,7 +5964,7 @@ export var $Object;
|
|
|
5955
5964
|
}
|
|
5956
5965
|
if (PropertyGroup.isPropertyGroup(value)) {
|
|
5957
5966
|
return [
|
|
5958
|
-
PropertyGroup
|
|
5967
|
+
PropertyGroup.toRdfResource(value, {
|
|
5959
5968
|
graph: _options.graph,
|
|
5960
5969
|
resourceSet: _options.resourceSet,
|
|
5961
5970
|
}).identifier,
|
|
@@ -5963,7 +5972,7 @@ export var $Object;
|
|
|
5963
5972
|
}
|
|
5964
5973
|
if (PropertyShape.isPropertyShape(value)) {
|
|
5965
5974
|
return [
|
|
5966
|
-
PropertyShape
|
|
5975
|
+
PropertyShape.toRdfResource(value, {
|
|
5967
5976
|
graph: _options.graph,
|
|
5968
5977
|
resourceSet: _options.resourceSet,
|
|
5969
5978
|
}).identifier,
|
|
@@ -5971,28 +5980,13 @@ export var $Object;
|
|
|
5971
5980
|
}
|
|
5972
5981
|
throw new Error("unable to serialize to RDF");
|
|
5973
5982
|
});
|
|
5974
|
-
$Object.$toString = (value) => {
|
|
5975
|
-
if (NodeShape.isNodeShape(value)) {
|
|
5976
|
-
return NodeShape.$toString(value);
|
|
5977
|
-
}
|
|
5978
|
-
if (Ontology.isOntology(value)) {
|
|
5979
|
-
return Ontology.$toString(value);
|
|
5980
|
-
}
|
|
5981
|
-
if (PropertyGroup.isPropertyGroup(value)) {
|
|
5982
|
-
return PropertyGroup.$toString(value);
|
|
5983
|
-
}
|
|
5984
|
-
if (PropertyShape.isPropertyShape(value)) {
|
|
5985
|
-
return PropertyShape.$toString(value);
|
|
5986
|
-
}
|
|
5987
|
-
throw new Error("unable to serialize to string");
|
|
5988
|
-
};
|
|
5989
5983
|
})($Object || ($Object = {}));
|
|
5990
5984
|
export class $RdfjsDatasetObjectSet {
|
|
5991
|
-
$graph;
|
|
5992
5985
|
#dataset;
|
|
5986
|
+
#graph;
|
|
5993
5987
|
constructor(dataset, options) {
|
|
5994
5988
|
this.#dataset = dataset;
|
|
5995
|
-
this
|
|
5989
|
+
this.#graph = options?.graph;
|
|
5996
5990
|
}
|
|
5997
5991
|
$dataset() {
|
|
5998
5992
|
if (typeof this.#dataset === "object") {
|
|
@@ -6032,9 +6026,9 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6032
6026
|
}
|
|
6033
6027
|
nodeShapesSync(query) {
|
|
6034
6028
|
return this.#objectsSync({
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6029
|
+
filter: NodeShape.filter,
|
|
6030
|
+
fromRdfResource: NodeShape.fromRdfResource,
|
|
6031
|
+
fromRdfTypes: [NodeShape.fromRdfType],
|
|
6038
6032
|
}, query);
|
|
6039
6033
|
}
|
|
6040
6034
|
async ontology(identifier, options) {
|
|
@@ -6063,9 +6057,9 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6063
6057
|
}
|
|
6064
6058
|
ontologiesSync(query) {
|
|
6065
6059
|
return this.#objectsSync({
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6060
|
+
filter: Ontology.filter,
|
|
6061
|
+
fromRdfResource: Ontology.fromRdfResource,
|
|
6062
|
+
fromRdfTypes: [Ontology.fromRdfType],
|
|
6069
6063
|
}, query);
|
|
6070
6064
|
}
|
|
6071
6065
|
async propertyGroup(identifier, options) {
|
|
@@ -6094,9 +6088,9 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6094
6088
|
}
|
|
6095
6089
|
propertyGroupsSync(query) {
|
|
6096
6090
|
return this.#objectsSync({
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6091
|
+
filter: PropertyGroup.filter,
|
|
6092
|
+
fromRdfResource: PropertyGroup.fromRdfResource,
|
|
6093
|
+
fromRdfTypes: [PropertyGroup.fromRdfType],
|
|
6100
6094
|
}, query);
|
|
6101
6095
|
}
|
|
6102
6096
|
async propertyShape(identifier, options) {
|
|
@@ -6125,9 +6119,9 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6125
6119
|
}
|
|
6126
6120
|
propertyShapesSync(query) {
|
|
6127
6121
|
return this.#objectsSync({
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6122
|
+
filter: PropertyShape.filter,
|
|
6123
|
+
fromRdfResource: PropertyShape.fromRdfResource,
|
|
6124
|
+
fromRdfTypes: [PropertyShape.fromRdfType],
|
|
6131
6125
|
}, query);
|
|
6132
6126
|
}
|
|
6133
6127
|
async shape(identifier, options) {
|
|
@@ -6157,14 +6151,14 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6157
6151
|
shapesSync(query) {
|
|
6158
6152
|
return this.#objectUnionsSync([
|
|
6159
6153
|
{
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6154
|
+
filter: Shape.filter,
|
|
6155
|
+
fromRdfResource: NodeShape.fromRdfResource,
|
|
6156
|
+
fromRdfTypes: [NodeShape.fromRdfType],
|
|
6163
6157
|
},
|
|
6164
6158
|
{
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6159
|
+
filter: Shape.filter,
|
|
6160
|
+
fromRdfResource: PropertyShape.fromRdfResource,
|
|
6161
|
+
fromRdfTypes: [PropertyShape.fromRdfType],
|
|
6168
6162
|
},
|
|
6169
6163
|
], query);
|
|
6170
6164
|
}
|
|
@@ -6195,29 +6189,29 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6195
6189
|
$objectsSync(query) {
|
|
6196
6190
|
return this.#objectUnionsSync([
|
|
6197
6191
|
{
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6192
|
+
filter: $Object.filter,
|
|
6193
|
+
fromRdfResource: NodeShape.fromRdfResource,
|
|
6194
|
+
fromRdfTypes: [NodeShape.fromRdfType],
|
|
6201
6195
|
},
|
|
6202
6196
|
{
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6197
|
+
filter: $Object.filter,
|
|
6198
|
+
fromRdfResource: Ontology.fromRdfResource,
|
|
6199
|
+
fromRdfTypes: [Ontology.fromRdfType],
|
|
6206
6200
|
},
|
|
6207
6201
|
{
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6202
|
+
filter: $Object.filter,
|
|
6203
|
+
fromRdfResource: PropertyGroup.fromRdfResource,
|
|
6204
|
+
fromRdfTypes: [PropertyGroup.fromRdfType],
|
|
6211
6205
|
},
|
|
6212
6206
|
{
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6207
|
+
filter: $Object.filter,
|
|
6208
|
+
fromRdfResource: PropertyShape.fromRdfResource,
|
|
6209
|
+
fromRdfTypes: [PropertyShape.fromRdfType],
|
|
6216
6210
|
},
|
|
6217
6211
|
], query);
|
|
6218
6212
|
}
|
|
6219
6213
|
#objectsSync(namedObjectType, query) {
|
|
6220
|
-
const graph = query?.graph ?? this
|
|
6214
|
+
const graph = query?.graph ?? this.#graph;
|
|
6221
6215
|
const limit = query?.limit ?? Number.MAX_SAFE_INTEGER;
|
|
6222
6216
|
if (limit <= 0) {
|
|
6223
6217
|
return Right([]);
|
|
@@ -6240,11 +6234,11 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6240
6234
|
}));
|
|
6241
6235
|
sortResources = false;
|
|
6242
6236
|
}
|
|
6243
|
-
else if (namedObjectType
|
|
6237
|
+
else if (namedObjectType.fromRdfTypes.length > 0) {
|
|
6244
6238
|
const identifierSet = new $IdentifierSet();
|
|
6245
6239
|
resources = [];
|
|
6246
6240
|
sortResources = true;
|
|
6247
|
-
for (const fromRdfType of namedObjectType
|
|
6241
|
+
for (const fromRdfType of namedObjectType.fromRdfTypes) {
|
|
6248
6242
|
for (const resource of resourceSet.instancesOf(fromRdfType, {
|
|
6249
6243
|
graph,
|
|
6250
6244
|
})) {
|
|
@@ -6277,7 +6271,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6277
6271
|
const resource = resourceSet.resource(quad.subject);
|
|
6278
6272
|
// Eagerly eliminate the majority of resources that won't match the object type
|
|
6279
6273
|
namedObjectType
|
|
6280
|
-
|
|
6274
|
+
.fromRdfResource(resource, fromRdfResourceOptions)
|
|
6281
6275
|
.ifRight((object) => {
|
|
6282
6276
|
resources.push({ object, resource });
|
|
6283
6277
|
});
|
|
@@ -6291,13 +6285,13 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6291
6285
|
const objects = [];
|
|
6292
6286
|
for (let { object, resource } of resources) {
|
|
6293
6287
|
if (!object) {
|
|
6294
|
-
const objectEither = namedObjectType
|
|
6288
|
+
const objectEither = namedObjectType.fromRdfResource(resource, fromRdfResourceOptions);
|
|
6295
6289
|
if (objectEither.isLeft()) {
|
|
6296
6290
|
return objectEither;
|
|
6297
6291
|
}
|
|
6298
6292
|
object = objectEither.unsafeCoerce();
|
|
6299
6293
|
}
|
|
6300
|
-
if (query?.filter && !namedObjectType
|
|
6294
|
+
if (query?.filter && !namedObjectType.filter(query.filter, object)) {
|
|
6301
6295
|
continue;
|
|
6302
6296
|
}
|
|
6303
6297
|
if (objectI++ >= offset) {
|
|
@@ -6310,7 +6304,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6310
6304
|
return Right(objects);
|
|
6311
6305
|
}
|
|
6312
6306
|
#objectUnionsSync(namedObjectTypes, query) {
|
|
6313
|
-
const graph = query?.graph ?? this
|
|
6307
|
+
const graph = query?.graph ?? this.#graph;
|
|
6314
6308
|
const limit = query?.limit ?? Number.MAX_SAFE_INTEGER;
|
|
6315
6309
|
if (limit <= 0) {
|
|
6316
6310
|
return Right([]);
|
|
@@ -6333,12 +6327,12 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6333
6327
|
}));
|
|
6334
6328
|
sortResources = false;
|
|
6335
6329
|
}
|
|
6336
|
-
else if (namedObjectTypes.every((namedObjectType) => namedObjectType
|
|
6330
|
+
else if (namedObjectTypes.every((namedObjectType) => namedObjectType.fromRdfTypes.length > 0)) {
|
|
6337
6331
|
const identifierSet = new $IdentifierSet();
|
|
6338
6332
|
resources = [];
|
|
6339
6333
|
sortResources = true;
|
|
6340
6334
|
for (const namedObjectType of namedObjectTypes) {
|
|
6341
|
-
for (const fromRdfType of namedObjectType
|
|
6335
|
+
for (const fromRdfType of namedObjectType.fromRdfTypes) {
|
|
6342
6336
|
for (const resource of resourceSet.instancesOf(fromRdfType, {
|
|
6343
6337
|
graph,
|
|
6344
6338
|
})) {
|
|
@@ -6373,7 +6367,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6373
6367
|
const resource = resourceSet.resource(quad.subject);
|
|
6374
6368
|
for (const namedObjectType of namedObjectTypes) {
|
|
6375
6369
|
if (namedObjectType
|
|
6376
|
-
|
|
6370
|
+
.fromRdfResource(resource, fromRdfResourceOptions)
|
|
6377
6371
|
.ifRight((object) => {
|
|
6378
6372
|
resources.push({ object, namedObjectType, resource });
|
|
6379
6373
|
})
|
|
@@ -6393,12 +6387,12 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6393
6387
|
if (!object) {
|
|
6394
6388
|
let objectEither;
|
|
6395
6389
|
if (namedObjectType) {
|
|
6396
|
-
objectEither = namedObjectType
|
|
6390
|
+
objectEither = namedObjectType.fromRdfResource(resource, fromRdfResourceOptions);
|
|
6397
6391
|
}
|
|
6398
6392
|
else {
|
|
6399
6393
|
objectEither = Left(new Error("no object types"));
|
|
6400
6394
|
for (const tryObjectType of namedObjectTypes) {
|
|
6401
|
-
objectEither = tryObjectType
|
|
6395
|
+
objectEither = tryObjectType.fromRdfResource(resource, fromRdfResourceOptions);
|
|
6402
6396
|
if (objectEither.isRight()) {
|
|
6403
6397
|
namedObjectType = tryObjectType;
|
|
6404
6398
|
break;
|
|
@@ -6413,7 +6407,7 @@ export class $RdfjsDatasetObjectSet {
|
|
|
6413
6407
|
if (!namedObjectType) {
|
|
6414
6408
|
throw new Error("namedObjectType should be set here");
|
|
6415
6409
|
}
|
|
6416
|
-
if (query?.filter && !namedObjectType
|
|
6410
|
+
if (query?.filter && !namedObjectType.filter(query.filter, object)) {
|
|
6417
6411
|
continue;
|
|
6418
6412
|
}
|
|
6419
6413
|
if (objectI++ >= offset) {
|