Any number of <metadataView> elements can be defined. Each element creates an independent metadata page with its own link in the sidebar.
The following attributes are included:
Metadata for LIDO events are also configured via this list. Desired event metadata must also be listed here.
Each element <metadata> describes a metadata field that is to be displayed. The order of the listing corresponds to the order in which this metadata (if available) is displayed. The element has the following attributes:
Titles for the individual widgets or blocks are configured in messages_*.properties according to the pattern metadataTab<Number>:
Metadata from LIDO events are automatically displayed in additional widgets per event.
Each <metadata> element must contain at least one element <param>. These define the source of the actual values for this metadata type. The following attributes must be configured:
Below an <param> element, <replace /> rules can be defined. The attributes string, char or regex can be used to define values that are extracted from the metadata and then replaced by the value specified in the replace block. The attribute condition can be used to formulate an optional Solr Query. In this case, only metadata of records to which the conditions apply are treated accordingly.
In the following example, the placeholder string [year] is searched for in monographs in the metadata from the field MDRIGHT and replaced by 2019:
The key MASTERVALUE_WIKINORM contains a complete HTML fragment with a Wikipedia URL, which contains two placeholders {1} and {3}. At the end the placeholder for the automatically generated link to GND is configured.
The metadata configuration for MD_AUTHOR (see first example) contains three <param> elements: a field, wikifield and normdatauri. The unchanged value in field replaces {1} (the displayed name). The same value as wikifield is formatted for Wikipedia conformance and replaces {2} (part of the URL). The result then consists of the author's name followed by a Wikipedia icon linking to the following URL:
http://en.wikipedia.org/wiki/Georges_Grosjean
The parameters are defined with {0},{1}, ... is addressed. However, if group="true" is set, they are {1}, {3}, ...
Optionally, a condition can be specified to replace metadata values. This makes it possible, for example, if a work is publicly restricted with a moving wall but can be viewed internally at a reading place, to display an alternative license for the period of the moving wall. The syntax of the condition here is the same Solr syntax that can be used as a condition when defining licenses:
If there are grouped metadata in the index, which in turn contain further grouped metadata, further elements can be configured within a element to map them (theoretically arbitrarily deep). In the interface they are visualized as a purple badge.
The attribute singleString="true" defines that grouped parameters are output via a master value in the messages_XX.properties (as in the examples above). If the attribute is set to false, parameter values are output in tabular form as label/value pairs. Default value is true.
If the heading of the grouped metadata should not be the field name (in the example above the translation of MD_EVENT), but for example the type of the event, the attribute labelField can be used to specify a subordinate field of the grouped metadata from which the heading should be taken (in the example EVENTTYPE). Attention: In this case the selected subfield must also be configured as , otherwise no value can be loaded for it! If the subfield is not to be displayed additionally as a parameter, the reserved attribute value value="MASTERVALUE NULL" can be used to empty the parameter again after its value has been used for the heading.
Order of the view within the listing. Missing values are implicitly set to 0. However, if multiple views are configured, each must have a unique value.
label
Optional message key for the name of this metadata field (the translation for this key must be available in the respective messages.properties).
url
URL pattern for the page. The value is appended as a suffix to the standard /metadata pattern. If several views are configured, a maximum of one element may have an empty value of this attribute, all others require a unique value each.
condition
Optional condition for displaying the link in the sidebar. Allowed are either a Solr field name ("MD_FOO") or a field-value pair ("MD_FOO:bar"), which must have the main element of the opened work.
Attribute
Description
label
The key for the name of this metadata field (the translation for this key must be available in the respective messages.properties)
value
Default value of the metadata. For example, this value can be a URL defined in messages.properties that contains placeholders that are replaced by actual values from the metadata (see the configuration of MD_AUTHOR in the above example). For simple metadata, this attribute should be left empty (see the configuration of MD_TITLE in the above example).
sortField
Here you can optionally define a sortable field (e.g. SORT_VALUE) which can be used to sort multiple values within a grouped metadata field.
type
The value of the type attribute contains the number of the widget or block in which the metadata is to be displayed (starting with 0). If this attribute is missing, the value 0 is automatically used.
group
Optional attribute that indicates whether it is a grouped metadata. Default is false
citationTemplate
Optional attribute that is only required for the display of citation recommendations. A citation style valid for Citeproc is then specified here.
hideIfOnlyMetadataField
Metadata marked true here are considered dispensable. If there are only metadata fields in a structural element that have this attribute, the entire metadata block for this structural element is hidden. If, on the other hand, at least one metadata field is present that has the attribute value false, the block with all metadata is displayed (metadata with the attribute value true are then also displayed). The default value is false.
Attribute
Description
type
The type of the value describes the way whether and how the value is handled. Possible types are:
field- The value is taken over as it is.
translatedfield- The value is translated into the current language, if a translation exists.
unescapedfield- no HTML unescaping is performed on the value
wikifield- Adjusts the value of a search query in Wikipedia: brackets are removed, spaces are replaced by underscores
wikipersonfield- Like wikifield, but if the value contains a comma, the strings before and after the comma are also swapped, so that person names are converted to the pattern first name_last name for correct Wikipedia resolving.
urlescapedfield- Here, characters encoded especially for URLs such as the slash
normdatauri- A button is rendered which retrieves and opens the authority data using the authority data URI contained here.
normdatasearch- A button is rendered which starts a search with the configured index field in key, listing all works with this field:value combination (e.g. NORM_IDENTIFIER).
hierarchicalfield - Creates a link for each hierarchy level. Designed for use with the Solr field DC.
millisfield - Formats millisecond timestamps as date (dd.MM.yyyy if locale = DE, otherwise MM/dd/yyyy).
citeproc - Indicates that a citation recommendation using Citeproc is to be created.
key
The field in the Solr Index that contains the desired value.
prefix
Character string that is immediately after the value of the metadata (spaces are coded with SPACE).
suffix
Character string that is immediately before the value of the metadata (spaces are coded with SPACE).
value
The attribute value in <param> optionally offers the possibility to define a Master Value (character string or Message Key) for the respective parameter, in which the value of the parameter is inserted (e.g. value="foo {0} bar"). The entire expression is then inserted into the respective placeholder of the master value of the entire metadata (if the parameter has the index 0, the entire expression is inserted into the placeholder {0} of the metadata). If a value attribute is defined, any prefix and suffix parameters set are ignored.
If the attribute has the value true, metadata that occurs in all structural elements is only listed for the main record. This is usually the case with the DC field where the collections are stored. Default is false
dest
Is only needed in connection with the type="citeproc" and then specifies where the values from the solr field configured in the key="" attribute should be mapped within Citeproc.
condition
Optionally, a simple Solr query can be defined in condition for the parameter. In this case, the value is only used if the query returns hits. In this case, the placeholder {0} in the query is replaced by the value of the parameter (usually the value of the field in the parameter key). The following example shows the link to another work (with the identifier in MD_RELATED_RECORD_ID) only if this work also exists in the index:
The search hit highlighting is not applied to the value if the attribute is set to true. This allows you to use this value for URL construction, for example. Default is false
pattern
Only works with the type="datefield". A desired formatting for the date can then be configured (Java-compatible notation). In this case, the configured formatting is applied to valid dates instead of the locale-based formatting. Examples of the pattern are dd/MM/yyyy or dd.MM.yyyy.
defaultValue
If the configured parameter is empty, the value specified in the defaultValue is output. If no defaultValue is specified, the parameter is skipped.