ORG.oclc.fmts.rules
Class Add856
java.lang.Object
|
+--ORG.oclc.fmts.rules.RuleUtil
|
+--ORG.oclc.fmts.rules.Add856
- public class Add856
- extends RuleUtil
- implements DisplayRule
The Add856 class is a record formatting rule that handles
the MARC 856 field. It can create a hot link for the 856/u field
as well as create a mailto anchor for the 856/m if requested.
The HTML or Text specifications defined in the DisplayUserData
object are used to delimit data found in the input record to create
the formatted text.
The additional parameters this rule recognizes are:
addMailToLink
true or false to indicate whether to make the
contact field e-mail address a mailto: link where the default value
is false.
beforeLabelWrapperNameThe name of the data wrapper
entry that has the string to append before the field display label,
default, if not specified, is the wrapper element named
beforeFieldLabel
.
afterLabelWrapperNameThe name of the data wrapper
entry that has the string to append after the field display label, where
the default, if not specified, is the wrapper element named
afterFieldLabel
fieldTrailerWrapperNameThe name of the data wrapper
entry that has the string to append after the field data, where
the default, if not specified, is the wrapper element named
fieldTrailer
.
The special wrapper data entries that are recognized:
before856ItemLabel
data before an item label in the 856 field,
where the default html value is an "\" and text is an empty string.
after856ItemLabel
data after an item label in the 856 field, where
the default html value is "" and text is an empty string.
856ItemTrailer
data after an 856 item, where the default html value
is a break and text is a new line.
- See Also:
RuleSpec
,
FormatBerUtil
,
DisplayUserData
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Add856
public Add856()
doRule
public void doRule(DataDir dir,
int recordNumber,
RuleSpec ruleSpec,
FormatBerUtil fmtUtil,
DisplayUserData userData)
- Executes the doRule logic to add formatted 856 data to the format
buffer held in the input FormatBerUtil object.
- Specified by:
- doRule in interface DisplayRule
- Parameters:
dir
- the DataDir object containing the data recordrecordNumber
- the record number of the item within the listruleSpec
- the field specification for locating the datafmtUtil
- the FormatBerUtil object containing the current formatted
data buffer and the formatting utilities.userData
- the DisplayUserData object containing the user's
context for formatting the data records.