Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
7b7533a
Fix 2 files appear missing from epmi, checksum for z_datacitedoi.pl o…
drtjmb Dec 19, 2014
af8e62b
Fix })}) mashup in z_datacite_core.pl, new epmi
drtjmb Dec 19, 2014
e37c779
Finally fixed the typo in How it works
Dec 19, 2014
adbcb28
code moved to datacitedoi.pl
cziaarm Jan 15, 2015
af246e6
new config options
cziaarm Jan 15, 2015
dae3b09
improved event handling
cziaarm Jan 15, 2015
10c2a39
Event::Datacite::coin_doi for consisstency
cziaarm Jan 15, 2015
43dfb29
pharses for action button and related msgs
cziaarm Jan 15, 2015
7723caf
Action button plugin
cziaarm Jan 15, 2015
53af6d8
updated readme to reflect new features
cziaarm Jan 15, 2015
67d9326
Screen not Sreen!!
cziaarm Jan 16, 2015
8c6c49a
Fixed schemqLocation in config
cziaarm Jan 16, 2015
4db3b82
epmi relates to latest code
cziaarm Jan 16, 2015
1683cd6
Updating plugin code to resolve server error issue
Aug 12, 2016
2daef87
updating plugin, to use 4.0 metadata schema
BorysFeldman Aug 31, 2016
3d1bef3
changes to the plugin for the repo link
BorysFeldman Sep 1, 2016
6b80290
Updating DataCiteEvent.pm to use Crypt::SSLeay module
Sep 2, 2016
ee2d788
Update z_datacitedoi.pl
cziaarm Sep 7, 2016
aceb640
Update z_datacitedoi.pl
BorysFeldman Sep 7, 2016
50233b4
updates to the datacite plugin
BorysFeldman Sep 13, 2016
5178819
Fixing bug when <subjects> tag is created
Nov 3, 2016
cfb51f5
Fixing minor typo
Nov 3, 2016
a3354c4
Adding resourceType and resourceTypeGeneral attributes to DataCiteXML…
Nov 4, 2016
4939f22
Updating rendering of resourceType and subjects elements
Nov 7, 2016
32cc4b0
Fixing minor typos in XML element names
Nov 15, 2016
cc5493d
Fixing rendering of geoLocations XML elements
Nov 16, 2016
402886d
Commenting out creation of contributors element due to requirements o…
Dec 16, 2016
203e85a
Fixed hash ref bug, this closes #6
Nov 29, 2016
4fed4d0
bug fix for creators and orcid, though more to be done, and tidied l…
Mar 6, 2017
a40fe61
Added configurable var for lang tags, use EPrints::XML::to_string, Cl…
Mar 6, 2017
ec11dca
be more explicit about utf8
Mar 6, 2017
d1741dc
updates to the dataciteXML
Apr 26, 2017
3ac5bf6
tab tidying and datacite_custom_repo_link
Jul 11, 2017
be7a6c2
remove the relatedIdentifier for now
Jul 13, 2017
336a27c
reworked Export plugin so that *any* EPrint field can be mapped if a …
Aug 21, 2017
7aab5a0
rationalisation of field render code
Sep 19, 2017
c5454f7
rationalisation of field render code
Sep 19, 2017
4808185
remove uneeded file
Sep 19, 2017
2cb2ba8
removing uneeded file
Sep 19, 2017
d5659f9
updating Datacitexml file
Sep 19, 2017
659a674
Merge pull request #15 from eprintsug/new_release
cziaarm Sep 19, 2017
5a2ab4d
updated epmi
Sep 20, 2017
83f2fa0
updating the license
Sep 27, 2017
b6a4038
updating epmi
Sep 27, 2017
d7f8a91
small udate ad bug fix to the plugin
Nov 1, 2017
dc3afe9
adding the licenses and correcting the funders
Nov 8, 2017
06d541d
corrcting of the comment in the xml file
Nov 8, 2017
c1882f6
correcting the phrase file
Nov 8, 2017
499585b
Update z_datacite_mapping.pl
cziaarm Nov 8, 2017
f8a3259
We derive rights from document MD so not in loop
cziaarm Nov 8, 2017
4e018ab
changes to a for loop
Nov 8, 2017
5fa8843
removed spurious $value
cziaarm Nov 8, 2017
548d743
take rights cl out of loop, stop passing in value
cziaarm Nov 8, 2017
21b4e2a
correccting the rights
Nov 8, 2017
29ee701
Merge branch 'master' of https://github.com/eprintsug/DataCiteDoi
Nov 8, 2017
1789ea2
update epmi
Nov 17, 2017
0f425ff
adding publisher
Dec 8, 2017
f34a02f
fix situation in which the existance of an eprint.rights field makes …
Feb 15, 2018
88403aa
correct Noncommercial to NonCommercial
Feb 15, 2018
b00ef82
update epmi
Feb 15, 2018
64956b6
fix for attached licences
Feb 15, 2018
3bd20bc
Correct typos
goetzk Aug 22, 2018
a666e9a
Merge pull request #20 from goetzk/patch-1
goetzk Sep 13, 2018
b036ac8
Correct typo in comment
goetzk Aug 22, 2018
9791f6d
Add section on licence phrases to readme (#24)
goetzk Sep 13, 2018
2eb6bf3
Reformat and update How it Works (#25)
goetzk Sep 13, 2018
070ec00
Don't show coin doi button if field populated
liamgh Nov 15, 2017
dc7961e
Output publisher element
liamgh Nov 15, 2017
ad369bd
Update location of test Datacite server
goetzk Sep 13, 2018
4d276b8
Modify CoinDOI.pm in line with my suggestion in PR #16
goetzk Sep 13, 2018
30a497d
some additional resrouceType thingies
Sep 13, 2018
fd41e34
significantly better mapping of default eprints data to datacite mand…
Sep 13, 2018
2796673
change to allow more control in ...mapping.pl file
Sep 13, 2018
f4dc3c1
phrases for warnings
Sep 13, 2018
54a5653
validation of data and warnings if mandatory fields are not present
Sep 13, 2018
9ff73f1
I have replaced the contents of README.md's example configuration wit…
goetzk Sep 13, 2018
f722b2f
Make DOI minters configurable (#32)
goetzk Sep 25, 2018
e1ccc5a
WIP: Only permit coining DOIs for certain eprint types (#30)
goetzk Sep 25, 2018
6fa9f2a
Update the controlled mapping list to schema 4.1 (#27)
goetzk Sep 25, 2018
f930aa4
Correct various spelling and whitespace errors (#28)
goetzk Sep 25, 2018
fa34723
Check doi prefix (#31)
goetzk Sep 26, 2018
ea64098
Move from Crypt::SSLeay to LWP::Protocol::https
goetzk Sep 26, 2018
95e7558
Check $content exists before invocation
goetzk Sep 26, 2018
d926512
Include matched regex and DOI prefix in error message
goetzk Sep 27, 2018
b77efe5
Fix mapping for Text types
goetzk Oct 3, 2018
ca572aa
Ignore vim temp files
goetzk Oct 3, 2018
50d3eec
WIP: Libcurl backend (#26)
goetzk Oct 4, 2018
340fdbc
Import WWW::Curl::Easy
goetzk Oct 4, 2018
dfe21a1
Disable adding publisher to XML for DataCite
goetzk Oct 4, 2018
4766bfb
eval() module imports
goetzk Oct 4, 2018
da742f9
be more forgiving with publisher value from config
Oct 6, 2018
436744e
pub squash went funny
Oct 6, 2018
4ea7eff
udpate epmi
Oct 6, 2018
e30f081
fix logic for pu blisher validation
Oct 6, 2018
7de3289
Provide more detailed error log
goetzk Oct 8, 2018
ea4270c
Update version value in DataCiteDoi.epmi
goetzk Oct 8, 2018
7e75287
Be more forgiving when publisher set from config
Oct 6, 2018
23cf8e5
Make funders fields optional
goetzk Oct 9, 2018
0f6c562
Change from iterating eprint fields to mapping functions
goetzk Oct 9, 2018
b1e649f
Change datacite_mapping_date and date validation
goetzk Oct 9, 2018
cda10da
Fix bug with corporate creators
goetzk Oct 10, 2018
de45ae9
Add validation for 'type' before minting
goetzk Oct 10, 2018
34fda23
Update plugin description
goetzk Oct 10, 2018
e895777
Correct bug in new mapping validation
goetzk Oct 11, 2018
c9d6cf5
add an epm
Nov 12, 2018
9af19a3
Update the icon
Nov 12, 2018
3617ee4
Enhance error message on submission failure
goetzk Dec 5, 2018
298e0e7
Change SSL library imports to reduce verbosity
goetzk Dec 13, 2018
415c595
Merge pull request #42 from UniTasLibrary/reduce-verbosity
cziaarm Dec 17, 2018
5ba30d6
update epmi
Nov 12, 2018
4fe3ff7
update epmi after updating icon
Dec 18, 2018
09385b5
fixing funderIdentifier element issue to comply with schema 4.0 (and …
Jan 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

*.sw[po]
DataCiteDoi.epm
4,636 changes: 4,636 additions & 0 deletions DataCiteDoi-2.1.0.epm

Large diffs are not rendered by default.

86 changes: 63 additions & 23 deletions DataCiteDoi.epmi
Original file line number Diff line number Diff line change
@@ -1,61 +1,101 @@
<?xml version='1.0' encoding='utf-8'?>
<epm xmlns='http://eprints.org/ep2/data/2.0' id='http://eprints/id/epm/DataCiteDoi'>
<epm xmlns='http://eprints.org/ep2/data/2.0' id='http://192.168.23.142/id/epm/DataCiteDoi'>
<epmid>DataCiteDoi</epmid>
<uri>http://eprints/id/epm/DataCiteDoi</uri>
<uri>http://192.168.23.142/id/epm/DataCiteDoi</uri>
<documents>
<document>
<files>
<file>
<filename>epm/DataCiteDoi/cfg/cfg.d/z_datacitedoi.pl</filename>
<mime_type>text/plain</mime_type>
<hash>fcb3176e88cf0bccb6c8e000bd1ac0da</hash>
<datasetid>document</datasetid>
<filename>lang/en/phrases/coinDOI.xml</filename>
<mime_type>application/xml</mime_type>
<hash>0df177ef1ffd08206156f49996b70c92</hash>
<hash_type>MD5</hash_type>
<filesize>13340</filesize>
</file>
<file>
<datasetid>document</datasetid>
<filename>static/images/epm/datacitedoi.png</filename>
<mime_type>image/png</mime_type>
<hash>5c277fb358fe95e059b0f2aed2b49ce8</hash>
<hash_type>MD5</hash_type>
<filesize>1070</filesize>
<filesize>21105</filesize>
</file>
<file>
<datasetid>document</datasetid>
<filename>plugins/EPrints/Plugin/Event/DataCiteEvent.pm</filename>
<mime_type>text/x-java</mime_type>
<hash>6a29de65f6268314881d1197cb70b74e</hash>
<hash_type>MD5</hash_type>
<filesize>7606</filesize>
</file>
<file>
<datasetid>document</datasetid>
<filename>plugins/EPrints/Plugin/Export/DataCiteXML.pm</filename>
<mime_type>application/x-symlink</mime_type>
<hash>84f4180876ff95bdde9f78a6a4c300e6</hash>
<mime_type>text/plain</mime_type>
<hash>c2cd69eac69b3008b343d916688b95f4</hash>
<hash_type>MD5</hash_type>
<filesize>3898</filesize>
<filesize>2948</filesize>
</file>
<file>
<filename>static/images/epm/datacitedoi.png</filename>
<mime_type>application/x-symlink</mime_type>
<hash>14e9e2be0a73f452533488634aaea66e</hash>
<datasetid>document</datasetid>
<filename>plugins/EPrints/Plugin/Screen/EPrint/Staff/CoinDOI.pm</filename>
<mime_type>text/plain</mime_type>
<hash>9be56b73b331a5a012466899d8c644f0</hash>
<hash_type>MD5</hash_type>
<filesize>3894</filesize>
</file>
<file>
<datasetid>document</datasetid>
<filename>cfg.d/z_datacite_mapping.pl</filename>
<mime_type>text/plain</mime_type>
<hash>259bcefdcf55f87cabc2d0b002023987</hash>
<hash_type>MD5</hash_type>
<filesize>101504</filesize>
<filesize>20371</filesize>
</file>
<file>
<datasetid>document</datasetid>
<filename>epm/DataCiteDoi/cfg/cfg.d/z_datacitedoi.pl</filename>
<mime_type>text/plain</mime_type>
<hash>98b5a0b2203a9b6a180ae1b996823d20</hash>
<hash_type>MD5</hash_type>
<filesize>6522</filesize>
</file>
</files>
<mime_type>application/x-symlink</mime_type>
<format>other</format>
<main>static/images/epm/datacitedoi.png</main>
<mime_type>text/plain</mime_type>
<format>text</format>
<main>epm/DataCiteDoi/cfg/cfg.d/z_datacitedoi.pl</main>
<content>install</content>
</document>
<document>
<files>
<file>
<datasetid>document</datasetid>
<filename>static/images/epm/datacitedoi.png</filename>
<mime_type>application/x-symlink</mime_type>
<hash>14e9e2be0a73f452533488634aaea66e</hash>
<mime_type>image/png</mime_type>
<hash>5c277fb358fe95e059b0f2aed2b49ce8</hash>
<hash_type>MD5</hash_type>
<filesize>101504</filesize>
<filesize>21105</filesize>
</file>
</files>
<format>image</format>
<main>static/images/epm/datacitedoi.png</main>
<content>coverimage</content>
</document>
</documents>
<version>0.9.0</version>
<version>2.1.0</version>
<creators>
<item>
<name>
<family>Milsted</family>
<given>Andrew</given>
<family>McNicholl</family>
<given>Rory</given>
</name>
<id>repositories@ulcc.ac.uk</id>
</item>
</creators>
<title>Data Cite DOI Registration</title>
<datestamp>2018-12-18 20:07:23</datestamp>
<title>DataCiteDoi - DataCite DOIs for EPrints</title>
<description>Integrate minting and registering DataCite DOIs in to EPrints</description>
<home_page>https://github.com/eprintsug/DataCiteDoi</home_page>
<icon>images/epm/datacitedoi.png</icon>
</epm>
193 changes: 145 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,31 @@ DateCiteDoi - A plugin to mint DataCite DOIs to eprints
Requirements
-------------

In order to use the DataCite API the plugin requires the following perl libraries on to of EPrints requirements.
In order to use the DataCite API the plugin requires the following perl libraries on top of EPrints requirements.

```
use LWP;
use Crypt::SSLeay;
use LWP::Protocol::https;
```

For systems who's
[LWP::Protocol::https](https://metacpan.org/release/LWP-Protocol-https) is
older than 6.0.7 and where connections will be made to SNI enabled servers
WWW::Curl should be used instead.

```
use WWW::Curl;
```

If using WWW::Curl ensure configuration item `$c->{datacitedoi}{use_curl}` is defined.


Installation
-------------

Install the plugin from the bazaar and edit the following config files.

```
z_datacite_core.pl
z_datacitedoi.pl
```

Expand All @@ -33,90 +44,176 @@ This config file contains all the configurable settings for the plugin, see comm
$c->{plugins}{"Export::DataCiteXML"}{params}{disable} = 0;
$c->{plugins}{"Event::DataCiteEvent"}{params}{disable} = 0;

#which field do use for the doi
# Regex to match pre production servers
# $c->{datacitedoi}{test_host_regex} = 'dev|test|preprod';

# which field to use for the doi
$c->{datacitedoi}{eprintdoifield} = "id_number";

#for xml:lang attributes in XML
$c->{datacitedoi}{defaultlangtag} = "en-GB";

#When should you register/update doi info.
$c->{datacitedoi}{eprintstatus} = {inbox=>0,buffer=>1,archive=>1,deletion=>0};

# Choose which EPrint types are allowed (or denied) the ability to coin DOIs. Keys must be lower case and be eprints *types* not *type_names*.
# Entries here can be explicitly skipped by setting 0; however those not listed with a 1 are not given a Coin DOI button by default.
# To include the 'Coin DOI' button on all types leave this undefined.
# $c->{datacitedoi}{typesallowed} = {
# 'article'=>0, # Article
# 'thesis'=>1, # Thesis
# 'creative_works' => 1, # Creative Works
# 'dataset' => 1, # Dataset
# };

#set these (you will get the from data site)
# doi = {prefix}/{repoid}/{eprintid}
$c->{datacitedoi}{prefix} = "10.5072";
$c->{datacitedoi}{repoid} = $c->{host};
$c->{datacitedoi}{apiurl} = "https://test.datacite.org/mds/";
$c->{datacitedoi}{apiurl} = "https://mds.test.datacite.org/";
$c->{datacitedoi}{user} = "USER";
$c->{datacitedoi}{pass} = "PASS";

# datacite requires a Publisher
# The name of the entity that holds, archives, publishes,
# prints, distributes, releases, issues, or produces the
# resource. This property will be used to formulate the
# citation, so consider the prominence of the role.
# eg World Data Center for Climate (WDCC);
$c->{datacitedoi}{publisher} = "Eprints Repo";
# Backend library used for connecting to API; defaults to LWP (configuration item unset) but can also be Curl (configuration item set).
# $c->{datacitedoi}{use_curl} = "yes";

# Priviledge required to be able to mint DOIs
# See https://wiki.eprints.org/w/User_roles.pl for role and privilege configuration
$c->{datacitedoi}{minters} = "eprint/edit:editor";

# need to map eprint type (article, dataset etc) to ResourceType
# Controled list http://schema.datacite.org/meta/kernel-2.2/doc/DataCite-MetadataKernel_v2.2.pdf
# DataCite requires a Publisher
# The name of the entity that holds, archives, publishes,
# prints, distributes, releases, issues, or produces the
# resource. This property will be used to formulate the
# citation, so consider the prominence of the role.
# eg World Data Center for Climate (WDCC);
$c->{datacitedoi}{publisher} = "EPrints Repo";

# Namespace and location for DataCite XML schema
# feel free to update, though no guarantees it'll be accepted if you do
$c->{datacitedoi}{xmlns} = "http://datacite.org/schema/kernel-4";
# Try this instead:
# $c->{datacitedoi}{schemaLocation} = $c->{datacitedoi}{xmlns}." ".$c->{datacitedoi}{xmlns}."/metadata.xsd";
$c->{datacitedoi}{schemaLocation} = $c->{datacitedoi}{xmlns}." http://schema.datacite.org/meta/kernel-4/metadata.xsd";

# Need to map eprint type (article, dataset etc) to DOI ResourceType
# Controlled list http://schema.datacite.org/meta/kernel-4.1/doc/DataCite-MetadataKernel_v4.1.pdf
# where v is the ResourceType and a is the resourceTypeGeneral
#$c->{datacitedoi}{typemap}{book_section} = {v=>'BookSection',a=>'Text'};
$c->{datacitedoi}{typemap}{article} = {v=>'Article',a=>'Text'};
$c->{datacitedoi}{typemap}{book_section} = {v=>'BookSection',a=>'Text'};
$c->{datacitedoi}{typemap}{monograph} = {v=>'Monograph',a=>'Text'};
$c->{datacitedoi}{typemap}{thesis} = {v=>'Thesis',a=>'Text'};
$c->{datacitedoi}{typemap}{book} = {v=>'Book',a=>'Text'};
$c->{datacitedoi}{typemap}{patent} = {v=>'Patent',a=>'Text'};
$c->{datacitedoi}{typemap}{artefact} = {v=>'Artefact',a=>'PhysicalObject'};
$c->{datacitedoi}{typemap}{performance} = {v=>'Performance',a=>'Event'};
$c->{datacitedoi}{typemap}{exhibition} = {v=>'Exhibition',a=>'InteractiveResource'};
$c->{datacitedoi}{typemap}{composition} = {v=>'Composition',a=>'Sound'};
$c->{datacitedoi}{typemap}{performance} = {v=>'Performance',a=>'Event'};
$c->{datacitedoi}{typemap}{image} = {v=>'Image',a=>'Image'};
$c->{datacitedoi}{typemap}{video} = {v=>'Video',a=>'AudioVisual'};
$c->{datacitedoi}{typemap}{audio} = {v=>'Audio',a=>'Sound'};
$c->{datacitedoi}{typemap}{dataset} = {v=>'Dataset',a=>'Dataset'};
$c->{datacitedoi}{typemap}{experiment} = {v=>'Experiment',a=>'Text'};
$c->{datacitedoi}{typemap}{teaching_resource} = {v=>'TeachingResourse',a=>'InteractiveResource'};
$c->{datacitedoi}{typemap}{other} = {v=>'Misc',a=>'Collection'};
$c->{datacitedoi}{typemap}{dataset} = {v=>'Dataset',a=>'Dataset'};
$c->{datacitedoi}{typemap}{audio} = {v=>'Audio',a=>'Sound'};
$c->{datacitedoi}{typemap}{video} = {v=>'Video',a=>'Film'};
```
#For use with recollect
$c->{datacitedoi}{typemap}{data_collection} = {v=>'Dataset',a=>'Dataset'};
$c->{datacitedoi}{typemap}{collection} = {v=>'Collection',a=>'Collection'};

z_datacite_core.pl

Adds the minting plugin, by default it the plugin will run when ever the status (draft,review,deposit,delete) changes.
The plugin will then run asynchronously after the change using the eprints queue so the datacite registration wont affect the users view.
###########################
#### DOI syntax config ####
###########################

```perl
# Adds the minting plugin to the EP_TRIGGER_STATUS_CHANGE
$c->add_dataset_trigger( "eprint", EP_TRIGGER_STATUS_CHANGE , sub {
# Set config of DOI delimiters
# Feel free to change, but they must conform to DOI syntax
# If not set will default to prefix/repoid/id the example below gives prefix/repoid.id
$c->{datacitedoi}{delimiters} = ["/","."];

# If set, plugin will attempt to register what is found in the EP DOI field ($c->{datacitedoi}{eprintdoifield})
# Will only work if what is found adheres to DOI syntax rules (obviously)
$c->{datacitedoi}{allow_custom_doi} = 0;

#Datacite recommend digits of length 8-10 set this param to pad the id to required length
$c->{datacitedoi}{zero_padding} = 8;

##########################################
### Override which URL gets registered ###
##########################################

#Only useful for testing from "wrong" domain (eg an unregistered test server) should be undef for normal operation
$c->{datacitedoi}{override_url} = undef;

##########################
##### When to coin ? #####
##########################

#If auto_coin is set DOIs will be minted on Status change (provided all else is well)
$c->{datacitedoi}{auto_coin} = 0;
#If action_coin is set then a button will be displayed under action tab (for staff) to mint DOIs on an adhoc basis
$c->{datacitedoi}{action_coin} = 1;

# NB setting auto_coin renders action coin redundant as only published items can be registered

####### Formerly in cfg.d/datacite_core.pl #########

# Including datacite_core.pl below as we can make some useful decisions based on the above config.

## Adds the minting plugin to the EP_TRIGGER_STATUS_CHANGE
if($c->{datacitedoi}{auto_coin}){
$c->add_dataset_trigger( "eprint", EP_TRIGGER_STATUS_CHANGE , sub {
my ( %params ) = @_;

my $repository = %params->{repository};

return undef if (!defined $repository);

if (defined %params->{dataobj}) {
my $dataobj = %params->{dataobj};
my $eprint_id = $dataobj->id;
my $repository = $params{repository};

return undef if (!defined $repository);

if (defined $params{dataobj}) {
my $dataobj = $params{dataobj};
my $eprint_id = $dataobj->id;
$repository->dataset( "event_queue" )->create_dataobj({
pluginid => "Event::DataCiteEvent",
action => "datacite_doi",
params => [$dataobj->internal_uri],
});
});
}

});
pluginid => "Event::DataCiteEvent",
action => "datacite_doi",
params => [$dataobj->internal_uri],
});
}

});
}

# Activate an action button, the plugin for which is at
# /plugins/EPrints/Plugin/Screen/EPrint/Staff/CoinDOI.pm
if($c->{datacitedoi}{action_coin}){
$c->{plugins}{"Screen::EPrint::Staff::CoinDOI"}{params}{disable} = 0;
}

```


If using a custom licence you must have phrases for your licences URI and typename (phrases for common licences are supplied in ``lib/lang/en/phrases/coinDOI.xml``). For example in ``archives/REPOID/cfg/lang/en/phrases/copyright.xml`` you might have these entries

```
Who it works
<epp:phrase id="licenses_uri_cc_exampleorg">https://example.org/eprints/about/legal/</epp:phrase>
<epp:phrase id="licenses_typename_cc_exampleor">University of Example important licence</epp:phrase>

```

See [EPrints wiki](https://wiki.eprints.org/w/Phrase_Format) for the full phrase file format and note that variables (like ``{$config{http_url}}``) do not appear to be supported in licenses_uri_*.


How it works
-------------

/lib/plugins/EPrints/Plugin/Event/DataCiteEvent.pm
This is added to the queue and actually mints the doi.
``lib/plugins/EPrints/Plugin/Event/DataCiteEvent.pm`` is added to the queue and actually mints the doi.

``lib/plugins/EPrints/Plugin/Sreen/EPrint/Staff/CoinDOI.pm`` adds a button to enable staff to choose when to coin the DOI and request registration.

/lib/plugins/EPrints/Plugin/Export/DataCiteXML.pm
This exports the metadata xml required for minting, this can be used independently and through the user interface.
``lib/plugins/EPrints/Plugin/Export/DataCiteXML.pm`` exports the metadata xml required for minting, this can be used independently and through the user interface.

By default the plugin uses the following mapping:
By default the plugin produces the following mapping:
```xml
<?xml version="1.0"?>
<resource xmlns="http://datacite.org/schema/kernel-2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://datacite.org/schema/kernel-2.2 http://schema.datacite.org/meta/kernel-2.2/metadata.xsd">
<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/metadata.xsd">
<identifier identifierType="DOI">[[From Config: $c->{datacitedoi}{prefix}/$c->{datacitedoi}{repoid]]/{{Eprintid}}</identifier>
<creators>
<creator>
Expand Down
Loading