Metadata enrichment via Excel file
This Step Plugin enables the enrichment of metadata within a METS file based on data from an Excel file.

Introduction

This plugin allows metadata to be read from an Excel file and added to existing structural elements.

Overview

Details
Text
Identifier
intranda_step_excelMetadataenrichment
Licence
GPL 2.0 or newer
Documentation date
29.03.2022

Installation

To install the plugin, the following file must be installed:
1
/opt/digiverso/goobi/plugins/step/plugin_intranda_step_excelMetadataenrichment.jar
Copied!
To configure how the plugin should behave, various values can be adjusted in the configuration file. The configuration file is usually located here:
1
/opt/digiverso/goobi/config/plugin_intranda_step_excelMetadataenrichment.xml
Copied!

Configuration of the plug-in

The configuration of the plug-in is structured as follows:
1
<config_plugin>
2
<!--
3
order of configuration is:
4
1.) project name and step name matches
5
2.) step name matches and project is *
6
3.) project name matches and step name is *
7
4.) project name and step name are *
8
-->
9
10
<config>
11
<!-- which projects to use for (can be more then one, otherwise use *) -->
12
<project>*</project>
13
<step>*</step>
14
15
<!-- name of the folder to find the excel file -->
16
<!-- can be part of the process folder (master, media, import, ...) or an absolute path -->
17
<!-- if more then one excel file was found, the filename must match the process name -->
18
<excelFolder>master</excelFolder>
19
20
<!-- name of the identifier field in existing docstructs-->
21
<docstructIdentifier>shelfmarksource</docstructIdentifier>
22
23
24
<!-- define which column is the one to use for catalogue requests -->
25
<excelIdentifierColumn>0-Signatur</excelIdentifierColumn>
26
27
<metadata ugh="CatalogIDSource" headerName="2-PPN-A" />
28
<metadata ugh="CatalogIDDigital" headerName="3-PPN-O" />
29
<metadata ugh="Subject" normdataHeaderName="13-GND Schlagwort 1" headerName="13a-GND Schlagwort 1"/>
30
<metadata ugh="Subject" normdataHeaderName="14-GND Schlagwort 2" headerName="14a-GND Schlagwort 2"/>
31
32
<person ugh="Author">
33
<!-- use this field if the column contains the complete name -->
34
<nameFieldHeader>Author</nameFieldHeader>
35
<!-- set this field to true, if the name must be splitted into first- and lastname. The complete name gets written into lastname -->
36
<splitName>true</splitName>
37
<!-- define at which character the name is separated. @firstNameIsFirstPart defines, if the firstname is the first or last part of the name -->
38
<splitChar firstNameIsFirstPart="false">, </splitChar>
39
<!-- use this fields, if the firstname and lastname are in different columns -->
40
<!--
41
<firstname>5-Vorname</firstname>
42
<lastname>6-Nachname</lastname>
43
-->
44
</person>
45
</config>
46
</config_plugin>
Copied!
The block <config> can occur repeatedly for different projects or work steps in order to be able to carry out different actions within different workflows.
The field <excelFolder> defines where the Excel file is searched for. The Goobi internal variables can be used to define e.g. the process folder or the master folder. Alternatively, an absolute path can be specified where all excel files to be imported are located. If there is more than one excel file in the configured directory, a file 'PROCESSNAME.xlsx' is expected.
The fields <docstructIdentifier> and <excelIdentifierColumn> are used to define the name of the metadatum and the Excel column via which the individual lines of the Excel file can be assigned.
The configuration of the metadata and personal data to be imported is already described here:
Importing records from an Excel file
Goobi workflow Plugins (English)
Importing records from an Excel file
Goobi workflow Plugins (English)

Integration of the plug-in into the workflow

To put the plugin into operation, it must be activated for a task in the workflow. This is done as shown in the following screenshot by selecting the plugin plugin_intranda_step_excelMetadataenrichment from the list of installed plugins.
Integration in den Workflow
Since this plugin should usually be executed automatically, the work step should be configured as automatic in the workflow.

How the plugin works

After the plugin has been fully installed and set up, it is usually executed automatically within the workflow so that there is no manual interaction with the user. Instead, the workflow invokes the plugin in the background and performs the following tasks:
First, a suitable Excel file is searched for. The configured path is searched. If a single Excel file exists there, it is opened regardless of its name. If there are several Excel files, it is expected that the Excel file is named after the process name.
If an Excel file is found, the metadata is read. All existing structure elements are listed and checked whether they contain a metadatum that corresponds to the configured value in the field <docstructIdentifier>. If this is the case, the Excel file is searched for a row in which the metadatum was used in the column configured in the field <excelIdentifierColumn>. If it is found, the metadata of the row is added to the structure item.