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 Details

    • 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 Details

    • 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 Details

    • 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 interface RDFHandler
      Overrides:
      handleStatement in class AbstractRDFHandler
      Parameters:
      st - The statement.
      Throws:
      RDFHandlerException - If the RDF handler has encountered an unrecoverable error.