com.raritantechnologies.searchApp.resultComparators
Class CompositeResultComparator
java.lang.Object
com.raritantechnologies.searchApp.resultComparators.CompositeResultComparator
- All Implemented Interfaces:
- java.util.Comparator, IConfigurable, IResultComparator
- public class CompositeResultComparator
- extends java.lang.Object
- implements IResultComparator
Enables a tiered comparison: returns the value of the first nested IResultComparator that
detects a difference between two IResult objects.
XML Configuration Template:
<ResultComparator class="com.raritantechnologies.searchApp.resultComparators.CompositeResultComparator" >
<!-- Two or more nested ResultComparators: -->
<ResultComparator class="[ class of com.raritantechnologies.searchApp.IResultComparator ]" >
</ResultComparator>
<ResultComparator class="[ class of com.raritantechnologies.searchApp.IResultComparator ]" >
</ResultComparator>
<!-- etc . . . -->
</ResultComparator>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
equals |
CompositeResultComparator
public CompositeResultComparator()
compare
public int compare(java.lang.Object obj1,
java.lang.Object obj2)
- Specified by:
compare in interface java.util.Comparator
compare
public int compare(IResult res1,
IResult res2)
- Specified by:
compare in interface IResultComparator
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 IResultComparator
setContext
public void setContext(java.util.Map parameterMap)
- Specified by:
setContext in interface IResultComparator
getConfigurationXML
public java.lang.String getConfigurationXML()
getConfigurationXML
public java.lang.String getConfigurationXML(java.lang.String configurationTemplate)