Skip to content

using sh:class and sh:targetClass #45

Open
@elf-pavlik

Description

@elf-pavlik

I would like to discuss it initially without taking about SKOS, later we can discuss those topic together in appropriate issues.
Currently all shapes use sh:targetClass ( -> in compact syntax), in #19 I also started using sh:class (in compact e.g. ex:hasDependencyOn IRI ex:Software).

Looking at https://www.w3.org/TR/shacl12-core/#ClassConstraintComponent

The condition specified by sh:class is that each value node is a SHACL instance of a given type.

and the snippet, I understand that it ensures that in case of ex:hasDependencyOn IRI ex:Software the values will always need to by typed as ex:Software. This way stating <https://sai.js.org/vuejectron> ex:hasDependencyOn cdata:Jeff_Zucker would be invalid since Jeff is typed as a ex:Person but not as a ex:Software.

Looking at https://www.w3.org/TR/shacl12-core/#targetClass

If s is a shape in a shapes graph SG and s has value c for sh:targetClass in SG then the set of SHACL instances of c in a data graph DG is a target from DG for s in SG.

TBH I have hard time parsing that definition but I understand that each instance of a class becomes focus node for that shape. This would probably help us with #12

Since we already have all the shapes using sh:tragetClass, should we also add sh:class wherever they are missing in current shapes?

@jeswr I believe we will need your arcane knowledge of SHACL here 🧙‍♂️

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions