Skip to content

add targetShape #213

@VladimirAlexiev

Description

@VladimirAlexiev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ProfilesFor SHACL 1.2 Profiles spec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions