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
-
#identifier ⇒ String?
An identifier for the rights setting.
-
#identifier_scheme ⇒ String?
An identifier for the rights scheme.
-
#language ⇒ String?
An IETF BCP 47, ISO 639-1 language code identifying the language.
-
#scheme_uri ⇒ URI?
A URI for the rights scheme.
-
#uri ⇒ URI?
A URI for the license.
-
#value ⇒ String
The rights statement.
Instance Method Summary collapse
-
#initialize(uri: nil, identifier: nil, identifier_scheme: nil, scheme_uri: nil, language: nil, value: nil) ⇒ Rights
constructor
Initializes a new Rights object.
Constructor Details
#initialize(uri: nil, identifier: nil, identifier_scheme: nil, scheme_uri: nil, language: nil, value: nil) ⇒ Rights
Initializes a new Datacite::Mapping::Rights object
20 21 22 23 24 25 26 27 |
# File 'lib/datacite/mapping/rights.rb', line 20 def initialize(uri: nil, identifier: nil, identifier_scheme: nil, scheme_uri: nil, language: nil, value: nil) self.uri = uri self.identifier = identifier self.identifier_scheme = identifier_scheme self.scheme_uri = scheme_uri self.language = language self.value = value end |
Instance Attribute Details
#identifier ⇒ String?
Returns an identifier for the rights setting. Optional.
47 |
# File 'lib/datacite/mapping/rights.rb', line 47 text_node :identifier, '@rightsIdentifier', default_value: nil |
#identifier_scheme ⇒ String?
Returns an identifier for the rights scheme. Optional.
51 |
# File 'lib/datacite/mapping/rights.rb', line 51 text_node :identifier_scheme, '@rightsIdentifierScheme', default_value: nil |
#language ⇒ String?
Returns an IETF BCP 47, ISO 639-1 language code identifying the language.
43 |
# File 'lib/datacite/mapping/rights.rb', line 43 text_node :language, '@xml:lang', default_value: nil |
#scheme_uri ⇒ URI?
Returns a URI for the rights scheme. Optional.
55 |
# File 'lib/datacite/mapping/rights.rb', line 55 uri_node :scheme_uri, '@schemeURI', default_value: nil |
#uri ⇒ URI?
Returns a URI for the license. Optional.
39 |
# File 'lib/datacite/mapping/rights.rb', line 39 uri_node :uri, '@rightsURI', default_value: nil |
#value ⇒ String
Returns the rights statement. Cannot be empty or nil.
59 |
# File 'lib/datacite/mapping/rights.rb', line 59 text_node :value, 'text()', default_value: nil |