org.semanticweb.owlapi.util
Class NamedConjunctChecker

java.lang.Object
  extended by org.semanticweb.owlapi.util.NamedConjunctChecker

public class NamedConjunctChecker
extends java.lang.Object

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 16-Feb-2007

A utility class which checks if a class expression has a named conjunct or a specific named conjunct.


Constructor Summary
NamedConjunctChecker()
           
 
Method Summary
 java.util.Set<OWLClass> getNamedConjuncts(OWLClassExpression classExpression)
          Gets the named conjuncts for the specified expression.
 boolean hasNamedConjunct(OWLClassExpression classExpression)
          Checks whether the specified expression has a named conjunct.
 boolean isNamedConjunct(OWLClass conjunct, OWLClassExpression classExpression)
          Checks whether a named class is a conjunct in a given class expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedConjunctChecker

public NamedConjunctChecker()
Method Detail

isNamedConjunct

public boolean isNamedConjunct(OWLClass conjunct,
                               OWLClassExpression classExpression)
Checks whether a named class is a conjunct in a given class expression. For class expressions which aren't named classes or object intersections this method will always return false.

Parameters:
conjunct - The conjunct to check for
classExpression - The expression to be checked

hasNamedConjunct

public boolean hasNamedConjunct(OWLClassExpression classExpression)
Checks whether the specified expression has a named conjunct. For For class expressions which aren't named classes or object intersections this method will always return false.

Parameters:
classExpression - The expression to be checked.
Returns:
true if the expression is in fact a named class (OWLClass) or if the expression is an intersection that has a named operand (included nested intersections), otherwise false

getNamedConjuncts

public java.util.Set<OWLClass> getNamedConjuncts(OWLClassExpression classExpression)
Gets the named conjuncts for the specified expression.

Parameters:
classExpression - The expression whose conjuncts are to be retrieved.
Returns:
A set containing the named conjuncts of the specified expression. If the expression is not a named class or an intersection then the set will definitely be empty.