Skip to content

Instantly share code, notes, and snippets.

@jamesvanmil
Last active April 3, 2018 13:51
Show Gist options
  • Save jamesvanmil/529b165c735fbc5ab68d900b8584878a to your computer and use it in GitHub Desktop.
Save jamesvanmil/529b165c735fbc5ab68d900b8584878a to your computer and use it in GitHub Desktop.

Mahonia

https://github.com/curationexperts/mahonia

Notes:

Hyrax::Actor::DataciteActor runs DataciteRegisterJob, which runs Mahonia::IdentifierDispatcher, which assigns an identifier to the object.

This involves two steps:

  • Registering the identifier with the registrar service via registrar.
  • Storing the new identifier on the object, in the provided attribute.

Looks like everything is automatic?

Relevant classes:

app/actors/hyrax/actors/datacite_actor.rb
app/jobs/datacite_register_job.rb
app/lib/datacite/configuration.rb
app/lib/datacite/connection.rb
app/lib/datacite/xml_builder.rb
app/lib/mahonia/datacite_registrar.rb
app/lib/mahonia/identifier_builder.rb
app/lib/mahonia/identifier_dispatcher.rb
app/lib/mahonia/identifier_registrar.rb
app/lib/ok_computer/datacite_connection_check.rb
config/datacite.yml

EZID

https://github.com/duke-libraries/ezid-client

Notes:

Wrangles CRUD, plus batch download/create, and metadata handling for EZID reserved metadata elements and metadata profiles.

Consider extending this to the Datacite EZ API? Is Duke doing this?

Hydra Remote Identifier

Application-end business logic that implements identifier minting as an attribute on the curation_concern model:

app/models/concerns/remotely_identified_by_doi.rb

Minting takes place as part of saving the work, in real time, per the option selected in the UI:

app/actors/hyrax/actors/mint_doi_actor.rb

With application-configurable mapping:

config/initializers/hydra_remote_identifier_config.rb

UI implementation is a tab on the work creation form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment