com.raritantechnologies.utils.tagging
Class SearchSourceTagSource

java.lang.Object
  extended bycom.raritantechnologies.utils.tagging.SearchSourceTagSource
All Implemented Interfaces:
IConfigurable, IHyperlinkTagSource, InitializableSystemObject

public class SearchSourceTagSource
extends java.lang.Object
implements IHyperlinkTagSource, InitializableSystemObject

Uses a SearchSource to lookup terms for tagging. Extracts the tag values from a result field. It then constructs a searchURL with the source mapped category for each tagged term. This will cause a secondary search against the search source that should return a single row with the other values associated with the term.

XML Configuration Template:
   <TagSource class="com.raritantechnologies.utils.tagging.SearchSourceTagSource"
                 name="[unique name for this TagSource]"
                 action="[URL of hyperlink action]"
                 searchSource="[name of search source]"
                 tagTermField="[ name of result field to extract tag(s) from ]" >

      <!-- Used to set up the query to the search source: query should return all results that will -->
      <!-- be used to get the tagging vocabulary set. -->
      <Query ID="[fieldID of query element]" value="[value of query element" />
      <Query ID="[fieldID of second q element]" value="[its value]" />

      <!-- Defines the list of parameters that will be extracted from the tagging search source result -->
        <!-- and added to the final tagged http request. -->
      <RequestParams>
        <Param ID="[field id in IResult]" name="[request param name]" />
        <Param ID="[ another result field]" name="[another request param]" />
      </RequestParams>

      <-- Defines a set of optional fixed parameters that will be added to the final tagged http request -->
      <FixedParams>
         <Param name="[request param name]" value="[fixed value]" />
         <Param name="[another param name]" value="[another value]" />
      </FixedParams>

      <!-- optional TermExtractor that will extract terms from search results -->
      <TermExtractor class="[ class of com.raritantechnologies.utils.tagging.ITermExtractor ]" >
        <!-- configuration parameters of TermExtractor -->
      </TermExtractor>

      <ExcludedTerms delimiter="[ delimiter (default is comma ',') ]" >
        [delimited list of terms that should not be added]
      </ExcludedTerms>

   </TagSource>
 

Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Constructor Summary
SearchSourceTagSource()
           
 
Method Summary
 java.util.HashMap getTagWords()
          returns a HashMap of first tag word --> URLWordsTagger
 void init()
           
 void initialize(org.w3c.dom.Element elem)
          Initialize TagWriter from an XML configuation element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchSourceTagSource

public SearchSourceTagSource()
Method Detail

init

public void init()
Specified by:
init in interface InitializableSystemObject

getTagWords

public java.util.HashMap getTagWords()
Description copied from interface: IHyperlinkTagSource
returns a HashMap of first tag word --> URLWordsTagger

Specified by:
getTagWords in interface IHyperlinkTagSource

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IHyperlinkTagSource
Initialize TagWriter from an XML configuation element.

Specified by:
initialize in interface IHyperlinkTagSource