uk.ac.manchester.cs.owl.owlapi
Class OWLAnonymousClassExpressionImpl

java.lang.Object
  extended by uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl
      extended by uk.ac.manchester.cs.owl.owlapi.OWLClassExpressionImpl
          extended by uk.ac.manchester.cs.owl.owlapi.OWLAnonymousClassExpressionImpl
All Implemented Interfaces:
java.lang.Comparable<OWLObject>, OWLAnonymousClassExpression, OWLClassExpression, OWLObject, OWLPropertyRange, SWRLPredicate
Direct Known Subclasses:
OWLNaryBooleanClassExpressionImpl, OWLObjectComplementOfImpl, OWLObjectOneOfImpl, OWLRestrictionImpl

public abstract class OWLAnonymousClassExpressionImpl
extends OWLClassExpressionImpl
implements OWLAnonymousClassExpression

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 26-Oct-2006


Constructor Summary
OWLAnonymousClassExpressionImpl(OWLDataFactory dataFactory)
           
 
Method Summary
 java.util.Set<OWLClassExpression> asConjunctSet()
          Interprets this expression as a conjunction and returns the conjuncts.
 java.util.Set<OWLClassExpression> asDisjunctSet()
          Interprets this expression as a disjunction and returns the disjuncts.
 OWLClass asOWLClass()
          If this class expression is in fact a named class then this method may be used to obtain the expression as an OWLClass without the need for casting.
 boolean containsConjunct(OWLClassExpression ce)
          Determines if this class expression contains a particular conjunct.
 OWLClassExpression getComplementNNF()
          Gets the negation normal form of the complement of this expression.
 OWLClassExpression getNNF()
          Gets this expression in negation normal form.
 OWLClassExpression getObjectComplementOf()
          Gets the object complement of this class expression.
 boolean isAnonymous()
          Determines whether or not this expression represents an anonymous class expression.
 boolean isOWLNothing()
          Determines if this expression is the built in class owl:Nothing.
 boolean isOWLThing()
          Determines if this expression is the built in class owl:Thing.
 
Methods inherited from class uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl
compareObjectOfSameType, compareSets, compareTo, equals, getClassesInSignature, getDataPropertiesInSignature, getDatatypesInSignature, getIndividualsInSignature, getNestedClassExpressions, getObjectPropertiesInSignature, getOWLDataFactory, getSignature, hashCode, isBottomEntity, isTopEntity, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.semanticweb.owlapi.model.OWLClassExpression
accept, accept, getClassExpressionType, isClassExpressionLiteral
 

Constructor Detail

OWLAnonymousClassExpressionImpl

public OWLAnonymousClassExpressionImpl(OWLDataFactory dataFactory)
Method Detail

isAnonymous

public boolean isAnonymous()
Description copied from interface: OWLClassExpression
Determines whether or not this expression represents an anonymous class expression.

Specified by:
isAnonymous in interface OWLClassExpression
Returns:
true if this is an anonymous class expression, or false if this is a named class (OWLClass)

isOWLThing

public boolean isOWLThing()
Description copied from interface: OWLClassExpression
Determines if this expression is the built in class owl:Thing. This method does not determine if the class is equivalent to owl:Thing.

Specified by:
isOWLThing in interface OWLClassExpression
Returns:
true if this expression is owl:Thing, or false if this expression is not owl:Thing

isOWLNothing

public boolean isOWLNothing()
Description copied from interface: OWLClassExpression
Determines if this expression is the built in class owl:Nothing. This method does not determine if the class is equivalent to owl:Nothing.

Specified by:
isOWLNothing in interface OWLClassExpression
Returns:
true if this expression is owl:Nothing, or false if this expression is not owl:Nothing.

getNNF

public OWLClassExpression getNNF()
Description copied from interface: OWLClassExpression
Gets this expression in negation normal form.

Specified by:
getNNF in interface OWLClassExpression
Returns:
The expression in negation normal form.

getComplementNNF

public OWLClassExpression getComplementNNF()
Description copied from interface: OWLClassExpression
Gets the negation normal form of the complement of this expression.

Specified by:
getComplementNNF in interface OWLClassExpression
Returns:
A expression that represents the NNF of the complement of this expression.

getObjectComplementOf

public OWLClassExpression getObjectComplementOf()
Gets the object complement of this class expression.

Specified by:
getObjectComplementOf in interface OWLClassExpression
Returns:
A class expression that is the complement of this class expression.

asOWLClass

public OWLClass asOWLClass()
Description copied from interface: OWLClassExpression
If this class expression is in fact a named class then this method may be used to obtain the expression as an OWLClass without the need for casting. The general pattern of use is to use the isAnonymous to first check

Specified by:
asOWLClass in interface OWLClassExpression
Returns:
This class expression as an OWLClass.

asConjunctSet

public java.util.Set<OWLClassExpression> asConjunctSet()
Description copied from interface: OWLClassExpression
Interprets this expression as a conjunction and returns the conjuncts. This method does not normalise the expression (full CNF is not computed).

Specified by:
asConjunctSet in interface OWLClassExpression
Returns:
The conjucts of this expression if it is a conjunction (object intersection of), or otherwise a singleton set containing this expression. Note that nested conjunctions will be flattened, for example, calling this method on (A and B) and C will return the set {A, B, C}

containsConjunct

public boolean containsConjunct(OWLClassExpression ce)
Description copied from interface: OWLClassExpression
Determines if this class expression contains a particular conjunct. This method does not do any normalisation such as applying DeMorgans rules.

Specified by:
containsConjunct in interface OWLClassExpression
Parameters:
ce - The conjunct to test for
Returns:
true if this class expression is equal to ce or if this class expression is an ObjectIntersectionOf (possibly nested withing another ObjectIntersectionOf) that contains ce, otherwise false.

asDisjunctSet

public java.util.Set<OWLClassExpression> asDisjunctSet()
Description copied from interface: OWLClassExpression
Interprets this expression as a disjunction and returns the disjuncts. This method does not normalise the expression (full DNF is not computed).

Specified by:
asDisjunctSet in interface OWLClassExpression
Returns:
The disjuncts of this expression if it is a disjunction (object union of), or otherwise a singleton set containing this expression. Note that nested disjunctions will be flattened, for example, calling this method on (A or B) or C will return the set {A, B, C}