Class: Datacite::Mapping::Creator
- Inherits:
-
Object
- Object
- Datacite::Mapping::Creator
- Includes:
- XML::Mapping
- Defined in:
- lib/datacite/mapping/creator.rb
Overview
The main researchers involved working on the data, or the authors of the publication in priority order.
Instance Attribute Summary collapse
-
#affiliations ⇒ Array<String>?
The creator's affiliations.
-
#family_name ⇒ String?
The family name of the creator.
-
#given_name ⇒ String?
The given name of the creator.
-
#identifier ⇒ NameIdentifier?
An identifier for the creator.
-
#name ⇒ String
The personal name of the creator, in the format
Family, Given
.
Instance Method Summary collapse
-
#initialize(name:, given_name: nil, family_name: nil, identifier: nil, affiliations: []) ⇒ Creator
constructor
Initializes a new Creator.
Constructor Details
#initialize(name:, given_name: nil, family_name: nil, identifier: nil, affiliations: []) ⇒ Creator
Initializes a new Datacite::Mapping::Creator.
19 20 21 22 23 24 25 |
# File 'lib/datacite/mapping/creator.rb', line 19 def initialize(name:, given_name: nil, family_name: nil, identifier: nil, affiliations: []) self.name = name self.given_name = given_name self.family_name = family_name self.identifier = identifier self.affiliations = affiliations end |
Instance Attribute Details
#affiliations ⇒ Array<String>?
Returns The creator's affiliations. Defaults to an empty list.
65 |
# File 'lib/datacite/mapping/creator.rb', line 65 array_node :affiliations, 'affiliation', class: String, default_value: [] |
#family_name ⇒ String?
Returns The family name of the creator. Optional.
57 |
# File 'lib/datacite/mapping/creator.rb', line 57 text_node :family_name, 'familyName', default_value: nil |
#given_name ⇒ String?
Returns The given name of the creator. Optional.
53 |
# File 'lib/datacite/mapping/creator.rb', line 53 text_node :given_name, 'givenName', default_value: nil |
#identifier ⇒ NameIdentifier?
Returns An identifier for the creator. Optional.
61 |
# File 'lib/datacite/mapping/creator.rb', line 61 object_node :identifier, 'nameIdentifier', class: NameIdentifier, default_value: nil |
#name ⇒ String
Returns The personal name of the creator, in the format Family, Given
. Cannot be empty or nil.
49 |
# File 'lib/datacite/mapping/creator.rb', line 49 text_node :name, 'creatorName' |