fekaputra / shacl-plugin

SHACL4Protege - SHACL constraint validation plugin for Protégé
https://semantic-systems.org
MIT License
35 stars 8 forks source link

SHACL-SPARQL #33

Open danca103 opened 3 years ago

danca103 commented 3 years ago

Hi guys, is it possible to express SPARQL-based constraints within SHACL4P?

fekaputra commented 3 years ago

Hi there, yes - as SHACL-SPARQL is part of the W3C recommendation (and implemented by the TopBraid engine that we used here in the plugin), it is possible to express it within SHACL4P

Sorry for the late reply :)

danca103 commented 3 years ago

Hey, thanks for your answer! I have another question regarding the property sh:inversePath. I tried to express sh:inversePath with a property from a local data base with the prefix "". It didn't work. Than I just changed the prefix to "ex" and suprisingly it worked. Is that a common bug or is there a reason for that behavior? Below is the code that didn't work.

@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix sh:    <http://www.w3.org/ns/shacl#> .
@prefix :      <http://www.semanticweb.org#> .

:RoomShape a sh:NodeShape ;
    sh:targetNode :Room ; 
    sh:property [
        sh:path     [ sh:inversePath :consists_of ] ;
        sh:minCount 1 ;
    ] .