Class MetadataVocabTermsGroups
- All Implemented Interfaces:
Serializable,MetadataVocab,ContentHandler
Controlled vocabulary is stored in XML files and read into the hierarchical
class data structure via a SAX reader. Various methods are provided for
representing the vocabulary through a Web interface (HTML/Javascript) using
JSP scriptlet calls or custom tags (see org.dlese.dpc.vocab.tags).
Methods that might be usefull outside of any particular UI are as follows:
- getFieldSystemId
- getFieldValueIdPairExists
- getFieldValueSystemId
- getMetaNameOfId
- getUiLabelOf
- getUiLabelOfSystemIds
Method descriptions often use the following terms:
- Field - The first half of the field/value vocabulary scheme
- Value - The second half of the field/value vocabulary scheme
- Metadata name - The descriptive name given to a vocabulary field or value
- Encoded Id - The compact unique identifier that the management system assigns to a particular vocabulary field or value (sometimes referred to as "system Id")
The last two terms are often used in combination with the first two. For example, "Encoded field Id" refers to the unique system Id of a vocabulary field.
Most public methods take an initial parameter called "system", which is a period-seperated trio that corresponds to the system/interface/language attributes of the XML files. To retreive values associated with the english language version of the default DDS interface, for example, one would pass the string "dds.default.en-us".
Almost all of the public methods that produce lists for UI display take a parameter named "group". This is a colon-seperated identifier of the spot within the vocabulary hierarchy which is being requested for display. Passing "topic:geography" would return a representation of only the metadata entries that fall under the "geography" sub-heading in the "topic" category. The colon is not always necessary, however--passing simply "topic" will return a represenation of all entries in the "topic" category.
- Author:
- Ryan Deardorff
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a feature to the Error attribute of the MetadataVocabOPML objectvoidaddMessage(String msg) Adds a feature to the Message attribute of the MetadataVocabOPML objectvoidcharacters(char[] ch, int start, int length) (SAX) Element data (characters between tags)voidcharactersDefinition(char[] ch, int start, int length) (SAX) Element data for definitionsvoidcharactersUI(char[] ch, int start, int length) (SAX) Element data for UIsvoidWhen all vocabs are loaded, generate the Lucene queries, register all current UI labels into the database, and close any database connectionvoid(SAX) Invoked at the end of parsing.voidendElement(String namespaceURI, String localName, String qName) (SAX) Invoked upon closing tag of an XML elementvoidendElementDefinition(String namespaceURI, String localName, String qName) (SAX) End element for definitionsvoidendElementUI(String namespaceURI, String localName, String qName) (SAX) End element for UIsvoidendPrefixMapping(String prefix) (SAX) Required by SAX, but not used herefindVocabNode(String system, String fieldName, String valueName) Within a given system (system.interface.language), find the node that contains the given value for its 'name' attribute.getCacheValuesInOrder(String system, String group, Map cache) Given a cache (Map) of vocab values, this method returns a list of those values in the order that they are defined in their groups file.getCurrentVersion(String metaFramework) Gets the currentVersion attribute of the MetadataVocabTermsGroups objectGets the errors attribute of the MetadataVocab objectgetFieldSystemId(String field) Gets the encoded field Id of the given metadata fieldbooleangetFieldValueIdPairExists(String fieldId, String valueId) Does a vocabulary definition exist for the given encoded field/value Ids?getFieldValueSystemId(String field, String value) Gets the encoded value Id of the given metadata field/value pairGets the messages attribute of the MetadataVocab objectgetMetaFormatOfField(String field) Gets the metaFormatOfField attribute of the MetadataVocabTermsGroups objectgetMetaNameOfId(String system, String fieldId, String valueId) Gets the metadata value or field name of the given encoded field and value Ids.Gets the oPML attribute of the MetadataVocabTermsGroups objectgetOPML(String metaFormat, String audience, String language, String field, boolean includeXmlDeclaration) Gets the oPML attribute of the MetadataVocabTermsGroups objectGets the OPML for a given format/version/audience/languagegetOPML(String metaFormat, String metaVersion, String audience, String language, String field, boolean includeXmlDeclaration) Gets the oPML attribute of the MetadataVocabTermsGroups objectgetResponseOPML(PageContext context) Gets the responseGroup attribute of the MetadataVocabOPML objectgetTopLevelAbbrevLabelOf(String system, String metadataField, String systemFieldId, String systemValueId) Gets the topLevelAbbrevLabelOf attribute of the MetadataVocab objectgetTranslatedField(String metaFormat, String field) Gets the translatedField attribute of the MetadataVocabTermsGroups objectgetTranslatedField(String metaFormat, String metaVersion, String field) Gets the translated FIELD NAME/ID of the given FIELD+VALUE NAMEs/IDsgetTranslatedFieldPath(String metaFormat, String field) Gets the translatedFieldPath attribute of the MetadataVocabTermsGroups objectgetTranslatedFieldPath(String metaFormat, String metaVersion, String field) Gets the translatedFieldPath attribute of the MetadataVocabTermsGroups objectgetTranslatedValue(String metaFormat, String field, String value) Gets the translatedValue attribute of the MetadataVocabTermsGroups objectgetTranslatedValue(String metaFormat, String metaVersion, String field, String value) Gets the translated VALUE NAME/ID of the given FIELD NAME/IDgetUiFieldLabel(String audience, String language, String field, boolean abbrev) Gets the uiFieldLabel attribute of the MetadataVocabTermsGroups objectgetUiFieldLabel(String metaFormat, String audience, String language, String field, boolean abbrev) Gets the UI label associated with the given FIELD NAME/ID, using the current or most recently loaded metadata format version numbergetUiFieldLabel(String metaFormat, String metaVersion, String audience, String language, String field) Gets the non-abbreviated UI label associated with the given FIELD NAME/IDgetUiFieldLabel(String metaFormat, String metaVersion, String audience, String language, String field, boolean abbrev) Gets the UI label associated with the given FIELD NAME/IDgetUiLabelOf(String system, String metadataField, String metadataValue) getUiLabelOf(String system, String metadataField, String metadataValue, boolean abbreviated) Gets the UI label of the given metadata field/value pairgetUiLabelOfFieldId(String fieldId) Gets the uiLabelOfFieldId attribute of the MetadataVocab objectgetUiLabelOfSystemIds(String system, String systemFieldId, String systemValueId) Gets the full (non-abbreviated) UI label of the given encoded field/value Id pairgetUiLabelOfSystemIds(String system, String systemFieldId, String systemValueId, boolean abbreviated) Gets the UI label of the given encoded field/value Id pairGets the "display" attribute value for the given field/value vocab using the CURRENT metadata framework versiongetUiValueDisplay(String metaFormat, String metaVersion, String audience, String language, String field, String value) Gets the "display" attribute value for the given field/value vocabgetUiValueLabel(String audience, String language, String field, String value, boolean abbrev) Gets the uiValueLabel attribute of the MetadataVocabTermsGroups objectgetUiValueLabel(String metaFormat, String audience, String language, String field, String value, boolean abbrev) Gets the UI label associated with the given FIELD+VALUE NAMES/IDS, using the current or most recently loaded metadata format version numbergetUiValueLabel(String metaFormat, String metaVersion, String audience, String language, String field, String value) Gets the non-abbreviated UI label associated with the given FIELD+VALUE NAMES/IDSgetUiValueLabel(String metaFormat, String metaVersion, String audience, String language, String field, String value, boolean abbrev) Gets the UI label associated with the given FIELD+VALUE NAMES/IDSgetVocabCheckbox(String groupTop, String value, String label, MetadataVocabInputState inputState) Returns a SINGLE HTML CHECKBOX input of the specified part of the vocabulary.getVocabCheckboxes(String system, String group, int size, String tdWidth, boolean skipTopRow, MetadataVocabInputState inputState) Returns an HTML TABLE of CHECKBOX inputs of the specified part of the vocabulary.Gets the vocabFieldIds attribute of the MetadataVocab objectgetVocabHiddenInputs(String system, String group, MetadataVocabInputState inputState) Generates HTML HIDDEN inputs of the specified part of the vocabulary.getVocabNode(String metaFormat, String audience, String language, String fieldName, String valueName) Gets the vocabNode attribute of the MetadataVocabTermsGroups objectgetVocabNodes(String system, String group) Gets the vocabNodes attribute of the MetadataVocab objectgetVocabNodes(String metaFormat, String audience, String language, String field) Gets the vocabNodes attribute of the MetadataVocabTermsGroups objectGets the vocabNodes attribute of the MetadataVocabTermsGroups objectgetVocabSelectList(String system, String group, int size, MetadataVocabInputState inputState) Returns an HTML SELECT list of the specified part of the vocabulary.Gets the set of UI system interfaces (i.e., "dds.descr.en-us") that this vocabulary is defined forgetVocabTreeMenu(String system, String language, String group, PageContext page) Generates a Javascript Tree Menu (collapsable hierarchy) of the specified part of the vocabularyvoidignorableWhitespace(char[] ch, int start, int length) (SAX) Reports any whitespace that is ignored because it falls outside of the DTD or schema definition--usefull for re-generating the file with indents intact.nonWrappedLabel(String label) Replaces "||" in label values with spacesvoidprocessingInstruction(String target, String data) (SAX) Required by SAX, but not used herevoidreportError(String err) Log an errorvoidreportMessage(String msg) Log a messagevoidsetDocumentLocator(Locator locator) (SAX) Sets the SAX locator, which indicates the current position of the parser within the document (line number, column number).protected voidsetNodesIsLastInSubList(VocabList list, boolean topList) Sets the isLastInSubList attribute of each vocab nodevoidsetParsingDefinitions(boolean bool) (SAX) Not strictly part of the SAX interface, but we use this to figure out which type of XML we're parsing (definitions/terms vs.voidsetResponseGroup(PageContext context, String metaFormat, String audience, String language, String field) Initiate the re-ordering/grouping/labeling of a flat list of metadata values in a search response (Services or otherwise) by indicating an audience grouping (OPML tree) sans versionvoidsetResponseGroup(PageContext context, String metaFramework, String metaVersion, String audience, String language, String field) Gets the responseGroup attribute of the MetadataVocabOPML objectvoidsetResponseList(String[] values, PageContext context) Adds an ArrayList of metadata values to the re-ordering/grouping/labeling cachevoidsetResponseList(ArrayList values, PageContext context) Adds an ArrayList of metadata values to the re-ordering/grouping/labeling cachevoidsetResponseValue(String value, PageContext context) Caches a response value for rendering within proper order/groupingvoidskippedEntity(String name) (SAX) Required by SAX, but not used herevoid(SAX) Invoked at the start of any document parsevoidstartElement(String namespaceURI, String localName, String qName, Attributes atts) (SAX) Invoked upon opening tag of an XML elementvoidstartElementDefinition(String namespaceURI, String localName, String qName, Attributes atts) (SAX) Invoked upon opening tag of a definitions XML elementvoidstartElementUI(String namespaceURI, String localName, String qName, Attributes atts) (SAX) Start element for the UI filesvoidstartPrefixMapping(String prefix, String uri) (SAX) Required by SAX, but not used herewrappedLabel(String label) Replaces "||" in label values with <br> Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
vocab
-
vocabCompare
-
-
Constructor Details
-
MetadataVocabTermsGroups
public MetadataVocabTermsGroups(String sqlDriver, String sqlURL, String sqlUser, String sqlPassword, String vocabTextFile) Constructor for the MetadataVocab object- Parameters:
sqlDriver-sqlURL-sqlUser-sqlPassword-vocabTextFile-
-
MetadataVocabTermsGroups
public MetadataVocabTermsGroups()Constructor for the MetadataVocab object
-
-
Method Details
-
addError
Adds a feature to the Error attribute of the MetadataVocabOPML object- Specified by:
addErrorin interfaceMetadataVocab- Parameters:
err- The feature to be added to the Error attribute
-
addMessage
Adds a feature to the Message attribute of the MetadataVocabOPML object- Specified by:
addMessagein interfaceMetadataVocab- Parameters:
msg- The feature to be added to the Message attribute
-
getMessages
Gets the messages attribute of the MetadataVocab object- Specified by:
getMessagesin interfaceMetadataVocab- Returns:
- The messages value
-
getErrors
Gets the errors attribute of the MetadataVocab object- Specified by:
getErrorsin interfaceMetadataVocab- Returns:
- The errors value
-
getVocabSystemInterfaces
Gets the set of UI system interfaces (i.e., "dds.descr.en-us") that this vocabulary is defined for- Specified by:
getVocabSystemInterfacesin interfaceMetadataVocab- Returns:
- The vocabSystemInterfaces value
-
getMetaNameOfId
Gets the metadata value or field name of the given encoded field and value Ids. Pass "" (empty string) for valueId to have it return the metadata field name (instead of value).- Specified by:
getMetaNameOfIdin interfaceMetadataVocab- Parameters:
system- Vocabulary system/interface/language trio, i.e. "dds.default.en-us"fieldId- Encoded vocabulary field IdvalueId- Encoded vocabulary value Id- Returns:
- The metaNameOfId value
- See Also:
-
getFieldValueIdPairExists
Does a vocabulary definition exist for the given encoded field/value Ids?- Specified by:
getFieldValueIdPairExistsin interfaceMetadataVocab- Parameters:
fieldId- Encoded vocabulary field IdvalueId- Encoded vocabulary value Id- Returns:
- The fieldValueIdPairExists value
-
getFieldValueSystemId
Gets the encoded value Id of the given metadata field/value pair- Specified by:
getFieldValueSystemIdin interfaceMetadataVocab- Parameters:
field- Metadata field namevalue- Metadata value name- Returns:
- The encoded value Id
- Throws:
Exception
-
getFieldSystemId
Gets the encoded field Id of the given metadata field- Specified by:
getFieldSystemIdin interfaceMetadataVocab- Parameters:
field- Metadata field name- Returns:
- The encoded field Id
- Throws:
Exception
-
getUiLabelOf
public String getUiLabelOf(String system, String metadataField, String metadataValue, boolean abbreviated) Gets the UI label of the given metadata field/value pair- Specified by:
getUiLabelOfin interfaceMetadataVocab- Parameters:
system- Vocabulary system/interface/language trio, i.e. "dds.default.en-us"metadataField- Metadata field namemetadataValue- Metadata value nameabbreviated- Return the abbreviated form of the UI label?- Returns:
- The user interface label associated with the given vocabulary value
-
getUiLabelOf
- Specified by:
getUiLabelOfin interfaceMetadataVocab- Parameters:
system- Vocabulary system/interface/language trio, i.e. "dds.default.en-us"metadataField- Metadata field namemetadataValue- Metadata value name- Returns:
- The user interface label associated with the given vocabulary value
-
getUiLabelOfFieldId
Gets the uiLabelOfFieldId attribute of the MetadataVocab object- Specified by:
getUiLabelOfFieldIdin interfaceMetadataVocab- Parameters:
fieldId- Description of the Parameter- Returns:
- The uiLabelOfFieldId value
-
getUiLabelOfSystemIds
public String getUiLabelOfSystemIds(String system, String systemFieldId, String systemValueId, boolean abbreviated) Gets the UI label of the given encoded field/value Id pair- Specified by:
getUiLabelOfSystemIdsin interfaceMetadataVocab- Parameters:
system- Vocabulary system/interface/language trio, i.e. "dds.default.en-us"systemFieldId- Encoded field IdsystemValueId- Encoded value Idabbreviated- Return the abbreviated form of the UI label?- Returns:
- The user interface label associated with the given vocabulary value
-
getUiLabelOfSystemIds
Gets the full (non-abbreviated) UI label of the given encoded field/value Id pair- Specified by:
getUiLabelOfSystemIdsin interfaceMetadataVocab- Parameters:
system- Vocabulary system/interface/language trio, i.e. "dds.default.en-us"systemFieldId- Encoded field IdsystemValueId- Encoded value Id- Returns:
- The user interface label associated with the given vocabulary value
-
getTopLevelAbbrevLabelOf
public String getTopLevelAbbrevLabelOf(String system, String metadataField, String systemFieldId, String systemValueId) Gets the topLevelAbbrevLabelOf attribute of the MetadataVocab object- Specified by:
getTopLevelAbbrevLabelOfin interfaceMetadataVocab- Parameters:
system-metadataField-systemFieldId-systemValueId-- Returns:
- The topLevelAbbrevLabelOf value
-
getVocabNodes
Gets the vocabNodes attribute of the MetadataVocab object- Specified by:
getVocabNodesin interfaceMetadataVocab- Parameters:
system-group-- Returns:
- The vocabNodes value
-
getVocabNodes
Gets the vocabNodes attribute of the MetadataVocabTermsGroups object- Specified by:
getVocabNodesin interfaceMetadataVocab- Parameters:
metaFormat-audience-language-field-- Returns:
- The vocabNodes value
-
getVocabNodes
public ArrayList getVocabNodes(String metaFormat, String audience, String language, String field, String group) Gets the vocabNodes attribute of the MetadataVocabTermsGroups object- Specified by:
getVocabNodesin interfaceMetadataVocab- Parameters:
metaFormat-audience-language-field-group-- Returns:
- The vocabNodes value
-
getVocabSelectList
public String getVocabSelectList(String system, String group, int size, MetadataVocabInputState inputState) Returns an HTML SELECT list of the specified part of the vocabulary.- Specified by:
getVocabSelectListin interfaceMetadataVocab- Parameters:
system-group- colon-seperated specifier of the part of the vocab hierarchy which is to be displayedsize- size (height) of the SELECT listinputState-- Returns:
- The vocabSelectList value
-
getVocabCheckboxes
public String getVocabCheckboxes(String system, String group, int size, String tdWidth, boolean skipTopRow, MetadataVocabInputState inputState) Returns an HTML TABLE of CHECKBOX inputs of the specified part of the vocabulary.- Specified by:
getVocabCheckboxesin interfaceMetadataVocab- Parameters:
system-group- colon-seperated specifier of the part of the vocab hierarchy which is to be displayedsize- how many inputs to display before starting a new column in the tabletdWidth- value inserted into the width param of the TD tagskipTopRow- Should the top row of checkboxes (next to All | Clear) be skipped?inputState-- Returns:
- the HTML code
-
getVocabCheckbox
public String getVocabCheckbox(String groupTop, String value, String label, MetadataVocabInputState inputState) Returns a SINGLE HTML CHECKBOX input of the specified part of the vocabulary.- Specified by:
getVocabCheckboxin interfaceMetadataVocab- Parameters:
groupTop- Top-level vocab groupvalue- vocab valuelabel- UI labelinputState-- Returns:
- the HTML code
-
getVocabTreeMenu
Generates a Javascript Tree Menu (collapsable hierarchy) of the specified part of the vocabulary- Specified by:
getVocabTreeMenuin interfaceMetadataVocab- Parameters:
system-language-group- colon-seperated specifier of the part of the vocab hierarchy which is to be displayedpage-- Returns:
- the Javascript code defining the menu
-
wrappedLabel
Replaces "||" in label values with <br> - Parameters:
label-- Returns:
-
nonWrappedLabel
Replaces "||" in label values with spaces- Parameters:
label-- Returns:
-
getVocabHiddenInputs
Generates HTML HIDDEN inputs of the specified part of the vocabulary.- Specified by:
getVocabHiddenInputsin interfaceMetadataVocab- Parameters:
system-group- colon-seperated specifier of the part of the vocab hierarchy which is to be displayedinputState-- Returns:
- the HTML code
-
doneLoading
public void doneLoading()When all vocabs are loaded, generate the Lucene queries, register all current UI labels into the database, and close any database connection- Specified by:
doneLoadingin interfaceMetadataVocab
-
getCacheValuesInOrder
Given a cache (Map) of vocab values, this method returns a list of those values in the order that they are defined in their groups file.- Specified by:
getCacheValuesInOrderin interfaceMetadataVocab- Parameters:
system-group-cache-- Returns:
- The orderedCacheValues value
-
getVocabFieldIds
Gets the vocabFieldIds attribute of the MetadataVocab object- Specified by:
getVocabFieldIdsin interfaceMetadataVocab- Returns:
- The vocabFieldIds value
-
setParsingDefinitions
public void setParsingDefinitions(boolean bool) (SAX) Not strictly part of the SAX interface, but we use this to figure out which type of XML we're parsing (definitions/terms vs. UI/groups)- Parameters:
bool- The new parsingDefinitions value
-
setDocumentLocator
(SAX) Sets the SAX locator, which indicates the current position of the parser within the document (line number, column number). Could be used to indicate the spot where an error occured.- Specified by:
setDocumentLocatorin interfaceContentHandler- Parameters:
locator- The new saxLocator value
-
startDocument
(SAX) Invoked at the start of any document parse- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
endDocument
(SAX) Invoked at the end of parsing. Rewrite the definitions XML if new Ids have been assigned.- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException
-
setNodesIsLastInSubList
Sets the isLastInSubList attribute of each vocab node- Parameters:
list- The new nodesIsLastInSubList valuetopList- The new nodesIsLastInSubList value
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException (SAX) Invoked upon opening tag of an XML element- Specified by:
startElementin interfaceContentHandler- Parameters:
namespaceURI-localName-qName-atts-- Throws:
SAXException
-
startElementDefinition
public void startElementDefinition(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException (SAX) Invoked upon opening tag of a definitions XML element- Parameters:
namespaceURI-localName-qName-atts-- Throws:
SAXException
-
findVocabNode
Within a given system (system.interface.language), find the node that contains the given value for its 'name' attribute.- Specified by:
findVocabNodein interfaceMetadataVocab- Parameters:
system-fieldName-valueName- pass null if only the field node is desired- Returns:
-
startElementUI
public void startElementUI(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException (SAX) Start element for the UI files- Parameters:
namespaceURI- XML namespacelocalName- local tag nameqName- fully qualified tag nameatts- tag attributes- Throws:
SAXException
-
endElement
(SAX) Invoked upon closing tag of an XML element- Specified by:
endElementin interfaceContentHandler- Parameters:
namespaceURI- XML namespacelocalName- local tag nameqName- fully qualified tag name- Throws:
SAXException
-
endElementDefinition
public void endElementDefinition(String namespaceURI, String localName, String qName) throws SAXException (SAX) End element for definitions- Parameters:
namespaceURI-localName-qName-- Throws:
SAXException
-
endElementUI
(SAX) End element for UIs- Parameters:
namespaceURI-localName-qName-- Throws:
SAXException
-
characters
(SAX) Element data (characters between tags)- Specified by:
charactersin interfaceContentHandler- Parameters:
ch-start-length-- Throws:
SAXException
-
charactersDefinition
(SAX) Element data for definitions- Parameters:
ch-start-length-- Throws:
SAXException
-
charactersUI
(SAX) Element data for UIs- Parameters:
ch- character arraystart- starting index of character datalength- length of character data- Throws:
SAXException
-
ignorableWhitespace
(SAX) Reports any whitespace that is ignored because it falls outside of the DTD or schema definition--usefull for re-generating the file with indents intact.- Specified by:
ignorableWhitespacein interfaceContentHandler- Parameters:
ch-start-length-- Throws:
SAXException
-
startPrefixMapping
(SAX) Required by SAX, but not used here- Specified by:
startPrefixMappingin interfaceContentHandler- Parameters:
prefix-uri-- Throws:
SAXException
-
endPrefixMapping
(SAX) Required by SAX, but not used here- Specified by:
endPrefixMappingin interfaceContentHandler- Parameters:
prefix-- Throws:
SAXException
-
processingInstruction
(SAX) Required by SAX, but not used here- Specified by:
processingInstructionin interfaceContentHandler- Parameters:
target-data-- Throws:
SAXException
-
skippedEntity
(SAX) Required by SAX, but not used here- Specified by:
skippedEntityin interfaceContentHandler- Parameters:
name-- Throws:
SAXException
-
reportMessage
Log a message- Specified by:
reportMessagein interfaceMetadataVocab- Parameters:
msg-
-
reportError
Log an error- Specified by:
reportErrorin interfaceMetadataVocab- Parameters:
err-
-
getCurrentVersion
Gets the currentVersion attribute of the MetadataVocabTermsGroups object- Specified by:
getCurrentVersionin interfaceMetadataVocab- Parameters:
metaFramework-- Returns:
- The currentVersion value
-
getTranslatedField
public String getTranslatedField(String metaFormat, String metaVersion, String field) throws Exception Gets the translated FIELD NAME/ID of the given FIELD+VALUE NAMEs/IDs- Specified by:
getTranslatedFieldin interfaceMetadataVocab- Parameters:
metaFormat-metaVersion-field- metadata FIELD encoded ID (i.e. "gr") or metadata NAME (i.e. "gradeRange")- Returns:
- The FIELD NAME/ID as translated from input FIELD NAME/ID
- Throws:
Exception
-
getTranslatedField
Gets the translatedField attribute of the MetadataVocabTermsGroups object- Specified by:
getTranslatedFieldin interfaceMetadataVocab- Parameters:
metaFormat-field-- Returns:
- The translatedField value
- Throws:
Exception
-
getTranslatedFieldPath
public String getTranslatedFieldPath(String metaFormat, String metaVersion, String field) throws Exception Gets the translatedFieldPath attribute of the MetadataVocabTermsGroups object- Specified by:
getTranslatedFieldPathin interfaceMetadataVocab- Parameters:
metaFormat-metaVersion-field-- Returns:
- The translatedFieldPath value
- Throws:
Exception
-
getTranslatedFieldPath
Gets the translatedFieldPath attribute of the MetadataVocabTermsGroups object- Specified by:
getTranslatedFieldPathin interfaceMetadataVocab- Parameters:
metaFormat-field-- Returns:
- The translatedFieldPath value
- Throws:
Exception
-
getTranslatedValue
public String getTranslatedValue(String metaFormat, String metaVersion, String field, String value) throws Exception Gets the translated VALUE NAME/ID of the given FIELD NAME/ID- Specified by:
getTranslatedValuein interfaceMetadataVocab- Parameters:
metaFormat-metaVersion-field- metadata FIELD encoded ID (i.e. "gr") or metadata NAME (i.e. "gradeRange")value- metadata VALUE encoded ID (i.e. "04") or metadata NAME (i.e. "DLESE:Intermediate elementary")- Returns:
- The VALUE NAME/ID as translated from input FIELD+VALUE NAMEs/IDs
- Throws:
Exception
-
getTranslatedValue
Gets the translatedValue attribute of the MetadataVocabTermsGroups object- Specified by:
getTranslatedValuein interfaceMetadataVocab- Parameters:
metaFormat-field-value-- Returns:
- The translatedValue value
- Throws:
Exception
-
getUiValueLabel
public String getUiValueLabel(String metaFormat, String metaVersion, String audience, String language, String field, String value, boolean abbrev) Gets the UI label associated with the given FIELD+VALUE NAMES/IDS- Specified by:
getUiValueLabelin interfaceMetadataVocab- Parameters:
metaFormat- metadata format (i.e. "adn")metaVersion- metadata version (i.e. "0.6.50")audience- UI audience, i.e. "community" or "cataloger"language- UI language, ie.e. "en-us"field- metadata FIELD encoded ID (i.e. "gr") or metadata NAME (i.e. "gradeRange")value- metadata VALUE encoded ID (i.e. "04") or metadata NAME (i.e. "DLESE:Intermediate elementary")abbrev- get the abbreviated version of the label?- Returns:
- The user interface label associated with the given format/version/audience/language value
-
getUiValueLabel
public String getUiValueLabel(String metaFormat, String metaVersion, String audience, String language, String field, String value) Gets the non-abbreviated UI label associated with the given FIELD+VALUE NAMES/IDS- Specified by:
getUiValueLabelin interfaceMetadataVocab- Parameters:
metaFormat- metadata format (i.e. "adn")metaVersion- metadata version (i.e. "0.6.50")audience- UI audience, i.e. "community" or "cataloger"language- UI language, ie.e. "en-us"field- metadata FIELD encoded ID (i.e. "gr") or metadata NAME (i.e. "gradeRange")value- metadata VALUE encoded ID (i.e. "04") or metadata NAME (i.e. "DLESE:Intermediate elementary")- Returns:
- The user interface label associated with the given format/version/audience/language value
-
getUiValueLabel
public String getUiValueLabel(String metaFormat, String audience, String language, String field, String value, boolean abbrev) Gets the UI label associated with the given FIELD+VALUE NAMES/IDS, using the current or most recently loaded metadata format version number- Specified by:
getUiValueLabelin interfaceMetadataVocab- Parameters:
metaFormat- metadata format (i.e. "adn")audience- UI audience, i.e. "community" or "cataloger"language- UI language, ie.e. "en-us"field- metadata FIELD encoded ID (i.e. "gr") or metadata NAME (i.e. "gradeRange")value- metadata VALUE encoded ID (i.e. "04") or metadata NAME (i.e. "DLESE:Intermediate elementary")abbrev- get the abbreviated version of the label?- Returns:
- The user interface label associated with the given format/version/audience/language value
-
setResponseGroup
public void setResponseGroup(PageContext context, String metaFramework, String metaVersion, String audience, String language, String field) Gets the responseGroup attribute of the MetadataVocabOPML object- Specified by:
setResponseGroupin interfaceMetadataVocab- Parameters:
context-metaFramework- The new responseGroup valuemetaVersion- The new responseGroup valueaudience- The new responseGroup valuelanguage- The new responseGroup valuefield- The new responseGroup value- See Also:
-
setResponseGroup
public void setResponseGroup(PageContext context, String metaFormat, String audience, String language, String field) Initiate the re-ordering/grouping/labeling of a flat list of metadata values in a search response (Services or otherwise) by indicating an audience grouping (OPML tree) sans version- Specified by:
setResponseGroupin interfaceMetadataVocab- Parameters:
context- JSP page contextmetaFormat- metadata format (i.e. "adn")audience- UI audience, i.e. "community" or "cataloger"language- UI language, i.e. "en-us"field- metadata FIELD encoded ID (i.e. "gr") or metadata NAME (i.e. "gradeRange")- See Also:
-
setResponseValue
Caches a response value for rendering within proper order/grouping- Specified by:
setResponseValuein interfaceMetadataVocab- Parameters:
value- the metadata vocab value, i.e. "DLESE:High school"context- The new response value- See Also:
-
getResponseOPML
Gets the responseGroup attribute of the MetadataVocabOPML object- Specified by:
getResponseOPMLin interfaceMetadataVocab- Parameters:
context-- Returns:
- The responseGroup value
- See Also:
-
getUiFieldLabel
public String getUiFieldLabel(String metaFormat, String metaVersion, String audience, String language, String field, boolean abbrev) Gets the UI label associated with the given FIELD NAME/ID- Specified by:
getUiFieldLabelin interfaceMetadataVocab- Parameters:
metaFormat- metadata format (i.e. "adn")metaVersion- metadata version (i.e. "0.6.50")audience- UI audience, i.e. "community" or "cataloger"language- UI language, ie.e. "en-us"field- metadata FIELD encoded ID (i.e. "gr") or metadata NAME (i.e. "gradeRange")abbrev- get the abbreviated version of the label?- Returns:
- The user interface label associated with the given format/version/audience/language value
-
getUiFieldLabel
public String getUiFieldLabel(String metaFormat, String metaVersion, String audience, String language, String field) Gets the non-abbreviated UI label associated with the given FIELD NAME/ID- Specified by:
getUiFieldLabelin interfaceMetadataVocab- Parameters:
metaFormat- metadata format (i.e. "adn")metaVersion- metadata version (i.e. "0.6.50")audience- UI audience, i.e. "community" or "cataloger"language- UI language, ie.e. "en-us"field- metadata FIELD encoded ID (i.e. "gr") or metadata NAME (i.e. "gradeRange")- Returns:
- The user interface label associated with the given format/version/audience/language value
-
getUiFieldLabel
public String getUiFieldLabel(String metaFormat, String audience, String language, String field, boolean abbrev) Gets the UI label associated with the given FIELD NAME/ID, using the current or most recently loaded metadata format version number- Specified by:
getUiFieldLabelin interfaceMetadataVocab- Parameters:
metaFormat- metadata format (i.e. "adn")audience- UI audience, i.e. "community" or "cataloger"language- UI language, ie.e. "en-us"field- metadata FIELD encoded ID (i.e. "gr") or metadata NAME (i.e. "gradeRange")abbrev- get the abbreviated version of the label?- Returns:
- The user interface label associated with the given format/version/audience/language value
-
getOPML
public String getOPML(String metaFormat, String metaVersion, String audience, String language, String field) Gets the OPML for a given format/version/audience/language- Specified by:
getOPMLin interfaceMetadataVocab- Parameters:
metaFormat- metadata format (i.e. "adn")metaVersion- metadata version (i.e. "0.6.50")audience- UI audience, i.e. "community" or "cataloger"language- UI language, i.e. "en-us"field- metadata FIELD encoded ID (i.e. "gr") or metadata NAME (i.e. "gradeRange")- Returns:
- OPML for the given format/audience
-
getOPML
Gets the oPML attribute of the MetadataVocabTermsGroups object- Specified by:
getOPMLin interfaceMetadataVocab- Parameters:
metaFormat-audience-language-field-- Returns:
- The oPML value
-
getOPML
public String getOPML(String metaFormat, String metaVersion, String audience, String language, String field, boolean includeXmlDeclaration) Gets the oPML attribute of the MetadataVocabTermsGroups object- Specified by:
getOPMLin interfaceMetadataVocab- Parameters:
metaFormat-metaVersion-audience-language-field-includeXmlDeclaration-- Returns:
- The oPML value
-
getUiValueLabel
public String getUiValueLabel(String audience, String language, String field, String value, boolean abbrev) Gets the uiValueLabel attribute of the MetadataVocabTermsGroups object- Specified by:
getUiValueLabelin interfaceMetadataVocab- Parameters:
audience-language-field-value-abbrev-- Returns:
- The uiValueLabel value
-
getUiFieldLabel
Gets the uiFieldLabel attribute of the MetadataVocabTermsGroups object- Specified by:
getUiFieldLabelin interfaceMetadataVocab- Parameters:
audience-language-field-abbrev-- Returns:
- The uiFieldLabel value
-
getUiValueDisplay
public String getUiValueDisplay(String metaFormat, String metaVersion, String audience, String language, String field, String value) Gets the "display" attribute value for the given field/value vocab- Specified by:
getUiValueDisplayin interfaceMetadataVocab- Parameters:
metaFormat- metadata format (i.e. "adn")metaVersion- metadata version (i.e. "0.6.50")audience- UI audience, i.e. "community" or "cataloger"language- UI language, i.e. "en-us"field- metadata FIELD encoded ID (i.e. "gr") or metadata NAME (i.e. "gradeRange")value- metadata VALUE encoded ID (i.e. "04") or metadata NAME (i.e. "DLESE:Intermediate elementary")- Returns:
- The uiValueDisplay value
-
getUiValueDisplay
public String getUiValueDisplay(String metaFormat, String audience, String language, String field, String value) Gets the "display" attribute value for the given field/value vocab using the CURRENT metadata framework version- Specified by:
getUiValueDisplayin interfaceMetadataVocab- Parameters:
metaFormat- metadata format (i.e. "adn")audience- UI audience, i.e. "community" or "cataloger"language- UI language, i.e. "en-us"field- metadata FIELD encoded ID (i.e. "gr") or metadata NAME (i.e. "gradeRange")value- metadata VALUE encoded ID (i.e. "04") or metadata NAME (i.e. "DLESE:Intermediate elementary")- Returns:
- The uiValueDisplay value
-
getOPML
public String getOPML(String metaFormat, String audience, String language, String field, boolean includeXmlDeclaration) Gets the oPML attribute of the MetadataVocabTermsGroups object- Specified by:
getOPMLin interfaceMetadataVocab- Parameters:
metaFormat-audience-language-field-includeXmlDeclaration-- Returns:
- The oPML value
-
getMetaFormatOfField
Gets the metaFormatOfField attribute of the MetadataVocabTermsGroups object- Specified by:
getMetaFormatOfFieldin interfaceMetadataVocab- Parameters:
field-- Returns:
- The metaFormatOfField value
-
getVocabNode
public VocabNode getVocabNode(String metaFormat, String audience, String language, String fieldName, String valueName) Gets the vocabNode attribute of the MetadataVocabTermsGroups object- Specified by:
getVocabNodein interfaceMetadataVocab- Parameters:
metaFormat-audience-language-fieldName-valueName-- Returns:
- The vocabNode value
-
setResponseList
Adds an ArrayList of metadata values to the re-ordering/grouping/labeling cache- Specified by:
setResponseListin interfaceMetadataVocab- Parameters:
values- List of metadata VALUE encoded ID (i.e. "04") or metadata NAME (i.e. "DLESE:Intermediate elementary")context- JSP page context- See Also:
-
setResponseList
Adds an ArrayList of metadata values to the re-ordering/grouping/labeling cache- Specified by:
setResponseListin interfaceMetadataVocab- Parameters:
values- List of metadata VALUE encoded ID (i.e. "04") or metadata NAME (i.e. "DLESE:Intermediate elementary")context- JSP page context- See Also:
-