org.treebind
Class JavaObject2XmlSaxPipe

java.lang.Object
  extended byorg.treebind.DefaultPipeImplementation
      extended byorg.treebind.JavaObject2XmlSaxPipe
All Implemented Interfaces:
Pipe

public class JavaObject2XmlSaxPipe
extends DefaultPipeImplementation
implements Pipe

Pipe designed to convert Java XML objects into XML Sax events. This pipe embeds and chains a JavaObjectSource, a JavaObject2XmlSaxFilter and a XmlSaxSink.

Author:
vdv
See Also:
Pipe, DefaultPipeImplementation, JavaObjectSource, JavaObject2XmlSaxFilter, XmlSaxSink

Constructor Summary
JavaObject2XmlSaxPipe()
          Creates a new JavaObject2XmlSaxPipe.
 
Method Summary
 void pourObject(java.lang.Object object)
          Pours a Java object in the pipe.
 void setContentHandler(org.xml.sax.ContentHandler handler)
          Sets the content handler that will receive the SAX events.
 
Methods inherited from class org.treebind.DefaultPipeImplementation
addFilter, addFilterAfterSource, addFilterBeforeSink, getParameter, getParameter, getParameterWithDefault, getParameterWithDefault, getSink, getSource, setParameter, setParameter, setSink, setSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.treebind.Pipe
addFilter, addFilterAfterSource, addFilterBeforeSink, getParameter, getParameter, getParameterWithDefault, getParameterWithDefault, setParameter, setParameter, setSink, setSource
 

Constructor Detail

JavaObject2XmlSaxPipe

public JavaObject2XmlSaxPipe()
Creates a new JavaObject2XmlSaxPipe.

Method Detail

pourObject

public void pourObject(java.lang.Object object)
                throws java.lang.Exception
Pours a Java object in the pipe. This is method acts as a proxy for the JavaObjectSource.pourObject(Object) method.

Parameters:
object - the Java object to pour.
Throws:
java.lang.Exception - any exception that can happen when the object is poured.

setContentHandler

public void setContentHandler(org.xml.sax.ContentHandler handler)
Sets the content handler that will receive the SAX events. This methods acts as a proxy for the XmlSaxSink.setContentHandler(ContentHandler) method.

Parameters:
handler - the content handler.