eu.larkc.core.management
Class StamentCollectorRDFHandler

java.lang.Object
  extended by eu.larkc.core.management.StamentCollectorRDFHandler
All Implemented Interfaces:
org.openrdf.rio.RDFHandler

public class StamentCollectorRDFHandler
extends java.lang.Object
implements org.openrdf.rio.RDFHandler

Very simple RDF handler which collects all statements of a RDF document. Use getSetOfStatements() to retrieve the collected statements as a SetOfStatement.

Note: Comments and namespaces are currently ignored!

Author:
Christoph Fuchs

Constructor Summary
StamentCollectorRDFHandler()
          Constructor.
 
Method Summary
 void endRDF()
           
 SetOfStatements getSetOfStatements()
          Used to retrieve the collected statements as a SetOfStatement.
 void handleComment(java.lang.String arg0)
           
 void handleNamespace(java.lang.String arg0, java.lang.String arg1)
           
 void handleStatement(org.openrdf.model.Statement arg0)
           
 void startRDF()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StamentCollectorRDFHandler

public StamentCollectorRDFHandler()
Constructor.

Method Detail

endRDF

public void endRDF()
            throws org.openrdf.rio.RDFHandlerException
Specified by:
endRDF in interface org.openrdf.rio.RDFHandler
Throws:
org.openrdf.rio.RDFHandlerException

handleComment

public void handleComment(java.lang.String arg0)
                   throws org.openrdf.rio.RDFHandlerException
Specified by:
handleComment in interface org.openrdf.rio.RDFHandler
Throws:
org.openrdf.rio.RDFHandlerException

handleNamespace

public void handleNamespace(java.lang.String arg0,
                            java.lang.String arg1)
                     throws org.openrdf.rio.RDFHandlerException
Specified by:
handleNamespace in interface org.openrdf.rio.RDFHandler
Throws:
org.openrdf.rio.RDFHandlerException

handleStatement

public void handleStatement(org.openrdf.model.Statement arg0)
                     throws org.openrdf.rio.RDFHandlerException
Specified by:
handleStatement in interface org.openrdf.rio.RDFHandler
Throws:
org.openrdf.rio.RDFHandlerException

startRDF

public void startRDF()
              throws org.openrdf.rio.RDFHandlerException
Specified by:
startRDF in interface org.openrdf.rio.RDFHandler
Throws:
org.openrdf.rio.RDFHandlerException

getSetOfStatements

public SetOfStatements getSetOfStatements()
Used to retrieve the collected statements as a SetOfStatement.

Returns:
the collected statements