Class: Datacite::Mapping::Affiliation

Inherits:
Object
  • Object
show all
Includes:
XML::Mapping
Defined in:
lib/datacite/mapping/affiliation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, identifier: nil, identifier_scheme: nil, scheme_uri: nil) ⇒ Affiliation

Returns a new instance of Affiliation.



11
12
13
14
15
16
# File 'lib/datacite/mapping/affiliation.rb', line 11

def initialize(value:, identifier: nil, identifier_scheme: nil, scheme_uri: nil)
  self.identifier = identifier
  self.identifier_scheme = identifier_scheme
  self.scheme_uri = scheme_uri
  self.value = value
end

Instance Attribute Details

#identifierString?

Returns The affiliation identifier. Optional.

Returns:

  • (String, nil)

    The affiliation identifier. Optional.



27
# File 'lib/datacite/mapping/affiliation.rb', line 27

text_node :identifier, '@affiliationIdentifier', default_value: nil

#identifier_schemeString?

Returns The scheme for the affiliation identifier. Optional.

Returns:

  • (String, nil)

    The scheme for the affiliation identifier. Optional.



31
# File 'lib/datacite/mapping/affiliation.rb', line 31

text_node :identifier_scheme, '@affiliationIdentifierScheme', default_value: nil

#scheme_uriURI?

Returns the URI of the identifier scheme. Optional.

Returns:

  • (URI, nil)

    the URI of the identifier scheme. Optional.



35
# File 'lib/datacite/mapping/affiliation.rb', line 35

uri_node :scheme_uri, '@schemeURI', default_value: nil

#valueString

Returns the name itself.

Returns:

  • (String)

    the name itself.



39
# File 'lib/datacite/mapping/affiliation.rb', line 39

text_node :value, 'text()'