org.semanticweb.owlapi.util
Class SimpleRootClassChecker

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

public class SimpleRootClassChecker
extends java.lang.Object
implements RootClassChecker

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 16-Dec-2006

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


Constructor Summary
SimpleRootClassChecker(java.util.Set<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
 
Method Summary
 boolean isRootClass(OWLClass cls)
          Determines if the specified class is a direct syntactic subclass of owl:Thing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleRootClassChecker

public SimpleRootClassChecker(java.util.Set<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 Detail

isRootClass

public boolean isRootClass(OWLClass cls)
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.