org.oddjob.arooa.handlers
Class SkipLevelHandler

java.lang.Object
  extended byorg.oddjob.arooa.ArooaHandler
      extended byorg.oddjob.arooa.handlers.SkipLevelHandler

public class SkipLevelHandler
extends ArooaHandler

Skips an element level. For instance when a component has the method addComponentChild.

The new component is in a nested element like this:

 <comp1>
   <foo>
     <comp2/>
   </foo>
 </comp1>
 
 This is the handler that handles the foo element.

See Also:
ArooaHandler.
Author:
Rob Gordon.

Constructor Summary
SkipLevelHandler(ArooaHandler handler)
          Constructor.
 
Method Summary
 ArooaHandler onStartChild(java.lang.String uri, java.lang.String name, java.lang.String qname, org.xml.sax.Attributes attrs, ArooaContext context)
          Handles the start of an element.
 
Methods inherited from class org.oddjob.arooa.ArooaHandler
characters, checkNamespace, onEndChild, onEndElement, onStartElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkipLevelHandler

public SkipLevelHandler(ArooaHandler handler)
Constructor.

Parameters:
handler - The handler to use for the next level element.
Method Detail

onStartChild

public ArooaHandler onStartChild(java.lang.String uri,
                                 java.lang.String name,
                                 java.lang.String qname,
                                 org.xml.sax.Attributes attrs,
                                 ArooaContext context)
                          throws org.xml.sax.SAXParseException
Description copied from class: ArooaHandler
Handles the start of an element. This base implementation just throws an exception - you must override this method if you expect child elements.

Overrides:
onStartChild in class ArooaHandler
Parameters:
uri - The namespace uri for this element.
name - The name of the element being started. Will not be null.
qname - The qualified name for this element.
attrs - Attributes of the element being started. Will not be null.
context - The current context.
Returns:
a handler (in the derived classes)
Throws:
org.xml.sax.SAXParseException - if this method is not overridden, or in case of error in an overridden version