org.oddjob.arooa.handlers
Class DocumentStartHandler

java.lang.Object
  extended byorg.oddjob.arooa.ArooaHandler
      extended byorg.oddjob.arooa.handlers.TypicalElementHandler
          extended byorg.oddjob.arooa.handlers.DocumentStartHandler

public class DocumentStartHandler
extends TypicalElementHandler

Handles the document element. This handler behaves just like a component handler except that it doesn't create a component - the root component must have been provided.

This handler doesn't attempt to add the component to any parent because there is none. The id attribute and other attributes are processed as per the ComponentHandler.

The RuntimeConfigurable wrapper will be set in the rootComponent or added to a parent.

See Also:
ArooaHandler.
Author:
Rob Gordon.

Constructor Summary
DocumentStartHandler(java.lang.Object rootObject)
          /** Constructor.
 
Method Summary
 void onEndElement(java.lang.String uri, java.lang.String tag, ArooaContext context)
          Handles the end of the element.
 void onStartElement(java.lang.String uri, java.lang.String tag, java.lang.String qname, org.xml.sax.Attributes attrs, ArooaContext context)
          Handle the top level element.
 
Methods inherited from class org.oddjob.arooa.handlers.TypicalElementHandler
characters, onStartChild
 
Methods inherited from class org.oddjob.arooa.ArooaHandler
checkNamespace, onEndChild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentStartHandler

public DocumentStartHandler(java.lang.Object rootObject)
/** Constructor.

Parameters:
rootObject - The root object which is to be built up.
Method Detail

onStartElement

public void onStartElement(java.lang.String uri,
                           java.lang.String tag,
                           java.lang.String qname,
                           org.xml.sax.Attributes attrs,
                           ArooaContext context)
                    throws org.xml.sax.SAXParseException
Handle the top level element.

Specified by:
onStartElement in class TypicalElementHandler
Parameters:
uri - The namespace uri.
qname - The element qualified name.
attrs - The attributes of the element.
context - The current context.
Returns:
The handler that handles the top level elelement.
Throws:
org.xml.sax.SAXParseException - if the qualified name is not "project".

onEndElement

public void onEndElement(java.lang.String uri,
                         java.lang.String tag,
                         ArooaContext context)
Handles the end of the element.

Overrides:
onEndElement in class ArooaHandler
Parameters:
uri - The namespace URI for the element.
tag - The name of the element.
context - The current context.