org.jrdf.graph.local.mem
Class LiteralImpl
java.lang.Object
org.jrdf.graph.AbstractLiteral
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
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 interface org.jrdf.graph.Literal |
equals, getDatatypeURI, getDatatypeValue, getEscapedForm, getEscapedLexicalForm, getLanguage, getValue, hashCode, isDatatypedLiteral, isLanguageLiteral, isPlainLiteral |
LiteralImpl
public LiteralImpl(String newLexicalForm)
LiteralImpl
public LiteralImpl(String newLexicalForm,
String newLanguage)
LiteralImpl
public LiteralImpl(String newLexicalForm,
URI datatype)
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.