SiteSearch Formatting Classes: A Forum | |
OCLC SiteSearch User's Group Meeting March 23, 1999 |
Larry Baerveldt (larry@incolsa.palni.edu) Private Academic Network of Indiana |
/** ** Method for adding a repeatable field and specifying the String to use as a * separator. The fieldSeparator could be straight text, such as ", " or HTML code, * such as "<br>". If useLabel is true, fieldLabel is processed through * labelMaker. If useLabel is false, fieldLabel is still displayed, but without * any of the table formatting codes included in labelMaker; it is simple text * that is displayed in front of the tag content. *
* * @param dir a DataDir that contains the record to be formatted * @param useLabel a Boolean that specified whether or not a label is needed * @param fieldLabel a String that contains the text to be displayed as the label * @param fieldTag a String containing the MARC tag of the field to be displayed * @param fieldSeparator a String containing the text to use as a separator * @param useTrailer a Boolean that specifies whether or not a trailer is needed * @return void *
*/ protected final void addGenericField(DataDir dir, boolean useLabel, String fieldLabel, String fieldTag, String fieldSeparator, boolean useTrailer) { String trailerText; if (useTrailer) { trailerText = trailer; } else { trailerText = ""; } // end if-else if (useLabel) { fmtUtil.addFields(labelMaker(fieldLabel), fieldSeparator, trailerText, dir, fieldTag); } else { fmtUtil.addFields(fieldLabel, fieldSeparator, trailerText, dir, fieldTag); } // end if-else }