Plugin for registering DOI via the DataCite API
This is a Goobi step plugin to allow the registration of digital objects at the DataCite DOI service.

Introduction

This documentation describes the installation, configuration and use of the plugin.
Details
Identifier
intranda_step_datacite_doi
Licence
GPL 2.0 or newer
Compatibility
Goobi workflow 2021.03
Documentation date
15.03.2021

Installation

The plugin consists of these files:
1
plugin_intranda_step_datacite_doi.jar
2
plugin_intranda_step_datacite_doi.xml
3
plugin_intranda_step_datacite_mapping.xml
Copied!
The file plugin_intranda_step_datacite_doi.jar contains the program logic. it needs to be installed at this path:
1
/opt/digiverso/goobi/plugins/step/plugin_intranda_step_datacite_doi.jar
Copied!
The file plugin_intranda_step_datacite_mapping.xml is the mapping file, defining how local metadata should be translated to the form required for the DOI registration. It needs to be installed at this path:
1
/opt/digiverso/goobi/config/plugin_intranda_step_datacite_mapping.xml
Copied!
The file plugin_intranda_step_datacite_doi.xml is the main configuration file for the plugin. It needs to be installed at this path:
1
/opt/digiverso/goobi/config/plugin_intranda_step_datacite_doi.xml
Copied!

Configuration of the plug-in

Main configuration

The configuration is done via the configuration file plugin_intranda_step_datacite_doi.xml and can be adapted during operation. It is structured as follows:
1
<config_plugin>
2
<config>
3
<!-- which projects to use for (can be more then one, otherwise use *) -->
4
<project>*</project>
5
<step>*</step>
6
7
<!-- authentication and main information -->
8
<!-- For testing: for deployment, remove "test" -->
9
<SERVICE_ADDRESS>https://mds.test.datacite.org/</SERVICE_ADDRESS>
10
11
<base>10.80831</base>
12
<url>https://viewer.goobi.io/idresolver?doi=</url>
13
<USERNAME>YZVP.GOOBI</USERNAME>
14
<PASSWORD>password</PASSWORD>
15
16
<!-- configuration for DOIs -->
17
<prefix>go</prefix>
18
<name>goobi</name>
19
<separator>-</separator>
20
<handleMetadata>DOI</handleMetadata>
21
22
<!-- configuration for DOIs -->
23
<doiMapping>/opt/digiverso/goobi/config/plugin_intranda_step_datacite_mapping.xml</doiMapping>
24
25
<!-- Type of DocStruct which should be given DOIs -->
26
<typeForDOI>Article</typeForDOI>
27
28
<!-- display button to finish the task directly from within the entered plugin -->
29
<allowTaskFinishButtons>true</allowTaskFinishButtons>
30
</config>
31
32
</config_plugin>
Copied!
The block <config> can occur repeatedly for different projects or workflow steps in order to be able to perform different actions within different workflows. The other parameters within this configuration file have the following meanings:
Value
Description
project
This parameter determines for which project the current block <config> is to apply. The name of the project is used here. This parameter can occur several times per <config> block.
step
This parameter controls for which workflow steps the block <config> should apply. The name of the workflow step is used here. This parameter can occur several times per <config> block.
SERVICE_ADDRESS
This parameter defines the URL for the Datacite service. In the example above, it is the test server.
base
This parameter defines the DOI base for the institution, which has been registered with Datacite.
url
The url parameter defines the prefix accorded to each DOI link. A DOI "10.80831/goobi-1", for example, will here be given the hyperlink "https://viewer.goobi.io/idresolver?doi=10.80831/goobi-1"
USERNAME
This is the username that is used for the DataCite registration.
PASSWORD
This is the password that is used for the DataCite registration.
prefix
This is the prefix that may be given to the DOI before the name and ID of the document.
name
This is the name that may be given to the DOI before the ID number of the document.
separator
Define here a separator that shall be used between the different parts of the DOI.
handleMetadata
This parameter specifies under which metadata name the DOI is to be saved in the METS-MODS file. Default is _urn.
doiMapping
In this parameter the path to the mapping file for the DOI registration is defined.
typeForDOI
With this parameter the DocStruct type can be defined which will be given DOIs. If this is empty or missing, the top DocStruct elemtnet only will be given a DOI. If the parameter contains the name of a sub-DocStruct, then these will be given DOIs.

Configuration inside of the Mapping file

The mapping configuration file looks something like this:
1
<?xml version="1.0" encoding="UTF-8"?>
2
<Mapping>
3
<!-- Mandatory fields: -->
4
<map>
5
<field>title</field>
6
<metadata>TitleDocMain</metadata>
7
<altMetadata>TitleDocMainShort</altMetadata>
8
<altMetadata>Title</altMetadata>
9
<default>Fragment</default>
10
</map>
11
12
<map>
13
<field>author</field>
14
<metadata>Author</metadata>
15
<altMetadata>Composer</altMetadata>
16
<altMetadata>IllustratorArtist</altMetadata>
17
<altMetadata>WriterCorporate</altMetadata>
18
<default>unkn</default>
19
</map>
20
21
<map>
22
<field>publisher</field>
23
<metadata>Publisher</metadata>
24
<altMetadata>PublisherName</altMetadata>
25
<altMetadata>PublisherPerson</altMetadata>
26
<default>unkn</default>
27
</map>
28
29
<map>
30
<field>publicationYear</field>
31
<metadata>_dateDigitization</metadata>
32
<default>#CurrentYear</default>
33
</map>
34
35
<map>
36
<field>inst</field>
37
<default>intranda</default>
38
</map>
39
40
41
<map>
42
<field>resourceType</field>
43
<default>document</default>
44
</map>
45
46
<!-- Optional fields: -->
47
<map>
48
<field>editor</field>
49
<metadata>Editor</metadata>
50
</map>
51
52
</Mapping>
Copied!
For each <map>, the <field> specifies the name of the DOI element, and the <metadata> and <altMetadata> entries indicate from which metadata of the DocStruct the value should be taken, in order. If there is no such entry in the DocStruct, then the <default> value is taken. The value "unkn" for "unknown" is recommended by Datacite for data which is missing.
For the mandatory fields, a <default> must be specified; for optional fields this is not necessary, but may be done if wished.
The default entry #CurrentYear is a special case: it is replaced with the current year in the DOI.

Integration of the plugin into the workflow

To put the plugin into operation, it must be activated for one or more desired tasks in the workflow. This is done as shown in the following screenshot by selecting the plugin intranda_step_datacite_doi from the list of installed plugins.
Assigning the plugin to a specific task
Since this plugin is usually to be executed automatically, the workflow step should be configured as automatic in the workflow. As the plugin writes the DOI to the metadata file of the process, the checkbox for Update metadata index when finishing should be ticked.

Operation of the plugin

The program examines the metadata fields of a METS-MODS file from a Goobi process. If a <typeForDOI> is specified, then it will go through each DocStruct of this type in the file. If not, then it will take the top DocStruct. From these it creates the data for a DOI, using the mapping file to translate. It then registers the DOI via the MDS API of DataCite, with DOI given by the <base> together with any <prefix> and <name>, and the ID of the document (its CatalogIDDigital) plus an increment, if there are more than one DOIs generated for the given document. The record is given a registered URL defined by the <url> followed by the DOI. The generated DOI is written into the METS/MODS file under the metadata specified in <handleMetadata>. If the <typeForDOI> is Article for example, then each Article in the METS/MODS file will be given a DOI, which is saved in the metadata under <handleMetadata> for each Article.
Last modified 9mo ago