-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
ProfilesFor SHACL 1.2 Profiles specFor SHACL 1.2 Profiles spec
Description
targetShape is one of the features mentioned in #199.
It means "the targets of shape B are the nodes that satisfy shape A".
@tpluscode: I implemented a custom target using SHACL-AF sh:expression
This is implemented in rdf4j as rsx:targetShape
- https://rdf4j.org/shacl/extensions.html,
https://rdf4j.org/javadoc/5.0.3/org/eclipse/rdf4j/model/vocabulary/RSX.html, https://graphdb.ontotext.com/documentation/10.8/shacl-validation.html - It is used substantially by https://platform.ontotext.com/semantic-objects/ to implement a useful pattern
I call this pattern "Reference vs Full shapes". A "Semantic Object" is defined by:
- A: "business type discriminator". It can be
rdf:typebut can include more, eg- Researcher:
rdf:type schema:Personanddct:type <person/type/researcher> - Industry:
rdf:type skos:Conceptandskos:inScheme <thesaurus/industry>
- Researcher:
- B: a list of properties, with cardinality, range and other restrictions
Say we have a node X with relation p pointing to Y.
- To check X, we use its reference shape X.A to find its full shape X.B.
- When checking the full shape X.B, we check all props.
- But when checking the relation X.p, we use the reference shape Y.A of the target, not its full shape Y.B.
This eliminates uncontrolled expansion of validation work.
And it takes care of recursive shapes: Y.q can refer back to X because to check Y.q, you check the reference shape X.A not the full shape X.B.
Metadata
Metadata
Assignees
Labels
ProfilesFor SHACL 1.2 Profiles specFor SHACL 1.2 Profiles spec