Generate URNs
Goobi Step Plugin for the creation of Uniform Resource Names (URN).

Introduction

This documentation describes the installation, configuration and use of the Step Plugin for the generation of Uniform Resource Names in Goobi workflow.
Details
Text
Identifier
intranda_step_urn
Licence
GPL 2.0 or newer
Compatibility
Goobi workflow 2022.03
Documentation date
06.05.2022

How the plugin works

The plugin is usually executed fully automatically within the workflow. It first determines whether a Uniform Resource Name (URN) already exists. If no URN exists yet, a new URN is registered. If a URN already exists in the metadata, an attempt is made to update the metadata of the URN.

Operation of the plugin

This plugin is integrated into the workflow in such a way that it is executed automatically. Manual interaction with the plugin is not necessary. For use within a workflow step, it should be configured as shown in the screenshot below.
Integration of the plugin into the workflow

Installation

The plugin consists of the following file:
1
plugin_intranda_step_urn.jar
Copied!
This file must be installed in the correct directory so that it is available at the following path after installation:
1
/opt/digiverso/goobi/plugins/step/plugin_intranda_step_urn.jar
Copied!
In addition, there is a configuration file that must be located in the following place:
1
/opt/digiverso/goobi/config/plugin_intranda_step_urn.xml
Copied!

Configuration

The configuration of the plugin is done via the configuration file plugin_intranda_step_urn.xml and can be adjusted during operation. The following is an example configuration file:
1
<?xml version="1.0" encoding="UTF-8"?>
2
<config_plugin>
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 API user -->
16
<apiUser>user</apiUser>
17
18
<!-- password of the API user -->
19
<apiPassword>password</apiPassword>
20
21
<!-- URI of the URN API, must use httos -->
22
<apiUri>https://api.nbn-resolving.org/v2/</apiUri>
23
24
<!-- namespace in which new URNs shall be created -->
25
<!-- example urn:nbn:de:gbv:{SIGIL} -->
26
<namespace>urn:nbn:de:{SIGIL}</namespace>
27
28
<!-- infix that you want to use (optional) -->
29
<infix>-goobi-</infix>
30
31
<!-- example URN urn:nbn:de:gbv:48-goobi-20220404122233 -->
32
33
<!--target url the newly generated urn will forward to. {pi.urn} will be
34
replaced with the newly minted urn -->
35
<publicationUrl>https://viewer.example.org/viewer/resolver?urn={pi.urn}
36
</publicationUrl>
37
38
<!--Generate URN for the work (e.g. for Monograph, Manuscript, Volume, etc.) -->
39
<work>true</work>
40
41
<!--Generate URN for the anchor Element -->
42
<anchor>false</anchor>
43
44
<!--Elements listed here will receive a URN. If work is set to true the
45
work element will receive a URN, even if it is not listed here -->
46
<!--
47
<allowed>
48
<type>Monograph</type>
49
</allowed>
50
-->
51
52
<!-- metadata name for urns in METS-bloc "_urn" -->
53
<typeNameMets>_urn</typeNameMets>
54
55
<!--metadata name for URNs in MODS-bloc. -->
56
<typeNameMods>URN</typeNameMods>
57
58
<!--Shall the plugin create URNs in the MODS-bloc. The rule set entries
59
of certain elements may have to be altered, if you wish to use this -->
60
<createModsUrns>false</createModsUrns>
61
</config>
62
</config_plugin>
Copied!
Parameter
Explanation
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.
apiUser
The name of the API user.
apiPassword
The name of the API user.
apiUri
The URL of the API must be stored in this parameter. As a rule, the standard entry https://api.nbn-resolving.org/v2/ can be used.
namespace
The namespace in which the new URNs are created.
infix
Infix to be inserted in the generated URNs after the namespace. A new URN would have the form {namespace}{infix}{generatedValue}.
publicationUrl
The URL under which the digitised work will be available in the future. As a rule, the publication URL will follow a pattern, e.g. https://viewer.example.org/viewer/resolver?urn={pi.urn}. The placeholder {pi.urn} will be replaced by the plugin with the new URN.
work
Switch that activates the setting of work URNs (Monograph, Manuscript, Volume, etc.).
anchor
Switch that activates the setting of URNs for the anchor element.
allowed -> type
Here you can list elements for which a URN is to be generated. For each element, a <type>ElementName</type> entry must be created in the <allowed> element. Note: If you set anchor or work to true, the anchor element and the work element will receive a URN even if their type names are not listed.
typeNameMets
Specifies the metadata type under which METS-URNs are to be recorded. The default should not be changed here.
typeNameMods
Specifies the metadata type under which MODS-URNs are to be recorded. The default should not be changed here.
createModsUrns
If you want to write URNs in the MODS block, set this switch to true. However, bear in mind that it may be necessary to adjust the rule sets of individual structural elements.