All Downloads are FREE. Search and download functionalities are using the official Maven repository.

report_queries.missing_superclass.rq Maven / Gradle / Ivy

Go to download

Core library for ROBOT: Library for working with OWL ontologies, especially Open Biological and Biomedical Ontologes (OBO).

The newest version!
# # Missing Superclass
#
# **Problem:** A class does not have a superclass. This is not relevant for top-level classes, but may reveal orphaned children. Excludes deprecated entities.
#
# **Solution:** Make sure there are no orphaned children - if so, assert a parent.

PREFIX owl: 
PREFIX rdf: 
PREFIX rdfs: 

SELECT DISTINCT ?entity ?property ?value WHERE {
  VALUES ?property { rdfs:subClassOf }
  ?entity a owl:Class .
  FILTER (!isBlank(?entity)) .
  FILTER NOT EXISTS { ?entity ?property ?value }
  FILTER NOT EXISTS { ?entity owl:deprecated true }
  FILTER EXISTS {
    ?entity ?prop2 ?object .
    FILTER (?prop2 != rdf:type)
    FILTER (?prop2 != owl:equivalentClass)
    FILTER (?prop2 != owl:disjointWith)
    FILTER (?prop2 != owl:equivalentProperty)
    FILTER (?prop2 != owl:sameAs)
    FILTER (?prop2 != owl:differentFrom)
    FILTER (?prop2 != owl:inverseOf)
  }
}
ORDER BY ?entity




© 2015 - 2025 Weber Informatics LLC | Privacy Policy