net.fortytwo.sesametools
Class ReusableRDFHandler

java.lang.Object
  extended by net.fortytwo.sesametools.ReusableRDFHandler
All Implemented Interfaces:
org.openrdf.rio.RDFHandler

public class ReusableRDFHandler
extends Object
implements org.openrdf.rio.RDFHandler

An RDFHandler which wraps another handler and ignores calls to startRDF and endRDF, allowing the base handler to be used multiple times. For example, there may be several distinct operations which push RDF statements into a wrapped RDFWriter before the document is terminated. To actually call the base handler's startRDF and endRDF methods, use reallyStartRDF and reallyEndRDF, respectively.

Author:
Joshua Shinavier (http://fortytwo.net)

Constructor Summary
ReusableRDFHandler(org.openrdf.rio.RDFHandler base)
           
 
Method Summary
 void endRDF()
           
 void handleComment(String comment)
           
 void handleNamespace(String prefix, String uri)
           
 void handleStatement(org.openrdf.model.Statement st)
           
 void reallyEndRDF()
           
 void reallyStartRDF()
           
 void startRDF()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReusableRDFHandler

public ReusableRDFHandler(org.openrdf.rio.RDFHandler base)
Method Detail

startRDF

public void startRDF()
              throws org.openrdf.rio.RDFHandlerException
Specified by:
startRDF in interface org.openrdf.rio.RDFHandler
Throws:
org.openrdf.rio.RDFHandlerException

endRDF

public void endRDF()
            throws org.openrdf.rio.RDFHandlerException
Specified by:
endRDF in interface org.openrdf.rio.RDFHandler
Throws:
org.openrdf.rio.RDFHandlerException

reallyStartRDF

public void reallyStartRDF()
                    throws org.openrdf.rio.RDFHandlerException
Throws:
org.openrdf.rio.RDFHandlerException

reallyEndRDF

public void reallyEndRDF()
                  throws org.openrdf.rio.RDFHandlerException
Throws:
org.openrdf.rio.RDFHandlerException

handleNamespace

public void handleNamespace(String prefix,
                            String uri)
                     throws org.openrdf.rio.RDFHandlerException
Specified by:
handleNamespace in interface org.openrdf.rio.RDFHandler
Throws:
org.openrdf.rio.RDFHandlerException

handleStatement

public void handleStatement(org.openrdf.model.Statement st)
                     throws org.openrdf.rio.RDFHandlerException
Specified by:
handleStatement in interface org.openrdf.rio.RDFHandler
Throws:
org.openrdf.rio.RDFHandlerException

handleComment

public void handleComment(String comment)
                   throws org.openrdf.rio.RDFHandlerException
Specified by:
handleComment in interface org.openrdf.rio.RDFHandler
Throws:
org.openrdf.rio.RDFHandlerException


Copyright © 2014. All Rights Reserved.