Thesaurus
Formatting Configuration Files
Contents
Introduction
Sections in a Thesaurus Formatting Configuration File
Term
List Display Specification [termlist]
Thesaurus Tree Display Specification [thestree]
Example
Introduction
Formatting a thesaurus
tree display and formatting a term list from a thesaurus database are
specific applications of WebZ's
rules-based formatting, which uses configuration files with
display and rule specifications to provide inputs to one or more Java
formatting classes.
The following graphic
illustrates the part of the process flow for vocabulary-assisted searching
that deals with displaying a term list from the thesaurus database and
displaying a thesaurus tree.
The WebZ Out-of-the-Box
Interface (OBI), version 1, contains formatting configuration files for
thesaurus databases accessible from the OBI for demonstration purposes:
PsycInfo, ERIC, Library of Congress Subject Headings (LCSH), and Medical
Subject Headings (MeSH). In the OBI, version 1, WorldCat is associated
with LCSH and Medline is associated with Mesh
The formatting configuration
files for these thesauri are PsycThesaurusFormats.ini, ERICThesaurusFormats.ini,
LCSHFormats.ini, and MeSHFormats.ini, respectively. They reside in the
<WebZ_root>/ini/format/obiv1/ directory. For creating formatting
configuration files for other thesaurus databases, contact
SiteSearch Support for assistance.
Sections
in a Thesaurus Formatting Configuration File
The following
sections make up the file:
Term
List Display Specification [termlist]
This display specification
has one formatting rule, rtltree, which is described below.
[rltree] Rule
Specification
Variable
|
Description
|
class |
Java class that
performs the formatting.
|
name |
Name of the
hashtable that SaveTermFinderResults (ORG.oclc.fmts.rules.SaveTermFinderResults)
uses to store data for the term list. |
field* |
Fields from
which to extract data in the records retrieved for the term finder
search from the thesaurus database by the TermFinderQuery verb (ORG.oclc.obi.extverb.TermFinderQuery). |
value* |
Parameters
that indicate how to store the data in the hashtable:
- Text refers
to both the display term and the search term
- hotTASTerm
builds a hot link for the term so that the patron can click this
link to view a thesaurus
- usedfor
adds the "used for" line to a term when the thesaurus indicates
that the term should be used in place of another term.
|
usedforbeforeLabelWrapperName
usedForAfterLabelWrapperName
usedForSeparatorWrapperName
usedForTrailerWrapperName
|
dataWrapper
specifications in the interface display gadgets configuration file
(such as frameDisplayGadgets.ini or noframesDisplayGadgets.ini in
the OBI, version1) for the TermListDisplay gadget (ORG.oclc.gadgets.TermListDisplay). |
Thesaurus
Tree Display Specification [thestree]
This display specification
builds a thesaurus tree from a single record retrieved from the thesaurus
database when a patron clicks a hot
link on a term list created from the thesaurus database or a tree
icon on the full record display from a database associated with a thesaurus.
The Java class ORG.oclc.obi.extverb.ThesaurusQuery
retrieves the corresponding record from the thesaurus database. Each rule
specification uses the Java class ORG.oclc.fmts.rules.SaveTermFinderResults
to extract fields from the record and save them in a hashtable so that
they can be displayed by a formatting gadget that populates the thesaurus
tree display screen (ORG.oclc.gadgets.ThesTreeDisplay
in the OBI, version 1). The following graphic shows how each rule specification
contributes to creating the thesaurus tree display in the OBI, version
1.
[thestree] Rule
Specifications
Each rule specification
is similar, and includes the following lines:
Variable
|
Description
|
class
|
Java class that
performs the formatting.
|
Name
|
Name of the
hashtable that SaveTermFinderResults ((ORG.oclc.fmts.rules.SaveTermFinderResults)
uses to store data for the term list.
|
Field# |
Fields
from which to extract data in the record retrieved from the thesaurus
database. Each rule specification refers to a different field or fields. |
value*
|
Parameters that
indicate how to store the data in the hashtable:
- Text refers
to both the display term and the search term
- hotTASTerm
builds a hot link for the term so that the patron can click this
link to view its thesaurus tree
While every
rule specification contains the text parameter, only the rule specifications
that build hot links to another thesaurus tree use the hotTASTerm
parameter. Therefore, the [mainterm] and [scopenote] sections, which
refer to the term for which a thesaurus tree is displayed and a
clarification of the term, respectively, do not require this parameter.
The other sections of the thesaurus tree display broader, narrower,
and related terms, so they use this parameter to add hot links to
other thesaurus entries.
|
This display specification
should produce a similar thesaurus tree for other thesaurus databases,
provided that the field specifications refer to the correct fields and
subfields in the database for each section of the thesaurus tree. If the
thesaurus database has additional fields, you must modify the Java classes
that build the thesaurus tree (ORG.oclc.gadgets.ThesTreeDisplay
and ORG.oclc.fmts.rules.SaveTermFinderResults).
Example
PsycThesaurusFormats.ini
# The related termlist display [termlist] rule* = rtltree
#The thesaurus tree display [thestree] rule* = broadtree rule* = mainterm rule* = relatedtree rule* = narrowtree rule* = scopenote
[rtltree] class = ORG.oclc.fmts.rules.SaveTermFinderResults name = TermListTable field* = 150,151(sep='@',repeatsfld='a')|a(sep='@') field* = 450,451(sep='+',repeatsfld='a')|a(sep='+') value* = text value* = hotTASTerm value* = usedFor usedforbeforeLabelWrapperName = ThesaurusUsedForBeforeLabel usedForAfterLabelWrapperName = ThesaurusUsedForAfterLabel usedForSeparatorWrapperName = ThesaurusUsedForSeparator usedForTrailerWrapperName = ThesaurusUsedForTrailer
[broadtree] class = ORG.oclc.fmts.rules.SaveTermFinderResults name = BroadTerms field* = 550,551(sep='@@',repeatsfld='a')|a(sep='@@') value* = text value* = hotTASTerm
[narrowtree] class = ORG.oclc.fmts.rules.SaveTermFinderResults name = NarrowTerms field* = 1350(sep='@@',repeatsfld='a')|a(sep='@@') value* = text value* = hotTASTerm
[relatedtree] class = ORG.oclc.fmts.rules.SaveTermFinderResults name = RelatedTerms field* = 1450,450,451(sep='@@',repeatsfld='a')|a(sep='@@') value* = text value* = hotTASTerm
[mainterm] class = ORG.oclc.fmts.rules.SaveTermFinderResults name = MainTerm field* = 150,151(sep='@',repeatsfld='a')|a(sep='@') value* = text
[scopenote] class = ORG.oclc.fmts.rules.SaveTermFinderResults name = ScopeNote field* = 680|a,i,x-z(sep='; ') value* = text
See Also
WebZ
and Vocabulary-Assisted Searching
Vocabulary-Assisted Searching Process Flow
Configuration Files that Support Vocabulary-Assisted
Searching
Configuring Databases to Use Vocabulary-Assisted
Searching with its Thesaurus Database
Formatting
Specifications
Formatting Configuration Files
|