Class 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 Detail

      • con

        private final SailConnection con
        The connection to use for the remove operations.
      • 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.