org.openrdf.repository.util
Class RDFRemover

java.lang.Object
  extended by org.openrdf.rio.helpers.RDFHandlerBase
      extended by org.openrdf.repository.util.RDFRemover
All Implemented Interfaces:
RDFHandler

public class RDFRemover
extends RDFHandlerBase

An RDFHandler that removes RDF data from a repository.


Constructor Summary
RDFRemover(RepositoryConnection con)
          Creates a new RDFRemover object that removes the data from the default context.
 
Method Summary
 void enforceContext(Resource context)
          Enforces the supplied context upon all statements that are reported to this RDFRemover.
 boolean enforcesContext()
          Checks whether this RDFRemover enforces its context upon all statements that are reported to it.
 Resource getContext()
          Gets the context identifier 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.openrdf.rio.helpers.RDFHandlerBase
endRDF, handleComment, handleNamespace, startRDF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDFRemover

public RDFRemover(RepositoryConnection con)
Creates a new RDFRemover object that removes the data from the default context.

Parameters:
con - The connection to use for the removal operations.
Method Detail

enforceContext

public void enforceContext(Resource context)
Enforces the supplied context upon all statements that are reported to this RDFRemover.

Parameters:
context - A Resource identifying the context, or null for the null context.

enforcesContext

public boolean enforcesContext()
Checks whether this RDFRemover enforces its context upon all statements that are reported to it.

Returns:
true if it enforces its context, false otherwise.

getContext

public Resource getContext()
Gets the context identifier that this RDFRemover enforces upon all statements that are reported to it (in case enforcesContext() returns true).

Returns:
A Resource identifying the context, or null if the null context 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 RDFHandlerBase
Parameters:
st - The statement.
Throws:
RDFHandlerException - If the RDF handler has encountered an unrecoverable error.


Copyright © 2001-2010 Aduna. All Rights Reserved.