org.tagnetic.core.jaxb.tagneticconfig.impl.runtime
Class UnmarshallingEventHandlerAdaptor

java.lang.Object
  extended byorg.tagnetic.core.jaxb.tagneticconfig.impl.runtime.UnmarshallingEventHandlerAdaptor
All Implemented Interfaces:
UnmarshallingEventHandler

public class UnmarshallingEventHandlerAdaptor
extends java.lang.Object
implements UnmarshallingEventHandler

Redirects events to another SAX ContentHandler.

Note that the SAXException returned by the ContentHandler is unreported. So we have to catch them and report it, then rethrow it if necessary.

Author:
Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)

Field Summary
protected  UnmarshallingContext context
           
protected  org.xml.sax.ContentHandler handler
          This handler will receive SAX events.
 
Constructor Summary
UnmarshallingEventHandlerAdaptor(UnmarshallingContext _ctxt, org.xml.sax.ContentHandler _handler)
           
 
Method Summary
 void enterAttribute(java.lang.String uri, java.lang.String local, java.lang.String qname)
           
 void enterElement(java.lang.String uri, java.lang.String local, java.lang.String qname, org.xml.sax.Attributes atts)
           
 void leaveAttribute(java.lang.String uri, java.lang.String local, java.lang.String qname)
           
 void leaveChild(int nextState)
           
 void leaveElement(java.lang.String uri, java.lang.String local, java.lang.String qname)
           
 java.lang.Object owner()
          Returns the content-tree object for which this unmarshaller is working for.
 void text(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected final UnmarshallingContext context

handler

protected final org.xml.sax.ContentHandler handler
This handler will receive SAX events.

Constructor Detail

UnmarshallingEventHandlerAdaptor

public UnmarshallingEventHandlerAdaptor(UnmarshallingContext _ctxt,
                                        org.xml.sax.ContentHandler _handler)
                                 throws org.xml.sax.SAXException
Method Detail

owner

public java.lang.Object owner()
Description copied from interface: UnmarshallingEventHandler
Returns the content-tree object for which this unmarshaller is working for.

Specified by:
owner in interface UnmarshallingEventHandler

enterAttribute

public void enterAttribute(java.lang.String uri,
                           java.lang.String local,
                           java.lang.String qname)
                    throws org.xml.sax.SAXException
Specified by:
enterAttribute in interface UnmarshallingEventHandler
Throws:
org.xml.sax.SAXException

enterElement

public void enterElement(java.lang.String uri,
                         java.lang.String local,
                         java.lang.String qname,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Specified by:
enterElement in interface UnmarshallingEventHandler
Throws:
org.xml.sax.SAXException

leaveAttribute

public void leaveAttribute(java.lang.String uri,
                           java.lang.String local,
                           java.lang.String qname)
                    throws org.xml.sax.SAXException
Specified by:
leaveAttribute in interface UnmarshallingEventHandler
Throws:
org.xml.sax.SAXException

leaveElement

public void leaveElement(java.lang.String uri,
                         java.lang.String local,
                         java.lang.String qname)
                  throws org.xml.sax.SAXException
Specified by:
leaveElement in interface UnmarshallingEventHandler
Throws:
org.xml.sax.SAXException

text

public void text(java.lang.String s)
          throws org.xml.sax.SAXException
Specified by:
text in interface UnmarshallingEventHandler
Throws:
org.xml.sax.SAXException

leaveChild

public void leaveChild(int nextState)
                throws org.xml.sax.SAXException
Specified by:
leaveChild in interface UnmarshallingEventHandler
Throws:
org.xml.sax.SAXException


Copyright © 2005 tagnetic.org. All Rights Reserved.