Class SimpleRootClassChecker

java.lang.Object
org.semanticweb.owlapi.util.SimpleRootClassChecker
All Implemented Interfaces:
RootClassChecker

public class SimpleRootClassChecker extends Object implements RootClassChecker
A utility class that can be used to determine is a class is a syntactic direct subclass of owl:Thing. A class is considered NOT to be a syntactic direct subclass of owl:Thing if ANY of the following conditions apply:
  1. It is equal to the left hand side of a subclass axiom, where the right hand side is a named class other than owl:Thing
  2. It is an operand in an equivalent class axiom where at least one of the other other operands is an intersection class that has a named operand other than the class in question. For example EquivalentClasses(A, (B and prop some C))
This functionality is provided because it is useful for displaying class hierarchies in editors and browsers. In these situations it is needed because not all "orphan" classes are asserted to be subclasses of owl:Thing. For example, if the only referencing axiom of class A was ObjectDomain(propP A) then A is a syntactic subclass of owl:Thing.
Since:
2.0.0
Author:
Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
  • Constructor Details

    • SimpleRootClassChecker

      public SimpleRootClassChecker(Collection<OWLOntology> ontologies)
      Creates a root class checker, which examines axioms contained in ontologies from the specified set in order to determine if a class is a syntactic subclass of owl:Thing.
      Parameters:
      ontologies - The ontologies whose axioms are to be taken into consideration when determining if a class is a syntactic direct subclass of owl:Thing
  • Method Details

    • isRootClass

      public boolean isRootClass(OWLClass cls)
      Description copied from interface: RootClassChecker
      Determines if the specified class is a direct syntactic subclass of owl:Thing.
      Specified by:
      isRootClass in interface RootClassChecker
      Parameters:
      cls - The class to be checked.
      Returns:
      true if the class is a direct syntactic root class of owl:Thing, otherwise false.