org.jrdf.graph.global.molecule
Class AddMoleculeToGraph

java.lang.Object
  extended by org.jrdf.graph.global.molecule.AddMoleculeToGraph
All Implemented Interfaces:
MoleculeHandler

public class AddMoleculeToGraph
extends Object
implements MoleculeHandler

This takes a molecule and adds all the triples to a normal Graph. This is the opposite of GraphDecomposer.

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

Constructor Summary
AddMoleculeToGraph(Graph newGraph)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddMoleculeToGraph

public AddMoleculeToGraph(Graph newGraph)
Method Detail

handleTriple

public void handleTriple(Triple triple)
Description copied from interface: MoleculeHandler
A triple in the root set of triples is found.

Specified by:
handleTriple in interface MoleculeHandler
Parameters:
triple - the triple found.

handleEmptyMolecules

public void handleEmptyMolecules()
Description copied from interface: MoleculeHandler
The is called instead of handleStart/End contains molecules when the triple visited does not contain any submolecules.

Specified by:
handleEmptyMolecules in interface MoleculeHandler

handleStartContainsMolecules

public void handleStartContainsMolecules(Set<Molecule> newMolecules)
Description copied from interface: MoleculeHandler
This is called when the current top level triple contains a set of submolecules.

Specified by:
handleStartContainsMolecules in interface MoleculeHandler
Parameters:
newMolecules - the submolecules belonging to the top level triple.

handleEndContainsMolecules

public void handleEndContainsMolecules(Set<Molecule> newMolecules)
Description copied from interface: MoleculeHandler
This is called when the top level triple's submolecules have all been visited.

Specified by:
handleEndContainsMolecules in interface MoleculeHandler
Parameters:
newMolecules - the submolecules belonging to the top level triple.