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

Adjust notion of "Top-level property" to account for SHACL shapes #108

Merged
merged 4 commits into from
May 26, 2022

Conversation

balon
Copy link
Contributor

@balon balon commented Dec 9, 2021

This patch will address use cases where an ontology may define no or few rdfs:domain statements for its properties, instead relating properties to classes via SHACL shapes. If a property is associated to classes via SHACL property shapes within an ontology, it does not seem appropriate to treat the property as universally applicable.

Contained is a new method in the SparqlHelper class, which will find find the properties that should not be "top-level" due to applying to a class as a SHACL PropertyShape, and adjust the "Top-level property" based on this query.

Please advise if there is a better approach to solving this case where an ontology may utilize OWL, SHACL, or both.

balon and others added 4 commits December 9, 2021 16:09
This patch addresses a use case where an ontology
defines no or few rdfs:domain statements for its
properties, instead relating properties to classes
via SHACL shapes.  If a property is associated to
classes via SHACL property shapes within an ontology,
it does not seem appropriate to treat the property as
universally applicable.

Co-authored-by: Alex Nelson <[email protected]>
Signed-off-by: TJ Balon <[email protected]>
This patch should have no functional impact, except possibly some
speedup from a braces encapsulation.

Signed-off-by: Alex Nelson <[email protected]>
Review of the SHACL specification showed the sh:targetClass is not
explicitly required under certain conditions, cited in
getPropsApplicableByShapes.

Signed-off-by: Alex Nelson <[email protected]>
@ajnelson-nist
Copy link
Contributor

Apologies for the in-flight update, but review of the SHACL specification showed one of the triples we had thought was explicitly required could be inferred from other conditions. The query now behaves more in line with the SHACL specification.

@lambdamusic lambdamusic merged commit 1d7e289 into lambdamusic:master May 26, 2022
@ajnelson-nist ajnelson-nist deleted the hotfix-SHACL-shapes-usage branch May 26, 2022 17:16
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

Successfully merging this pull request may close these issues.

3 participants