uk.ac.manchester.cs.owl
Class OWLUntypedConstantImpl

java.lang.Object
  extended by uk.ac.manchester.cs.owl.OWLObjectImpl
      extended by uk.ac.manchester.cs.owl.OWLConstantImpl
          extended by uk.ac.manchester.cs.owl.OWLUntypedConstantImpl
All Implemented Interfaces:
java.lang.Comparable<OWLObject>, OWLConstant, OWLObject, OWLUntypedConstant

public class OWLUntypedConstantImpl
extends OWLConstantImpl
implements OWLUntypedConstant

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


Constructor Summary
OWLUntypedConstantImpl(OWLDataFactory dataFactory, java.lang.String literal, java.lang.String lang)
           
 
Method Summary
 void accept(OWLDataVisitor visitor)
           
<O> O
accept(OWLDataVisitorEx<O> visitor)
           
 void accept(OWLObjectVisitor visitor)
           
<O> O
accept(OWLObjectVisitorEx<O> visitor)
           
 OWLTypedConstant asOWLTypedConstant()
          If this constant is a typed constant (i.e.
 OWLUntypedConstant asOWLUntypedConstant()
          If this constant is an untyped constant (i.e.
 boolean equals(java.lang.Object obj)
           
 java.lang.String getLang()
          Gets the language tag (if present)
 boolean hasLang()
          Language tags on untyped constants are optional.
 boolean hasLang(java.lang.String lang)
          Determines if this constant has a specific language tag.
 boolean isTyped()
          Determines if this constant is typed (i.e.
 
Methods inherited from class uk.ac.manchester.cs.owl.OWLConstantImpl
getLiteral
 
Methods inherited from class uk.ac.manchester.cs.owl.OWLObjectImpl
compareTo, getOWLDataFactory, getSignature, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.semanticweb.owl.model.OWLConstant
getLiteral
 
Methods inherited from interface org.semanticweb.owl.model.OWLObject
getSignature
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

OWLUntypedConstantImpl

public OWLUntypedConstantImpl(OWLDataFactory dataFactory,
                              java.lang.String literal,
                              java.lang.String lang)
Method Detail

getLang

public java.lang.String getLang()
Description copied from interface: OWLUntypedConstant
Gets the language tag (if present)

Specified by:
getLang in interface OWLUntypedConstant
Returns:
A String which represents the langauge tag, or null if there is no language tag

hasLang

public boolean hasLang()
Description copied from interface: OWLUntypedConstant
Language tags on untyped constants are optional. This method determines if the language tag is present.

Specified by:
hasLang in interface OWLUntypedConstant
Returns:
true if there is a language tag, or false if there is not a langauge tag.

hasLang

public boolean hasLang(java.lang.String lang)
Description copied from interface: OWLUntypedConstant
Determines if this constant has a specific language tag.

Specified by:
hasLang in interface OWLUntypedConstant
Parameters:
lang - The specific lang to test for.
Returns:
true if this constant has the specified langauge tag, or false if this constant does not have a language tag or if this constant has a language tag that is not equal to the specified language tag.

isTyped

public boolean isTyped()
Description copied from interface: OWLConstant
Determines if this constant is typed (i.e. an instance of OWLTypedConstant)

Specified by:
isTyped in interface OWLConstant
Returns:
true if the constant is typed, or false if the constant is untyped.

asOWLTypedConstant

public OWLTypedConstant asOWLTypedConstant()
Description copied from interface: OWLConstant
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.

Specified by:
asOWLTypedConstant in interface OWLConstant

asOWLUntypedConstant

public OWLUntypedConstant asOWLUntypedConstant()
Description copied from interface: OWLConstant
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.

Specified by:
asOWLUntypedConstant in interface OWLConstant

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class OWLConstantImpl

accept

public void accept(OWLDataVisitor visitor)
Specified by:
accept in interface OWLConstant

accept

public void accept(OWLObjectVisitor visitor)
Specified by:
accept in interface OWLObject

accept

public <O> O accept(OWLDataVisitorEx<O> visitor)
Specified by:
accept in interface OWLConstant

accept

public <O> O accept(OWLObjectVisitorEx<O> visitor)
Specified by:
accept in interface OWLObject