org.jrdf.graph.global.molecule
Interface FindEntryNode

All Known Implementing Classes:
FindEntryNodeImpl

public interface FindEntryNode

Given a graph and a starting triple recursively find the starting triple in the chain. The triple must have a blank subject and must be pointed to by triples with blank subjects and objects. These blank nodes form a chain that can be traversed backwards in the chain. For example: _:1 p _:2, _:2 p _:3, _:3 p _:4. If you start from _:3 p _:4 you end at _:1 p _2. If you start at _:1 p _:2 you remain at the same point. Code using this can make the decision whether the found triple is a better candidate than the starting triple.

Version:
$Id: FindEntryNode.java 2894 2009-01-27 21:25:13Z newmana $
Author:
Andrew Newman

Method Summary
 Triple find(Graph newGraph, Triple startingTriple)
          Find the entry point into the graph following a chain of triples starting from the triple given.
 

Method Detail

find

Triple find(Graph newGraph,
            Triple startingTriple)
            throws GraphException
Find the entry point into the graph following a chain of triples starting from the triple given.

Parameters:
newGraph - the graph to search.
startingTriple - the starting point in the chain of triples.
Returns:
the top most triple in the chain.
Throws:
GraphException - if there is an issue searching through the graph.