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 |
private final String formatRecord(DataDir dir, int whichRecord) { // variables to control the creation of the HTML boolean useLabel = true; boolean useTrailer = true; boolean useHTML = true; boolean createHotLink = true; boolean createHoldingsHotLink = true; addGenericFieldWBookMark(dir, whichRecord, "Medline No.", "060/2"); addGenericField(dir, useLabel, "Title", "245/1"); addGenericFieldHotLink(dir, useLabel, createHotLink, "Authors", "100", "1", "au:"); addGenericSubfields(dir, useLabel, "Source", "773", "19,4,2,7", ", "); addGenericField(dir, useLabel, "Language", ""); addGenericField(dir, useLabel, "Country", "260/1"); addGenericField(dir, useLabel, "Standard No.", "069/1"); addGenericField(dir, useLabel, "CODEN", "773/25"); addGenericField(dir, useLabel, "Pub. Type", "567/1"); addGenericFieldWInternalLabel(dir, "500/1", ':'); addGenericField(dir, useLabel, "Abstract", "520/1"); addGenericFieldHotLink(dir, useLabel, createHotLink, "MeSH Headings", "650", "1", "sh:"); addGenericField(dir, useLabel, "Libraries", "948/8"); return(fmtUtil.toString()); }Sample screenshot
Displaying a full bookmarked citation from FirstSearch's PsycINFO
private final String formatRecord(DataDir dir) { // variables to control the processing with the formatting methods boolean useLabel = true; boolean dontuseLabel = false; boolean useTrailer = true; boolean dontuseTrailer = false; boolean labelIndent = true; boolean usepreText = true; boolean dontusepreText = false; addBookmarkField(dir, "Accession No.", "069/1"); addBookmarkField(dir, "Title", "245/*"); addBookmarkField(dir, "Author", "100/*"); addBookmarkField(dir, "Author", "700/*"); addBookmarkField(dir, "Organization", "410/1"); addBookmarkField(dir, "Meeting", "711/*"); addBookmarkField(dir, useLabel, "From", "773/20", dontuseTrailer); addBookmarkField(dir, ", ", usepreText, "773/7", dontuseTrailer); addBookmarkField(dir, ", ", usepreText, "773/4", dontuseTrailer); if (fmtUtil.fieldsExist(dir, "773/24")) { addBookmarkField(dir, "ISSN", "773/24"); } else if (fmtUtil.fieldsExist(dir, "022/1")) { addBookmarkField(dir, "ISSN", "022/1"); } else { fmtUtil.addText("\n"); } addBookmarkField(dir, "IN", "779/*"); if (fmtUtil.fieldsExist(dir, "260/2")) { addBookmarkField(dir, useLabel, "Publisher", "260/1", dontuseTrailer); addBookmarkField(dir, ": ", usepreText, "260/2", useTrailer); } else if (fmtUtil.fieldsExist(dir, "773/3")) { addBookmarkField(dir, "Publisher", "773/3"); } addBookmarkField(dir, "Year", "260/1"); addBookmarkField(dir, "ISBN", "020/1"); addBookmarkField(dir, "Collation", "300/1"); addBookmarkField(dir, "Includes", "505/*"); addBookmarkField(dir, "Abstract", "520/1"); // Wanted each subject heading to appear on a separate line, so was not // able to use the addBookmarkField method if (fmtUtil.fieldsExist(dir, "650/1")) { fmtUtil.addText("Major Descriptors: "); fmtUtil.addText(fmtUtil.getFormattedFields("\n ", dir, "650/1")); fmtUtil.addText("\n"); } if (fmtUtil.fieldsExist(dir, "651/1")) { fmtUtil.addText("Minor Descriptors: "); fmtUtil.addText(fmtUtil.getFormattedFields("\n ", dir, "651/1")); fmtUtil.addText("\n"); } addBookmarkField(dir, "Notes", "500/1"); addBookmarkField(dir, "Language", "546/1"); addBookmarkField(dir, "Libraries", "948/8"); // finish with a couple of blank lines... fmtUtil.addText("\n\n"); return(fmtUtil.toString()); }Sample screenshot