org.oddjob.ant
Class AntJobComponentHandler

java.lang.Object
  extended byorg.oddjob.arooa.ArooaHandler
      extended byorg.oddjob.ant.AntJobComponentHandler

public class AntJobComponentHandler
extends ArooaHandler

The handler for an Ant ProjectComponent such as a task. This uses an ant project to create a task.

See Also:
ArooaHandler
Author:
Rob Gordon

Constructor Summary
AntJobComponentHandler(org.apache.tools.ant.Project project)
          Constructor.
 
Method Summary
 void characters(char[] buf, int start, int count, ArooaContext context)
          Adds text to the component, using the wrapper
 void onEndElement(java.lang.String uri, java.lang.String tag, ArooaContext context)
          Handles the end of the element.
 ArooaHandler onStartChild(java.lang.String uri, java.lang.String name, java.lang.String qname, org.xml.sax.Attributes attrs, ArooaContext context)
          Handle a child tag.
 void onStartElement(java.lang.String uri, java.lang.String tag, 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
checkNamespace, onEndChild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntJobComponentHandler

public AntJobComponentHandler(org.apache.tools.ant.Project project)
Constructor.

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
Handles the start of an element.

Overrides:
onStartElement in class ArooaHandler
Parameters:
uri - the namespace URI for the tag
tag - The name of the element being started. Will not be null.
qname - The qualified name of the element.
attrs - Attributes of the element being started. Will not be null.
context - The context that this element is in.
Throws:
org.xml.sax.SAXParseException - if this method is not overridden, or in case of error in an overridden version

characters

public void characters(char[] buf,
                       int start,
                       int count,
                       ArooaContext context)
                throws org.xml.sax.SAXParseException
Adds text to the component, using the wrapper

Overrides:
characters in class ArooaHandler
Parameters:
buf - A character array of the text within the element. Will not be null.
start - The start element in the array.
count - The number of characters to read from the array.
context - The current context.
Throws:
org.xml.sax.SAXParseException - if the element doesn't support text

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
Handle a child tag.

Overrides:
onStartChild in class ArooaHandler
Parameters:
uri - The namespace uri.
name - The element tag.
qname - The element qualified name.
attrs - The attributes of the element.
context - The current context.
Returns:
The handler that handles this subelement.
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.