com.raritantechnologies.searchApp.browse
Class FileBrowseListWriter

java.lang.Object
  extended bycom.raritantechnologies.searchApp.browse.FileBrowseListWriter
All Implemented Interfaces:
IBrowseListWriter, IConfigurable
Direct Known Subclasses:
XMLBrowseListWriter

public class FileBrowseListWriter
extends java.lang.Object
implements IBrowseListWriter

Implementation of IBrowseListWriter that writes Browse entries to a hierarchical file system that can be used by the standard Browse object.

XML Configuration Template:
  <BrowseListWriter class="com.raritantechnologies.searchApp.browse.FileBrowseListWriter"
                       directoryPath="[ path to base browse directory ]" />
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Field Summary
protected  java.util.HashMap displayMap
           
protected  java.util.HashMap sourceMap
           
 
Constructor Summary
FileBrowseListWriter()
           
 
Method Summary
 void addBrowseItem(java.lang.String fieldName, java.lang.String browseTerm, java.lang.String displayTerm, java.lang.String searchSource, int counts, int page)
           
 java.util.Map getBrowseCounts(java.lang.String fieldName)
          Returns a map of searchSource --> map of term --> counts for fieldName
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void saveBrowseList()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sourceMap

protected java.util.HashMap sourceMap

displayMap

protected java.util.HashMap displayMap
Constructor Detail

FileBrowseListWriter

public FileBrowseListWriter()
Method Detail

addBrowseItem

public void addBrowseItem(java.lang.String fieldName,
                          java.lang.String browseTerm,
                          java.lang.String displayTerm,
                          java.lang.String searchSource,
                          int counts,
                          int page)
Specified by:
addBrowseItem in interface IBrowseListWriter

saveBrowseList

public void saveBrowseList()
Specified by:
saveBrowseList in interface IBrowseListWriter

getBrowseCounts

public java.util.Map getBrowseCounts(java.lang.String fieldName)
Description copied from interface: IBrowseListWriter
Returns a map of searchSource --> map of term --> counts for fieldName

Specified by:
getBrowseCounts in interface IBrowseListWriter

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