Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHACL rule example in Protege #45

Open
riannella opened this issue Jan 6, 2024 · 1 comment
Open

SHACL rule example in Protege #45

riannella opened this issue Jan 6, 2024 · 1 comment

Comments

@riannella
Copy link

Hi, I tried to replicate the example in Section 8.1:
https://w3c.github.io/shacl/shacl-af/
to try out sh:rule in Protege and the SHACL plugin (with the Pellet reasoner running).

Unfortunately, I could not replicate the results (that is, a new axiom is inferred for the ex:SquareRectangle)

I used the below ontology/data file and the first example shapes graph (in green) in Section 8.1

Any ideas??

Cheers - Renato

=========

@Prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# .
@Prefix xsd: http://www.w3.org/2001/XMLSchema# .
@Prefix rdfs: http://www.w3.org/2000/01/rdf-schema# .
@Prefix ex: http://www.example.org/# .

ex:onto rdf:type owl:Ontology ;
rdfs:label "Test" .

ex:Rectangle rdf:type owl:Class ;
rdfs:label "Rectangle" .

ex:height rdf:type owl:DatatypeProperty ;
rdfs:range xsd:integer .

ex:width rdf:type owl:DatatypeProperty ;
rdfs:range xsd:integer .

ex:InvalidRectangle
a ex:Rectangle .

ex:NonSquareRectangle
a ex:Rectangle ;
ex:height 2 ;
ex:width 3 .

ex:SquareRectangle
a ex:Rectangle ;
ex:height 4 ;
ex:width 4 .

@fekaputra
Copy link
Owner

Hi, unfortunately the commands for validation and generation (i.e., SHACL-AF) are different and currently it's not supported in the SHACL plugin for protege. See this commit (TopQuadrant/shacl@c4db989) for SHACL-AF execution command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants