org.jrdf.graph.global.molecule
Class MoleculeParserStatementHandler

java.lang.Object
  extended by org.jrdf.graph.global.molecule.MoleculeParserStatementHandler
All Implemented Interfaces:
StatementHandler

public class MoleculeParserStatementHandler
extends Object
implements StatementHandler

A simple StatementHandler which simply adds triples to a graph and allows you then to acces the graph at the end of the parsing.

Version:
$Revision: 1226 $
Author:
Imran Khan

Constructor Summary
MoleculeParserStatementHandler(Graph newGraph)
           
 
Method Summary
 Graph getGraph()
           
 void handleStatement(SubjectNode subject, PredicateNode predicate, ObjectNode object)
          Called by an RDF parser when it has parsed a statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoleculeParserStatementHandler

public MoleculeParserStatementHandler(Graph newGraph)
Method Detail

handleStatement

public void handleStatement(SubjectNode subject,
                            PredicateNode predicate,
                            ObjectNode object)
                     throws StatementHandlerException
Description copied from interface: StatementHandler
Called by an RDF parser when it has parsed a statement. The type of the subject, predicate and object is determined by the ValueFactory that the parser uses.

Specified by:
handleStatement in interface StatementHandler
Parameters:
subject - A URI or bNode.
predicate - A URI.
object - A URI, bNode or literal.
Throws:
StatementHandlerException - If the statement handler has encountered an unrecoverable error.

getGraph

public Graph getGraph()