Package io.goobi.viewer.model.metadata
Class MetadataValue
java.lang.Object
io.goobi.viewer.model.metadata.MetadataValue
- All Implemented Interfaces:
Serializable
Wrapper class for metadata parameter value groups, so that JSF can iterate through them properly.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyHighlightingToParamValue(int paramIndex, Set<String> searchTerms) Applies (full HTML) search hit value highlighting to all values for the given parameter index.getComboValueShort(int index) getComboValueShort.getDisplayParamValue(int index) getDisplayValue(boolean includeLabels) getDisplayValue(Locale locale) getDisplayValue(Locale locale, boolean includeLabels) getGroupTypeForUrl.getIddoc()getLabel()Getter for the fieldmasterValue.getNormDataUrl(String key) getNormDataUrl.getNormDataUrl(String key, boolean urlEncode) getNormDataUrl.getNormDataUrlKeys.Getter for the fieldnormDataUrls.Getter for the fieldparamLabels.getParamLabelWithColon(int index) getParamLabelWithColon.Getter for the fieldparamMasterValueFragments.Getter for the fieldparamPrefixes.Getter for the fieldparamSuffixes.Getter for the fieldparamUrls.getParamValue(String paramLabel) getParamValue.Getter for the fieldparamValues.getParamValues(String paramLabel) booleanhasParamValue(String paramLabel) hasParamValue.booleanbooleanbooleanisParamValueBlank(int index) setCitationItemDataProvider(CitationDataProvider citationItemDataProvider) setCitationProcessor(de.undercouch.citeproc.CSL citationProcessor) setDocstrct(String docstrct) setGroupType(String groupType) Setter for the fieldgroupType.voidvoidsetMasterValue(String masterValue) Setter for the fieldmasterValue.voidsetOwnerIddoc(String ownerIddoc) voidsetTopstruct(String topstruct) toString()
-
Method Details
-
isParamValueBlank
public boolean isParamValueBlank(int index) - Parameters:
index- zero-based parameter index to check- Returns:
- true if value at index blank; false otherwise
-
isAllParamValuesBlank
public boolean isAllParamValuesBlank()- Returns:
- true if all of the param values are empty or blank; false otherwise
-
getDisplayParamValue
-
getComboValueShort
getComboValueShort.- Parameters:
index- zero-based parameter index to retrieve- Returns:
- the formatted combined metadata value for the given parameter index
-
getParamLabelWithColon
getParamLabelWithColon.- Parameters:
index- zero-based parameter index to look up- Returns:
- the translated label for the given parameter index with an appended colon, or an empty string if the index is out of range
-
getParamLabels
Getter for the fieldparamLabels.- Returns:
- the list of label keys for each metadata parameter
-
getParamValues
Getter for the fieldparamValues.- Returns:
- the list of value lists for each metadata parameter
-
getParamMasterValueFragments
Getter for the fieldparamMasterValueFragments.- Returns:
- the list of master value template fragments associated with each metadata parameter
-
getParamPrefixes
Getter for the fieldparamPrefixes.- Returns:
- the list of prefix strings prepended to each parameter value during rendering
-
getParamSuffixes
Getter for the fieldparamSuffixes.- Returns:
- the list of suffix strings appended to each parameter value during rendering
-
getParamUrls
Getter for the fieldparamUrls.- Returns:
- the list of URLs associated with each metadata parameter value
-
getNormDataUrls
Getter for the fieldnormDataUrls.- Returns:
- the map of norm data type keys to their resolved URLs
-
getNormDataUrlKeys
getNormDataUrlKeys.- Returns:
- a list of norm data URL keys stored in this metadata value
-
getNormDataUrl
getNormDataUrl.- Parameters:
key- norm data type identifier key- Returns:
- Not URL-encoded norm data URL
-
getNormDataUrl
getNormDataUrl.- Parameters:
key- norm data type identifier keyurlEncode- true to return a URL-encoded value- Returns:
- if urlEncode=true, then URL-encoded norm data URL; otherwise not encoded norm data URL
-
getCitationValues
-
getChildMetadata
-
isAccessRestricted
public boolean isAccessRestricted()- Returns:
- true if thids.accessConditions not empty; false otherwise
-
getAccessConditions
-
hasParamValue
hasParamValue.- Parameters:
paramLabel- label key identifying the parameter- Returns:
- true if this metadata value has a value for the parameter identified by the given label, false otherwise
-
getParamValue
getParamValue.- Parameters:
paramLabel- label key identifying the parameter- Returns:
- the first value for the parameter identified by the given label, or an empty string if not found
-
getParamValues
- Parameters:
paramLabel- label key identifying the parameter- Returns:
- List of parameter values for the given paramLabel
-
applyHighlightingToParamValue
Applies (full HTML) search hit value highlighting to all values for the given parameter index.- Parameters:
paramIndex- Metadata parameter indexsearchTerms- Set of search terms
-
getIddoc
-
setIddoc
-
getOwnerIddoc
-
setOwnerIddoc
-
getDisplayValue
- Returns:
- Display value for the current locale
-
getDisplayValue
- Parameters:
includeLabels- if true, prepend parameter labels to each value- Returns:
- Display value for the current locale
-
getDisplayValue
- Parameters:
locale- locale for translation lookup- Returns:
- Display value for the given locale
-
getDisplayValue
- Parameters:
locale- locale for translation lookupincludeLabels- if true, prepend parameter labels to each value- Returns:
- Display value for the given locale
-
getMasterValue
Getter for the fieldmasterValue.- Returns:
- the template string into which parameter values are substituted during rendering, defaulting to "{0}" if empty
-
setMasterValue
Setter for the fieldmasterValue.- Parameters:
masterValue- the template string into which parameter values are substituted during rendering
-
getGroupTypeForUrl
getGroupTypeForUrl.- Returns:
- the METADATATYPE value of the owning grouped metadata structure element, or "-" if not set
-
setGroupType
Setter for the fieldgroupType.- Parameters:
groupType- the METADATATYPE value of the owning grouped metadata structure element- Returns:
- this
-
getDocstrct
-
setDocstrct
- Parameters:
docstrct- the document structure type of the owning structure element- Returns:
- this
-
getTopstruct
-
setTopstruct
-
getLabel
-
setLabel
- Parameters:
label- the display label for this metadata value- Returns:
- this
-
setCitationProcessor
- Parameters:
citationProcessor- the configured CSL citation processor used to format this value as a citation- Returns:
- this
-
setCitationItemDataProvider
- Parameters:
citationItemDataProvider- the data provider that supplies citation item data to the CSL processor- Returns:
- this
-
toString
-
getCombinedValue
-