public class MetadataVocabTermsGroups extends java.lang.Object implements MetadataVocab, org.xml.sax.ContentHandler, java.io.Serializable
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:
Method descriptions often use the following terms:
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.
Modifier and Type | Field and Description |
---|---|
protected VocabList |
vocab |
MetadataVocabOPML |
vocabCompare |
Constructor and Description |
---|
MetadataVocabTermsGroups()
Constructor for the MetadataVocab object
|
MetadataVocabTermsGroups(java.lang.String sqlDriver,
java.lang.String sqlURL,
java.lang.String sqlUser,
java.lang.String sqlPassword,
java.lang.String vocabTextFile)
Constructor for the MetadataVocab object
|
Modifier and Type | Method and Description |
---|---|
void |
addError(java.lang.String err)
Adds a feature to the Error attribute of the MetadataVocabOPML object
|
void |
addMessage(java.lang.String msg)
Adds a feature to the Message attribute of the MetadataVocabOPML object
|
void |
characters(char[] ch,
int start,
int length)
(SAX) Element data (characters between tags)
|
void |
charactersDefinition(char[] ch,
int start,
int length)
(SAX) Element data for definitions
|
void |
charactersUI(char[] ch,
int start,
int length)
(SAX) Element data for UIs
|
void |
doneLoading()
When all vocabs are loaded, generate the Lucene queries, register all
current UI labels into the database, and close any database connection
|
void |
endDocument()
(SAX) Invoked at the end of parsing.
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
(SAX) Invoked upon closing tag of an XML element
|
void |
endElementDefinition(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
(SAX) End element for definitions
|
void |
endElementUI(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
(SAX) End element for UIs
|
void |
endPrefixMapping(java.lang.String prefix)
(SAX) Required by SAX, but not used here
|
VocabNode |
findVocabNode(java.lang.String system,
java.lang.String fieldName,
java.lang.String valueName)
Within a given system (system.interface.language), find the node that
contains the given value for its 'name' attribute.
|
java.util.ArrayList |
getCacheValuesInOrder(java.lang.String system,
java.lang.String group,
java.util.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.
|
java.lang.String |
getCurrentVersion(java.lang.String metaFramework)
Gets the currentVersion attribute of the MetadataVocabTermsGroups object
|
java.util.ArrayList |
getErrors()
Gets the errors attribute of the MetadataVocab object
|
java.lang.String |
getFieldSystemId(java.lang.String field)
Gets the encoded field Id of the given metadata field
|
boolean |
getFieldValueIdPairExists(java.lang.String fieldId,
java.lang.String valueId)
Does a vocabulary definition exist for the given encoded field/value Ids?
|
java.lang.String |
getFieldValueSystemId(java.lang.String field,
java.lang.String value)
Gets the encoded value Id of the given metadata field/value pair
|
java.util.ArrayList |
getMessages()
Gets the messages attribute of the MetadataVocab object
|
java.lang.String |
getMetaFormatOfField(java.lang.String field)
Gets the metaFormatOfField attribute of the MetadataVocabTermsGroups object
|
java.lang.String |
getMetaNameOfId(java.lang.String system,
java.lang.String fieldId,
java.lang.String valueId)
Gets the metadata value or field name of the given encoded field and value
Ids.
|
java.lang.String |
getOPML(java.lang.String metaFormat,
java.lang.String audience,
java.lang.String language,
java.lang.String field)
Gets the oPML attribute of the MetadataVocabTermsGroups object
|
java.lang.String |
getOPML(java.lang.String metaFormat,
java.lang.String audience,
java.lang.String language,
java.lang.String field,
boolean includeXmlDeclaration)
Gets the oPML attribute of the MetadataVocabTermsGroups object
|
java.lang.String |
getOPML(java.lang.String metaFormat,
java.lang.String metaVersion,
java.lang.String audience,
java.lang.String language,
java.lang.String field)
Gets the OPML for a given format/version/audience/language
|
java.lang.String |
getOPML(java.lang.String metaFormat,
java.lang.String metaVersion,
java.lang.String audience,
java.lang.String language,
java.lang.String field,
boolean includeXmlDeclaration)
Gets the oPML attribute of the MetadataVocabTermsGroups object
|
java.lang.String |
getResponseOPML(javax.servlet.jsp.PageContext context)
Gets the responseGroup attribute of the MetadataVocabOPML object
|
java.lang.String |
getTopLevelAbbrevLabelOf(java.lang.String system,
java.lang.String metadataField,
java.lang.String systemFieldId,
java.lang.String systemValueId)
Gets the topLevelAbbrevLabelOf attribute of the MetadataVocab object
|
java.lang.String |
getTranslatedField(java.lang.String metaFormat,
java.lang.String field)
Gets the translatedField attribute of the MetadataVocabTermsGroups object
|
java.lang.String |
getTranslatedField(java.lang.String metaFormat,
java.lang.String metaVersion,
java.lang.String field)
Gets the translated FIELD NAME/ID of the given FIELD+VALUE NAMEs/IDs
|
java.lang.String |
getTranslatedFieldPath(java.lang.String metaFormat,
java.lang.String field)
Gets the translatedFieldPath attribute of the MetadataVocabTermsGroups
object
|
java.lang.String |
getTranslatedFieldPath(java.lang.String metaFormat,
java.lang.String metaVersion,
java.lang.String field)
Gets the translatedFieldPath attribute of the MetadataVocabTermsGroups
object
|
java.lang.String |
getTranslatedValue(java.lang.String metaFormat,
java.lang.String field,
java.lang.String value)
Gets the translatedValue attribute of the MetadataVocabTermsGroups object
|
java.lang.String |
getTranslatedValue(java.lang.String metaFormat,
java.lang.String metaVersion,
java.lang.String field,
java.lang.String value)
Gets the translated VALUE NAME/ID of the given FIELD NAME/ID
|
java.lang.String |
getUiFieldLabel(java.lang.String audience,
java.lang.String language,
java.lang.String field,
boolean abbrev)
Gets the uiFieldLabel attribute of the MetadataVocabTermsGroups object
|
java.lang.String |
getUiFieldLabel(java.lang.String metaFormat,
java.lang.String audience,
java.lang.String language,
java.lang.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
|
java.lang.String |
getUiFieldLabel(java.lang.String metaFormat,
java.lang.String metaVersion,
java.lang.String audience,
java.lang.String language,
java.lang.String field)
Gets the non-abbreviated UI label associated with the given FIELD NAME/ID
|
java.lang.String |
getUiFieldLabel(java.lang.String metaFormat,
java.lang.String metaVersion,
java.lang.String audience,
java.lang.String language,
java.lang.String field,
boolean abbrev)
Gets the UI label associated with the given FIELD NAME/ID
|
java.lang.String |
getUiLabelOf(java.lang.String system,
java.lang.String metadataField,
java.lang.String metadataValue)
|
java.lang.String |
getUiLabelOf(java.lang.String system,
java.lang.String metadataField,
java.lang.String metadataValue,
boolean abbreviated)
Gets the UI label of the given metadata field/value pair
|
java.lang.String |
getUiLabelOfFieldId(java.lang.String fieldId)
Gets the uiLabelOfFieldId attribute of the MetadataVocab object
|
java.lang.String |
getUiLabelOfSystemIds(java.lang.String system,
java.lang.String systemFieldId,
java.lang.String systemValueId)
Gets the full (non-abbreviated) UI label of the given encoded field/value
Id pair
|
java.lang.String |
getUiLabelOfSystemIds(java.lang.String system,
java.lang.String systemFieldId,
java.lang.String systemValueId,
boolean abbreviated)
Gets the UI label of the given encoded field/value Id pair
|
java.lang.String |
getUiValueDisplay(java.lang.String metaFormat,
java.lang.String audience,
java.lang.String language,
java.lang.String field,
java.lang.String value)
Gets the "display" attribute value for the given field/value vocab using
the CURRENT metadata framework version
|
java.lang.String |
getUiValueDisplay(java.lang.String metaFormat,
java.lang.String metaVersion,
java.lang.String audience,
java.lang.String language,
java.lang.String field,
java.lang.String value)
Gets the "display" attribute value for the given field/value vocab
|
java.lang.String |
getUiValueLabel(java.lang.String audience,
java.lang.String language,
java.lang.String field,
java.lang.String value,
boolean abbrev)
Gets the uiValueLabel attribute of the MetadataVocabTermsGroups object
|
java.lang.String |
getUiValueLabel(java.lang.String metaFormat,
java.lang.String audience,
java.lang.String language,
java.lang.String field,
java.lang.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
|
java.lang.String |
getUiValueLabel(java.lang.String metaFormat,
java.lang.String metaVersion,
java.lang.String audience,
java.lang.String language,
java.lang.String field,
java.lang.String value)
Gets the non-abbreviated UI label associated with the given FIELD+VALUE
NAMES/IDS
|
java.lang.String |
getUiValueLabel(java.lang.String metaFormat,
java.lang.String metaVersion,
java.lang.String audience,
java.lang.String language,
java.lang.String field,
java.lang.String value,
boolean abbrev)
Gets the UI label associated with the given FIELD+VALUE NAMES/IDS
|
java.lang.String |
getVocabCheckbox(java.lang.String groupTop,
java.lang.String value,
java.lang.String label,
MetadataVocabInputState inputState)
Returns a SINGLE HTML CHECKBOX input of the specified part of the
vocabulary.
|
java.lang.String |
getVocabCheckboxes(java.lang.String system,
java.lang.String group,
int size,
java.lang.String tdWidth,
boolean skipTopRow,
MetadataVocabInputState inputState)
Returns an HTML TABLE of CHECKBOX inputs of the specified part of the
vocabulary.
|
java.util.ArrayList |
getVocabFieldIds()
Gets the vocabFieldIds attribute of the MetadataVocab object
|
java.lang.String |
getVocabHiddenInputs(java.lang.String system,
java.lang.String group,
MetadataVocabInputState inputState)
Generates HTML HIDDEN inputs of the specified part of the vocabulary.
|
VocabNode |
getVocabNode(java.lang.String metaFormat,
java.lang.String audience,
java.lang.String language,
java.lang.String fieldName,
java.lang.String valueName)
Gets the vocabNode attribute of the MetadataVocabTermsGroups object
|
java.util.ArrayList |
getVocabNodes(java.lang.String system,
java.lang.String group)
Gets the vocabNodes attribute of the MetadataVocab object
|
java.util.ArrayList |
getVocabNodes(java.lang.String metaFormat,
java.lang.String audience,
java.lang.String language,
java.lang.String field)
Gets the vocabNodes attribute of the MetadataVocabTermsGroups object
|
java.util.ArrayList |
getVocabNodes(java.lang.String metaFormat,
java.lang.String audience,
java.lang.String language,
java.lang.String field,
java.lang.String group)
Gets the vocabNodes attribute of the MetadataVocabTermsGroups object
|
java.lang.String |
getVocabSelectList(java.lang.String system,
java.lang.String group,
int size,
MetadataVocabInputState inputState)
Returns an HTML SELECT list of the specified part of the vocabulary.
|
java.util.Set |
getVocabSystemInterfaces()
Gets the set of UI system interfaces (i.e., "dds.descr.en-us") that this
vocabulary is defined for
|
java.lang.String |
getVocabTreeMenu(java.lang.String system,
java.lang.String language,
java.lang.String group,
javax.servlet.jsp.PageContext page)
Generates a Javascript Tree Menu (collapsable hierarchy) of the specified
part of the vocabulary
|
void |
ignorableWhitespace(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.
|
java.lang.String |
nonWrappedLabel(java.lang.String label)
Replaces "||" in label values with spaces
|
void |
processingInstruction(java.lang.String target,
java.lang.String data)
(SAX) Required by SAX, but not used here
|
void |
reportError(java.lang.String err)
Log an error
|
void |
reportMessage(java.lang.String msg)
Log a message
|
void |
setDocumentLocator(org.xml.sax.Locator locator)
(SAX) Sets the SAX locator, which indicates the current position of the
parser within the document (line number, column number).
|
protected void |
setNodesIsLastInSubList(VocabList list,
boolean topList)
Sets the isLastInSubList attribute of each vocab node
|
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.
|
void |
setResponseGroup(javax.servlet.jsp.PageContext context,
java.lang.String metaFormat,
java.lang.String audience,
java.lang.String language,
java.lang.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
|
void |
setResponseGroup(javax.servlet.jsp.PageContext context,
java.lang.String metaFramework,
java.lang.String metaVersion,
java.lang.String audience,
java.lang.String language,
java.lang.String field)
Gets the responseGroup attribute of the MetadataVocabOPML object
|
void |
setResponseList(java.util.ArrayList values,
javax.servlet.jsp.PageContext context)
Adds an ArrayList of metadata values to the re-ordering/grouping/labeling
cache
|
void |
setResponseList(java.lang.String[] values,
javax.servlet.jsp.PageContext context)
Adds an ArrayList of metadata values to the re-ordering/grouping/labeling
cache
|
void |
setResponseValue(java.lang.String value,
javax.servlet.jsp.PageContext context)
Caches a response value for rendering within proper order/grouping
|
void |
skippedEntity(java.lang.String name)
(SAX) Required by SAX, but not used here
|
void |
startDocument()
(SAX) Invoked at the start of any document parse
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
(SAX) Invoked upon opening tag of an XML element
|
void |
startElementDefinition(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
(SAX) Invoked upon opening tag of a definitions XML element
|
void |
startElementUI(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
(SAX) Start element for the UI files
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
(SAX) Required by SAX, but not used here
|
java.lang.String |
wrappedLabel(java.lang.String label)
Replaces "||" in label values with <br>
|
protected VocabList vocab
public MetadataVocabOPML vocabCompare
public MetadataVocabTermsGroups(java.lang.String sqlDriver, java.lang.String sqlURL, java.lang.String sqlUser, java.lang.String sqlPassword, java.lang.String vocabTextFile)
sqlDriver
- sqlURL
- sqlUser
- sqlPassword
- vocabTextFile
- public MetadataVocabTermsGroups()
public void addError(java.lang.String err)
addError
in interface MetadataVocab
err
- The feature to be added to the Error attributepublic void addMessage(java.lang.String msg)
addMessage
in interface MetadataVocab
msg
- The feature to be added to the Message attributepublic java.util.ArrayList getMessages()
getMessages
in interface MetadataVocab
public java.util.ArrayList getErrors()
getErrors
in interface MetadataVocab
public java.util.Set getVocabSystemInterfaces()
getVocabSystemInterfaces
in interface MetadataVocab
public java.lang.String getMetaNameOfId(java.lang.String system, java.lang.String fieldId, java.lang.String valueId)
getMetaNameOfId
in interface MetadataVocab
system
- Vocabulary system/interface/language trio, i.e.
"dds.default.en-us"fieldId
- Encoded vocabulary field IdvalueId
- Encoded vocabulary value IdMetadataVocab#getTranslatedField(String,String,String,String,String)
,
MetadataVocab#getTranslatedValue(String,String,String,String,String,String)
public boolean getFieldValueIdPairExists(java.lang.String fieldId, java.lang.String valueId)
getFieldValueIdPairExists
in interface MetadataVocab
fieldId
- Encoded vocabulary field IdvalueId
- Encoded vocabulary value Idpublic java.lang.String getFieldValueSystemId(java.lang.String field, java.lang.String value) throws java.lang.Exception
getFieldValueSystemId
in interface MetadataVocab
field
- Metadata field namevalue
- Metadata value namejava.lang.Exception
public java.lang.String getFieldSystemId(java.lang.String field) throws java.lang.Exception
getFieldSystemId
in interface MetadataVocab
field
- Metadata field namejava.lang.Exception
public java.lang.String getUiLabelOf(java.lang.String system, java.lang.String metadataField, java.lang.String metadataValue, boolean abbreviated)
getUiLabelOf
in interface MetadataVocab
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?public java.lang.String getUiLabelOf(java.lang.String system, java.lang.String metadataField, java.lang.String metadataValue)
getUiLabelOf
in interface MetadataVocab
system
- Vocabulary system/interface/language trio, i.e.
"dds.default.en-us"metadataField
- Metadata field namemetadataValue
- Metadata value namepublic java.lang.String getUiLabelOfFieldId(java.lang.String fieldId)
getUiLabelOfFieldId
in interface MetadataVocab
fieldId
- Description of the Parameterpublic java.lang.String getUiLabelOfSystemIds(java.lang.String system, java.lang.String systemFieldId, java.lang.String systemValueId, boolean abbreviated)
getUiLabelOfSystemIds
in interface MetadataVocab
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?public java.lang.String getUiLabelOfSystemIds(java.lang.String system, java.lang.String systemFieldId, java.lang.String systemValueId)
getUiLabelOfSystemIds
in interface MetadataVocab
system
- Vocabulary system/interface/language trio, i.e.
"dds.default.en-us"systemFieldId
- Encoded field IdsystemValueId
- Encoded value Idpublic java.lang.String getTopLevelAbbrevLabelOf(java.lang.String system, java.lang.String metadataField, java.lang.String systemFieldId, java.lang.String systemValueId)
getTopLevelAbbrevLabelOf
in interface MetadataVocab
system
- metadataField
- systemFieldId
- systemValueId
- public java.util.ArrayList getVocabNodes(java.lang.String system, java.lang.String group)
getVocabNodes
in interface MetadataVocab
system
- group
- public java.util.ArrayList getVocabNodes(java.lang.String metaFormat, java.lang.String audience, java.lang.String language, java.lang.String field)
getVocabNodes
in interface MetadataVocab
metaFormat
- audience
- language
- field
- public java.util.ArrayList getVocabNodes(java.lang.String metaFormat, java.lang.String audience, java.lang.String language, java.lang.String field, java.lang.String group)
getVocabNodes
in interface MetadataVocab
metaFormat
- audience
- language
- field
- group
- public java.lang.String getVocabSelectList(java.lang.String system, java.lang.String group, int size, MetadataVocabInputState inputState)
getVocabSelectList
in interface MetadataVocab
group
- colon-seperated specifier of the part of the vocab
hierarchy which is to be displayedsize
- size (height) of the SELECT listsystem
- inputState
- public java.lang.String getVocabCheckboxes(java.lang.String system, java.lang.String group, int size, java.lang.String tdWidth, boolean skipTopRow, MetadataVocabInputState inputState)
getVocabCheckboxes
in interface MetadataVocab
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?system
- inputState
- public java.lang.String getVocabCheckbox(java.lang.String groupTop, java.lang.String value, java.lang.String label, MetadataVocabInputState inputState)
getVocabCheckbox
in interface MetadataVocab
groupTop
- Top-level vocab groupvalue
- vocab valuelabel
- UI labelinputState
- public java.lang.String getVocabTreeMenu(java.lang.String system, java.lang.String language, java.lang.String group, javax.servlet.jsp.PageContext page)
getVocabTreeMenu
in interface MetadataVocab
group
- colon-seperated specifier of the part of the vocab
hierarchy which is to be displayedsystem
- page
- language
- public java.lang.String wrappedLabel(java.lang.String label)
label
- public java.lang.String nonWrappedLabel(java.lang.String label)
label
- public java.lang.String getVocabHiddenInputs(java.lang.String system, java.lang.String group, MetadataVocabInputState inputState)
getVocabHiddenInputs
in interface MetadataVocab
group
- colon-seperated specifier of the part of the vocab
hierarchy which is to be displayedsystem
- inputState
- public void doneLoading()
doneLoading
in interface MetadataVocab
public java.util.ArrayList getCacheValuesInOrder(java.lang.String system, java.lang.String group, java.util.Map cache)
getCacheValuesInOrder
in interface MetadataVocab
cache
- system
- group
- public java.util.ArrayList getVocabFieldIds()
getVocabFieldIds
in interface MetadataVocab
public void setParsingDefinitions(boolean bool)
bool
- The new parsingDefinitions valuepublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.ContentHandler
locator
- The new saxLocator valuepublic void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
protected void setNodesIsLastInSubList(VocabList list, boolean topList)
list
- The new nodesIsLastInSubList valuetopList
- The new nodesIsLastInSubList valuepublic void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
namespaceURI
- localName
- qName
- atts
- org.xml.sax.SAXException
public void startElementDefinition(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
namespaceURI
- localName
- qName
- atts
- org.xml.sax.SAXException
public VocabNode findVocabNode(java.lang.String system, java.lang.String fieldName, java.lang.String valueName)
findVocabNode
in interface MetadataVocab
system
- fieldName
- valueName
- pass null if only the field node is desiredpublic void startElementUI(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
namespaceURI
- XML namespacelocalName
- local tag nameqName
- fully qualified tag nameatts
- tag attributesorg.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
namespaceURI
- XML namespacelocalName
- local tag nameqName
- fully qualified tag nameorg.xml.sax.SAXException
public void endElementDefinition(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
namespaceURI
- localName
- qName
- org.xml.sax.SAXException
public void endElementUI(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
namespaceURI
- localName
- qName
- org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
ch
- start
- length
- org.xml.sax.SAXException
public void charactersDefinition(char[] ch, int start, int length) throws org.xml.sax.SAXException
ch
- start
- length
- org.xml.sax.SAXException
public void charactersUI(char[] ch, int start, int length) throws org.xml.sax.SAXException
ch
- character arraystart
- starting index of character datalength
- length of character dataorg.xml.sax.SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
ch
- start
- length
- org.xml.sax.SAXException
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri) throws org.xml.sax.SAXException
startPrefixMapping
in interface org.xml.sax.ContentHandler
prefix
- uri
- org.xml.sax.SAXException
public void endPrefixMapping(java.lang.String prefix) throws org.xml.sax.SAXException
endPrefixMapping
in interface org.xml.sax.ContentHandler
prefix
- org.xml.sax.SAXException
public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.ContentHandler
target
- data
- org.xml.sax.SAXException
public void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException
skippedEntity
in interface org.xml.sax.ContentHandler
name
- org.xml.sax.SAXException
public void reportMessage(java.lang.String msg)
reportMessage
in interface MetadataVocab
msg
- public void reportError(java.lang.String err)
reportError
in interface MetadataVocab
err
- public java.lang.String getCurrentVersion(java.lang.String metaFramework)
getCurrentVersion
in interface MetadataVocab
metaFramework
- public java.lang.String getTranslatedField(java.lang.String metaFormat, java.lang.String metaVersion, java.lang.String field) throws java.lang.Exception
getTranslatedField
in interface MetadataVocab
field
- metadata FIELD encoded ID (i.e. "gr") or metadata
NAME (i.e. "gradeRange")metaFormat
- metaVersion
- java.lang.Exception
public java.lang.String getTranslatedField(java.lang.String metaFormat, java.lang.String field) throws java.lang.Exception
getTranslatedField
in interface MetadataVocab
metaFormat
- field
- java.lang.Exception
public java.lang.String getTranslatedFieldPath(java.lang.String metaFormat, java.lang.String metaVersion, java.lang.String field) throws java.lang.Exception
getTranslatedFieldPath
in interface MetadataVocab
metaFormat
- metaVersion
- field
- java.lang.Exception
public java.lang.String getTranslatedFieldPath(java.lang.String metaFormat, java.lang.String field) throws java.lang.Exception
getTranslatedFieldPath
in interface MetadataVocab
metaFormat
- field
- java.lang.Exception
public java.lang.String getTranslatedValue(java.lang.String metaFormat, java.lang.String metaVersion, java.lang.String field, java.lang.String value) throws java.lang.Exception
getTranslatedValue
in interface MetadataVocab
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")metaFormat
- metaVersion
- java.lang.Exception
public java.lang.String getTranslatedValue(java.lang.String metaFormat, java.lang.String field, java.lang.String value) throws java.lang.Exception
getTranslatedValue
in interface MetadataVocab
metaFormat
- field
- value
- java.lang.Exception
public java.lang.String getUiValueLabel(java.lang.String metaFormat, java.lang.String metaVersion, java.lang.String audience, java.lang.String language, java.lang.String field, java.lang.String value, boolean abbrev)
getUiValueLabel
in interface MetadataVocab
metaFormat
- metadata format (i.e. "adn")metaVersion
- metadata version (i.e. "0.6.50")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?audience
- UI audience, i.e. "community" or "cataloger"language
- UI language, ie.e. "en-us"public java.lang.String getUiValueLabel(java.lang.String metaFormat, java.lang.String metaVersion, java.lang.String audience, java.lang.String language, java.lang.String field, java.lang.String value)
getUiValueLabel
in interface MetadataVocab
metaFormat
- metadata format (i.e. "adn")metaVersion
- metadata version (i.e. "0.6.50")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")audience
- UI audience, i.e. "community" or "cataloger"language
- UI language, ie.e. "en-us"public java.lang.String getUiValueLabel(java.lang.String metaFormat, java.lang.String audience, java.lang.String language, java.lang.String field, java.lang.String value, boolean abbrev)
getUiValueLabel
in interface MetadataVocab
metaFormat
- metadata format (i.e. "adn")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")audience
- UI audience, i.e. "community" or "cataloger"language
- UI language, ie.e. "en-us"abbrev
- get the abbreviated version of the label?public void setResponseGroup(javax.servlet.jsp.PageContext context, java.lang.String metaFramework, java.lang.String metaVersion, java.lang.String audience, java.lang.String language, java.lang.String field)
setResponseGroup
in interface MetadataVocab
context
- metaFramework
- The new responseGroup valuemetaVersion
- The new responseGroup valueaudience
- The new responseGroup valuelanguage
- The new responseGroup valuefield
- The new responseGroup valueMetadataVocab.setResponseValue(String,PageContext)
,
MetadataVocab.setResponseList(String[],PageContext)
,
MetadataVocab.setResponseList(ArrayList,PageContext)
,
MetadataVocab.getResponseOPML(PageContext)
public void setResponseGroup(javax.servlet.jsp.PageContext context, java.lang.String metaFormat, java.lang.String audience, java.lang.String language, java.lang.String field)
setResponseGroup
in interface MetadataVocab
context
- JSP page contextaudience
- 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")metaFormat
- metadata format (i.e. "adn")MetadataVocab.setResponseValue(String,PageContext)
,
MetadataVocab.setResponseList(String[],PageContext)
,
MetadataVocab.setResponseList(ArrayList,PageContext)
,
MetadataVocab.getResponseOPML(PageContext)
public void setResponseValue(java.lang.String value, javax.servlet.jsp.PageContext context)
setResponseValue
in interface MetadataVocab
value
- the metadata vocab value, i.e. "DLESE:High school"context
- The new response valueMetadataVocab.setResponseGroup(PageContext,String,String,String,String,String)
,
MetadataVocab.setResponseList(String[],PageContext)
,
MetadataVocab.setResponseList(ArrayList,PageContext)
,
MetadataVocab.getResponseOPML(PageContext)
public java.lang.String getResponseOPML(javax.servlet.jsp.PageContext context)
getResponseOPML
in interface MetadataVocab
context
- MetadataVocab.setResponseValue(String,PageContext)
,
MetadataVocab.setResponseList(String[],PageContext)
,
MetadataVocab.setResponseList(ArrayList,PageContext)
,
MetadataVocab.setResponseGroup(PageContext,String,String,String,String,String)
public java.lang.String getUiFieldLabel(java.lang.String metaFormat, java.lang.String metaVersion, java.lang.String audience, java.lang.String language, java.lang.String field, boolean abbrev)
getUiFieldLabel
in interface MetadataVocab
metaFormat
- metadata format (i.e. "adn")metaVersion
- metadata version (i.e. "0.6.50")abbrev
- get the abbreviated version of the label?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")public java.lang.String getUiFieldLabel(java.lang.String metaFormat, java.lang.String metaVersion, java.lang.String audience, java.lang.String language, java.lang.String field)
getUiFieldLabel
in interface MetadataVocab
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")public java.lang.String getUiFieldLabel(java.lang.String metaFormat, java.lang.String audience, java.lang.String language, java.lang.String field, boolean abbrev)
getUiFieldLabel
in interface MetadataVocab
metaFormat
- metadata format (i.e. "adn")field
- metadata FIELD encoded ID (i.e. "gr") or metadata NAME
(i.e. "gradeRange")audience
- UI audience, i.e. "community" or "cataloger"language
- UI language, ie.e. "en-us"abbrev
- get the abbreviated version of the label?public java.lang.String getOPML(java.lang.String metaFormat, java.lang.String metaVersion, java.lang.String audience, java.lang.String language, java.lang.String field)
getOPML
in interface MetadataVocab
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")metaFormat
- metadata format (i.e. "adn")public java.lang.String getOPML(java.lang.String metaFormat, java.lang.String audience, java.lang.String language, java.lang.String field)
getOPML
in interface MetadataVocab
metaFormat
- audience
- language
- field
- public java.lang.String getOPML(java.lang.String metaFormat, java.lang.String metaVersion, java.lang.String audience, java.lang.String language, java.lang.String field, boolean includeXmlDeclaration)
getOPML
in interface MetadataVocab
metaFormat
- metaVersion
- audience
- language
- field
- includeXmlDeclaration
- public java.lang.String getUiValueLabel(java.lang.String audience, java.lang.String language, java.lang.String field, java.lang.String value, boolean abbrev)
getUiValueLabel
in interface MetadataVocab
audience
- language
- field
- value
- abbrev
- public java.lang.String getUiFieldLabel(java.lang.String audience, java.lang.String language, java.lang.String field, boolean abbrev)
getUiFieldLabel
in interface MetadataVocab
audience
- language
- field
- abbrev
- public java.lang.String getUiValueDisplay(java.lang.String metaFormat, java.lang.String metaVersion, java.lang.String audience, java.lang.String language, java.lang.String field, java.lang.String value)
getUiValueDisplay
in interface MetadataVocab
metaFormat
- metadata format (i.e. "adn")metaVersion
- metadata version (i.e. "0.6.50")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")audience
- UI audience, i.e. "community" or "cataloger"language
- UI language, i.e. "en-us"public java.lang.String getUiValueDisplay(java.lang.String metaFormat, java.lang.String audience, java.lang.String language, java.lang.String field, java.lang.String value)
getUiValueDisplay
in interface MetadataVocab
metaFormat
- metadata format (i.e. "adn")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")audience
- UI audience, i.e. "community" or "cataloger"language
- UI language, i.e. "en-us"public java.lang.String getOPML(java.lang.String metaFormat, java.lang.String audience, java.lang.String language, java.lang.String field, boolean includeXmlDeclaration)
getOPML
in interface MetadataVocab
metaFormat
- audience
- language
- field
- includeXmlDeclaration
- public java.lang.String getMetaFormatOfField(java.lang.String field)
getMetaFormatOfField
in interface MetadataVocab
field
- public VocabNode getVocabNode(java.lang.String metaFormat, java.lang.String audience, java.lang.String language, java.lang.String fieldName, java.lang.String valueName)
getVocabNode
in interface MetadataVocab
metaFormat
- audience
- language
- fieldName
- valueName
- public void setResponseList(java.util.ArrayList values, javax.servlet.jsp.PageContext context)
setResponseList
in interface MetadataVocab
context
- JSP page contextvalues
- List of metadata VALUE encoded ID (i.e. "04") or metadata
NAME (i.e. "DLESE:Intermediate elementary")MetadataVocab.setResponseGroup(PageContext,String,String,String,String,String)
,
MetadataVocab.getResponseOPML(PageContext)
public void setResponseList(java.lang.String[] values, javax.servlet.jsp.PageContext context)
setResponseList
in interface MetadataVocab
context
- JSP page contextvalues
- List of metadata VALUE encoded ID (i.e. "04") or metadata
NAME (i.e. "DLESE:Intermediate elementary")MetadataVocab.setResponseGroup(PageContext,String,String,String,String,String)
,
MetadataVocab.getResponseOPML(PageContext)