-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #865 from ontodev/fix844
Report: Equivalent class with no genus check
- Loading branch information
Showing
5 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Equivalent Class Axiom with no Genus | ||
|
||
**Problem:** An equivalent class axiom of the kind C = R some A is nearly always an indication of a problem. It basically means that anything that is R related to an A is equal to the class. While this is sometimes legit, most often this is accidental. | ||
|
||
**Solution:** Add a genus to the class expression like: C = B and R some A. | ||
|
||
``` | ||
PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
SELECT DISTINCT ?entity ?property ?value WHERE { | ||
?entity owl:equivalentClass ?ec . | ||
?entity owl:equivalentClass [ rdf:type owl:Restriction ; | ||
owl:someValuesFrom ?y ; | ||
owl:onProperty ?property ] . | ||
FILTER (!isBlank(?entity)) | ||
FILTER (!isBlank(?y)) | ||
} | ||
ORDER BY ?entity | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
robot-core/src/main/resources/report_queries/equivalent_class_axiom_no_genus.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# # Equivalent Class Axiom with no Genus | ||
# | ||
# **Problem:** An equivalent class axiom of the kind C = R some A is nearly always an indication of a problem. It basically means that anything that is R related to an A is equal to the class. While this is sometimes legit, most often this is accidental. | ||
# | ||
# **Solution:** Add a genus to the class expression like: C = B and R some A. | ||
|
||
PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
|
||
SELECT DISTINCT ?entity ?property ?value WHERE { | ||
?entity owl:equivalentClass ?ec . | ||
?entity owl:equivalentClass [ rdf:type owl:Restriction ; | ||
owl:someValuesFrom ?y ; | ||
owl:onProperty ?property ] . | ||
FILTER (!isBlank(?entity)) | ||
FILTER (!isBlank(?y)) | ||
} | ||
ORDER BY ?entity |