Class RDFSailRemover
- java.lang.Object
-
- org.eclipse.rdf4j.rio.helpers.AbstractRDFHandler
-
- org.eclipse.rdf4j.repository.sail.helpers.RDFSailRemover
-
- All Implemented Interfaces:
RDFHandler
class RDFSailRemover extends AbstractRDFHandler
An Sail-specific RDFHandler that removes RDF data from a repository. To be used in combination with SPARQL DELETE DATA only.
-
-
Field Summary
Fields Modifier and Type Field Description private SailConnection
con
The connection to use for the remove operations.private Resource[]
contexts
The contexts to remove the statements from.private UpdateContext
uc
private ValueFactory
vf
-
Constructor Summary
Constructors Constructor Description RDFSailRemover(SailConnection con, ValueFactory vf, UpdateContext uc)
Creates a new RDFSailRemover object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enforceContext(Resource... contexts)
Enforces the supplied contexts upon all statements that are reported to this RDFSailRemover.boolean
enforcesContext()
Checks whether this RDFRemover enforces its contexts upon all statements that are reported to it.Resource[]
getContexts()
Gets the contexts that this RDFRemover enforces upon all statements that are reported to it (in case enforcesContext() returns true).void
handleStatement(Statement st)
Handles a statement.-
Methods inherited from class org.eclipse.rdf4j.rio.helpers.AbstractRDFHandler
endRDF, handleComment, handleNamespace, startRDF
-
-
-
-
Field Detail
-
con
private final SailConnection con
The connection to use for the remove operations.
-
vf
private final ValueFactory vf
-
uc
private final UpdateContext uc
-
contexts
private Resource[] contexts
The contexts to remove the statements from. If this variable is a non-empty array, statements will be removed from the corresponding contexts.
-
-
Constructor Detail
-
RDFSailRemover
public RDFSailRemover(SailConnection con, ValueFactory vf, UpdateContext uc)
Creates a new RDFSailRemover object.- Parameters:
con
- The connection to use for the remove operations.
-
-
Method Detail
-
enforceContext
public void enforceContext(Resource... contexts)
Enforces the supplied contexts upon all statements that are reported to this RDFSailRemover.- Parameters:
contexts
- the contexts to use. Use an empty array (not null!) to indicate no context(s) should be enforced.
-
enforcesContext
public boolean enforcesContext()
Checks whether this RDFRemover enforces its contexts upon all statements that are reported to it.- Returns:
- true if it enforces its contexts, false otherwise.
-
getContexts
public Resource[] getContexts()
Gets the contexts that this RDFRemover enforces upon all statements that are reported to it (in case enforcesContext() returns true).- Returns:
- A Resource[] identifying the contexts, or null if no contexts is enforced.
-
handleStatement
public void handleStatement(Statement st) throws RDFHandlerException
Description copied from interface:RDFHandler
Handles a statement.- Specified by:
handleStatement
in interfaceRDFHandler
- Overrides:
handleStatement
in classAbstractRDFHandler
- Parameters:
st
- The statement.- Throws:
RDFHandlerException
- If the RDF handler has encountered an unrecoverable error.
-
-