Manually updating DOI metadata

From Dryad wiki
Revision as of 14:53, 1 December 2016 by Elizabeth Hull (talk | contribs) (Using to update DOI registrations)

Jump to: navigation, search


When DOIs are registered with EZID through the REST API, it is not possible to manually edit metadata through the web interface.

EZID provides a python command-line tool that communicates with this API. It is documented in the EZID API Docs:

When Dryad sends metadata to ezid, the metadata uses the DataCite XML schema, and is ANVL-encoded. The 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

  1. Copy the DIM2DATACITE.xsl stylesheet file from the dryad-repo/config/crosswalks directory to a local working location
  2. Determine the item's metadata URL. If the item is at, just add /mets.xml to the URL. Visit the URL in a web browser, and confirm there is an XML document with expected metadata.
  3. Generate a datacite XML document using xsltproc:
    xsltproc DIM2DATACITE.xsl > 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 datacite-a1b2c.xml
datacite-a1b2c.xml validates

Be sure to check for the latest schema.

Using to update DOI registrations

EZID provides a python script to access their API:

Items registered with ezid have elements for target and datacite metadata. To update the target (destination URL), the element name is target and the value is the URL. Note that the identifier is capitalized, this is EZID's convention:

python username:password update doi:10.5061/DRYAD.A1B2C target

To update the datacite metadata, the element name is datacite and the value is the path to your xml file (the @ indicates to read from the file):

python username:password update doi:10.5061/DRYAD.A1B2C datacite @datacite-dryad.a1b2c.xml should allow both on the same line for easier scripting:

python username:password update doi:10.5061/DRYAD.A1B2C target datacite @datacite-dryad.a1b2c.xml

You can also use to create a doi. Use the target key-value pair as well as the datacite key-value pair:

python username:password create doi:10.5061/DRYAD.A1B2C target datacite @datacite-dryad.a1b2c.xml

If the item is in blackout, use for the target.

Note: This method does not appear to be properly setting the "Location (URL)" in EZID. It works correctly for the file-level DOI(s), but not the package-level DOI. For now, you have to go into EZID and update Location(URL) manually to point either to the /resource page or to /publicationBlackout.

See Also