com.raritantechnologies.searchApp.resultComparators
Class CompositeResultMatcher

java.lang.Object
  extended bycom.raritantechnologies.searchApp.resultComparators.CompositeResultMatcher
All Implemented Interfaces:
IConfigurable, IResultMatcher

public class CompositeResultMatcher
extends java.lang.Object
implements IResultMatcher

Matcher that contains a set of child IResultMatchers - with any/all/exclude logic.

XML Configuration Template:
  <ResultMatcher class="com.raritantechnologies.searchApp.resultComparators.CompositeResultMatcher" >

     <!-- IResultMatchers that will cause this matcher to return false -->
     <ExcludeMatchers >
        <ResultMatcher class="[ class of com.raritantechnologies.searchApp.IResultMatcher ]" >

        </ResultMatcher>

        <ResultMatcher class="[ class of com.raritantechnologies.searchApp.IResultMatcher ]" >

        </ResultMatcher>

        <!-- etc... -->

     </ExcludeMatchers>

     <!-- IResultMatchers that will cause this matcher to return true -->
     <IncludeMatchers
           matchIfAll="true|false(default)" >

        <ResultMatcher class="[ class of com.raritantechnologies.searchApp.IResultMatcher ]" >

        </ResultMatcher>

        <ResultMatcher class="[ class of com.raritantechnologies.searchApp.IResultMatcher ]" >

        </ResultMatcher>

        <!-- etc... -->

     </IncludeMatchers>

  </ResultMatcher>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Field Summary
static boolean MATCH_IF_ALL
           
static boolean MATCH_IF_ANY
           
 
Fields inherited from interface com.raritantechnologies.searchApp.IResultMatcher
TEMPLATE
 
Constructor Summary
CompositeResultMatcher()
           
CompositeResultMatcher(boolean matchIfAll)
           
 
Method Summary
 void addExcludeMatcher(IResultMatcher excludeMatcher)
           
 void addIncludeMatcher(IResultMatcher includeMatcher)
           
 boolean equals(ILoginInfo userInfo, IResult result)
           
 java.lang.String getConfigurationXML()
           
 java.lang.String getConfigurationXML(java.lang.String configurationTemplate)
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MATCH_IF_ALL

public static final boolean MATCH_IF_ALL
See Also:
Constant Field Values

MATCH_IF_ANY

public static final boolean MATCH_IF_ANY
See Also:
Constant Field Values
Constructor Detail

CompositeResultMatcher

public CompositeResultMatcher()

CompositeResultMatcher

public CompositeResultMatcher(boolean matchIfAll)
Method Detail

addIncludeMatcher

public void addIncludeMatcher(IResultMatcher includeMatcher)

addExcludeMatcher

public void addExcludeMatcher(IResultMatcher excludeMatcher)

equals

public boolean equals(ILoginInfo userInfo,
                      IResult result)
Specified by:
equals in interface IResultMatcher

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

getConfigurationXML

public java.lang.String getConfigurationXML()
Specified by:
getConfigurationXML in interface IResultMatcher

getConfigurationXML

public java.lang.String getConfigurationXML(java.lang.String configurationTemplate)
Specified by:
getConfigurationXML in interface IResultMatcher