org.openrdf.sesame.sailimpl.memory
Class LiteralNode

java.lang.Object
  extended byorg.openrdf.model.impl.LiteralImpl
      extended byorg.openrdf.sesame.sailimpl.memory.LiteralNode
All Implemented Interfaces:
Comparable, Literal, Serializable, Value, ValueNode

public class LiteralNode
extends LiteralImpl
implements ValueNode

An extension of Literal giving it node properties.

Version:
$Revision: 1.12.4.2 $
Author:
Arjohn Kampman
See Also:
Serialized Form

Constructor Summary
LiteralNode(RdfSource source, String label, String lang)
          Creates a new Literal which will get the supplied label and language code.
LiteralNode(RdfSource source, String label, URI datatype)
          Creates a new Literal which will get the supplied label and datatype.
 
Method Summary
 void addObjectStatement(Statement st)
          Adds a statement to this LiteralNode's list of statements for which it is the object.
 int getObjectStatementCount()
          Gets the amount of Statements for which this LiteralNode is the object.
 StatementList getObjectStatementList()
           
 StatementIterator getObjectStatements()
          Gets the list of Statements for which this LiteralNode is the object.
 RdfSource getRdfSource()
          Returns the RdfSource that contains this ValueNode.
 void removeObjectStatement(Statement st)
          Removes a statement from this ResourceNode's list of statements for which it is the object.
 
Methods inherited from class org.openrdf.model.impl.LiteralImpl
compareTo, equals, getDatatype, getLabel, getLanguage, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

LiteralNode

public LiteralNode(RdfSource source,
                   String label,
                   String lang)
Creates a new Literal which will get the supplied label and language code.

Parameters:
source - The Sail instance that created this LiteralNode.
label - The label for this literal.
lang - The language code of the supplied label, or null if not specified.

LiteralNode

public LiteralNode(RdfSource source,
                   String label,
                   URI datatype)
Creates a new Literal which will get the supplied label and datatype.

Parameters:
source - The Sail instance that created this LiteralNode.
label - The label for this literal.
datatype - The datatype of the supplied label, or null if not specified.
Method Detail

getObjectStatementList

public StatementList getObjectStatementList()
Specified by:
getObjectStatementList in interface ValueNode

getObjectStatements

public StatementIterator getObjectStatements()
Gets the list of Statements for which this LiteralNode is the object.

Specified by:
getObjectStatements in interface Value
Overrides:
getObjectStatements in class LiteralImpl
Returns:
A List of Statements, or null if no such statement exists.

getObjectStatementCount

public int getObjectStatementCount()
Gets the amount of Statements for which this LiteralNode is the object.

Specified by:
getObjectStatementCount in interface ValueNode
Returns:
An integer larger than or equal to 0.

addObjectStatement

public void addObjectStatement(Statement st)
Adds a statement to this LiteralNode's list of statements for which it is the object.

Specified by:
addObjectStatement in interface ValueNode

removeObjectStatement

public void removeObjectStatement(Statement st)
Removes a statement from this ResourceNode's list of statements for which it is the object.

Specified by:
removeObjectStatement in interface ValueNode

getRdfSource

public RdfSource getRdfSource()
Description copied from interface: ValueNode
Returns the RdfSource that contains this ValueNode. ValueNodes are only unique within a single repository, but an application could use several repository at the same time, passing ValueNodes generated by one Sail to another Sail. In such situations, the ValueNode of the first Sail cannot be used by the second Sail.

Specified by:
getRdfSource in interface ValueNode


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.