Skip to content

Commit

Permalink
Merge pull request #459 from CommonCoreOntology/448-new-query
Browse files Browse the repository at this point in the history
Create no-orphaned-subclasses.sparql
  • Loading branch information
neilotte authored Sep 11, 2024
2 parents ec4ed88 + f512eaf commit 4d6568e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/deployment/sparql/all-CCO-classes-have-a-BFO-superclass
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Title:
# No CCO Class Should Be Outside the BFO Hierarchy
# Constraint Description:
# All CCO classes must have a BFO superclass.
# Severity:
# Error
# Author:
# github.com/neilotte

PREFIX owl: http://www.w3.org/2002/07/owl#
PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema#

SELECT DISTINCT ?class ?label
WHERE {
?class a owl:Class .
FILTER contains(str(?class),"http://www.ontologyrepository.com/CommonCoreOntologies/")
FILTER NOT EXISTS {?class rdfs:subClassOf+ http://purl.obolibrary.org/obo/BFO_0000001 }
OPTIONAL {?class rdfs:label ?label}
}

0 comments on commit 4d6568e

Please sign in to comment.