DOI Registration
This is a Goobi Step plug-in to enable the registration of digital objects with the DataCite DOI service.

Introduction

This documentation describes the installation, configuration and use of a plugin for registering DOIs via the DataCite API.
Attention:
It should be noted that this plugin is a new implementation of the datacite-doi plugin, which works using XSLT. This implementation has so far been limited to allowing DOIs to be registered for stand-alone works (e.g. monographs and journal volumes). Registering DOIs for structural elements (e.g. for journal articles) is not yet possible with this plugin.
Details
Text
Identifier
intranda_step_doi
Licence
GPL 2.0 or newer
Compatibility
Goobi workflow 2022.05
Documentation date
21.06.2022

Installation

The plugin consists of the following files:
1
plugin_intranda_step_doi.jar
2
plugin_intranda_step_doi.xml
3
doi.xsl
Copied!
The file plugin_intranda_step_doi.jar contains the programme logic. It must be installed under the following path:
1
/opt/digiverso/goobi/plugins/step/plugin_intranda_step_doi.jar
Copied!
The file doi.xsl is the transformation file that represents the basic framework of the DataCite metadata, into which the plugin inserts the individual metadata of the respective transaction in order to subsequently register the DOIs with it. It must be installed under this path:
1
/opt/digiverso/goobi/xslt/doi.xsl
Copied!
The file plugin_intranda_step_doi.xml is the main configuration file for the plugin. It must be installed under this path:
1
/opt/digiverso/goobi/config/plugin_intranda_step_doi.xml
Copied!

Plugin configuration

Main configuration

The configuration is done via the configuration file plugin_intranda_step_doi.xml and can be adjusted during operation. It is structured as follows:
1
<config_plugin>
2
3
<config>
4
<!-- which projects to use for (can be more then one, otherwise use *) -->
5
<project>*</project>
6
<step>*</step>
7
8
<!-- use debug mode if the temporary xml shall be saved in the Goobi tmp folder -->
9
<debugMode>true</debugMode>
10
11
<!-- authentication and main information -->
12
<!-- For testing: https://mds.test.datacite.org/ -->
13
<!-- For production https://mds.datacite.org/ -->
14
<serviceAddress>https://mds.test.datacite.org/</serviceAddress>
15
16
<!-- authentication and main information -->
17
<base>10.12345678</base>
18
<viewer>https://viewer.example.org/resolver?field=MD_PI_DOI&amp;identifier=</viewer>
19
<username>USER</username>
20
<password>PASSWORD</password>
21
22
<!-- name parts for DOI composition -->
23
<prefix>go</prefix>
24
<name>goobi</name>
25
<separator>-</separator>
26
27
<!-- metadata field from ruleset where to store the DOI -->
28
<metadata>DOI</metadata>
29
30
<!-- Path to the xsl file that shall be used for the datacite xml generation
31
(file must be located inside of the central Goobi xslt folder) -->
32
<xslt>doi.xsl</xslt>
33
34
<field name="LANGUAGE" default="- UNKNOWN LANGUAGE -">
35
<data content="{meta.DocLanguage}"/>
36
</field>
37
38
<field name="TITLE" default="- UNKNOWN TITLE -">
39
<data content="{meta.TitleDocMain}"/>
40
</field>
41
42
<field name="ANCHORTITLE" default="- UNKNOWN ANCHOR TITLE -">
43
<data content="{meta.topstruct.TitleDocMain}"/>
44
</field>
45
46
<field name="ANCHORSUBTITLE" default="- UNKNOWN ANCHOR SUB TITLE -">
47
<data content="{meta.topstruct.TitleDocSub1}"/>
48
</field>
49
50
<field name="IDENTIFIER" default="- NO IDENTIFIER DEFINED -">
51
<data content="{meta.CatalogIDDigital}"/>
52
</field>
53
54
<field name="FORMAT" default="- NO FORMAT DEFINED -">
55
<data content="{meta.FormatSourcePrint}"/>
56
</field>
57
58
<field name="PUBLICATIONYEAR" default="- NO FORMAT DEFINED -">
59
<data content="{meta.PublicationYear}"/>
60
</field>
61
62
<field name="CREATOR" default="- NO CREATOR DEFINED -">
63
<data content="{meta.Author}"/>
64
</field>
65
66
<field name="PUBLISHER" default="- NO PUBLISHER DEFINED -">
67
<data content="{meta.PublisherName}"/>
68
</field>
69
70
<field name="SERIES" default="- NO SERIES DEFINED -">
71
<data content="{meta.PublicationSeries}"/>
72
</field>
73
74
<field name="NUMBER">
75
<data content="{meta.CurrentNo}"/>
76
<data content="{meta.CurrentNoSorting}"/>
77
</field>
78
79
</config>
80
</config_plugin>
Copied!
The block <config> can occur several times 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 meaning:
Value
Description
project
This parameter determines for which project the current block <config> should 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.
debugMode
With this parameter, the debug mode can be activated. This allows the XML file with the defined field variables (doi_in.xml) as well as the transformed DataCite XML file (doi_out.xml) to be stored within the tmp directory of Goobi workflow. This allows insight into the actual metadata used or customised for DOI registration.
base
This parameter defines the DOI base for the facility registered with DataCite.
viewer
The parameter viewer defines the prefix that each DOI link receives. A DOI "10.80831/goobi-1", for example, receives the hyperlink here "https://viewer.goobi.io/idresolver?doi=10.80831/goobi-1"
username
This is the username used for DataCite registration.
password
This is the password used for DataCite registration.
prefix
This is the prefix to be given to the DOI before the name and ID of the document.
name
This is the name to be given to the DOI before the ID of the document.
separator
Define here a separator to be used between the different parts of the DOI.
metadata
This parameter specifies under which metadata name the DOI should be stored in the METS-MODS file. Default is DOI.
xslt
This parameter sets the transformation file to be used for DOI registration.
field - name
The parameter name can be used to name a field variable that is to be available for mapping.
field - default
This parameter can be used to specify a value that the field variable should receive if none of the listed metadata can be found from the elements data.
field - data - content
Within this element, metadata or even static texts can be defined that are to be assigned as values of the field variable. The order of the listed data elements is decisive here. As soon as a field with the content could be found, the following data elements are skipped. This is therefore a descending priority of the listed elements.

Configuration within the transformation file

The transformation file doi.xsl looks something like this:
1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
<xsl:output indent="yes"/>
4
<xsl:template match="/">
5
<resource xmlns="http://datacite.org/schema/kernel-4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.2/metadata.xsd">
6
7
<identifier identifierType="DOI"><xsl:value-of select="//GOOBI-DOI"/></identifier>
8
<titles>
9
<title><xsl:value-of select="//TITLE"/></title>
10
</titles>
11
<publisher><xsl:value-of select="//PUBLISHER"/></publisher>
12
<publicationYear><xsl:value-of select="//PUBLICATIONYEAR"/></publicationYear>
13
<resourceType resourceTypeGeneral="Text"><xsl:value-of select="//GOOBI-DOCTYPE"/></resourceType>
14
<language><xsl:value-of select="//LANGUAGE"/></language>
15
<creators>
16
<creator>
17
<creatorName><xsl:value-of select="//CREATOR"/></creatorName>
18
<givenName><xsl:value-of select="substring-before(//CREATOR, ', ')"/></givenName>
19
<familyName><xsl:value-of select="substring-after(//CREATOR, ', ')"/></familyName>
20
</creator>
21
</creators>
22
<sizes>
23
<size><xsl:value-of select="//FORMAT"/></size>
24
</sizes>
25
<alternateIdentifiers>
26
<alternateIdentifier alternateIdentifierType="Goobi identifier"><xsl:value-of select="//IDENTIFIER"/></alternateIdentifier>
27
</alternateIdentifiers>
28
<contributors>
29
<contributor contributorType="HostingInstitution">
30
<contributorName>intranda GmbH</contributorName>
31
</contributor>
32
</contributors>
33
34
<!--
35
<xsl:if test="//NUMBER != ''">
36
<relatedItem relatedItemType="Collection" relationType="IsPartOf">
37
<title><xsl:value-of select="//ANCHORTITLE"/></title>
38
<title titleType="Subtitle"><xsl:value-of select="//ANCHORSUBTITLE"/></title>
39
<volume><xsl:value-of select="//SERIES"/></volume>
40
<number><xsl:value-of select="//NUMBER"/></number>
41
</relatedItem>
42
</xsl:if>
43
-->
44
45
</resource>
46
</xsl:template>
47
</xsl:stylesheet>
48
49
50
<!--
51
========================== Available internal elements ==========================
52
53
- Publication type of anchor document (e.g. Periodical)
54
<xsl:value-of select="//GOOBI-ANCHOR-DOCTYPE"/>
55
56
- Publication type of document (e.g. Monograph or Volume)
57
<xsl:value-of select="//GOOBI-DOCTYPE"/>
58
59
- Generated DOI
60
<xsl:value-of select="//GOOBI-DOI"/>
61
62
========================== // Available internal elements ==========================
63
-->
Copied!
Within this transformation file, the DataCite XML is listed as the basic framework. Contents of the individual xml elements are automatically inserted from the field variables defined in the main configuration file. Besides these usable definable field variables there are also some additional variables that can be used:
Field Variable
Description
//GOOBI-ANCHOR-DOCTYPE
This variable contains the internal name of the publication type of the parent anchor element (e.g. Periodical).
//GOOBI-DOCTYPE
This variable contains the internal name of the publication type of the work (e.g. Monograph).
//GOOBI-DOI
This variable contains the DOI to be used.

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_doi from the list of installed plugins.
Assigning 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

This plugin first reads its configuration file and tries to fill the field variables with those contents of the METS file that were defined in the configuration. The field variables are run through from top to bottom. As soon as a value has been determined in a defined field, it is assigned to the variable. If no value was determined in any of the fields, the default value is used instead. If no default value is defined for a field variable, it remains empty.
After the creation of the field variables, they are transferred to the transformation file as an xml file. The transformation file uses the defined field variables to insert the contents from the METS file. The DataCite xml file generated in this way is then used for registering or updating the DOIs at DataCite, using the access data and URL information from the configuration file.

Useful additional information

  • DataCite documentation: https://support.datacite.org/docs/getting-started
  • Metadata schema overview: https://schema.datacite.org/
  • Metadata schema for version 4.4 with sample files: 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!