|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.rio.helpers.RDFHandlerBase
org.openrdf.repository.util.RDFInserter
public class RDFInserter
An RDFHandler that adds RDF data to a repository.
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
void |
endRDF()
Signals the end of the RDF data. |
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)
Handles a namespace declaration/definition. |
void |
handleStatement(Statement st)
Handles a statement. |
boolean |
preservesBNodeIDs()
Checks whether this RDFInserter preserves blank node IDs. |
void |
setPreserveBNodeIDs(boolean preserveBNodeIDs)
Sets whether this RDFInserter should preserve blank node IDs. |
| Methods inherited from class org.openrdf.rio.helpers.RDFHandlerBase |
|---|
handleComment, startRDF |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RDFInserter(RepositoryConnection con)
con - The connection to use for the add operations.| Method Detail |
|---|
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
RDFHandler
endRDF in interface RDFHandlerendRDF in class RDFHandlerBaseRDFHandlerException - If the RDF handler has encountered an unrecoverable error.
public void handleNamespace(String prefix,
String name)
RDFHandler
handleNamespace in interface RDFHandlerhandleNamespace in class RDFHandlerBaseprefix - The prefix for the namespace, or an empty string in case of a
default namespace.name - The URI that the prefix maps to.
public void handleStatement(Statement st)
throws RDFHandlerException
RDFHandler
handleStatement in interface RDFHandlerhandleStatement in class RDFHandlerBasest - The statement.
RDFHandlerException - If the RDF handler has encountered an unrecoverable error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||