Class: Datacite::Mapping::NameIdentifier

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

Overview

Uniquely identifies an individual or legal entity, according to various schemes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scheme:, scheme_uri: nil, value:) ⇒ NameIdentifier

Parameters:

  • scheme (Scheme) —

    the name identifier scheme. Cannot be nil.

  • scheme_uri (URI, nil) (defaults to: nil) —

    the URI of the identifier scheme. Optional.

  • value (String) —

    the identifier value. Cannot be nil.



31
32
33
34
35
# File 'lib/datacite/mapping/name_identifier.rb', line 31

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

Instance Attribute Details

#scheme ⇒ String

Returns the name identifier scheme. Cannot be nil.

Returns:

  • (String) —

    the name identifier scheme. Cannot be nil.



13
# File 'lib/datacite/mapping/name_identifier.rb', line 13

text_node :scheme, '@nameIdentifierScheme'

#scheme_uri ⇒ URI?

Returns the URI of the identifier scheme. Optional.

Returns:

  • (URI, nil) —

    the URI of the identifier scheme. Optional.



16
# File 'lib/datacite/mapping/name_identifier.rb', line 16

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

#value ⇒ String

Returns the identifier value. Cannot be nil.

Returns:

  • (String) —

    the identifier value. Cannot be nil.



19
# File 'lib/datacite/mapping/name_identifier.rb', line 19

text_node :value, 'text()'