public class

BeanRuleSet

extends Object
implements RuleSet
java.lang.Object
   ↳ org.apache.commons.betwixt.io.BeanRuleSet

Class Overview

Sets Betwixt digestion rules for a bean class.

Summary

Public Constructors
BeanRuleSet(XMLIntrospector introspector, String basePath, ElementDescriptor baseElementDescriptor, Class baseBeanClass, boolean matchIDs)
This constructor is deprecated. 0.5 use constructor which takes a ReadContext instead
BeanRuleSet(XMLIntrospector introspector, String basePath, ElementDescriptor baseElementDescriptor, Context context)
This constructor is deprecated. 0.6 use the constructor which takes a ReadContext instead
BeanRuleSet(XMLIntrospector introspector, String basePath, ElementDescriptor baseElementDescriptor, Class baseBeanClass, Context context)
This constructor is deprecated. 0.5 use the constructor which takes a ReadContext instead
BeanRuleSet(XMLIntrospector introspector, String basePath, ElementDescriptor baseElementDescriptor, Class baseBeanClass, ReadContext baseContext)
Base constructor.
Public Methods
void addRuleInstances(Digester digester)
Add rules for bean to given Digester.
String getClassNameAttribute()
The name of the attribute which can be specified in the XML to override the type of a bean used at a certain point in the schema.
String getNamespaceURI()

Gets the namespace associated with this ruleset.

void setClassNameAttribute(String classNameAttribute)
This method is deprecated. 0.5 set the ReadContext property instead
static void setLog(Log aLog)
Set log to be used by BeanRuleSet instances
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.commons.digester.RuleSet

Public Constructors

public BeanRuleSet (XMLIntrospector introspector, String basePath, ElementDescriptor baseElementDescriptor, Class baseBeanClass, boolean matchIDs)

This constructor is deprecated.
0.5 use constructor which takes a ReadContext instead

Base constructor.

Parameters
introspector the XMLIntrospector used to introspect
basePath specifies the (Digester-style) path under which the rules will be attached
baseElementDescriptor the ElementDescriptor used to create the rules
baseBeanClass the Class whose mapping rules will be created
matchIDs should ID/IDREFs be used to match beans?

public BeanRuleSet (XMLIntrospector introspector, String basePath, ElementDescriptor baseElementDescriptor, Context context)

This constructor is deprecated.
0.6 use the constructor which takes a ReadContext instead

Base constructor.

Parameters
introspector the XMLIntrospector used to introspect
basePath specifies the (Digester-style) path under which the rules will be attached
baseElementDescriptor the ElementDescriptor used to create the rules
context the root Context that bean carrying Contexts should be obtained from, not null

public BeanRuleSet (XMLIntrospector introspector, String basePath, ElementDescriptor baseElementDescriptor, Class baseBeanClass, Context context)

This constructor is deprecated.
0.5 use the constructor which takes a ReadContext instead

Base constructor.

Parameters
introspector the XMLIntrospector used to introspect
basePath specifies the (Digester-style) path under which the rules will be attached
baseElementDescriptor the ElementDescriptor used to create the rules
baseBeanClass the Class whose mapping rules will be created
context the root Context that bean carrying Contexts should be obtained from, not null

public BeanRuleSet (XMLIntrospector introspector, String basePath, ElementDescriptor baseElementDescriptor, Class baseBeanClass, ReadContext baseContext)

Base constructor.

Parameters
introspector the XMLIntrospector used to introspect
basePath specifies the (Digester-style) path under which the rules will be attached
baseElementDescriptor the ElementDescriptor used to create the rules
baseBeanClass the Class whose mapping rules will be created
baseContext the root Context that bean carrying Contexts should be obtained from, not null

Public Methods

public void addRuleInstances (Digester digester)

Add rules for bean to given Digester.

Parameters
digester the Digester to which the rules for the bean will be added

public String getClassNameAttribute ()

The name of the attribute which can be specified in the XML to override the type of a bean used at a certain point in the schema.

The default value is 'className'.

Returns
  • The name of the attribute used to overload the class name of a bean

public String getNamespaceURI ()

Gets the namespace associated with this ruleset.

Note namespaces are not currently supported.

Returns
  • null

public void setClassNameAttribute (String classNameAttribute)

This method is deprecated.
0.5 set the ReadContext property instead

Sets the name of the attribute which can be specified in the XML to override the type of a bean used at a certain point in the schema.

The default value is 'className'.

Parameters
classNameAttribute The name of the attribute used to overload the class name of a bean

public static void setLog (Log aLog)

Set log to be used by BeanRuleSet instances

Parameters
aLog the Log implementation for this class to log to