com.raritantechnologies.concept.classifier.userInterface
Class SelectedResultClassifierServletHandler

java.lang.Object
  extended bycom.raritantechnologies.concept.classifier.userInterface.SelectedResultClassifierServletHandler
All Implemented Interfaces:
IConfigurable, IServletHandler

public class SelectedResultClassifierServletHandler
extends java.lang.Object
implements IServletHandler

Associates a Taxonomy and one or more Taxonomy nodes with a set of documents collected in a selected SearchSource cache - for example, using the CheckboxResultRenderer.

Reads / Writes results associated with a Taxonomy and one or more Taxonomy nodes to a database. On a read operation, loads the SelectedResult session cache using the taxonomy node and taxonomy name as a key.

On a write operation, writes the SelectedResult set in session cache to a database. This appends the records to the records already persisted. For some output processors/search sources - may need to read the existing records to determine if a record is new or an update.

XML Configuration Template:
  <ServletHandler class="com.raritantechnologies.concept.classifier.userInterface.SelectedResultClassifierServletHandler" 
                     cachedResultSetName="[ name of cached or selected result set ]"
                     taxonomyNodeParam="[ request parameter that contains the taxonomy Node that has been selected ]"
                     taxonomyNameParam="[ request parameter that contains the taxonomy that has been selected ]"
                     taxonomyNodeCache="[ name of session data that holds current selections ]"
                     resultIDField="[ name of field that holds result ID ]"
                     readWriteParam="[ name or request parameter that contains read|write|reset command ]" >

     <DatabaseTables connectionManager="[ name of DB ConnectionManager ]"
                        classificationIDColumn="[ column containing the classification ID ]" >

       <!-- One or more SaveField tags -->
       <SaveField ID="[ result field ID ]" />
       <!-- etc . . . -->

     </DatabaseTables>

     <!-- ====================================================================== -->
     <!-- Set of request parameters to add to DynamicHttpServletRequest after    -->
     <!-- loading a new document list from a taxonomy node: if we are switching  -->
     <!-- from one set of taxonomy nodes to another and need to synchronize the  -->
     <!-- User Interface.                                                        -->
     <!-- ====================================================================== -->
     <OnSwitchRequestParameters>
       <Param name="[ name of parameter ]" value="[ value of parameter ]" />
       <!-- etc . . . -->
     </OnSwitchRequestParameters>

     <!-- ====================================================================== -->
     <!-- Set of request parameters to add to the DynamicHttpServletRequest if   -->
     <!-- we are NOT switching from one set of taxonomy nodes to another because -->
     <!-- the requested taxonomy node is not yet associated with any documents   -->
     <!-- in the database and we need to synchronize the User Interface.         -->
     <!-- ====================================================================== -->
     <OnAppendRequestParameters>
       <Param name="[ name of parameter ]" value="[ value of parameter ]" />
       <!-- etc . . . -->
     </OnAppendRequestParameters>

  </ServletHandler>                
 
Document table:
Document ID ID of associated document
Search Source Search Source that contains selected document
Result ID Field Result field that contains result ID
Result URL Field Result field that contains result URL
Result Title Field Result field that contains result Title
DocumentFields Document fields to save:id/title/url etc
Category-Taxonomy table:

Category - Classifier table: Associates a classification with a document via a classifier.


Field Summary
static java.lang.String CLEAR
           
static java.lang.String COMPUTED_ASSOCIATION
           
static java.lang.String FIXED_ASSOCIATION
           
static java.lang.String LOAD
           
static java.lang.String READ
           
static java.lang.String TRAINING_ASSOCIATION
           
static java.lang.String TRAINING_CHECKED
           
static java.lang.String WRITE
           
 
Constructor Summary
SelectedResultClassifierServletHandler()
           
 
Method Summary
 void init(SearchServlet searchServlet)
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void service(DynamicHttpServletRequest pReq, HttpServletResponse pRes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WRITE

public static java.lang.String WRITE

READ

public static java.lang.String READ

CLEAR

public static java.lang.String CLEAR

LOAD

public static java.lang.String LOAD

FIXED_ASSOCIATION

public static java.lang.String FIXED_ASSOCIATION

TRAINING_ASSOCIATION

public static java.lang.String TRAINING_ASSOCIATION

COMPUTED_ASSOCIATION

public static java.lang.String COMPUTED_ASSOCIATION

TRAINING_CHECKED

public static java.lang.String TRAINING_CHECKED
Constructor Detail

SelectedResultClassifierServletHandler

public SelectedResultClassifierServletHandler()
Method Detail

init

public void init(SearchServlet searchServlet)
Specified by:
init in interface IServletHandler

service

public void service(DynamicHttpServletRequest pReq,
                    HttpServletResponse pRes)
             throws ServletException,
                    java.io.IOException
Specified by:
service in interface IServletHandler
Throws:
ServletException
java.io.IOException

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