com.raritantechnologies.inxight
Class InxightClassifier

java.lang.Object
  extended bycom.raritantechnologies.inxight.InxightClassifier
All Implemented Interfaces:
IConfigurable, IFieldFormatter

public class InxightClassifier
extends java.lang.Object
implements IFieldFormatter

Result classifier that uses the Inxight SmartDiscovery Analysis Server.

XML Configuration Template:
   <FieldFormatter formatterClass="com.raritantechnologies.inxight.InxightClassifier"
                      analysisServerHost="[ host name of SmartDiscovery Analysis server ]"
                      analysisServerPort="[ port that SmartDiscovery Analysis server is listening on ]"
                      taxonomyName="[ name of published Inxight taxonomy to use for classification ]"
                      fullTextField="[ result field that contains content text to analyze ]"
                      fullTextURLField="[ result field that URL to document content ]"
                      categoryLabelField="[ result field to put matching category labels ]"
                      categoryPathField="[ result field to put matching category paths ]" />

 


Field Summary
 
Fields inherited from interface com.raritantechnologies.searchApp.IFieldFormatter
TEMPLATE
 
Constructor Summary
InxightClassifier()
           
 
Method Summary
 java.lang.String formatField(java.lang.String fieldVal)
          Reformats a field value.
 java.lang.String formatField(java.lang.String sessionID, java.lang.String fieldVal)
          Reformats a field value.
 void formatResultField(IResult result)
          Formats a result field "in place".
 void formatResultField(java.lang.String sessionID, IResult result)
          Formats a result field "in place", incorporating session context.
 java.lang.String getFieldName()
          Returns the name of the result field that this formatter can reformat.
 void initialize(org.w3c.dom.Element elem)
          Initializes the formatter from configuration XML element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.raritantechnologies.searchApp.IFieldFormatter
getConfigurationXML, getConfigurationXML
 

Constructor Detail

InxightClassifier

public InxightClassifier()
Method Detail

formatResultField

public void formatResultField(java.lang.String sessionID,
                              IResult result)
Description copied from interface: IFieldFormatter
Formats a result field "in place", incorporating session context.

Specified by:
formatResultField in interface IFieldFormatter
Parameters:
sessionID - The session key needed to lookup any session content stored in the session data cache.
result - The result object that is to be formatted.

formatResultField

public void formatResultField(IResult result)
Description copied from interface: IFieldFormatter
Formats a result field "in place".

Specified by:
formatResultField in interface IFieldFormatter
Parameters:
result - The result object that is to be formatted.

getFieldName

public java.lang.String getFieldName()
Description copied from interface: IFieldFormatter
Returns the name of the result field that this formatter can reformat.

Specified by:
getFieldName in interface IFieldFormatter

formatField

public java.lang.String formatField(java.lang.String sessionID,
                                    java.lang.String fieldVal)
Description copied from interface: IFieldFormatter
Reformats a field value.

Specified by:
formatField in interface IFieldFormatter
Parameters:
sessionID - The session key needed to lookup any session content stored in the session data cache.
fieldVal - The field value to be reformatted.
Returns:
The reformatted field value.

formatField

public java.lang.String formatField(java.lang.String fieldVal)
Description copied from interface: IFieldFormatter
Reformats a field value.

Specified by:
formatField in interface IFieldFormatter
Parameters:
fieldVal - The field value to be reformatted.
Returns:
The reformatted field value.

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IFieldFormatter
Initializes the formatter from configuration XML element.

Specified by:
initialize in interface IFieldFormatter