Open SiteSearch 4.1.1
Final

ORG.oclc.gadgets
Class SearchTabbar

java.lang.Object
  |
  +--ORG.oclc.gadgets.SearchTabbar

public class SearchTabbar
extends Object
implements GadgetBuilder

The SearchTabbar class is a gadget that builds the HTML representation of the search tabbar for the Search screens in the SiteSearch 4.0 OBI. It uses the parameters contained in a RequestManager object to determine the appropriate tabbar to generate.

SearchTabbar delivers a string that highlights the currently chosen search screen. It also provides the capability to define the text in the first 3 tab boxes tailored to the specific database using the tabbar parameter specified in the database configuration file [IndexLists] section. If the execution of the class fails, an empty string ("") is returned.

For efficiency purposes, the tabbar string is generated one time for each database and saved in the gadget Hastable object. Each subsequent request for the database tabbar is a table lookup to locate the appropriate string.


Constructor Summary
SearchTabbar()
          Constructs a SearchTabbar object.
 
Method Summary
protected  void addTab(StringBuffer tab, boolean active, String command, String text)
          Adds a tab cell to the current tab buffer for the input command.
 String buildit(RequestManager rMngr, String name)
          Generates a String containing the HTML for the tabbar on the search screens using the parameters containined in the RequestManager object and the name of the gadget.
 String toString()
          Generates a String representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SearchTabbar

public SearchTabbar()
Constructs a SearchTabbar object.
Method Detail

buildit

public String buildit(RequestManager rMngr,
                      String name)
Generates a String containing the HTML for the tabbar on the search screens using the parameters containined in the RequestManager object and the name of the gadget.
Specified by:
buildit in interface GadgetBuilder
Parameters:
rMngr - object containing input parameters for the request.
name - the name of the gadget - the section name in the configuration file defining the particular gadget.
Returns:
String

toString

public String toString()
Generates a String representation of the object.
Specified by:
toString in interface GadgetBuilder
Returns:
String
Overrides:
toString in class Object

addTab

protected void addTab(StringBuffer tab,
                      boolean active,
                      String command,
                      String text)
Adds a tab cell to the current tab buffer for the input command.
Parameters:
tab - the current tab string buffer
active - indicating if the current tab is active
command - the text to put in the tab.

Open SiteSearch 4.1.1
Final