org.semanticweb.owlapi.model
Interface OWLLiteral

All Superinterfaces:
java.lang.Comparable<OWLObject>, OWLAnnotationObject, OWLAnnotationValue, OWLObject, OWLPropertyAssertionObject
All Known Subinterfaces:
OWLStringLiteral, OWLTypedLiteral
All Known Implementing Classes:
OWLLiteralImpl, OWLStringLiteralImpl, OWLTypedLiteralImpl

public interface OWLLiteral
extends OWLObject, OWLAnnotationObject, OWLAnnotationValue, OWLPropertyAssertionObject

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

Represents a literal (typed or rdf:TEXT).


Method Summary
 void accept(OWLDataVisitor visitor)
           
<O> O
accept(OWLDataVisitorEx<O> visitor)
           
 OWLTypedLiteral asOWLStringLiteral()
          If this literal is a typed (i.e.
 OWLStringLiteral asRDFTextLiteral()
          If this literal is an RDFTextLiteral (i.e.
 java.lang.String getLiteral()
          Gets the lexical value of this literal
 boolean isTyped()
          Determines if this literal is typed (i.e.
 
Methods inherited from interface org.semanticweb.owlapi.model.OWLAnnotationValue
accept, accept
 

Method Detail

getLiteral

java.lang.String getLiteral()
Gets the lexical value of this literal

Returns:
gets the lexical value of this literal

isTyped

boolean isTyped()
Determines if this literal is typed (i.e. an instance of OWLTypedLiteral)

Returns:
true if the literal is typed, otherwise false false

asOWLStringLiteral

OWLTypedLiteral asOWLStringLiteral()
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.

Returns:
This literal as a typed literal

asRDFTextLiteral

OWLStringLiteral asRDFTextLiteral()
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.

Returns:
This literal as a more specific RDF Text Literal

accept

void accept(OWLDataVisitor visitor)

accept

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