Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add targetShape #213

Open
VladimirAlexiev opened this issue Jan 20, 2025 · 0 comments
Open

add targetShape #213

VladimirAlexiev opened this issue Jan 20, 2025 · 0 comments

Comments

@VladimirAlexiev
Copy link

VladimirAlexiev commented Jan 20, 2025

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

I call this pattern "Reference vs Full shapes". A "Semantic Object" is defined by:

  • A: "business type discriminator". It can be rdf:type but can include more, eg
    • Researcher: rdf:type schema:Person and dct:type <person/type/researcher>
    • Industry: rdf:type skos:Concept and skos:inScheme <thesaurus/industry>
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant