com.raritantechnologies.xml.sax.filter.comparators
Class PathAttributeComparator

java.lang.Object
  extended bycom.raritantechnologies.xml.sax.filter.comparators.PathComparator
      extended bycom.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

Constructor Summary
PathAttributeComparator()
           
PathAttributeComparator(java.lang.String path, java.lang.String attributeName, java.lang.String attributeValue)
           
 
Method Summary
 java.util.Comparator getAttributeComparator()
           
 java.lang.String getAttributeName()
           
 java.lang.String getAttributeValue()
           
 java.lang.String getConfigurationXML()
           
 void initialize(org.w3c.dom.Element compElem)
           
 boolean matchesTag(java.lang.String path, org.xml.sax.Attributes atts)
          Checks if the XML tag at the specified path with given attribute list matches the criteria of this comparator.
 void setAttributeComparator(java.util.Comparator comparator)
           
 void setAttributeName(java.lang.String attributeName)
           
 void setAttributeValue(java.lang.String attributeValue)
           
 
Methods inherited from class com.raritantechnologies.xml.sax.filter.comparators.PathComparator
matchesData, matchesPath, needsData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathAttributeComparator

public PathAttributeComparator()

PathAttributeComparator

public PathAttributeComparator(java.lang.String path,
                               java.lang.String attributeName,
                               java.lang.String attributeValue)
Method Detail

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()