Property Node
Property Nodes express the constraints for a given Property. sh:or
holds the possible ranges and their constraints for the property. If there is only 1 possible range, then it is possible to express all range constraints in the property node itself instead of using sh:or
in theory. Consequently, any property-key of a RangeNode may be part of a Property Node. However, it is recommended to always use sh:or
to wrap the range(s), since within semantify.it the code expects this structure.
Key-value table
key | required | value type | description | related error |
| true | IRI | The IRI of the Property that is restricted by this node | |
| true | List of RangeNode | List of RangeNode. Every value of this property must match at least 1 of the listed range nodes | Non-conform range |
| false |
| Declares the type of this node | |
| false | Integer | The minimum cardinality (amount of values) for the property | Missing Property, Non-conform cardinality |
| false | Integer | The maximum cardinality (amount of values) for the property | Non-conform cardinality |
| false | Integer | The position of this Property in comparison with other properties for the same Subject (only representation purpose) | |
| false | String | The Description/Justification for this Property and/or its ranges) |
Example
Tthe last 2 examples express the same constraints, it is recommeded to use the variant with sh:or
:
Property-pair constraints
The following property-pair constraints allow to compare the literal values of different properties. It makes sense to define them at property level, rather than at range level.
key | value type | description | related error |
| [ IRI ] | Specifies the condition that the set of all value nodes is equal to the set of objects of the triples that have the focus node as subject and the value of sh:equals as predicate. (The property shape having | Non-conform sh:equals |
| [ IRI ] | Specifies the condition that the set of value nodes is disjoint with the set of objects of the triples that have the focus node as subject and the value of | Non-conform sh:disjoint |
| [ IRI ] | Specifies the condition that each value node is smaller than all the objects of the triples that have the focus node as subject and the value of | Non-conform sh:lessThan |
| [ IRI ] | Specifies the condition that each value node is smaller than or equal to all the objects of the triples that have the focus node as subject and the value of | Non-conform sh:lessThanOrEquals |
Regarding the Error generation based on these property-pair constraints, tests were done trying https://shacl.org/playground/:
sh:equals produces an error if the specified property to compare does not exist.
sh:disjoint does NOT produce an error if the specified property to compare does not exist.
sh:lessThan does NOT produce an error if the specified property to compare does not exist.
sh:lessThanOrEquals does NOT produce an error if the specified property to compare does not exist.
Textual definition of error generation in the SHACL specification:
Regarding the implementation, have a look at https://www.w3.org/TR/rdf-sparql-query/
Example
Last updated