org.apache.commons.betwixt.digester
Class AddDefaultsRule

java.lang.Object
  extended byorg.apache.commons.digester.Rule
      extended byorg.apache.commons.betwixt.digester.RuleSupport
          extended byorg.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
private static org.apache.commons.logging.Log log
          Logger
 
Fields inherited from class org.apache.commons.digester.Rule
digester, namespaceURI
 
Constructor Summary
AddDefaultsRule()
          Base constructor
 
Method Summary
private  void addAdders()
          Adds default adder methods
private  void addDefaultProperties()
          Adds default property methods
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
 
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
 

Field Detail

log

private static final org.apache.commons.logging.Log log
Logger

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.

Parameters:
attributes - The attribute list of this element
Throws:
java.lang.Exception - generally this will indicate an unrecoverable error

addAdders

private void addAdders()
Adds default adder methods


addDefaultProperties

private void addDefaultProperties()
Adds default property methods


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.