org.jrdf.graph.global.molecule
Interface MoleculeHandler

All Known Implementing Classes:
AddMoleculeToGraph, AddMoleculeToIndex, MoleculeToString, MoleculeToText, MoleculeToTripleIterator

public interface MoleculeHandler

These methods are called as the MoleculeTraverser traverses a molecule. For a given molecule: _1 p _2, _1 p _3, _2 p o. First handleTriple is called with both the first triple (_1 p _2). Next, handleStartContainsMolecules is called which has the set of molecules (one molecule that contains _1 p _3). Then, handleTriple is called with _1 p _3. Then handleEndContainsMolecules is called with the same set of molecules. And so on...

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

Method Summary
 void handleEmptyMolecules()
          The is called instead of handleStart/End contains molecules when the triple visited does not contain any submolecules.
 void handleEndContainsMolecules(Set<Molecule> newMolecules)
          This is called when the top level triple's submolecules have all been visited.
 void handleStartContainsMolecules(Set<Molecule> newMolecules)
          This is called when the current top level triple contains a set of submolecules.
 void handleTriple(Triple triple)
          A triple in the root set of triples is found.
 

Method Detail

handleTriple

void handleTriple(Triple triple)
A triple in the root set of triples is found.

Parameters:
triple - the triple found.

handleEmptyMolecules

void handleEmptyMolecules()
The is called instead of handleStart/End contains molecules when the triple visited does not contain any submolecules.


handleStartContainsMolecules

void handleStartContainsMolecules(Set<Molecule> newMolecules)
This is called when the current top level triple contains a set of submolecules.

Parameters:
newMolecules - the submolecules belonging to the top level triple.

handleEndContainsMolecules

void handleEndContainsMolecules(Set<Molecule> newMolecules)
This is called when the top level triple's submolecules have all been visited.

Parameters:
newMolecules - the submolecules belonging to the top level triple.