You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of gen-shacl gives a sh:nodeShape the same name as the LinkML class that it was generated from; and then assigns the same as the targetClass
For SHACL-based validation purposes, the sh:targetClass specifies the target, and not the name of the nodeshape. The example could just as well have been:
Relevant LinkML issue: linkml/linkml#2084, which suggests using a shape annotation to redefine the name of the nodeshape in the exported shacl. This is strictly not necessary here, since a shift to using the sh:targetClass will in any case ignore the nodeshape name.
An important additional aspect to note from the SHACL standard is Implicit Class targets:
a sh:nodeshape might not always have sh:targetclass defined (the target is actually orthogonal to class, since there are different types of shacl targets: https://www.w3.org/TR/shacl/#targets (TODO: shacl-vue code needs to take this into account))
if a sh:nodeshape does not have a target defined (and here, more concretely a sh:targetclass), then see if the same nodeshape is also defined as a rdfs:Class in the same shapes graph: if true, use the shape name as the sh:targetclass
The text was updated successfully, but these errors were encountered:
The current implementation of
gen-shacl
gives ash:nodeShape
the same name as the LinkML class that it was generated from; and then assigns the same as thetargetClass
e.g.:
For SHACL-based validation purposes, the
sh:targetClass
specifies the target, and not the name of the nodeshape. The example could just as well have been:The form should show the name of the field as "dldist:Person" and not "dldist:MyPersonShape". The current shacl-vue code in https://github.com/psychoinformatics-de/shacl-vue/blob/main/src/composables/shapedata.js uses the nodeshape name, i.e. this has to be corrected to use
sh:targetClass
Relevant LinkML issue: linkml/linkml#2084, which suggests using a
shape
annotation to redefine the name of the nodeshape in the exported shacl. This is strictly not necessary here, since a shift to using thesh:targetClass
will in any case ignore the nodeshape name.An important additional aspect to note from the SHACL standard is Implicit Class targets:
I interpret this to mean the following
sh:nodeshape
might not always havesh:targetclass
defined (the target is actually orthogonal to class, since there are different types of shacl targets: https://www.w3.org/TR/shacl/#targets (TODO: shacl-vue code needs to take this into account))sh:nodeshape
does not have a target defined (and here, more concretely ash:targetclass
), then see if the same nodeshape is also defined as ardfs:Class
in the same shapes graph: if true, use the shape name as thesh:targetclass
The text was updated successfully, but these errors were encountered: