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

java.lang.Object
  extended by uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl
      extended by uk.ac.manchester.cs.owl.owlapi.OWLLiteralImpl
          extended by uk.ac.manchester.cs.owl.owlapi.OWLTypedLiteralImpl
All Implemented Interfaces:
java.lang.Comparable<OWLObject>, OWLAnnotationObject, OWLAnnotationValue, OWLLiteral, OWLObject, OWLPropertyAssertionObject, OWLTypedLiteral

public class OWLTypedLiteralImpl
extends OWLLiteralImpl
implements OWLTypedLiteral

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


Constructor Summary
OWLTypedLiteralImpl(OWLDataFactory dataFactory, java.lang.String literal, OWLDatatype datatype)
           
 
Method Summary
 void accept(OWLAnnotationValueVisitor visitor)
           
<O> O
accept(OWLAnnotationValueVisitorEx<O> visitor)
           
 void accept(OWLDataVisitor visitor)
           
<O> O
accept(OWLDataVisitorEx<O> visitor)
           
 void accept(OWLObjectVisitor visitor)
           
<O> O
accept(OWLObjectVisitorEx<O> visitor)
           
 OWLTypedLiteral asOWLStringLiteral()
          If this literal is a typed (i.e.
 OWLStringLiteral asRDFTextLiteral()
          If this literal is an RDFTextLiteral (i.e.
protected  int compareObjectOfSameType(OWLObject object)
           
 boolean equals(java.lang.Object obj)
           
 OWLDatatype getDatatype()
          Gets the datatype which types the literal which is represented by this constant.
 boolean isTyped()
          Determines if this literal is typed (i.e.
 
Methods inherited from class uk.ac.manchester.cs.owl.owlapi.OWLLiteralImpl
getLiteral, hashCode
 
Methods inherited from class uk.ac.manchester.cs.owl.owlapi.OWLObjectImpl
compareSets, compareTo, getClassesInSignature, getDataPropertiesInSignature, getDatatypesInSignature, getIndividualsInSignature, getObjectPropertiesInSignature, getOWLDataFactory, getSignature, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.semanticweb.owlapi.model.OWLLiteral
getLiteral
 

Constructor Detail

OWLTypedLiteralImpl

public OWLTypedLiteralImpl(OWLDataFactory dataFactory,
                           java.lang.String literal,
                           OWLDatatype datatype)
Method Detail

getDatatype

public OWLDatatype getDatatype()
Description copied from interface: OWLTypedLiteral
Gets the datatype which types the literal which is represented by this constant.

Specified by:
getDatatype in interface OWLTypedLiteral
Returns:
the data type which types this constant.

asOWLStringLiteral

public OWLTypedLiteral asOWLStringLiteral()
Description copied from interface: OWLLiteral
If this literal is a typed (i.e. if the isTyped method returns true then this method obtains this literal as a typed literal. If isTyped returns false then calling this method will cause an OWLRuntimeException to be thrown.

Specified by:
asOWLStringLiteral in interface OWLLiteral
Returns:
This literal as a typed literal

asRDFTextLiteral

public OWLStringLiteral asRDFTextLiteral()
Description copied from interface: OWLLiteral
If this literal is an RDFTextLiteral (i.e. if the isTyped method returns false then this method obtains this literal as an RDFTextLiteral. If the isTyped method returns true because this method is a typed literal, then calling this method will cause an OWLRuntimeException to be thrown.

Specified by:
asRDFTextLiteral in interface OWLLiteral
Returns:
This literal as a more specific RDF Text Literal

equals

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

isTyped

public boolean isTyped()
Description copied from interface: OWLLiteral
Determines if this literal is typed (i.e. an instance of OWLTypedLiteral)

Specified by:
isTyped in interface OWLLiteral
Returns:
true if the literal is typed, otherwise false false

accept

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

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 OWLLiteral

accept

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

accept

public void accept(OWLAnnotationValueVisitor visitor)
Specified by:
accept in interface OWLAnnotationValue

accept

public <O> O accept(OWLAnnotationValueVisitorEx<O> visitor)
Specified by:
accept in interface OWLAnnotationValue

compareObjectOfSameType

protected int compareObjectOfSameType(OWLObject object)
Specified by:
compareObjectOfSameType in class OWLObjectImpl