public class RDFInserter extends RDFHandlerBase
| Modifier and Type | Field and Description |
|---|---|
protected RepositoryConnection |
con
The connection to use for the add operations.
|
| Constructor and Description |
|---|
RDFInserter(RepositoryConnection con)
Creates a new RDFInserter object that preserves bnode IDs and that does
not enforce any context upon statements that are reported to it.
|
| Modifier and Type | Method and Description |
|---|---|
void |
endRDF() |
void |
enforceContext(Resource... contexts)
Enforces the supplied contexts upon all statements that are reported to
this RDFInserter.
|
boolean |
enforcesContext()
Checks whether this RDFInserter enforces its contexts upon all statements
that are reported to it.
|
Resource[] |
getContexts()
Gets the contexts that this RDFInserter enforces upon all statements that
are reported to it (in case enforcesContext() returns
true).
|
void |
handleNamespace(String prefix,
String name) |
void |
handleStatement(Statement st) |
boolean |
preservesBNodeIDs()
Checks whether this RDFInserter preserves blank node IDs.
|
void |
setPreserveBNodeIDs(boolean preserveBNodeIDs)
Sets whether this RDFInserter should preserve blank node IDs.
|
handleComment, startRDFprotected final RepositoryConnection con
public RDFInserter(RepositoryConnection con)
con - The connection to use for the add operations.public void setPreserveBNodeIDs(boolean preserveBNodeIDs)
preserveBNodeIDs - The new value for this flag.public boolean preservesBNodeIDs()
public void enforceContext(Resource... contexts)
contexts - the contexts to use. Use an empty array (not null!) to indicate no
context(s) should be enforced.public boolean enforcesContext()
public Resource[] getContexts()
public void endRDF()
throws RDFHandlerException
endRDF in interface RDFHandlerendRDF in class RDFHandlerBaseRDFHandlerExceptionpublic void handleNamespace(String prefix, String name)
handleNamespace in interface RDFHandlerhandleNamespace in class RDFHandlerBasepublic void handleStatement(Statement st) throws RDFHandlerException
handleStatement in interface RDFHandlerhandleStatement in class RDFHandlerBaseRDFHandlerExceptionCopyright © 2001-2014 Aduna. All Rights Reserved.