com.raritantechnologies.searchApp
Class QueryProcessorFilterFactory

java.lang.Object
  extended bycom.raritantechnologies.searchApp.XMLSearchSourceFactory
      extended bycom.raritantechnologies.searchApp.QueryProcessorFilterFactory
All Implemented Interfaces:
IXMLSearchSourceFactory

public class QueryProcessorFilterFactory
extends XMLSearchSourceFactory

Factory class for QueryProcessorFilters. Subclass of XMLSearchSourceFactory which builds a nested SearchSource - the outer layer is the filter layer, the inner layer is the proxy SearchSource. The inner proxy SearchSource can also be a filter - enabling arbitrarily deep nesting of filters.

XML Configuration Template: The XML Configuration should contain a <SourceType> tag for the filtered source, e.g.:
   <SourceType name="[ the Source Name ]" 
                  type="[ source type ]"
                  sourceFactoryClass = "[ class of SearchSourceFactory ]" 
                  queryProcessorClass = "[ class of IQueryProcessor ]" />
   

A filtered Search source uses a SourceType tag which refers to the filtered source and specifies a particular QueryProcessorFilter to act on the output of the "input Source":

   <SourceType name="filteredSource Name" 
                  inputSource  = "[ maps to the input source - use [Session:sourceKey] for session cached source name ]"
                    type="realType"
                  sourceFactoryClass="com.raritantechnologies.searchApp.QueryProcessorFilterFactory"
                  filterClass  = "[ subclass of com.raritantechnologies.searchApp.QueryProcessorFilter ]" >

    <!-- Any initialization information needed by the filterClass -->

  </SourceType>

   <!-- Alternatively, the QueryProcessorFilter can include a nested InputSource tag: -->
   <SourceType name="filteredSource Name" 
                    type="realType"
                  sourceFactoryClass="com.raritantechnologies.searchApp.QueryProcessorFilterFactory"
                  filterClass  = "[ subclass of com.raritantechnologies.searchApp.QueryProcessorFilter ]" >

    <!-- Any initialization information needed by the filterClass -->
    <InputSource name="name of input source"
                    sourceFactoryClass="[ class of SearchSourceFactory ]"
                    queryProcessorClass="[ class of IQueryProcessor ]" >

    </InputSource>

  </SourceType>

  

A single filter can only deal with ONE search source. For multiple search sources, use the Raritan FederatedQueryProcessor.


Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
QueryProcessorFilterFactory()
           
 
Method Summary
 SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem, ISearchFieldMapFactory factory)
           
static org.w3c.dom.Element getConfigElement(java.lang.String filterSourceName)
           
 
Methods inherited from class com.raritantechnologies.searchApp.XMLSearchSourceFactory
changeBasePath, initializeFieldFormatters, initializeSource, initializeStaticFields
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryProcessorFilterFactory

public QueryProcessorFilterFactory()
Method Detail

createSearchSources

public SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem,
                                          ISearchFieldMapFactory factory)
Specified by:
createSearchSources in interface IXMLSearchSourceFactory
Specified by:
createSearchSources in class XMLSearchSourceFactory

getConfigElement

public static org.w3c.dom.Element getConfigElement(java.lang.String filterSourceName)