|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ORG.oclc.fmts.rules.RuleUtil
The RuleUtil class is the base utility class for all the record display rules used by the RulesBasedDisplayGenerator to created formatted record data. It provides some basic utilities for all the display formatting rules classes.
RulesBasedDisplayGenerator
,
RuleSpec
,
DisplayUserData
Constructor Summary | |
RuleUtil()
|
Method Summary | |
void |
appendEntityData(String entityName,
FormatBerUtil fmtUtil,
String separatorB4Entity,
DisplayUserData userData)
Appends the data retrieved from the input entity name to the output formatting buffer held in the FormatBerUtil object. |
static String |
getData(DataDir dir,
RuleSpec ruleSpec,
FormatBerUtil fmtUtil,
boolean doDiacritics,
boolean firstOccurrenceOnly,
boolean makeAnchor)
Invokes the getData method with a lineBreak character of space(' ') to generate a String containing data from the input DataDir by retrieving the fields specified in the input RuleSpec object. |
static String |
getData(DataDir dir,
RuleSpec ruleSpec,
FormatBerUtil fmtUtil,
boolean doDiacritics,
boolean firstOccurrenceOnly,
boolean makeAnchor,
String lineBreak)
Generates a String containing data from the input DataDir by retrieving the fields specified in the input RuleSpec object. |
static String |
getWrapperData(String wrapperName,
DisplayUserData userData)
Retrieves the wrapper data value for the input wrapper name. |
static String |
getWrapperData(String wrapperName,
String defaultVal,
DisplayUserData userData)
Retrieves the wrapper data value for the input wrapper name and returns the default value when the entry is not found. |
static String |
getWrapperDataFromRuleParm(RuleSpec ruleSpec,
String ruleParmName,
String defaultParmName,
DisplayUserData userData)
Retrieves the input parameter from the RuleSpec rules, then retrieves the wrapper data string for the named parameter and uses the default when either the rule parameter does not exist or the wrapper data element does not exist. |
static String |
labelMaker(String text,
String begLabel,
String endLabel)
Creates a label from some text and uses the "beforeFieldLabel" and "afterFieldLabel" entries in the user's DisplayUserData wrapper data object to pre-pend and append to the data. |
void |
saveDataInEntity(String entityName,
String data,
String entitySeparator,
DisplayUserData userData)
Saves and Appends the input data string in the user state object in the named entity and separates any existing entity data with the input entity separator. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RuleUtil()
Method Detail |
public static final String getWrapperData(String wrapperName, DisplayUserData userData)
wrapperName
- a String that contains the name of the wrapper item.userData
- the DisplayUserData object containing the user's
display formatting context.public static final String getWrapperData(String wrapperName, String defaultVal, DisplayUserData userData)
wrapperName
- a String that contains the name of the wrapper item.defaultVal
- a String that contains the default value when the
wrapper item is not located.userData
- the DisplayUserData object containing the user's
display formatting context.public static final String getWrapperDataFromRuleParm(RuleSpec ruleSpec, String ruleParmName, String defaultParmName, DisplayUserData userData)
wrapperName
- a String that contains the name of the wrapper item.defaultVal
- a String that contains the default value when the
wrapper item is not located.userData
- the DisplayUserData object containing the user's
display formatting context.public static final String labelMaker(String text, String begLabel, String endLabel)
text
- a String that contains the text to be made into a labelbegLabel
- String to append before the textendLabel
- String to append after the textpublic final void appendEntityData(String entityName, FormatBerUtil fmtUtil, String separatorB4Entity, DisplayUserData userData)
entityName
- the name of the entity to store the datafmtUtil
- the FormatBerUtil object holding the format buffer.separatorB4Entity
- the string to append to the existing formatting
buffer before adding the entity data.userData
- the DisplayUserData object containing the
user's context.public final void saveDataInEntity(String entityName, String data, String entitySeparator, DisplayUserData userData)
entityName
- the name of the entity to store the datadata
- the string to storeentitySeparator
- the string to append to the existing
entity data before adding the input datauserData
- the DisplayUserData object containing the
user's context.public static final String getData(DataDir dir, RuleSpec ruleSpec, FormatBerUtil fmtUtil, boolean doDiacritics, boolean firstOccurrenceOnly, boolean makeAnchor)
dir
- the DataDir object containing the recordruleSpec
- the RuleSpec object defining the fields to retrievedoDiacritics
- the flag indicating whether diacritics should be
translated to HTMLfirstOccurrenceOnly
- flag indicating whether to stop the
field lookup after the first field is locatedmakeAnchor
- flag indicating whether to create hot-linkspublic static final String getData(DataDir dir, RuleSpec ruleSpec, FormatBerUtil fmtUtil, boolean doDiacritics, boolean firstOccurrenceOnly, boolean makeAnchor, String lineBreak)
dir
- the DataDir object containing the recordruleSpec
- the RuleSpec object defining the fields to retrievedoDiacritics
- the flag indicating whether diacritics should be
translated to HTMLfirstOccurrenceOnly
- flag indicating whether to stop the
field lookup after the first field is locatedmakeAnchor
- flag indicating whether to create hot-linkslineBreak
- the String defining what the line break
character is.
|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |