org.coode.owlapi.rdf.model
Class RDFLiteralNode

java.lang.Object
  extended by org.coode.owlapi.rdf.model.RDFNode
      extended by org.coode.owlapi.rdf.model.RDFLiteralNode

public class RDFLiteralNode
extends RDFNode

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 06-Dec-2006


Constructor Summary
RDFLiteralNode(java.lang.String literal, IRI datatype)
           
RDFLiteralNode(java.lang.String literal, java.lang.String lang)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 IRI getDatatype()
          Gets the datatype, or null if there is no datatype
 IRI getIRI()
          Gets the URI of the resource.
 java.lang.String getLang()
          Gets the lang
 java.lang.String getLiteral()
          Gets the lexical form of this literal.
 int hashCode()
           
 boolean isAnonymous()
          Determines if this node is a resource and is anonymous.
 boolean isLiteral()
           
 boolean isTyped()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RDFLiteralNode

public RDFLiteralNode(java.lang.String literal,
                      IRI datatype)

RDFLiteralNode

public RDFLiteralNode(java.lang.String literal,
                      java.lang.String lang)
Method Detail

getIRI

public IRI getIRI()
Description copied from class: RDFNode
Gets the URI of the resource.

Specified by:
getIRI in class RDFNode
Returns:
The URI or null if this is an anonymous resource.

isAnonymous

public boolean isAnonymous()
Description copied from class: RDFNode
Determines if this node is a resource and is anonymous.

Specified by:
isAnonymous in class RDFNode
Returns:
true if this is a resource node (i.e. isLiteral returns false) and the node is anonymous, or false if this is a resource node and is not anonymous.

getLiteral

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

Returns:
The lexical form

getLang

public java.lang.String getLang()
Gets the lang

Returns:
The lang, or null if there is no lang

getDatatype

public IRI getDatatype()
Gets the datatype, or null if there is no datatype

Returns:

isTyped

public boolean isTyped()

isLiteral

public boolean isLiteral()
Specified by:
isLiteral in class RDFNode

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object