com.raritantechnologies.autonomy.category
Class AutonomyClassifierOutputProcessor

java.lang.Object
  extended bycom.raritantechnologies.autonomy.category.AutonomyClassifierOutputProcessor
All Implemented Interfaces:
IConfigurable, IGatewayOutputProcessor, ITreeProcessor

public class AutonomyClassifierOutputProcessor
extends java.lang.Object
implements IGatewayOutputProcessor, ITreeProcessor

Generates Autonomy Category Nodes. Pushes them to IDOL using the ACI interface.

XML Configuration Template:
   <OutputProcessor class="com.raritantechnologies.autonomy.category.AutonomyClassifierOutputProcessor"
                       aciHost="[ ACI host ]"
                       aciPort="[ ACI port ]"
                       aciUserID="[ user ID to ACI ]"
                       databases="[ comma separated list of IDOL collections to be categorized by this category ]"
                       nameAttribute="[ NAME | ID | PATH | tree node attribute that contains category name ]"
                       booleanAttribute="[ tree node attribute that contains boolean query ]"
                       trainingTextAttribute="[ tree node attribute that contains training text ]"
                       fieldTextAttribute="[ tree node attribute that contains field text ]"
                       termAttribute="[ tree node attribute (or result field) that contains terms ]"
                       standardTermWeight="[ integer constant to be used as term weight factor ]"
                       processMode="[ CREATE (default) | UPDATE ]" >

     <!-- If used as GatewayOutputProcessor, need to have a ResultPathTreeBuilder -->
     <ResultPathTreeBuilder>

     </ResultPathTreeBuilder>

     <!-- Optional com.raritantechnologies.utils.tree.filter.ITreeFilter to pre-process Tree before uploading to IDOL -->
     <TreeFilter>

     </TreeFilter>

     <!-- IResultMatcher to select results for Terms N Weights -->
     <ResultTermMatcher class="[ class of com.raritantechnologies.searchApp.IResultMatcher ]"
                           termField="[ field in result that contains term ]"
                           weightField="[ field in result that has weight ]" >

     </ResultTermMatcher>

     <TrainingDocResultMatcher class="[ class of com.raritantechnologies.searchApp.IResultMatcher ]"
                                  documentReferenceField="[ field in result that has document URL ]"
                                  documentTitleField="[ field in result that has document title ]"
                                  documentContentField="[ field in result that has document content ]" >

     </TrainingDocResultMatcher>

     <CategoryFields >
        <Field categoryName="[ name of category field ]" resultField="[ name of result field ]" />
     </CategoryFields>

   </OutputProcessor>
 


Constructor Summary
AutonomyClassifierOutputProcessor()
           
 
Method Summary
 void dataComplete()
          Data feed is complete.
 java.lang.String getConfigurationXML()
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or 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.)
 java.lang.String processData(IResultSet data)
          returns name of XML File created/appended.
 void processTree(TreeRoot tree)
           
 void updateCategory(Category category, TreeNode treeNode, ChannelsFunctionality channels)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutonomyClassifierOutputProcessor

public AutonomyClassifierOutputProcessor()
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

processTree

public void processTree(TreeRoot tree)
Specified by:
processTree in interface ITreeProcessor

updateCategory

public void updateCategory(Category category,
                           TreeNode treeNode,
                           ChannelsFunctionality channels)

dataComplete

public void dataComplete()
Data feed is complete.

Specified by:
dataComplete in interface IGatewayOutputProcessor

initialize

public void initialize(org.w3c.dom.Element outputProcElem,
                       ISearchFieldMap sfMap)
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: 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

initialize

public void initialize(java.util.Map initParameters)
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