Class: Datacite::Mapping::RelatedIdentifier
- Inherits:
-
Object
- Object
- Datacite::Mapping::RelatedIdentifier
- Includes:
- XML::Mapping
- Defined in:
- lib/datacite/mapping/related_identifier.rb
Overview
Globally unique identifier of a related resource.
Instance Attribute Summary collapse
-
#identifier_type ⇒ RelatedIdentifierType
The type of the related identifier.
-
#related_metadata_scheme ⇒ String?
The name of the metadata scheme.
-
#relation_type ⇒ RelationType
The relationship of the Resource to the related resource.
-
#resource_type_general ⇒ ResourceTypeGeneral
The general resource type.
-
#scheme_type ⇒ String?
The type of the metadata scheme.
-
#scheme_uri ⇒ URI?
The URI of the metadata scheme.
-
#value ⇒ String
The identifier value.
Instance Method Summary collapse
-
#initialize(relation_type:, value:, identifier_type:, related_metadata_scheme: nil, scheme_uri: nil, scheme_type: nil) ⇒ RelatedIdentifier
constructor
Initializes a new RelatedIdentifier.
Constructor Details
#initialize(relation_type:, value:, identifier_type:, related_metadata_scheme: nil, scheme_uri: nil, scheme_type: nil) ⇒ RelatedIdentifier
Initializes a new Datacite::Mapping::RelatedIdentifier.
206 207 208 209 210 211 212 213 |
# File 'lib/datacite/mapping/related_identifier.rb', line 206 def initialize(relation_type:, value:, identifier_type:, related_metadata_scheme: nil, scheme_uri: nil, scheme_type: nil) self.relation_type = relation_type self.value = value self.identifier_type = identifier_type self. = self.scheme_uri = scheme_uri self.scheme_type = scheme_type end |
Instance Attribute Details
#identifier_type ⇒ RelatedIdentifierType
Returns the type of the related identifier. Cannot be nil.
245 |
# File 'lib/datacite/mapping/related_identifier.rb', line 245 typesafe_enum_node :identifier_type, '@relatedIdentifierType', class: RelatedIdentifierType |
#related_metadata_scheme ⇒ String?
Returns the name of the metadata scheme. Used only with HasMetadata
/IsMetadataFor
. Optional.
249 |
# File 'lib/datacite/mapping/related_identifier.rb', line 249 text_node :related_metadata_scheme, '@relatedMetadataScheme', default_value: nil |
#relation_type ⇒ RelationType
Returns the relationship of the Datacite::Mapping::Resource to the related resource. Cannot be nil.
237 |
# File 'lib/datacite/mapping/related_identifier.rb', line 237 typesafe_enum_node :relation_type, '@relationType', class: RelationType |
#resource_type_general ⇒ ResourceTypeGeneral
Returns the general resource type.
253 |
# File 'lib/datacite/mapping/related_identifier.rb', line 253 typesafe_enum_node :resource_type_general, '@resourceTypeGeneral', class: ResourceTypeGeneral, default_value: nil |
#scheme_type ⇒ String?
Returns the type of the metadata scheme. Used only with HasMetadata
/IsMetadataFor
. Optional.
261 |
# File 'lib/datacite/mapping/related_identifier.rb', line 261 text_node :scheme_type, '@schemeType', default_value: nil |
#scheme_uri ⇒ URI?
Returns the URI of the metadata scheme. Used only with HasMetadata
/IsMetadataFor
. Optional.
257 |
# File 'lib/datacite/mapping/related_identifier.rb', line 257 uri_node :scheme_uri, '@schemeURI', default_value: nil |
#value ⇒ String
Returns the identifier value. Cannot be nil.
241 |
# File 'lib/datacite/mapping/related_identifier.rb', line 241 text_node :value, 'text()' |