public class PresortRioLoader extends BasicRioLoader implements org.openrdf.rio.RDFHandler
StatementBuffer
.Modifier and Type | Field and Description |
---|---|
protected IStatementBuffer<?> |
buffer
Used to buffer RDF
Value s and Statement s emitted by
the RDF parser (the value is supplied by the ctor). |
defaultGraph, log, stmtsAdded
Constructor and Description |
---|
PresortRioLoader(IStatementBuffer<?> buffer)
Sets up parser to load RDF.
|
PresortRioLoader(IStatementBuffer<?> buffer,
boolean flush) |
Modifier and Type | Method and Description |
---|---|
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(org.openrdf.model.Statement stmt) |
org.openrdf.rio.RDFHandler |
newRDFHandler()
Note: YOU MUST override this method to install a different
RDFHandler . |
void |
startRDF() |
protected void |
success()
Invoked after successful parse (default is NOP).
|
addRioLoaderListener, before, cleanUp, getInsertRate, getInsertTime, getParser, getStatementsAdded, loadRdf, loadRdf, loadRdf2, notifyListeners, removeRioLoaderListener
protected final IStatementBuffer<?> buffer
Value
s and Statement
s emitted by
the RDF parser (the value is supplied by the ctor).public PresortRioLoader(IStatementBuffer<?> buffer)
buffer
- The buffer used to collect, sort, and write statements onto
the database.public PresortRioLoader(IStatementBuffer<?> buffer, boolean flush)
buffer
- The buffer onto which the parsed statements will be written.flush
- When true, the buffer will be flushed when the end of
the input is reached.(DataLoader.Options.FLUSH does not defer flush of
StatementBuffer)
protected void success()
bulk insert the buffered data into the store iff flush:=true
success
in class BasicRioLoader
protected void error(Exception ex)
BasicRioLoader
error
in class BasicRioLoader
public org.openrdf.rio.RDFHandler newRDFHandler()
BasicRioLoader
RDFHandler
. The default is the BasicRDFHandler
which
does NOTHING.newRDFHandler
in class BasicRioLoader
public void handleStatement(org.openrdf.model.Statement stmt)
handleStatement
in interface org.openrdf.rio.RDFHandler
public void endRDF() throws org.openrdf.rio.RDFHandlerException
endRDF
in interface org.openrdf.rio.RDFHandler
org.openrdf.rio.RDFHandlerException
public void handleComment(String arg0) throws org.openrdf.rio.RDFHandlerException
handleComment
in interface org.openrdf.rio.RDFHandler
org.openrdf.rio.RDFHandlerException
public void handleNamespace(String arg0, String arg1) throws org.openrdf.rio.RDFHandlerException
handleNamespace
in interface org.openrdf.rio.RDFHandler
org.openrdf.rio.RDFHandlerException
public void startRDF() throws org.openrdf.rio.RDFHandlerException
startRDF
in interface org.openrdf.rio.RDFHandler
org.openrdf.rio.RDFHandlerException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.