com.bigdata.rdf.rio
Class PresortRioLoader

java.lang.Object
  extended by com.bigdata.rdf.rio.BasicRioLoader
      extended by com.bigdata.rdf.rio.PresortRioLoader
All Implemented Interfaces:
IRioLoader, RDFHandler

public class PresortRioLoader
extends BasicRioLoader
implements RDFHandler

Statement handler for the RIO RDF Parser that writes on a StatementBuffer.

Version:
$Id: PresortRioLoader.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
protected  IStatementBuffer buffer
          Used to buffer RDF Values and Statements emitted by the RDF parser (the value is supplied by the ctor).
 
Fields inherited from interface com.bigdata.rdf.rio.IRioLoader
DEBUG, INFO, log
 
Constructor Summary
PresortRioLoader(IStatementBuffer buffer)
          Sets up parser to load RDF.
 
Method Summary
 void endRDF()
           
protected  void error(Exception ex)
          Invoked if the parse fails (default is NOP).
 void handleComment(String arg0)
           
 void handleNamespace(String arg0, String arg1)
           
 void handleStatement(Statement stmt)
           
 RDFHandler newRDFHandler()
          Note: YOU MUST override this method to install a different RDFHandler.
 void startRDF()
           
protected  void success()
          bulk insert the buffered data into the store.
 
Methods inherited from class com.bigdata.rdf.rio.BasicRioLoader
addRioLoaderListener, before, cleanUp, getInsertRate, getInsertTime, getParser, getStatementsAdded, loadRdf, loadRdf, loadRdf2, notifyListeners, removeRioLoaderListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

protected final IStatementBuffer buffer
Used to buffer RDF Values and Statements emitted by the RDF parser (the value is supplied by the ctor).

Constructor Detail

PresortRioLoader

public PresortRioLoader(IStatementBuffer buffer)
Sets up parser to load RDF.

Parameters:
buffer - The buffer used to collect, sort, and write statements onto the database.
Method Detail

success

protected void success()
bulk insert the buffered data into the store.

Overrides:
success in class BasicRioLoader

error

protected void error(Exception ex)
Description copied from class: BasicRioLoader
Invoked if the parse fails (default is NOP).

Overrides:
error in class BasicRioLoader

newRDFHandler

public RDFHandler newRDFHandler()
Description copied from class: BasicRioLoader
Note: YOU MUST override this method to install a different RDFHandler. The default is the BasicRDFHandler which does NOTHING.

Overrides:
newRDFHandler in class BasicRioLoader

handleStatement

public void handleStatement(Statement stmt)
Specified by:
handleStatement in interface RDFHandler

endRDF

public void endRDF()
            throws RDFHandlerException
Specified by:
endRDF in interface RDFHandler
Throws:
RDFHandlerException

handleComment

public void handleComment(String arg0)
                   throws RDFHandlerException
Specified by:
handleComment in interface RDFHandler
Throws:
RDFHandlerException

handleNamespace

public void handleNamespace(String arg0,
                            String arg1)
                     throws RDFHandlerException
Specified by:
handleNamespace in interface RDFHandler
Throws:
RDFHandlerException

startRDF

public void startRDF()
              throws RDFHandlerException
Specified by:
startRDF in interface RDFHandler
Throws:
RDFHandlerException


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.