@manta-eu/rdf-lib/shacl-property-constraints
Reference for @manta-eu/rdf-lib/shacl-property-constraints as it is on main.
Type Aliases
ShaclAllowedValueRow
ShaclAllowedValueRow =
object
One value of the sh:in list of one property shape.
Properties
path
path:
string
propertyShape
propertyShape:
string
value
value:
string
ShaclBound
ShaclBound =
"minCount"|"minLength"|"minInclusive"|"minExclusive"|"maxCount"|"maxLength"|"maxInclusive"|"maxExclusive"
A SHACL term that sets a lower or an upper number limit on a property.
ShaclPropertyConstraints
ShaclPropertyConstraints =
Partial<Record<ShaclBound,number>> &object
The SHACL limits on one property path, merged over every property shape that names it.
Type Declaration
allowedValues?
optionalallowedValues?:string[]
nodes
nodes:
string[]
path
path:
string
patterns
patterns:
string[]
qualified
qualified:
ShaclQualifiedLimit[]
ShaclPropertyShape
ShaclPropertyShape =
ShaclShape["property"][number]
ShaclQualifiedLimit
ShaclQualifiedLimit =
object
A count that applies only to the values that meet every condition, from sh:qualifiedValueShape.
Properties
conditions
conditions:
object[]
path
path:
string
value
value:
string
maxCount?
optionalmaxCount?:number
minCount?
optionalminCount?:number
ShaclShape
ShaclShape =
SchemaInterface<typeofShaclShapeSchema>
Variables
ShaclShapeSchema
constShaclShapeSchema:object
The LDKit schema of a node shape in the shacl graph, with the limits of its properties.
Type Declaration
@type
readonly@type:"sh:NodeShape"=sh.NodeShape
property
readonlyproperty:object
property.@array
readonly@array:true=true
property.@id
readonly@id:"sh:property"=sh.property
property.@optional
readonly@optional:true=true
property.@schema
readonly@schema:object
property.@schema.maxCount
readonlymaxCount:object
property.@schema.maxCount.@id
readonly@id:"sh:maxCount"=term
property.@schema.maxCount.@optional
readonly@optional:true=true
property.@schema.maxCount.@type
readonly@type:"xsd:decimal"=xsd.decimal
property.@schema.maxExclusive
readonlymaxExclusive:object
property.@schema.maxExclusive.@id
readonly@id:"sh:maxExclusive"=term
property.@schema.maxExclusive.@optional
readonly@optional:true=true
property.@schema.maxExclusive.@type
readonly@type:"xsd:decimal"=xsd.decimal
property.@schema.maxInclusive
readonlymaxInclusive:object
property.@schema.maxInclusive.@id
readonly@id:"sh:maxInclusive"=term
property.@schema.maxInclusive.@optional
readonly@optional:true=true
property.@schema.maxInclusive.@type
readonly@type:"xsd:decimal"=xsd.decimal
property.@schema.maxLength
readonlymaxLength:object
property.@schema.maxLength.@id
readonly@id:"sh:maxLength"=term
property.@schema.maxLength.@optional
readonly@optional:true=true
property.@schema.maxLength.@type
readonly@type:"xsd:decimal"=xsd.decimal
property.@schema.minCount
readonlyminCount:object
property.@schema.minCount.@id
readonly@id:"sh:minCount"=term
property.@schema.minCount.@optional
readonly@optional:true=true
property.@schema.minCount.@type
readonly@type:"xsd:decimal"=xsd.decimal
property.@schema.minExclusive
readonlyminExclusive:object
property.@schema.minExclusive.@id
readonly@id:"sh:minExclusive"=term
property.@schema.minExclusive.@optional
readonly@optional:true=true
property.@schema.minExclusive.@type
readonly@type:"xsd:decimal"=xsd.decimal
property.@schema.minInclusive
readonlyminInclusive:object
property.@schema.minInclusive.@id
readonly@id:"sh:minInclusive"=term
property.@schema.minInclusive.@optional
readonly@optional:true=true
property.@schema.minInclusive.@type
readonly@type:"xsd:decimal"=xsd.decimal
property.@schema.minLength
readonlyminLength:object
property.@schema.minLength.@id
readonly@id:"sh:minLength"=term
property.@schema.minLength.@optional
readonly@optional:true=true
property.@schema.minLength.@type
readonly@type:"xsd:decimal"=xsd.decimal
property.@schema.node
readonlynode:object
property.@schema.node.@array
readonly@array:true=true
property.@schema.node.@id
readonly@id:"sh:node"=sh.node
property.@schema.node.@optional
readonly@optional:true=true
property.@schema.node.@type
readonly@type:"ldkit:IRI"=ldkit.IRI
property.@schema.path
readonlypath:object
property.@schema.path.@id
readonly@id:"sh:path"=sh.path
property.@schema.path.@type
readonly@type:"ldkit:IRI"=ldkit.IRI
property.@schema.pattern
readonlypattern:object
property.@schema.pattern.@array
readonly@array:true=true
property.@schema.pattern.@id
readonly@id:"sh:pattern"=sh.pattern
property.@schema.pattern.@optional
readonly@optional:true=true
property.@schema.qualifiedMaxCount
readonlyqualifiedMaxCount:object
property.@schema.qualifiedMaxCount.@id
readonly@id:"sh:qualifiedMaxCount"=term
property.@schema.qualifiedMaxCount.@optional
readonly@optional:true=true
property.@schema.qualifiedMaxCount.@type
readonly@type:"xsd:decimal"=xsd.decimal
property.@schema.qualifiedMinCount
readonlyqualifiedMinCount:object
property.@schema.qualifiedMinCount.@id
readonly@id:"sh:qualifiedMinCount"=term
property.@schema.qualifiedMinCount.@optional
readonly@optional:true=true
property.@schema.qualifiedMinCount.@type
readonly@type:"xsd:decimal"=xsd.decimal
property.@schema.qualifiedValueShape
readonlyqualifiedValueShape:object
property.@schema.qualifiedValueShape.@id
readonly@id:"sh:qualifiedValueShape"=sh.qualifiedValueShape
property.@schema.qualifiedValueShape.@optional
readonly@optional:true=true
property.@schema.qualifiedValueShape.@schema
readonly@schema:object
property.@schema.qualifiedValueShape.@schema.property
readonlyproperty:object
property.@schema.qualifiedValueShape.@schema.property.@array
readonly@array:true=true
property.@schema.qualifiedValueShape.@schema.property.@id
readonly@id:"sh:property"=sh.property
property.@schema.qualifiedValueShape.@schema.property.@optional
readonly@optional:true=true
property.@schema.qualifiedValueShape.@schema.property.@schema
readonly@schema:object
property.@schema.qualifiedValueShape.@schema.property.@schema.hasValue
readonlyhasValue:object
property.@schema.qualifiedValueShape.@schema.property.@schema.hasValue.@id
readonly@id:"sh:hasValue"=sh.hasValue
property.@schema.qualifiedValueShape.@schema.property.@schema.hasValue.@optional
readonly@optional:true=true
property.@schema.qualifiedValueShape.@schema.property.@schema.path
readonlypath:object
property.@schema.qualifiedValueShape.@schema.property.@schema.path.@id
readonly@id:"sh:path"=sh.path
property.@schema.qualifiedValueShape.@schema.property.@schema.path.@type
readonly@type:"ldkit:IRI"=ldkit.IRI
Functions
buildShaclAllowedValuesQuery()
buildShaclAllowedValuesQuery(
shapeIri):string
Gives one row per sh:in value of the shape’s properties; an LDKit schema cannot read an RDF list.
Parameters
shapeIri
string
Returns
string
mergeShaclPropertyConstraints()
mergeShaclPropertyConstraints(
shape,allowedValueRows):Map<string,ShaclPropertyConstraints>
Merges the property shapes by path; a value must satisfy every property shape, so the tightest limit wins.
Parameters
shape
allowedValueRows
Returns
Map<string, ShaclPropertyConstraints>