Class: Datacite::Mapping::Datacite3RidValueNode

Inherits:
XML::Mapping::TextNode
  • Object
show all
Defined in:
lib/datacite/mapping/related_identifier.rb

Instance Method Summary collapse

Instance Method Details

#obj_to_xml(obj, xml)



182
183
184
185
186
187
188
189
190
191
# File 'lib/datacite/mapping/related_identifier.rb', line 182

def obj_to_xml(obj, xml)
  return super unless obj.identifier_type == RelatedIdentifierType::IGSN

  igsn_value = obj.value
  handle_value = "10273/#{igsn_value}"
  # TODO: move this somewhere more general
  ReadOnlyNodes.warn("IGSN identifiers not directly supported in Datacite 3; converting IGSN #{igsn_value} to Handle #{handle_value}")
  set_attr_value(xml, handle_value)
  true
end