Home » commons-digester-1.8-src » org.apache.commons » digester »

org.apache.commons.digester

Sub Packages:

org.apache.commons.digester.parser   Provides for parser recognition and parser dependent code.  
org.apache.commons.digester.plugins   Provides an easy mechanism whereby new digestion rules can be added dynamically during a digestion. Introduction.  
org.apache.commons.digester.plugins.strategies   This package contains "rule-finding" strategy classes, and their associated "helper" loader classes.  
org.apache.commons.digester.rss   Example usage of Digester to parse XML documents compatible with the Rich Site Summary format used by many newsfeeds.  
org.apache.commons.digester.substitution   Provides for manipulation of xml attributes and element body text before the data is processed by any Rule objects.  
org.apache.commons.digester.xmlrules   The xmlrules package provides for XML-based definition of rules for Digester .  

Interfaces:

Nameable   Interface used for testing.  code | html
ObjectCreationFactory  

Interface for use with FactoryCreateRule

code | html
RuleSet  

Public interface defining a shorthand means of configuring a complete set of related Rule definitions, possibly associated with a particular namespace URI, in one operation. 

code | html
Rules   Public interface defining a collection of Rule instances (and corresponding matching patterns) plus an implementation of a matching policy that selects the rules that match a particular pattern of nested elements discovered during parsing.  code | html
StackAction   An interface that can be implemented in order to get notifications of objects being pushed onto a digester stack or popped from one.  code | html

Abstract Classes:

AbstractObjectCreationFactory  

Abstract base class for ObjectCreationFactory implementations.

 
code | html
AbstractRulesImpl  

AbstractRuleImpl provides basic services for Rules implementations. 

code | html
RegexMatcher   Regular expression matching strategy for RegexRules.  code | html
Rule   Concrete implementations of this class implement actions to be taken when a corresponding nested pattern of XML elements has been matched.  code | html
RuleSetBase  

Convenience base class that implements the RuleSet interface. 

code | html
Substitutor  

(Logical) Interface for substitution strategies. 

code | html

Classes:

Address   Bean for Digester testing.  code | html
AlphaBean     code | html
BeanPropertySetterRule  

Rule implements sets a bean property on the top object to the body text.

The property set:

  • can be specified when the rule is created
  • or can match the current element when the rule is called.

Using the second method and the ExtendedBaseRules child match pattern, all the child elements can be automatically mapped to properties on the parent object.

 
code | html
BetaBean     code | html
Box   Simple class for use in unit tests.  code | html
CallMethodRule  

Rule implementation that calls a method on an object on the stack (normally the top/parent object), passing arguments collected from subsequent CallParamRule rules or from the body of this element. 

code | html
CallParamRule  

Rule implementation that saves a parameter for use by a surrounding CallMethodRule.

This parameter may be:

code | html
Digester  

A Digester processes an XML input stream by matching a series of element nesting patterns to execute Rules that have been added prior to the start of parsing. 

code | html
Employee   Bean for Digester testing.  code | html
ExtendedBaseRules  

Extension of RulesBase for complex schema.

This is an extension of the basic pattern matching scheme intended to improve support for mapping complex xml-schema. 

code | html
FactoryCreateRule  

Rule implementation that uses an ObjectCreationFactory to create a new object which it pushes onto the object stack. 

code | html
NamedBean   Very simple test bean  code | html
NodeCreateRule   A rule implementation that creates a DOM Node containing the XML at the element that matched the rule.  code | html
NodeCreateRule.NodeBuilder   The SAX content handler that does all the actual work of assembling the DOM node tree from the SAX events.  code | html
ObjectCreateRule   Rule implementation that creates a new object and pushes it onto the object stack.  code | html
ObjectParamRule  

Rule implementation that saves a parameter for use by a surrounding CallMethodRule.

This parameter may be:

  • an arbitrary Object defined programatically, assigned when the element pattern associated with the Rule is matched. 
code | html
OtherTestObjectCreationFactory   Another Object creation factory used for testing.  code | html
ParamBean   This bean is used to replicate a reasonably complex use case whose behaviour has changed from Digester 1.3 to 1.4.  code | html
ParserFeatureSetterFactory   Creates a SAXParser based on the underlying parser.  code | html
PathCallParamRule  

Rule implementation that saves a parameter containing the Digester matching path for use by a surrounding CallMethodRule

code | html
PrimitiveBean   A simple bean with primitive properties.  code | html
RegexRules  

Rules implementation that uses regular expression matching for paths.

The regex implementation is pluggable, allowing different strategies to be used. 

code | html
RegexRules.RegisteredRule   Used to associate rules with paths in the rules list  code | html
RulesBase  

Default implementation of the Rules interface that supports the standard rule matching behavior. 

code | html
SetNestedPropertiesRule  

Rule implementation that sets properties on the object at the top of the stack, based on child elements with names matching properties on that object.

Example input that can be processed by this rule:

[widget]
[height]7[/height]
[width]8[/width]
[label]Hello, world[/label]
[/widget]

For each child element of [widget], a corresponding setter method is located on the object on the top of the digester stack, the body text of the child element is converted to the type specified for the (sole) parameter to the setter method, then the setter method is invoked.

This rule supports custom mapping of xml element names to property names. 

code | html
SetNestedPropertiesRule.AnyChildRule     code | html
SetNestedPropertiesRule.AnyChildRules   Private Rules implementation  code | html
SetNextRule  

Rule implementation that calls a method on the (top-1) (parent) object, passing the top object (child) as an argument. 

code | html
SetPropertiesRule  

Rule implementation that sets properties on the object at the top of the stack, based on attributes with corresponding names.

This rule supports custom mapping of attribute names to property names. 

code | html
SetPropertyRule   Rule implementation that sets an individual property on the object at the top of the stack, based on attributes with specified names.  code | html
SetRootRule  

Rule implementation that calls a method on the root object on the stack, passing the top object (child) as an argument. 

code | html
SetTopRule  

Rule implementation that calls a "set parent" method on the top (child) object, passing the (top-1) (parent) object as an argument.

This rule now supports more flexible method matching by default. 

code | html
SimpleRegexMatcher  

Simple regex pattern matching algorithm.

This uses just two wildcards:

  • * matches any sequence of none, one or more characters
  • ? matches any one character
Escaping these wildcards is not supported .

 
code | html
SimpleTestBean  

As it's name suggests just a simple bean used for testing. 

code | html
TestBean   General purpose test bean for Digester tests.  code | html
TestObjectCreationFactory   Object creation factory used for testing.  code | html
TestRule  

This rule implementation is intended to help test digester. 

code | html
TestRuleSet   RuleSet that mimics the rules set used for Employee and Address creation, optionally associated with a particular namespace URI.  code | html
WithDefaultsRulesWrapper  

Rules Decorator that returns default rules when no matches are returned by the wrapped implementation.

This allows default Rule instances to be added to any existing Rules implementation. 

code | html

All Test Cases:

BeanPropertySetterRuleTestCase  

Test case for BeanPropertySetterRule

code | html
CallMethodRuleTestCase  

Tests for the CallMethodRule and associated CallParamRule

code | html
DigesterTestCase  

Test Case for the Digester class. 

code | html
EBRTestCase  

Runs standard tests for RulesBase as well as tests of extensions. 

code | html
NodeCreateRuleTestCase  

Test case for the NodeCreateRule

code | html
ObjectParamRuleTestCase  

Tests for the ObjectParamRuleTestCase 

code | html
OverlappingCallMethodRuleTestCase  

Tests for situations where CallMethodRule instances and their parameters overlap each other.

 
code | html
RegexRulesTestCase   Test case for RegexRules  code | html
RuleTestCase  

Test Case for the Digester class. 

code | html
RulesBaseTestCase  

Test Case for the RulesBase matching rules. 

code | html
SetNestedPropertiesRuleTestCase  

Test case for SetNestedPropertiesRule

code | html
SetPropertiesRuleTestCase  

Test case for SetPropertiesRule.

 
code | html
SetPropertyRuleTestCase  

Test case for SetPropertyRule.

 
code | html
TestEntityResolution   Tests for entity resolution.  code | html
TestFactoryCreate   Test case for factory create rules.  code | html
TestOthers   This class is a place that new test cases can easily added without having to chance the build.xml.  code | html
WDRulesWrapperTestCase   Test case for WithDefaultsRulesWrapper  code | html