1.19.1 Main metadata
The main metadata are displayed on the "Bibliographic data" page.
Metadata
They can be configured as follows:
config_viewer.xml
1
<metadata>
2
<metadataView index="0" label="metadata" url="" condition="">
3
<template name="_DEFAULT">
4
<metadata label="MD_TITLE" hideIfOnlyMetadataField="true">
5
<param type="field" key="MD_TITLE" />
6
</metadata>
7
<metadata label="MD_AUTHOR" value="MASTERVALUE_WIKINORM" sortField="SORT_NAME" group="true">
8
<param type="field" key="MD_VALUE" />
9
<param type="wikifield" key="MD_VALUE" />
10
<param type="normdatauri" key="NORM_URI" />
11
<param type="normdatasearch" key="NORM_IDENTIFIER" />
12
</metadata>
13
<metadata label="DC">
14
<param type="translatedfield" key="DC" topstructOnly="true" />
15
</metadata>
16
<metadata label="DOCSTRCT_TOP">
17
<param type="translatedfield" key="DOCSTRCT_TOP" />
18
</metadata>
19
<metadata label="DOCSTRCT_SUB" hideIfOnlyMetadataField="true">
20
<param type="translatedfield" key="DOCSTRCT_SUB" />
21
</metadata>
22
<metadata label="URN">
23
<param type="field" key="URN" />
24
</metadata>
25
<metadata label="MD_COPYRIGHT">
26
<param type="field" key="MD_COPYRIGHT">
27
<replace string="[year]">2019</replace>
28
<replace char="X">Y</replace>
29
<replace regex="..."></replace>
30
</param>
31
</metadata>
32
<metadata label="MD_LICENSELABELFIELD">
33
<param type="translatedfield" key="MD_LICENSELABELFIELD">
34
<replace condition="-MDNUM_PUBLICRELEASEYEAR:[* TO NOW/YEAR]" regex=".+">MESSAGE_LICENCEINFORMATION</replace>
35
</param>
36
</metadata>
37
<metadata label="DATECREATED">
38
<param type="millisfield" key="DATECREATED" />
39
</metadata>
40
<metadata label="label__citation_style_apa-6th-edition" citationTemplate="apa-6th-edition">
41
<param type="citeproc" dest="title" key="MD_TITLE"/>
42
<param type="citeproc" dest="author" key="MD_AUTHOR"/>
43
<param type="citeproc" dest="publisher" key="MD_PUBLISHER"/>
44
<param type="citeproc" dest="placepublish" key="MD_PLACEPUBLISH"/>
45
<param type="citeproc" dest="issued" key="MD_YEARPUBLISH"/>
46
<param type="citeproc" dest="isbn" key="MD_ISBN"/>
47
<param type="field" key="MD_RELATED_RECORD_ID" value="MASTERVALUE_RELATED_RECORD_LINK" condition="PI:{0}"/>
48
</metadata>
49
</template>
50
<template name="monograph">
51
<metadata label="MD_TITLE" >
52
<param type="field" key="MD_TITLE" />
53
</metadata>
54
<metadata label="MD_AUTHOR" value="MASTERVALUE_WIKINORM" group="true">
55
<param type="field" key="MD_VALUE" />
56
<param type="wikifield" key="MD_VALUE" />
57
<param type="normdatauri" key="NORM_URI" />
58
<param type="normdatasearch" key="NORM_IDENTIFIER" />
59
</metadata>
60
</template>
61
</metadataView>
62
<metadataView index="1" label="label__metadata_special" url="_special" condition="DC:specialcollection">
63
<metadata label="MD_SPECIAL" >
64
<param type="field" key="MD_SPECIAL" />
65
</metadata>
66
</metadataView>
67
</metadata>
Copied!
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:
Attribute
Description
index
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.
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:
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.
Titles for the individual widgets or blocks are configured in messages_*.properties according to the pattern metadataTab<Number>:
messages_de.properties
1
metadataTab0=Beschreibung
2
metadataTab1=Inhalt
3
metadataTab2=Weitere Informationen
Copied!
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:
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.
Example:
<metadata label="MD_LOREMIPSUM" value="LOREMIPSUM_MASTER_KEY">
<param type="field" key="MD_LOREM" value="LOREM_MSG_KEY" />
<param type="field" key="MD_DOLOR" />
</metadata>
messages_de.properties:
MD_LOREMIPSUM=LI
LOREMIPSUM_MASTER_KEY={0} ipsum {1} sit amet.
LOREM_MSG_KEY=<a href="https://example.com/?search={0}>{0}</a>
Output:
LI: Lorem ipsum dolor sit amet.
topstructOnly
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:
<param type="field" key="MD_RELATED_RECORDID" value="MASTERVALUE_RELATED_RECORD_LINK" condition="PI:{0}" />
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:
config_viewer.xml
1
<metadata>
2
<mainMetadataList>
3
<template name="_DEFAULT">
4
<metadata label="MD_COPYRIGHT" value="" type="">
5
<param type="field" key="MD_COPYRIGHT">
6
<replace string="[year]" condition="DOCSTRCT:monograph">2019</replace>
7
</param>
8
</metadata>
9
</template>
10
</mainMetadataList>
11
</metadata>
Copied!
The order of the <param> elements corresponds to the order in which the placeholders in the default value (if configured) are replaced.
Example:
messages_de.properties
1
MASTERVALUE_WIKINORM={1} <a href\="http\://de.wikipedia.org/wiki/{3}" target\="_blank" title\="Wikipedia" alt\="Wikipedia" data-trigger\="hover" data-placement\="top" data-toggle\="tooltip"><i class\="fa fa-wikipedia-w" aria-hidden\="true"></i></a> {5}
Copied!
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:
1
http://en.wikipedia.org/wiki/Georges_Grosjean
Copied!
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:
config_viewer.xml
1
<metadata>
2
<mainMetadataList>
3
<template name="_DEFAULT">
4
<metadata label="MD_LICENSELABELFIELD" value="" type="">
5
<param type="translatedfield" key="MD_LICENSELABELFIELD">
6
<replace condition="-MDNUM_PUBLICRELEASEYEAR:[* TO NOW/YEAR]" regex=".+">MESSAGE_LICENCEINFORMATION</replace>
7
</param>
8
</metadata>
9
</template>
10
</mainMetadataList>
11
</metadata>
Copied!

Multi-level grouped metadata.

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.
1
<metadata label="MD_EVENT" value="MASTERVALUE_EVENT" group="true" singleString="false" labelField="EVENTTYPE" type="3">
2
<param type="field" key="EVENTTYPE" value="MASTERVALUE_NULL">
3
<param type="field" key="MD_MATERIAL"/>
4
<param type="field" key="MD_DESCRIPTION" />
5
<metadata label="MD_ARTIST" value="MASTERVALUE_EVENT_ACTOR" singleString="false" group="true">
6
<param type="field" key="MD_NAME" value="MASTERVALUE_EVENT_ACTOR_NAME" />
7
<param type="field" key="MD_DISPLAYNAME" />
8
<param type="field" key="MD_ROLE" />
9
<param type="field" key="MD_STARTDATE" />
10
<param type="field" key="MD_ENDDATE" />
11
<param type="field" key="MD_URI_GETTY" value="MASTERVALUE_URI_GETTY" />
12
<param type="field" key="MD_URI_SIKART" value="MASTERVALUE_URI_SIKART" />
13
<param type="normdatauri" key="NORM_URI"/>
14
</metadata>
15
<metadata label="MD_DESIGNER" value="MASTERVALUE_EVENT_ACTOR" singleString="false" group="true">
16
<param type="field" key="MD_DISPLAYNAME" />
17
<param type="field" key="MD_ROLE" />
18
<param type="field" key="MD_STARTDATE" />
19
<param type="field" key="MD_ENDDATE" />
20
<param type="field" key="MD_URI_GETTY" value="MASTERVALUE_URI_GETTY" />
21
<param type="field" key="MD_URI_SIKART" value="MASTERVALUE_URI_SIKART" />
22
<param type="normdatauri" key="NORM_URI"/>
23
</metadata>
24
</metadata>
Copied!
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.
Last modified 4d ago