Class: Datacite::Mapping::Rights

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

Overview

Rights information for the Resource

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri: nil, value:) ⇒ Rights

Initializes a new Datacite::Mapping::Rights object

Parameters:

  • uri (URI, nil) (defaults to: nil)

    a URI for the license. Optional.

  • value (String)

    the rights statement. Cannot be empty or nil.



14
15
16
17
# File 'lib/datacite/mapping/rights.rb', line 14

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

Instance Attribute Details

#uriURI?

Returns a URI for the license. Optional.

Returns:

  • (URI, nil)

    a URI for the license. Optional.



26
# File 'lib/datacite/mapping/rights.rb', line 26

uri_node :uri, '@rightsURI', default_value: nil

#valueString

Returns the rights statement. Cannot be empty or nil.

Returns:

  • (String)

    the rights statement. Cannot be empty or nil.



30
# File 'lib/datacite/mapping/rights.rb', line 30

text_node :value, 'text()'