Open SiteSearch 4.1.1
Final

ORG.oclc.fmts
Class WebZFormatter

java.lang.Object
  |
  +--ORG.oclc.fmts.WebZFormatter
Direct Known Subclasses:
ABIIFullTextFmt, ArchivebookMarkFmt, ArchivebriefFmt, ArchivefullFmt, DRAHoldingsSearchKey, FullTextFmt, MarcArticleFmt, MarcArticleISOILLFmt, MarcCatalogFmt, MarcISOILLFmt, NetFirstbriefFmt, RecordDumper, ReservebookMarkFmt, ReservebriefFmt, ReservefullFmt, UListCopiesFmt

public class WebZFormatter
extends Object
implements RecordFormatter

The WebZFormatter class is the parent class for all the WebZ database record formatting classes. It defines variables commonly used by all the formats and provides a common method to initialize them based on the current user state. It also houses commonly used methods to format database records.

See Also:
RecordFormatter, UserStateObject, StyleTable

Field Summary
protected  String bookMarkFont
          String data type containing the HTML for the font of bookmarked records.
protected  String context
          String data type containing the user's sessionid.
protected  int currecno
          integer data type containing the current record number retrieved from the user state.
protected  String defaultTextFont
          String data type containing the HTML for the default text font.
protected  FormatBerUtil fmtUtil
          FormatBerUtil object containing formatting record utilities.
protected  int fullrecno
          integer data type containing the current full record number displayed.
protected  int j
          integer data type used as a loop counter.
protected static String otherWidgets
           String containing other widgets for a Hot-link query.
protected static String queryBad
           String containing link to query failure HTML.
protected static String queryNext
          String containing link to next query search results HTML.
protected static String queryTarget
           String containing link to target HTML
protected  String resultset
          String data type containing the resultset of the current search.
protected  String smallTextFont
          String data type containing the HTML for a small text font.
protected  StyleTable styles
          StyleTable object containing a reference to the user's style.
protected  StringBuffer tempRecords
          StringBuffer object used as a work buffer for storing formatted data.
protected  int toprecno
          integer data type containing the current first record number in a multi-record display.
protected  UserStateObject user
          UserStateObject object containing the user's state.
 
Constructor Summary
WebZFormatter()
          Constructs a WebZFormatter object.
 
Method Summary
protected  void addBookMark(int recno)
          Appends a record book mark Hot-Link to the FormatBerUtil object formatting buffer using the input record number.
protected  void addBookMark(int recno, String nextPage)
          Appends a record book mark Hot-Link to the FormatBerUtil object formatting buffer using the input record number.
protected  void addBookMark(int recno, String nextPage, String otherInfo)
          Appends a record book mark Hot-Link to the FormatBerUtil object formatting buffer using the input record number and an additional string of FETCH information.
 String doFormat(Object userObject, Vector records)
          Performs base initialization for the formatting classes and returns a null String if the initialization for the UserStateObject and input Vector object of records fails.
 String init(Object userObject, Vector records)
          Sets up a local reference to the UserStateObject for the input userObject and initializes commonly used variables based on the current user state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

user

protected UserStateObject user
UserStateObject object containing the user's state.

styles

protected StyleTable styles
StyleTable object containing a reference to the user's style.

fmtUtil

protected FormatBerUtil fmtUtil
FormatBerUtil object containing formatting record utilities.

tempRecords

protected StringBuffer tempRecords
StringBuffer object used as a work buffer for storing formatted data.

defaultTextFont

protected String defaultTextFont
String data type containing the HTML for the default text font.

smallTextFont

protected String smallTextFont
String data type containing the HTML for a small text font.

bookMarkFont

protected String bookMarkFont
String data type containing the HTML for the font of bookmarked records.

resultset

protected String resultset
String data type containing the resultset of the current search.

context

protected String context
String data type containing the user's sessionid.

j

protected int j
integer data type used as a loop counter.

currecno

protected int currecno
integer data type containing the current record number retrieved from the user state.

toprecno

protected int toprecno
integer data type containing the current first record number in a multi-record display.

fullrecno

protected int fullrecno
integer data type containing the current full record number displayed.

otherWidgets

protected static final String otherWidgets

String containing other widgets for a Hot-link query.


queryNext

protected static final String queryNext
String containing link to next query search results HTML.


queryBad

protected static final String queryBad

String containing link to query failure HTML.


queryTarget

protected static final String queryTarget

String containing link to target HTML

Constructor Detail

WebZFormatter

public WebZFormatter()
Constructs a WebZFormatter object.
Method Detail

doFormat

public String doFormat(Object userObject,
                       Vector records)
Performs base initialization for the formatting classes and returns a null String if the initialization for the UserStateObject and input Vector object of records fails.
Specified by:
doFormat in interface RecordFormatter
Parameters:
userObject - the UserStateObject object for the current user.
record - a vector of records to be formatted.
Returns:
a String with a null returned for bad input records and an empty string returned for successful execution.

init

public final String init(Object userObject,
                         Vector records)
Sets up a local reference to the UserStateObject for the input userObject and initializes commonly used variables based on the current user state.
Parameters:
userObject - the UserStateObject object for the current user.
record - a vector of records to be formatted.
Returns:
a String with a null returned for bad input records and an empty string returned for successful execution.

addBookMark

protected final void addBookMark(int recno)
Appends a record book mark Hot-Link to the FormatBerUtil object formatting buffer using the input record number.
Parameters:
recno - the record number.

addBookMark

protected final void addBookMark(int recno,
                                 String nextPage)
Appends a record book mark Hot-Link to the FormatBerUtil object formatting buffer using the input record number.
Parameters:
recno - the record number.
nextPage - the name of the next= widget on the bookmark anchor

addBookMark

protected final void addBookMark(int recno,
                                 String nextPage,
                                 String otherInfo)
Appends a record book mark Hot-Link to the FormatBerUtil object formatting buffer using the input record number and an additional string of FETCH information.
Parameters:
recno - the record number.
nextPage - the name of the next= widget on the bookmark anchor
otherInfo - additional fetch information for the bookmark.

Open SiteSearch 4.1.1
Final