psychoinformatics-de / shacl-vue

https://psychoinformatics-de.github.io/shacl-vue/
MIT License
0 stars 0 forks source link

Deal with multiple ways of specifying `a sh:PropertyShape` #7

Open jsheunis opened 3 months ago

jsheunis commented 3 months ago

See: https://www.w3.org/TR/shacl/#property-shapes

A sh:PropertyShape could be inferered from the fact that a property, with multiple attributes, is specified for a given NodeShape, or a separate sh:PropertyShape could be provided explicitly.

ex:ExampleNodeShapeWithPropertyShapes
    a sh:NodeShape ;
    sh:property [
        sh:path ex:email ;
        sh:name "e-mail" ;
        sh:description "We need at least one email value" ;
        sh:minCount 1 ;
    ] ;
    sh:property [
        sh:path (ex:knows ex:email) ;
        sh:name "Friend's e-mail" ;
        sh:description "We need at least one email for everyone you know" ;
        sh:minCount 1 ;
    ] .

ex:ExamplePropertyShape
    a sh:PropertyShape ;
    sh:path ex:email ;
    sh:description "We need at least one email value" ;
    sh:minCount 1 .

Code should resolve both of them to a common syntax for further use.