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.
-
#relation_type_information ⇒ String?
Additional information about the selected relationType, if appropriate.
-
#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:, relation_type_information: nil, related_metadata_scheme: nil, scheme_uri: nil, scheme_type: nil) ⇒ RelatedIdentifier
constructor
Initializes a new RelatedIdentifier.
Constructor Details
#initialize(relation_type:, value:, identifier_type:, relation_type_information: nil, related_metadata_scheme: nil, scheme_uri: nil, scheme_type: nil) ⇒ RelatedIdentifier
Initializes a new Datacite::Mapping::RelatedIdentifier.
237 238 239 240 241 242 243 244 245 |
# File 'lib/datacite/mapping/related_identifier.rb', line 237 def initialize(relation_type:, value:, identifier_type:, relation_type_information: nil, related_metadata_scheme: nil, scheme_uri: nil, scheme_type: nil) self.relation_type = relation_type self.relation_type_information = relation_type_information 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.
281 |
# File 'lib/datacite/mapping/related_identifier.rb', line 281 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.
285 |
# File 'lib/datacite/mapping/related_identifier.rb', line 285 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.
269 |
# File 'lib/datacite/mapping/related_identifier.rb', line 269 typesafe_enum_node :relation_type, '@relationType', class: RelationType |
#relation_type_information ⇒ String?
Returns Additional information about the selected relationType, if appropriate. Recommended for use with the relationType Other.
273 |
# File 'lib/datacite/mapping/related_identifier.rb', line 273 text_node :relation_type_information, '@rrelationTypeInformation', default_value: nil |
#resource_type_general ⇒ ResourceTypeGeneral
Returns the general resource type.
289 |
# File 'lib/datacite/mapping/related_identifier.rb', line 289 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.
297 |
# File 'lib/datacite/mapping/related_identifier.rb', line 297 text_node :scheme_type, '@schemeType', default_value: nil |
#scheme_uri ⇒ URI?
Returns the URI of the metadata scheme. Used only with HasMetadata/IsMetadataFor. Optional.
293 |
# File 'lib/datacite/mapping/related_identifier.rb', line 293 uri_node :scheme_uri, '@schemeURI', default_value: nil |
#value ⇒ String
Returns the identifier value. Cannot be nil.
277 |
# File 'lib/datacite/mapping/related_identifier.rb', line 277 text_node :value, 'text()' |