Package io.goobi.viewer.model.metadata
Class MetadataParameter
java.lang.Object
io.goobi.viewer.model.metadata.MetadataParameter
- All Implemented Interfaces:
Serializable
Defines a single parameter within a metadata field configuration, specifying the Solr field and display options.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumerates the display and processing types for a metadata parameter, such as plain fields, translated fields, date fields, identifier fields, norm data fields, and others. -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic MetadataParametercreateFromConfig(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> config, boolean topstructValueFallbackDefaultValue) booleanGetter for the fielddefaultValue.getKey()Getter for the fieldkey.Getter for the fieldmasterValueFragment.Getter for the fieldprefix.Getter for the fieldreplaceRules.getScope()Getter for the fieldsource.Getter for the fieldsuffix.getType()Getter for the fieldtype.inthashCode()booleanisAddUrl()isAddUrl.booleanbooleanisTopstructValueFallback.setAddUrl(boolean addUrl) setCondition(String condition) setDefaultValue(String defaultValue) setDestination(String destination) setInputPattern(String inputPattern) setMasterValueFragment(String masterValueFragment) setOutputPattern(String outputPattern) setRemoveHighlighting(boolean removeHighlighting) setReplaceRules(List<MetadataReplaceRule> replaceRules) setTopstructValueFallback(boolean topstructValueFallback) Setter for the fieldtype.toString()
-
Constructor Details
-
MetadataParameter
public MetadataParameter() -
MetadataParameter
-
MetadataParameter
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
getSource
Getter for the fieldsource.- Returns:
- the Solr field name from which this parameter's value is read
-
setSource
- Parameters:
source- the Solr field name from which this parameter's value is read- Returns:
- this
-
getDestination
-
setDestination
- Parameters:
destination- the target placeholder name in the master value template where this parameter's value is inserted- Returns:
- this
-
getType
Getter for the fieldtype.- Returns:
- the parameter type controlling how the value is retrieved and rendered
-
setType
Setter for the fieldtype.- Parameters:
type- the parameter type controlling how the value is retrieved and rendered- Returns:
- this
-
getKey
Getter for the fieldkey.- Returns:
- the Solr field name used as the primary key for value lookup
-
setKey
- Parameters:
key- the Solr field name used as the primary key for value lookup- Returns:
- this
-
getAltKey
-
setAltKey
- Parameters:
altKey- the alternative Solr field name used as a fallback when the primary key yields no value- Returns:
- this
-
getMasterValueFragment
Getter for the fieldmasterValueFragment.- Returns:
- the message key referencing a fragment of the master value template for this parameter
-
setMasterValueFragment
- Parameters:
masterValueFragment- the message key referencing a fragment of the master value template for this parameter- Returns:
- this
-
getDefaultValue
Getter for the fielddefaultValue.- Returns:
- the fallback value used when no value is found in the index
-
setDefaultValue
- Parameters:
defaultValue- the fallback value to use when no value is found in the index- Returns:
- this
-
getPrefix
Getter for the fieldprefix.- Returns:
- the string prepended to the rendered value in the output
-
setPrefix
- Parameters:
prefix- the string prepended to the rendered value in the output- Returns:
- this
-
getSuffix
Getter for the fieldsuffix.- Returns:
- the string appended to the rendered value in the output
-
setSuffix
- Parameters:
suffix- the string appended to the rendered value in the output- Returns:
- this
-
setScope
-
getScope
-
getCondition
-
setCondition
- Parameters:
condition- the Solr-query-style condition that must be satisfied for this parameter to be rendered- Returns:
- this
-
getInputPattern
-
setInputPattern
- Parameters:
inputPattern- the regular expression pattern applied to the raw input value before transformation- Returns:
- this
-
getOutputPattern
-
setOutputPattern
- Parameters:
outputPattern- the replacement pattern applied to the value after input-pattern matching- Returns:
- this
-
isAddUrl
public boolean isAddUrl()isAddUrl.- Returns:
- true if a hyperlink URL should be generated and attached to this parameter's rendered value, false otherwise
-
setAddUrl
- Parameters:
addUrl- true if a hyperlink URL should be generated and attached to this parameter's rendered value- Returns:
- this
-
isTopstructValueFallback
public boolean isTopstructValueFallback()isTopstructValueFallback.- Returns:
- true if the top-level structure element's value should be used as a fallback when no value is found, false otherwise
-
setTopstructValueFallback
- Parameters:
topstructValueFallback- true if the top-level structure element's value should be used as a fallback when no value is found- Returns:
- this
-
isRemoveHighlighting
public boolean isRemoveHighlighting() -
setRemoveHighlighting
- Parameters:
removeHighlighting- true if search-term highlighting markup should be stripped from the rendered value- Returns:
- this
-
getReplaceRules
Getter for the fieldreplaceRules.- Returns:
- the list of find-and-replace rules applied to the value during rendering
-
setReplaceRules
- Parameters:
replaceRules- the list of find-and-replace rules applied to the value during rendering- Returns:
MetadataParameter
-
toString
-
createFromConfig
public static MetadataParameter createFromConfig(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> config, boolean topstructValueFallbackDefaultValue) - Parameters:
config- the hierarchical configuration node to read fromtopstructValueFallbackDefaultValue- whether to fall back to topstruct value as default- Returns:
MetadataParameter
-