com.raritantechnologies.searchApp.dataCollection
Class GatewayProcessorFilter

java.lang.Object
  extended bycom.raritantechnologies.searchApp.dataCollection.GatewayProcessorFilter
All Implemented Interfaces:
ICollectionIndexer, IConfigurable, IGatewayOutputProcessor, IResultSetProcessor
Direct Known Subclasses:
CollectionStatisticsCollector, DeduplicatingGatewayProcessorFilter, FactRelationshipOutputProcessor, FactRelationshipOutputProcessor, GatewayFormatterFilter, IndexStatusUpdater, LinkVerifierGatewayFilter, NestedResultExtractorFilter, ProcessFilesPostProcessorFilter, ProfilerGatewayOutputProcessor, ResultMatcherFilter, ResultTermsCollector, SocketNotifierProcessorFilter, UpdateProcessorFilter, ZoneCollectorProcessorFilter

public class GatewayProcessorFilter
extends java.lang.Object
implements IGatewayOutputProcessor, IResultSetProcessor, ICollectionIndexer

Base class for objects that can add / remove or modify IResult items collected by a ICollectionGateway data collection / processing stream. Enables data collection processors to be connected into a processing pipeline or 'decision' tree. Can use a IResultMatcher to filter the data processing stream.

XML Configuration Template:
 <GatewayOutputProcessor class"[GatewayProcessorFilter class]" >

    <!-- Optional result matcher to filter the result set -->
    <ResultMatcher class="[IResultMatcher class]" >

    </ResultMatcher>

    <!-- One or more Proxy output processor that will get the filtered data set -->
    <OutputProcessor class="[IGatewayOutputProcessor class]" >
      <!-- OutputProcessor details -->
    </OutputProcessor>

    <!-- Additional result set filters that operate on the data after initial processing -->
    <PostProcessor class="[GatewayProcessorFilter class ]" >
      <!-- PostProcessor details -->
    </PostProcessor>
 </GatewayOutputProcessor>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Field Summary
protected  java.util.ArrayList postProcessorFilters
           
 
Fields inherited from interface com.raritantechnologies.searchApp.dataCollection.ICollectionIndexer
ADD, CREATE, DELETE, UPDATE
 
Constructor Summary
GatewayProcessorFilter()
           
 
Method Summary
 void addOutputProcessor(IGatewayOutputProcessor outputProcessor)
           
 void addPostProcessor(GatewayProcessorFilter postProcessor)
           
 void dataComplete()
          Data feed is complete.
protected  IResultSet filterData(IResultSet data)
           
 IResultSet filterResultSet(IResultSet data)
           
 java.lang.String getConfigurationXML()
           
 void initialize(org.w3c.dom.Element elem)
          Initialize the from XML Element.
 void initialize(org.w3c.dom.Element outputProcElem, 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 theOutputProcessor(s) output.
 void processResultSet(java.lang.String sessionID, IResultSet data)
          processes the IResultSet (somehow)
protected  java.lang.String sendToOutput(IResultSet filteredData)
           
 void setIndexMode(java.lang.String indexMode)
           
 void setResultMatcher(IResultMatcher resultMatcher)
           
 void setUserMatcher(ILoginInfo matchUser)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

postProcessorFilters

protected java.util.ArrayList postProcessorFilters
Constructor Detail

GatewayProcessorFilter

public GatewayProcessorFilter()
Method Detail

addOutputProcessor

public void addOutputProcessor(IGatewayOutputProcessor outputProcessor)

addPostProcessor

public void addPostProcessor(GatewayProcessorFilter postProcessor)

setResultMatcher

public void setResultMatcher(IResultMatcher resultMatcher)

setUserMatcher

public void setUserMatcher(ILoginInfo matchUser)

processResultSet

public void processResultSet(java.lang.String sessionID,
                             IResultSet data)
Description copied from interface: IResultSetProcessor
processes the IResultSet (somehow)

Specified by:
processResultSet in interface IResultSetProcessor

processData

public java.lang.String processData(IResultSet data)
returns theOutputProcessor(s) output. filters the data (can add or remove result items)

Specified by:
processData in interface IGatewayOutputProcessor

sendToOutput

protected java.lang.String sendToOutput(IResultSet filteredData)

setIndexMode

public void setIndexMode(java.lang.String indexMode)
Specified by:
setIndexMode in interface ICollectionIndexer

dataComplete

public void dataComplete()
Data feed is complete.

Specified by:
dataComplete in interface IGatewayOutputProcessor

filterResultSet

public IResultSet filterResultSet(IResultSet data)

filterData

protected IResultSet filterData(IResultSet data)

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IResultSetProcessor
Initialize the from XML Element.

Specified by:
initialize in interface IResultSetProcessor

initialize

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

Specified by:
initialize in interface IGatewayOutputProcessor

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

getConfigurationXML

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