Class: Datacite::Mapping::Rights
- Inherits:
-
Object
- Object
- Datacite::Mapping::Rights
- Includes:
- XML::Mapping
- Defined in:
- lib/datacite/mapping/rights.rb,
lib/datacite/mapping/rights.rb
Overview
Rights information for the Resource
Constant Summary collapse
- CC_ZERO =
Rights.new( uri: URI('https://creativecommons.org/publicdomain/zero/1.0/'), value: 'CC0 1.0 Universal (CC0 1.0) Public Domain Dedication' )
- CC_BY =
Rights.new( uri: URI('https://creativecommons.org/licenses/by/4.0/'), value: 'Creative Commons Attribution 4.0 International (CC BY 4.0)' )
Instance Attribute Summary collapse
-
#uri ⇒ URI?
A URI for the license.
-
#value ⇒ String
The rights statement.
Instance Method Summary collapse
-
#initialize(uri: nil, value:) ⇒ Rights
constructor
Initializes a new Rights object.
Constructor Details
#initialize(uri: nil, value:) ⇒ Rights
Initializes a new Datacite::Mapping::Rights object
16 17 18 19 |
# File 'lib/datacite/mapping/rights.rb', line 16 def initialize(uri: nil, value:) self.uri = uri self.value = value end |
Instance Attribute Details
#uri ⇒ URI?
Returns a URI for the license. Optional.
28 |
# File 'lib/datacite/mapping/rights.rb', line 28 uri_node :uri, '@rightsURI', default_value: nil |
#value ⇒ String
Returns the rights statement. Cannot be empty or nil.
32 |
# File 'lib/datacite/mapping/rights.rb', line 32 text_node :value, 'text()' |