com.raritantechnologies.concept.classifier
Class ResultTypeTermProcessor

java.lang.Object
  extended bycom.raritantechnologies.concept.classifier.ResultTypeTermProcessor
All Implemented Interfaces:
IConfigurable, IGatewayOutputProcessor, IResultSetProcessor

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

Creates a map of result 'type' to the number of 'hits' for each token in the result text fields. Used as a backup for inferential search: to rapidly choose the most likely content type for a query.

XML Configuration Template:
   <OutputProcessor class="com.raritantechnologies.concept.classifier.ResultTypeTermProcessor"
                       fileName="[ name of Term Map data file ]"
                       resultTypeField="[ result field that has the 'type' metadata ]"
                       textFields="[ comma separated list of fields that have tokenizable text ]" />
 


Nested Class Summary
 class ResultTypeTermProcessor.Count
           
 
Constructor Summary
ResultTypeTermProcessor()
           
 
Method Summary
 void dataComplete()
          Data feed is complete.
 java.lang.String getConfigurationXML()
           
static java.util.Map getResultTypeMap(java.lang.String termMapFile)
           
 java.util.Map getResultTypeTermMap()
           
 java.util.Map getResultTypeTermMap(java.lang.String countType)
           
 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 initParameters)
          Used for dynamic initialization (connection, collection name, file name, etc.)
protected  void initialzeTermMap(java.lang.String countType)
           
 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)
protected  void storeTermMap()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultTypeTermProcessor

public ResultTypeTermProcessor()
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)
Description copied from interface: IResultSetProcessor
processes the IResultSet (somehow)

Specified by:
processResultSet in interface IResultSetProcessor

dataComplete

public void dataComplete()
Description copied from interface: IResultSetProcessor
Data feed is complete.

Specified by:
dataComplete in interface IResultSetProcessor

initialzeTermMap

protected void initialzeTermMap(java.lang.String countType)

storeTermMap

protected void storeTermMap()

getResultTypeTermMap

public java.util.Map getResultTypeTermMap()

getResultTypeTermMap

public java.util.Map getResultTypeTermMap(java.lang.String countType)

getResultTypeMap

public static java.util.Map getResultTypeMap(java.lang.String termMapFile)

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(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(java.util.Map initParameters)
Used for dynamic initialization (connection, collection name, file name, etc.)

Specified by:
initialize in interface IResultSetProcessor

getConfigurationXML

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