public class BasicRioLoader extends Object implements IRioLoader
| Modifier and Type | Field and Description |
|---|---|
protected String |
defaultGraph |
protected static org.apache.log4j.Logger |
log
Note: This logger was historically associated with the
IRioLoader
interface and it is still named for that interface. |
long |
stmtsAdded |
| Constructor and Description |
|---|
BasicRioLoader(org.openrdf.model.ValueFactory valueFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRioLoaderListener(RioLoaderListener l)
Register a listener.
|
protected void |
before()
Invoked before parse (default is NOP).
|
protected void |
cleanUp()
Invoked from finally clause after parse regardless of success or failure.
|
protected void |
error(Exception ex)
Invoked if the parse fails (default is NOP).
|
long |
getInsertRate() |
long |
getInsertTime() |
protected org.openrdf.rio.RDFParser |
getParser(org.openrdf.rio.RDFFormat rdfFormat)
Choose the parser based on the
RDFFormat specified to the
constructor. |
long |
getStatementsAdded() |
void |
loadRdf(InputStream is,
String baseURI,
org.openrdf.rio.RDFFormat rdfFormat,
String defaultGraph,
RDFParserOptions options)
Parse RDF data.
|
void |
loadRdf(Reader reader,
String baseURI,
org.openrdf.rio.RDFFormat rdfFormat,
String defaultGraph,
RDFParserOptions options)
Parse RDF data.
|
protected void |
loadRdf2(Object source,
String baseURI,
org.openrdf.rio.RDFFormat rdfFormat,
String defaultGraph,
RDFParserOptions options)
Core implementation.
|
org.openrdf.rio.RDFHandler |
newRDFHandler()
Note: YOU MUST override this method to install a different
RDFHandler. |
protected void |
notifyListeners() |
void |
removeRioLoaderListener(RioLoaderListener l)
Remove a listener.
|
protected void |
success()
Invoked after successful parse (default is NOP).
|
protected static final transient org.apache.log4j.Logger log
IRioLoader
interface and it is still named for that interface.public long stmtsAdded
protected String defaultGraph
public BasicRioLoader(org.openrdf.model.ValueFactory valueFactory)
public final long getStatementsAdded()
getStatementsAdded in interface IRioLoaderpublic final long getInsertTime()
getInsertTime in interface IRioLoaderpublic final long getInsertRate()
getInsertRate in interface IRioLoaderpublic final void addRioLoaderListener(RioLoaderListener l)
IRioLoaderaddRioLoaderListener in interface IRioLoaderl - The listener.public final void removeRioLoaderListener(RioLoaderListener l)
IRioLoaderremoveRioLoaderListener in interface IRioLoaderl - The listener.protected final void notifyListeners()
protected final org.openrdf.rio.RDFParser getParser(org.openrdf.rio.RDFFormat rdfFormat)
RDFFormat specified to the
constructor.public final void loadRdf(InputStream is, String baseURI, org.openrdf.rio.RDFFormat rdfFormat, String defaultGraph, RDFParserOptions options) throws Exception
IRioLoaderloadRdf in interface IRioLoaderis - The source from which the data will be read.rdfFormat - The interchange format.defaultGraph - The default graph.options - Options to be applied to the RDFParser.Exceptionpublic final void loadRdf(Reader reader, String baseURI, org.openrdf.rio.RDFFormat rdfFormat, String defaultGraph, RDFParserOptions options) throws Exception
IRioLoaderloadRdf in interface IRioLoaderreader - The source from which the data will be read.baseURI - The base URL for those data.rdfFormat - The interchange format.defaultGraph - The default graph.options - Options to be applied to the RDFParser.Exceptionprotected void loadRdf2(Object source, String baseURI, org.openrdf.rio.RDFFormat rdfFormat, String defaultGraph, RDFParserOptions options) throws Exception
source - A Reader or InputStream.baseURI - rdfFormat - options - Exceptionprotected void before()
protected void success()
protected void error(Exception ex)
protected void cleanUp()
public org.openrdf.rio.RDFHandler newRDFHandler()
RDFHandler. The default is the BasicRDFHandler which
does NOTHING.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.