Stash::Merritt
Packaging and SWORD 2.0 deposit module for submitting Stash datasets to Merritt.
Submission process
The Stash::Merritt::SubmissionJob
class does the following:
- if no identifier is present, mint a new DOI with EZID (using the ezid-client gem) and assign it to the resource
- generate a ZIP package containing:
| filename | purpose |
| -------- | ------- |
| stash-wrapper.xml
| Stash wrapper, including Datacite 4 XML |
| mrt-datacite.xml
| Datacite 3 XML, for Merritt internal use. |
| mrt-oaidc.xml
| Dublin Core metadata, packaged in oai_dc format for OAI-PMH compliance |
| mrt-dataone-manifest.txt
| legacy DataONE manifest* |
| mrt-delete.txt
| list of files to be deleted in this version, if any |
* Note that the DataONE manifest is generated for all tenants, not just DataONE.
- using the stash-sword gem, submit the
package to Merritt via SWORD 2.0;
update the
download_uri
andupdate_uri
of the resource if not present - set the resource
version_zipfile
- again via ezid-client, update the target URL (landing page) and Datacite 3 metadata for the DOI
- clean up uploads and other temporary files
- returns a successful
SubmissionResult
If at any point one of these steps fails, the job exits with a failed SubmissionResult
.
Development
Dependencies
stash-merritt expects to find the stash_engine and
stash_datacite source locally under
a sister directory stash_engines
:
┬── stash-merritt
└── stash_engines
├── stash_datacite
└── stash_engine
Test database creation
For compatibility with Travis, you need
- a local MySQL installation
- a
travis@localhost
user with no password - a
stash_merritt
database travis
to have all privileges on that database
This should look something like:
$ mysql -u root
mysql> create user 'travis'@'localhost';
mysql> create database stash_merritt character set UTF8mb4 collate utf8mb4_bin;
mysql> use stash_merritt;
mysql> grant all on stash_merritt.* to 'travis'@'localhost';