org.jrdf.graph.local.index.nodepool
Interface Localizer

All Superinterfaces:
TypedNodeVisitor
All Known Implementing Classes:
LocalizerImpl

public interface Localizer
extends TypedNodeVisitor

Tied to a NodePool the Localizer interface is reponsible for read only queries against the nodepool. It converts nodes into longs.


Method Summary
 BlankNode createLocalBlankNode()
           
 Literal createLocalLiteral(String escapedForm)
           
 URIReference createLocalURIReference(URI uri, boolean validate)
           
 Long localize(Node node)
          Converts a node into it's localized version.
 Long[] localize(Node first, Node second, Node third)
          Converts a globalized set of triple objects to an array of longs.
 
Methods inherited from interface org.jrdf.graph.TypedNodeVisitor
visitBlankNode, visitLiteral, visitNode, visitResource, visitURIReference
 

Method Detail

localize

Long[] localize(Node first,
                Node second,
                Node third)
                throws GraphException
Converts a globalized set of triple objects to an array of longs.

Parameters:
first - The first node.
second - The second node.
third - The last node.
Returns:
an array of longs that match the given first, second and third nodes.
Throws:
GraphException - If there was an error adding the statement.

localize

Long localize(Node node)
              throws GraphException
Converts a node into it's localized version.

Parameters:
node - the node to localize.
Returns:
the unique node identifier.
Throws:
GraphException - if the node was not part of this node pool.

createLocalBlankNode

BlankNode createLocalBlankNode()
                               throws GraphException
Throws:
GraphException

createLocalURIReference

URIReference createLocalURIReference(URI uri,
                                     boolean validate)

createLocalLiteral

Literal createLocalLiteral(String escapedForm)