diff --git a/.github/deployment/sparql/all-CCO-classes-have-a-BFO-superclass b/.github/deployment/sparql/all-CCO-classes-have-a-BFO-superclass new file mode 100644 index 0000000..eeea2f5 --- /dev/null +++ b/.github/deployment/sparql/all-CCO-classes-have-a-BFO-superclass @@ -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} +}