Manually updating DOI metadata
Contents
Overview
When DOIs are registered with DataCite through the REST API, it is not possible to manually edit metadata through the web interface.
EZID has provided a python command-line tool that communicates with the API. It is documented in the ezid.cdlib.org EZID API Docs: ezid.py
When Dryad sends metadata, the metadata uses the DataCite XML schema, and is ANVL-encoded. The ezid.py script will handle the ANVL encoding, but the user must provide datacite metadata in XML format.
Manually generating DataCite XML
Dryad generates metadata by transforming XML documents with an XSL, and this process can be replicated using simple command line tools
- Copy the DIM2DATACITE.xsl stylesheet file from the dryad-repo/config/crosswalks directory to a local working location
- Determine the item's metadata URL. If the item is at http://www.datadryad.org/resource/doi:10.5061/dryad.a1b2c, just add /mets.xml to the URL. Visit the URL in a web browser, and confirm there is an XML document with expected metadata.
- Generate a datacite XML document using xsltproc:
xsltproc DIM2DATACITE.xsl http://www.datadryad.org/resource/doi:10.5061/dryad.a1b2c/mets.xml > datacite-dryad.a1b2c.xml
The XML document can now be modified.
Validating DataCite XML
After making modifications, It's a good idea to validate the xml against the DataCite XSD. This can be done with the xmllint tool:
xmllint --noout --schema http://schema.datacite.org/meta/kernel-2.2/metadata.xsd datacite-a1b2c.xml datacite-a1b2c.xml validates
Be sure to check schema.datacite.org for the latest schema.
Using ezid.py to update DOI registrations
There is a tool in dryad-utils for manually registering or updating a DOI. Run it locally on the machine running the Dryad instance, as it will use the transforms located in the deployed Dryad.
Usage: doi_tool.py [options]
Options:
-h, --help show this help message and exit --doi=DOI doi to register or update --blackout use blackout transform to save metadata --action=ACTION register/create/update --username=USERNAME --password=PASSWORD