Class RDFSailRemover
java.lang.Object
org.eclipse.rdf4j.rio.helpers.AbstractRDFHandler
org.eclipse.rdf4j.repository.sail.helpers.RDFSailRemover
- All Implemented Interfaces:
RDFHandler
An Sail-specific RDFHandler that removes RDF data from a repository. To be used in combination with SPARQL DELETE
DATA only.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SailConnectionThe connection to use for the remove operations.private Resource[]The contexts to remove the statements from.private final UpdateContextprivate final ValueFactory -
Constructor Summary
ConstructorsConstructorDescriptionRDFSailRemover(SailConnection con, ValueFactory vf, UpdateContext uc) Creates a new RDFSailRemover object. -
Method Summary
Modifier and TypeMethodDescriptionvoidenforceContext(Resource... contexts) Enforces the supplied contexts upon all statements that are reported to this RDFSailRemover.booleanChecks whether this RDFRemover enforces its contexts upon all statements that are reported to it.Resource[]Gets the contexts that this RDFRemover enforces upon all statements that are reported to it (in case enforcesContext() returns true).voidHandles a statement.Methods inherited from class AbstractRDFHandler
endRDF, handleComment, handleNamespace, startRDF
-
Field Details
-
con
The connection to use for the remove operations. -
vf
-
uc
-
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 Details
-
RDFSailRemover
Creates a new RDFSailRemover object.- Parameters:
con- The connection to use for the remove operations.
-
-
Method Details
-
enforceContext
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
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
Description copied from interface:RDFHandlerHandles a statement.- Specified by:
handleStatementin interfaceRDFHandler- Overrides:
handleStatementin classAbstractRDFHandler- Parameters:
st- The statement.- Throws:
RDFHandlerException- If the RDF handler has encountered an unrecoverable error.
-