Update no-orphaned-subclasses.sparql

Based on the updates provided by @swartik, thank you. Tell me if there are any remaining edits that need to be made.
This commit is contained in:
oliviahobai
2024-09-03 18:24:41 -04:00
committed by GitHub
parent 65bb0c9325
commit 51efd29ffa

View File

@@ -1,15 +1,12 @@
# Title:
# No Orphaned Subclasses
# Constraint Description:
# All classes must have some parent class. The only result otherwise should be “entity”.
# All CCO classes must have a superclass.
# Severity:
# Warning
# Error
# Author:
# github.com/swartik
Severity:
(select "Warning" or "Error")
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
@@ -18,4 +15,5 @@ WHERE {
?cls a owl:Class
FILTER isIRI(?cls)
FILTER NOT EXISTS { ?cls rdfs:subClassOf ?supercls }
FILTER (?cls != <http://purl.obolibrary.org/obo/BFO_0000001>)
}