com.raritantechnologies.xml.sax.filter.comparators
Class PathAttributeComparator
java.lang.Object
com.raritantechnologies.xml.sax.filter.comparators.PathComparator
com.raritantechnologies.xml.sax.filter.comparators.PathAttributeComparator
- All Implemented Interfaces:
- ElementComparator
- public class PathAttributeComparator
- extends PathComparator
Implementation of ElementComparator that matches
on the entire XML path and an attribute.
Used by ProgrammableSAXFilter.
XML Configuration Template:
<Comparator class="com.raritantechnologies.xml.sax.filter.comparators.PathAttributeComparator"
attributeName="[ attribute to match ]" attributeValue="[ match value ]" >
<PathName>[ path to compare ]</PathName>
<!-- Optional Comparator if attributeValue attribute is not used and/or a non-exact match is required -->
<AttributeComparator class="[ class of com.raritantechnologies.utils.comparators.IComparator" >
<!-- configuration params for Attribute Comparator -->
</AttributeComparator>
</Comparator>
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 |
PathAttributeComparator
public PathAttributeComparator()
PathAttributeComparator
public PathAttributeComparator(java.lang.String path,
java.lang.String attributeName,
java.lang.String attributeValue)
matchesTag
public boolean matchesTag(java.lang.String path,
org.xml.sax.Attributes atts)
- Description copied from interface:
ElementComparator
- Checks if the XML tag at the specified path with given attribute list
matches the criteria of this comparator.
- Specified by:
matchesTag in interface ElementComparator- Overrides:
matchesTag in class PathComparator
initialize
public void initialize(org.w3c.dom.Element compElem)
- Specified by:
initialize in interface ElementComparator- Overrides:
initialize in class PathComparator
setAttributeName
public void setAttributeName(java.lang.String attributeName)
getAttributeName
public java.lang.String getAttributeName()
setAttributeValue
public void setAttributeValue(java.lang.String attributeValue)
getAttributeValue
public java.lang.String getAttributeValue()
setAttributeComparator
public void setAttributeComparator(java.util.Comparator comparator)
getAttributeComparator
public java.util.Comparator getAttributeComparator()
getConfigurationXML
public java.lang.String getConfigurationXML()