Class: Datacite::Mapping::FromCocina::ContributorAttributes
- Inherits:
-
Object
- Object
- Datacite::Mapping::FromCocina::ContributorAttributes
- Defined in:
- lib/datacite/mapping/from_cocina/contributor_attributes.rb
Overview
Transform the Cocina::Models::Description to contributor attributes
see https://support.datacite.org/reference/dois-2#put_dois-id
Constant Summary collapse
- DATACITE_PERSON_CONTRIBUTOR_TYPES =
rubocop:disable Metrics/ClassLength
{ 'copyright holder' => 'RightsHolder', 'compiler' => 'DataCollector', 'editor' => 'Editor', 'organizer' => 'Supervisor', 'research team head' => 'ProjectLeader', 'researcher' => 'Researcher' }.freeze
- DATACITE_ORGANIZATION_CONTRIBUTOR_TYPES =
{ 'copyright holder' => 'RightsHolder', 'compiler' => 'DataCollector', 'distributor' => 'Distributor', 'host institution' => 'HostingInstitution', 'issuing body' => 'Distributor', 'publisher' => 'Distributor', 'researcher' => 'ResearchGroup', 'sponsor' => 'Sponsor' }.freeze
Class Method Summary collapse
-
.build ⇒ Hash
Hash of DataCite attributes containing creators, contributors, and fundingReferences keys.
Instance Method Summary collapse
-
#call ⇒ Hash
Hash of DataCite attributes containing creators, contributors, and fundingReferences keys.
-
#initialize(description:) ⇒ ContributorAttributes
constructor
A new instance of ContributorAttributes.
Constructor Details
#initialize(description:) ⇒ ContributorAttributes
35 36 37 |
# File 'lib/datacite/mapping/from_cocina/contributor_attributes.rb', line 35 def initialize(description:) @description = description end |
Class Method Details
.build ⇒ Hash
31 32 33 |
# File 'lib/datacite/mapping/from_cocina/contributor_attributes.rb', line 31 def self.build(...) new(...).call end |
Instance Method Details
#call ⇒ Hash
40 41 42 43 44 45 46 |
# File 'lib/datacite/mapping/from_cocina/contributor_attributes.rb', line 40 def call { creators: datacite_creators, contributors: datacite_contributors, fundingReferences: datacite_funders } end |