com.raritantechnologies.searchApp.dataCollection
Class DispatchResultProcessor

java.lang.Object
  extended bycom.raritantechnologies.searchApp.dataCollection.DispatchResultProcessor
All Implemented Interfaces:
IConfigurable, IGatewayOutputProcessor, IResultSetProcessor

public class DispatchResultProcessor
extends java.lang.Object
implements IGatewayOutputProcessor, IResultSetProcessor

Dispatches result processing based on a set of IResultMatcher filter / IResultSetProcessor pairs.

XML Configuration Template:
     <OutputProcessor class="com.raritantechnologies.searchApp.dataCollection.DispatchResultProcessor" >

         <!-- Contains one or more Dispatcher elements -->
         <Dispatcher>
           <ResultMatcher class="[ class of com.raritantechnologies.searchApp.IResultMatcher ]" >
             <!-- configuration parameters of ResultMatcher -->
           </ResultMatcher>

           <ResultSetProcessor class="[ class of com.raritantechnologies.searchApp.dataCollection.IResultSetProcessor" >
             <!-- configuration parameters of ResultSetProcessor -->        
           </ResultSetProcessor>

           <!-- Optional parameters to be added to Result objects -->
           <Param name="[ param name ]" value="[ param value ]" />

         </Dispatcher>

         <Dispatcher>
           <!-- ResultMatcher and ResultSetProcessor for alternate dispatcher . . . -->
         </Dispatcher>

     </OutputProcessor>
  

Developed by Raritan Technologies .

Author:
Ted Sullivan

Constructor Summary
DispatchResultProcessor()
           
 
Method Summary
 void addDispatcher(IResultMatcher matcher, IResultSetProcessor resSetProcessor)
           
 void addDispatcher(IResultMatcher matcher, IResultSetProcessor resSetProcessor, java.util.Map params)
           
 void dataComplete()
          Data feed is complete.
 java.lang.String getConfigurationXML()
           
 void initialize(org.w3c.dom.Element configElem)
          Initialize the from XML Element.
 void initialize(org.w3c.dom.Element configElem, ISearchFieldMap sfMap)
          Initialize the GatewayOutputProcessor from XML Configuration Element.
 void initialize(java.util.Map initParams)
          Used for dynamic initialization (connection, collection name, file name, etc.)
 java.lang.String processData(IResultSet data)
          returns name of XML File created/appended.
 void processResultSet(java.lang.String sessionID, IResultSet data)
          processes the IResultSet (somehow)
 void setUser(ILoginInfo user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DispatchResultProcessor

public DispatchResultProcessor()
Method Detail

processData

public java.lang.String processData(IResultSet data)
Description copied from interface: IGatewayOutputProcessor
returns name of XML File created/appended.

Specified by:
processData in interface IGatewayOutputProcessor

processResultSet

public void processResultSet(java.lang.String sessionID,
                             IResultSet data)
processes the IResultSet (somehow)

Specified by:
processResultSet in interface IResultSetProcessor

dataComplete

public void dataComplete()
Data feed is complete.

Specified by:
dataComplete in interface IGatewayOutputProcessor

setUser

public void setUser(ILoginInfo user)

initialize

public void initialize(java.util.Map initParams)
Description copied from interface: IGatewayOutputProcessor
Used for dynamic initialization (connection, collection name, file name, etc.)

Specified by:
initialize in interface IGatewayOutputProcessor

initialize

public void initialize(org.w3c.dom.Element configElem)
Initialize the from XML Element.

Specified by:
initialize in interface IResultSetProcessor

initialize

public void initialize(org.w3c.dom.Element configElem,
                       ISearchFieldMap sfMap)
Description copied from interface: IGatewayOutputProcessor
Initialize the GatewayOutputProcessor from XML Configuration Element.

Specified by:
initialize in interface IGatewayOutputProcessor

addDispatcher

public void addDispatcher(IResultMatcher matcher,
                          IResultSetProcessor resSetProcessor)

getConfigurationXML

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

addDispatcher

public void addDispatcher(IResultMatcher matcher,
                          IResultSetProcessor resSetProcessor,
                          java.util.Map params)