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 for registering DOIs.
Achtung:
There is a newer plugin for this functionality that allows a higher degree of freedom for DOI registration by means of XSL transformation. Documentation of the new plugin can be found here: https://docs.goobi.io/goobi-workflow-plugins-en/step/intranda_step_doi
Details
Text
Identifier
intranda_step_datacite_doi
Licence
GPL 2.0 or newer
Compatibility
Goobi workflow 2021.12
Documentation date
06.02.2022

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
<!-- order of configuration is:
3
1.) project name and step name matches
4
2.) step name matches and project is *
5
3.) project name matches and step name is *
6
4.) project name and step name are *
7
-->
8
9
<config>
10
<!-- which projects to use for (can be more then one, otherwise use *) -->
11
<project>*</project>
12
<step>*</step>
13
14
<!-- authentication and main information -->
15
<!-- For testing: for deployment, remove "test" -->
16
<serviceAddress>https://mds.test.datacite.org/</serviceAddress>
17
18
<!-- authentication and main information -->
19
<base>10.123456789</base>
20
<url>https://viewer.example.org/resolver?field=MD_PI_DOI&identifier=</url>
21
<username></username>
22
<password></password>
23
24
<!-- configuration for Handles -->
25
<prefix>go</prefix>
26
<name>goobi</name>
27
<separator>-</separator>
28
<doiMetadata>DOI</doiMetadata>
29
30
<!-- configuration for DOIs -->
31
<doiMapping>/opt/digiverso/goobi/config/plugin_intranda_step_datacite_mapping.xml</doiMapping>
32
33
<!-- Type of DocStruct which should be given DOIs -->
34
<typeForDOI>Article</typeForDOI>
35
36
</config>
37
38
</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.
serviceAddress
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.
doiMetadata
This parameter specifies under which metadata name the DOI is to be saved in the METS-MODS file. Default is DOI.
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 element 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>unkn</default>
10
</map>
11
12
<map>
13
<field>creators</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>hostingInstitution</field>
37
<metadata>_electronicPublisher</metadata>
38
<default>intranda GmbH</default>
39
</map>
40
41
<map>
42
<field>resourceType</field>
43
<default>document</default>
44
</map>
45
46
<!-- Optional fields: -->
47
48
<listMap alternateIdentifierType="Goobi identifier">
49
<field>alternateIdentifier</field>
50
<list>alternateIdentifiers</list>
51
<metadata>CatalogIDDigital</metadata>
52
</listMap>
53
54
<listMap>
55
<field>contributors</field>
56
<list>contributors</list>
57
<metadata>Editor</metadata>
58
</listMap>
59
60
<listMap relatedIdentifierType="ISSN" relationType="IsPublishedIn">
61
<field>relatedIdentifier</field>
62
<list>relatedIdentifiers</list>
63
<metadata>anchor_ISSN</metadata>
64
</listMap>
65
66
<listMap descriptionType="SeriesInformation">
67
<field>description</field>
68
<list>descriptions</list>
69
<metadata>anchor_TitleDocMain</metadata>
70
</listMap>
71
72
<listMap descriptionType="SeriesInformation">
73
<field>description</field>
74
<list>descriptions</list>
75
<metadata>CurrentNo</metadata>
76
</listMap>
77
78
<listMap dateType="Created">
79
<field>date</field>
80
<list>dates</list>
81
<metadata>Dating</metadata>
82
<altMetadata>PublicationYear</altMetadata>
83
<altMetadata>anchor_PublicationYear</altMetadata>
84
</listMap>
85
86
<!-- create related item information just for the following publication types -->
87
<publicationTypeWithRelatedItem>Article</publicationTypeWithRelatedItem>
88
89
<!-- Specific fields for publication info: -->
90
91
<publicationData>
92
<field>ISSN</field>
93
<metadata>anchor_ISSN</metadata>
94
</publicationData>
95
96
<publicationData>
97
<field>title</field>
98
<metadata>anchor_TitleDocMain</metadata>
99
</publicationData>
100
101
<publicationData>
102
<field>publicationYear</field>
103
<metadata>anchor_PublicationYear</metadata>
104
</publicationData>
105
106
<publicationData>
107
<field>volume</field>
108
<metadata>CurrentNo</metadata>
109
</publicationData>
110
111
</Mapping>
Copied!
For each <map>, the <field> specifies the name of the DOI element, and the <metadata> and <altMetadata> entries specify from which metadata of the structure elements the value is to be taken in turn. If there is no such entry in the structure elements, then the <default> value is taken. The value "unkn" for "unknown" is recommended by Datacite for missing data.
The elements <listMap> allow to create list elements within the generated Datacite structure, so that repeating values can be defined. Attributes can also be specified, which are taken over itentically with name and value for the list element to be created (e.g. alternateIdentifierType="Goobi identifier");
For mandatory fields a <default> must be specified; for optional fields this is not necessary, but can be done if desired.
The default entry #CurrentYear is a special case: it is replaced by the current year during DOI generation.
If, for selected structural elements, a reference is to be made to the work in which this element was published, several elements can be listed as publicationTypeWithRelatedItem. For these, the block of elements <publicationData> can also be evaluated. This could be used for scientific articles, for example.

Integration of the plug-in 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.
Assign the plugin to a specific task
Since this plugin should usually be executed automatically, the workflow step should be configured as automatic in the workflow. Since the plugin writes the DOI to the metadata file of the operation, the checkbox for 'Update metadata index when finishing' should also be activated.

How the plugin works

The programme examines the metadata fields of the METS/MODS file from the Goobi operation. If a <typeForDOI> is specified, then it goes through every structure element of that type in the file. If not, it takes the top structure item. From this it creates the data for a DOI, using the mapping file to translate it. Then it registers the DOI using DataCite's MDS API, specifying the DOI by <base> along with any <prefix> and <name> and the ID of the document (its CatalogIDDigital) plus an incremented counter if more than one DOI was created for the given document. The record is given a registered URL defined by <url> followed by the DOI. The generated DOI is stored in the METS/MODS file under the metadata specified in <doiMetadata>. For example, if the value for <typeForDOI> is Article, then each article in the METS/MODS file will have a DOI stored in the metadata under <doiMetadata> for each article.

Useful additional information

  • Datacite documentation: https://support.datacite.org/docs/getting-started
  • Metadata schema overview: https://schema.datacite.org/
  • Metadata schema for the version 4.4 mit Beispieldateien: https://schema.datacite.org/meta/kernel-4.4/
  • Admin area for Datacite customers: https://doi.datacite.org/
  • Admin area in the test system for Datacite customers: https://doi.test.datacite.org/

Example

  • Example of a Datacite XML file from Goobi:
1
<?xml version="1.0" encoding="UTF-8"?>
2
<resource
3
xmlns="http://datacite.org/schema/kernel-4"
4
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5
xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.2/metadata.xsd">
6
<identifier identifierType="DOI">10.48644/1776214552</identifier>
7
<titles>
8
<title>Della forza de'corpi che chiamano viva libri tre</title>
9
</titles>
10
<publisher>Pisarri</publisher>
11
<publicationYear>2022</publicationYear>
12
<resourceType resourceTypeGeneral="Text">document</resourceType>
13
<creators>
14
<creator>
15
<creatorName>Zanotti, Francesco Maria</creatorName>
16
<givenName>Francesco Maria</givenName>
17
<familyName>Zanotti</familyName>
18
</creator>
19
</creators>
20
<dates>
21
<date dateType="Created">1752</date>
22
</dates>
23
<alternateIdentifiers>
24
<alternateIdentifier alternateIdentifierType="Goobi identifier">1776214552</alternateIdentifier>
25
</alternateIdentifiers>
26
<contributors>
27
<contributor contributorType="HostingInstitution">
28
<contributorName>Max-Planck-Institut für Wissenschaftsgeschichte</contributorName>
29
</contributor>
30
</contributors>
31
</resource>
Copied!