Class: Datacite::Mapping::Publisher

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

Overview

The type of the resource

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Initializes a new Datacite::Mapping::Publisher

Parameters:

  • language (String, nil) (defaults to: nil)

    an IETF BCP 47, ISO 639-1 language code identifying the language.

  • value (String)

    name of the publisher



15
16
17
18
19
20
21
# File 'lib/datacite/mapping/publisher.rb', line 15

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

Instance Attribute Details

#identifierString?

Returns The publisher identifier. Optional.

Returns:

  • (String, nil)

    The publisher identifier. Optional.



40
# File 'lib/datacite/mapping/publisher.rb', line 40

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

#identifier_schemeString?

Returns The scheme for the publisher identifier. Optional.

Returns:

  • (String, nil)

    The scheme for the publisher identifier. Optional.



44
# File 'lib/datacite/mapping/publisher.rb', line 44

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

#languageString

Returns an IETF BCP 47, ISO 639-1 language code identifying the language.

Returns:

  • (String)

    an IETF BCP 47, ISO 639-1 language code identifying the language.



36
# File 'lib/datacite/mapping/publisher.rb', line 36

text_node :language, '@xml:lang', default_value: nil

#scheme_uriURI?

Returns the URI of the identifier scheme. Optional.

Returns:

  • (URI, nil)

    the URI of the identifier scheme. Optional.



48
# File 'lib/datacite/mapping/publisher.rb', line 48

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

#valueString

Returns the title itself.

Returns:

  • (String)

    the title itself.



52
# File 'lib/datacite/mapping/publisher.rb', line 52

text_node :value, 'text()'