com.raritantechnologies.utils.tree.filter
Class TreeNodeAttributeCollector
java.lang.Object
com.raritantechnologies.utils.tree.filter.TreeNodeAttributeCollector
- All Implemented Interfaces:
- IConfigurable, ITreeNodeFilter
- public class TreeNodeAttributeCollector
- extends java.lang.Object
- implements ITreeNodeFilter
Collects descendent, ancestor and/or related node attributes (sub attributes, inherited attributes or
associated node attributes respectively) and adds them as attributes to the ancestor (filtered) node.
XML Configuration Template:
<NodeFilter class="com.raritantechnologies.utils.tree.filter.TreeNodeAttributeCollector"
childAttributeName="[ name of child attribute to be collected ]"
allDescendents="[ true(default) | false - if false: just get attributes from immediate children ]"
parentAttributeName="[ name of parent or ancestor attribute to be collected ]"
allAncestors="[ true(default)|false - if false: just gets parents attributes ]"
associatedNodeAttribute="[ (alternative) name of attribute that contains asscociated node ID ]"
associatedAttribute="[ name of attribute in associated node to be collected ]"
associatedAncestors="[ true|false(default) - if true get values from associated node ancestors ]"
collectedAttributesName="[ name of attribute to receive the collected values ]"
excluded="[ optional comma separated list of values to exclude from output ]"
delimiter="[ optional delimiter - if present, multiple values will be concatenated into a single delimited output value ]" >
<TreeNodeComparator class="[ class of com.raritantechnologies.utils.tree.ITreeNodeComparator ]" >
</TreeNodeComparator>
<AttributeFilters>
<AttributeFilter class="[ class of com.raritantechnologies.utils.filter.IStringFilter ]"
mode=[ ALL | ASSOCIATED | ANCESTORS | DESCENDENTS ]"
appendIndexPattern="[ string pattern with {INDEX} placeholder ]" >
</AttributeFilter>
</AttributeFilters>
Developed by
Raritan Technologies Inc..
- Author:
- Ted Sullivan
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeNodeAttributeCollector
public TreeNodeAttributeCollector()
filterNode
public TreeNode filterNode(TreeNode theNode,
RaritanPageContext pContext)
- Specified by:
filterNode in interface ITreeNodeFilter
initialize
public void initialize(org.w3c.dom.Element elem)
- Description copied from interface:
IConfigurable
- Initializes the object from an XML tag or element.
This method is called by the Framework as part of the application initializtion.
see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory.
Configurable objects that are owned or contained by other configurable objects will be initialized
in by the parent object.
- Specified by:
initialize in interface IConfigurable