1.4 Authority data

Goobi workflow

In the rule set, the attribute normdata="true" must be activated for the desired metadata so that the norm data can be entered in the metadata editor:

ruleset.xml
ruleset.xml
<MetadataType type="person" normdata="true">
<Name>Author</Name>
<language name="de">Autor</language>
<language name="en">Author</language>
</MetadataType>

Then search for the XPATH expression in the rule record for the metadata, where this is exported to MODS:

ruleset.xml
ruleset.xml
<Metadata>
<InternalName>Author</InternalName>
<WriteXPath>./mods:mods/#mods:name[@type='personal'][mods:role/mods:roleTerm="aut"[@authority='marcrelator'][@type='code']]</WriteXPath>
[...]

Goobi viewer Indexer

Now search the configuration file of the Goobi viewer Indexer for the field definition in which the XPATH expression is mapped:

solr_indexerconfig.xml
solr_indexerconfig.xml
<MD_AUTHOR>
<list>
<item>
<xpath>
<list>
<item>mets:xmlData/mods:mods/mods:name[@type="personal"][mods:role/mods:roleTerm="aut"[@authority='marcrelator'][@type='code']]/mods:displayForm</item>
</list>
</xpath>
<onefield>false</onefield>
[...]

Now make sure that the following section is included for persons:

solr_indexerconfig.xml
solr_indexerconfig.xml
<groupEntity type="PERSON">
<field name="MD_VALUE">mods:displayForm</field>
<field name="MD_DISPLAYFORM">mods:displayForm</field>
<field name="MD_LINK">@xlink:href</field>
<field name="MD_CORPORATION">mods:namePart[not(@type)]</field>
<field name="MD_LASTNAME">mods:namePart[@type="family"]</field>
<field name="MD_FIRSTNAME">mods:namePart[@type="given"]</field>
<field name="MD_LIFEPERIOD">mods:namePart[@type="date"]</field>
<field name="MD_TERMSOFADDRESS">mods:namePart[@type="termsOfAddress"]</field>
<field name="NORM_URI">@valueURI</field>
</groupEntity>

For example, a complete entry looks like this:

solr_indexerconfig.xml
solr_indexerconfig.xml
<MD_AUTHOR>
<list>
<item>
<xpath>
<list>
<item>mets:xmlData/mods:mods/mods:name[@type="personal"][mods:role/mods:roleTerm="aut"[@authority='marcrelator'][@type='code']]/mods:displayForm</item>
</list>
</xpath>
<onefield>false</onefield>
<addToDefault>true</addToDefault>
<groupEntity type="PERSON">
<field name="MD_VALUE">mods:displayForm</field>
<field name="MD_DISPLAYFORM">mods:displayForm</field>
<field name="MD_LINK">@xlink:href</field>
<field name="MD_CORPORATION">mods:namePart[not(@type)]</field>
<field name="MD_LASTNAME">mods:namePart[@type="family"]</field>
<field name="MD_FIRSTNAME">mods:namePart[@type="given"]</field>
<field name="MD_LIFEPERIOD">mods:namePart[@type="date"]</field>
<field name="MD_TERMSOFADDRESS">mods:namePart[@type="termsOfAddress"]</field>
<field name="NORM_URI">@valueURI</field>
</groupEntity>
<addUntokenizedVersion>true</addUntokenizedVersion>
</item>
</list>
</MD_AUTHOR>

Restart the Goobi viewer Indexer process after the changes have been made. For the commands, see chapter 2.6.‚Äč

When indexing a record with authority data, information should now be displayed in the log file as follows:

indexer.log
indexer.log
[...]
INFO 2015-04-29 11:25:38,853 (MetadataHelper.java:retrieveNormData:322)
Retrieving norm data from 'http://d-nb.info/gnd/117395269'...
[...]

Goobi viewer Core

For the display, the definition of the metadata for the display of the authority data must now also be configured in the central configuration file of the Goobi viewers Core:

config_viewer.xml
config_viewer.xml
<metadata label="MD_AUTHOR" value="MASTERVALUE_WIKINORM" group="true">
<param type="field" key="MD_VALUE" />
<param type="wikipersonfield" key="MD_DISPLAYFORM" />
<param type="normdatauri" key="NORM_URI" />
</metadata>

If additional information is required in the display, the parameters must be adjusted accordingly. Make sure that a new KEY is defined in the attributes value="", which is then available in the messages_*.properties files. For the above example, the configuration within the language file messages_de.properties is the same, for example:

messages_de.properties
messages_de.properties
MASTERVALUE_WIKINORM={1} <a href="http://de.wikipedia.org/wiki/{3}" target="_blank"><img src="/viewer/javax.faces.resource/wikipedia.png.xhtml?ln=images/" style="height:16px;" title="Wikipedia" alt="Wikipedia" /></a> {5}