org.apache.commons.betwixt.digester
Class AddDefaultsRule

java.lang.Object
  extended by org.apache.commons.digester.Rule
      extended by org.apache.commons.betwixt.digester.RuleSupport
          extended by org.apache.commons.betwixt.digester.AddDefaultsRule

public class AddDefaultsRule
extends RuleSupport

AddDefaultsRule appends all the default properties to the current element.

Author:
James Strachan

Field Summary
 
Fields inherited from class org.apache.commons.digester.Rule
digester, namespaceURI
 
Constructor Summary
AddDefaultsRule()
          Base constructor
 
Method Summary
protected  void addDescriptor(Descriptor nodeDescriptor)
          Add a desciptor to the top object on the Digester stack.
protected  void addDescriptor(NodeDescriptor nodeDescriptor)
          Deprecated. 0.5 replaced addDescriptor( Descriptor )
 void begin(java.lang.String name, java.lang.String namespace, org.xml.sax.Attributes attributes)
          Process the beginning of this element.
protected  ElementDescriptor getRootElementDescriptor()
          Gets an ElementDescriptor for the top on digester's stack.
 
Methods inherited from class org.apache.commons.betwixt.digester.RuleSupport
getBeanClass, getProcessedPropertyNameSet, getXMLInfoDigester, getXMLIntrospector, loadClass
 
Methods inherited from class org.apache.commons.digester.Rule
begin, body, body, end, end, finish, getDigester, getNamespaceURI, setDigester, setNamespaceURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddDefaultsRule

public AddDefaultsRule()
Base constructor

Method Detail

begin

public void begin(java.lang.String name,
                  java.lang.String namespace,
                  org.xml.sax.Attributes attributes)
           throws java.lang.Exception
Process the beginning of this element.

Overrides:
begin in class org.apache.commons.digester.Rule
Parameters:
attributes - The attribute list of this element
Throws:
java.lang.Exception - generally this will indicate an unrecoverable error

addDescriptor

protected void addDescriptor(NodeDescriptor nodeDescriptor)
                      throws org.xml.sax.SAXException
Deprecated. 0.5 replaced addDescriptor( Descriptor )

Add a desciptor to the top object on the Digester stack.

Parameters:
nodeDescriptor - add this NodeDescriptor. Must not be null.
Throws:
org.xml.sax.SAXException - if the parent for the addDefaults element is not a or if the top object on the stack is not a XMLBeanInfo or a ElementDescriptor

addDescriptor

protected void addDescriptor(Descriptor nodeDescriptor)
                      throws org.xml.sax.SAXException
Add a desciptor to the top object on the Digester stack.

Parameters:
nodeDescriptor - add this NodeDescriptor. Must not be null.
Throws:
org.xml.sax.SAXException - if the parent for the addDefaults element is not a or if the top object on the stack is not a XMLBeanInfo or a ElementDescriptor
Since:
0.5

getRootElementDescriptor

protected ElementDescriptor getRootElementDescriptor()
Gets an ElementDescriptor for the top on digester's stack.

Returns:
the top object or the element description if the top object is an ElementDescriptor or a XMLBeanInfo class (respectively) Otherwise null.


Copyright 2002-2008 The Apache Software Foundation. All Rights Reserved.