org.jrdf.graph.index.nodepool
Interface NodePool

All Known Subinterfaces:
NodePoolMem
All Known Implementing Classes:
NodePoolMemImpl

public interface NodePool

Maps between the Long identifier and a Node (globalized value) or from a String to a Long (local value).

Version:
$Revision: 1045 $
Author:
Andrew Newman

Method Summary
 Node getNodeById(Long id)
          Package method to find a node in the node pool by its id.
 Long getNodeIdByString(String str)
          Package method to find a node id based on its string representation.
 Long[] localize(Node first, Node second, Node third)
          Converts a globalized set of triple objects to an array of longs.
 

Method Detail

getNodeById

Node getNodeById(Long id)
Package method to find a node in the node pool by its id.

Parameters:
id - The id of the node to search for.
Returns:
The node referred to by the id, null if not found.

getNodeIdByString

Long getNodeIdByString(String str)
Package method to find a node id based on its string representation.

Parameters:
str - The string representation of a node.
Returns:
The id of the node with the given string.

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.
Throws:
GraphException - If there was an error adding the statement.