org.semanticweb.owl.model
Interface OWLDescription

All Superinterfaces:
java.lang.Comparable<OWLObject>, OWLObject, OWLPropertyRange
All Known Subinterfaces:
OWLAnonymousDescription, OWLBooleanDescription, OWLCardinalityRestriction<P,F>, OWLClass, OWLDataAllRestriction, OWLDataCardinalityRestriction, OWLDataExactCardinalityRestriction, OWLDataMaxCardinalityRestriction, OWLDataMinCardinalityRestriction, OWLDataSomeRestriction, OWLDataValueRestriction, OWLNaryBooleanDescription, OWLObjectAllRestriction, OWLObjectCardinalityRestriction, OWLObjectComplementOf, OWLObjectExactCardinalityRestriction, OWLObjectIntersectionOf, OWLObjectMaxCardinalityRestriction, OWLObjectMinCardinalityRestriction, OWLObjectOneOf, OWLObjectSelfRestriction, OWLObjectSomeRestriction, OWLObjectUnionOf, OWLObjectValueRestriction, OWLQuantifiedRestriction<P,F>, OWLRestriction<P>, OWLValueRestriction<P,V>

public interface OWLDescription
extends OWLObject, OWLPropertyRange

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

Represents a class description in OWL. This interface covers named and anonymous classes.


Method Summary
 void accept(OWLDescriptionVisitor visitor)
          Accepts a visit from an OWLDescriptionVisitor
<O> O
accept(OWLDescriptionVisitorEx<O> visitor)
           
 java.util.Set<OWLDescription> asConjunctSet()
          Interprets this description as a conjunction and returns the conjuncts.
 java.util.Set<OWLDescription> asDisjunctSet()
          Interprets this description as a disjunction and returns the disjuncts.
 OWLClass asOWLClass()
          If this class description is in fact a named class then this method may be used to obtain the description as an OWLClass without the need for casting.
 OWLDescription getComplementNNF()
          Gets the negation normal form of the complement of this description.
 OWLDescription getNNF()
          Gets this description in negation normal form.
 boolean isAnonymous()
          Determines whether or not this description represents an anonymous class description.
 boolean isLiteral()
          Determines if this class is a literal.
 boolean isOWLNothing()
          Determines if this description is the built in class owl:Nothing.
 boolean isOWLThing()
          Determines if this description is the built in class owl:Thing.
 
Methods inherited from interface org.semanticweb.owl.model.OWLObject
accept, accept, getClassesInSignature, getDataPropertiesInSignature, getIndividualsInSignature, getObjectPropertiesInSignature, getSignature
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

isAnonymous

boolean isAnonymous()
Determines whether or not this description represents an anonymous class description.

Returns:
true if this is an anonymous class description, or false if this is a named class (OWLClass)

isLiteral

boolean isLiteral()
Determines if this class is a literal. A literal being either a named class or the negation of a named class (i.e. A or not(A)).

Returns:
true if this is a literal, or false if this is not a literal.

asOWLClass

OWLClass asOWLClass()
If this class description is in fact a named class then this method may be used to obtain the description as an OWLClass without the need for casting. The general pattern of use is to use the isAnonymous to first check

Returns:
This class description as an OWLClass.
Throws:
OWLRuntimeException - if this class description is not an OWLClass.

isOWLThing

boolean isOWLThing()
Determines if this description is the built in class owl:Thing. This method does not determine if the class is equivalent to owl:Thing.

Returns:
true if this description is owl:Thing, or false if this description is not owl:Thing

isOWLNothing

boolean isOWLNothing()
Determines if this description is the built in class owl:Nothing. This method does not determine if the class is equivalent to owl:Nothing.

Returns:
true if this description is owl:Nothing, or false if this description is not owl:Nothing.

getNNF

OWLDescription getNNF()
Gets this description in negation normal form.

Returns:
The description in negation normal form.

getComplementNNF

OWLDescription getComplementNNF()
Gets the negation normal form of the complement of this description.

Returns:
A description that represents the NNF of the complement of this description.

asConjunctSet

java.util.Set<OWLDescription> asConjunctSet()
Interprets this description as a conjunction and returns the conjuncts. This method does not normalise the description (full CNF is not computed).

Returns:
The conjucts of this description if it is a conjunction (object intersection of), or otherwise a singleton set containing this description. 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}

asDisjunctSet

java.util.Set<OWLDescription> asDisjunctSet()
Interprets this description as a disjunction and returns the disjuncts. This method does not normalise the description (full DNF is not computed).

Returns:
The disjuncts of this description if it is a disjunction (object union of), or otherwise a singleton set containing this description. 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}

accept

void accept(OWLDescriptionVisitor visitor)
Accepts a visit from an OWLDescriptionVisitor

Parameters:
visitor - The visitor that wants to visit

accept

<O> O accept(OWLDescriptionVisitorEx<O> visitor)