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.



22
23
24
25
# File 'lib/datacite/mapping/rights.rb', line 22

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

Instance Attribute Details

#uri ⇒ URI?

Returns a URI for the license. Optional.

Returns:

  • (URI, nil) —

    a URI for the license. Optional.



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

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

#value ⇒ String

Returns the rights statement. Cannot be empty or nil.

Returns:

  • (String) —

    the rights statement. Cannot be empty or nil.



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

text_node :value, 'text()'