org.jrdf.graph.local.mem
Class LiteralImpl

java.lang.Object
  extended by org.jrdf.graph.AbstractLiteral
      extended by org.jrdf.graph.local.mem.LiteralImpl
All Implemented Interfaces:
Serializable, Literal, LiteralMutableId, LocalizedNode, Node, ObjectNode, TypedNodeVisitable, Value

public class LiteralImpl
extends AbstractLiteral
implements LiteralMutableId

RDF literal node.

Version:
$Revision: 1804 $
Author:
Paul Gearon
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jrdf.graph.AbstractLiteral
datatypeURI, language, value
 
Constructor Summary
LiteralImpl(String newLexicalForm)
           
LiteralImpl(String newLexicalForm, String newLanguage)
           
LiteralImpl(String newLexicalForm, URI datatype)
           
 
Method Summary
 Long getId()
          Retrieves an internal identifier for this node.
 void setId(Long newId)
          Sets the interanl identifier for this node.
 String toString()
          Provide a legible representation of a literal.
 
Methods inherited from class org.jrdf.graph.AbstractLiteral
accept, equals, getDatatypeURI, getDatatypeValue, getEscapedForm, getEscapedLexicalForm, getLanguage, getLexicalForm, getValue, hashCode, isDatatypedLiteral, isLanguageLiteral, isPlainLiteral, isWellFormedXML
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jrdf.graph.Literal
equals, getDatatypeURI, getDatatypeValue, getEscapedForm, getEscapedLexicalForm, getLanguage, getValue, hashCode, isDatatypedLiteral, isLanguageLiteral, isPlainLiteral
 
Methods inherited from interface org.jrdf.graph.TypedNodeVisitable
accept
 
Methods inherited from interface org.jrdf.graph.Value
getLexicalForm, isWellFormedXML
 

Constructor Detail

LiteralImpl

public LiteralImpl(String newLexicalForm)

LiteralImpl

public LiteralImpl(String newLexicalForm,
                   String newLanguage)

LiteralImpl

public LiteralImpl(String newLexicalForm,
                   URI datatype)
Method Detail

getId

public Long getId()
Retrieves an internal identifier for this node.

Specified by:
getId in interface LocalizedNode
Returns:
A numeric identifier for thisa node.

setId

public void setId(Long newId)
Sets the interanl identifier for this node.

Specified by:
setId in interface LiteralMutableId
Parameters:
newId - new id.

toString

public String toString()
Provide a legible representation of a literal. Caches the immutable value so it gets mapped efficiently.

Specified by:
toString in interface Literal
Overrides:
toString in class AbstractLiteral
Returns:
the lexicalForm property, enclosed in " characters.