org.semanticweb.owl.model
Interface OWLConstant

All Superinterfaces:
java.lang.Comparable<OWLObject>, OWLObject
All Known Subinterfaces:
OWLTypedConstant, OWLUntypedConstant

public interface OWLConstant
extends OWLObject

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group Date: 24-Oct-2006 Represents a literal (typed or untyped).


Method Summary
 void accept(OWLDataVisitor visitor)
           
<O> O
accept(OWLDataVisitorEx<O> visitor)
           
 OWLTypedConstant asOWLTypedConstant()
          If this constant is a typed constant (i.e.
 OWLUntypedConstant asOWLUntypedConstant()
          If this constant is an untyped constant (i.e.
 java.lang.String getLiteral()
          Gets the string literal that this constant represents.
 boolean isTyped()
          Determines if this constant is typed (i.e.
 
Methods inherited from interface org.semanticweb.owl.model.OWLObject
accept, accept
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getLiteral

java.lang.String getLiteral()
Gets the string literal that this constant represents.


isTyped

boolean isTyped()
Determines if this constant is typed (i.e. an instance of OWLTypedConstant)

Returns:
true if the constant is typed, or false if the constant is untyped.

asOWLTypedConstant

OWLTypedConstant asOWLTypedConstant()
If this constant is a typed constant (i.e. if the isTyped method returns true then this method obtains this constant as a typed constant. If isTyped returns false because this constant is not a typed constant then calling this method will cause an OWLRuntimeException to be thrown.


asOWLUntypedConstant

OWLUntypedConstant asOWLUntypedConstant()
If this constant is an untyped constant (i.e. if the isTyped method returns false then this method obtains this constant as an untyped constant. If the isTyped method returns true because this method is a typed constant, then calling this method will cause an OWLRuntimeException to be thrown.


accept

void accept(OWLDataVisitor visitor)

accept

<O> O accept(OWLDataVisitorEx<O> visitor)