Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}
}