lib/bolognese/datacite_utils.rb in bolognese-1.5.19 vs lib/bolognese/datacite_utils.rb in bolognese-1.5.21

- old
+ new

@@ -26,16 +26,18 @@ insert_creators(xml) insert_titles(xml) insert_publisher(xml) insert_publication_year(xml) insert_resource_type(xml) - insert_alternate_identifiers(xml) insert_subjects(xml) - insert_language(xml) insert_contributors(xml) insert_dates(xml) + insert_language(xml) + insert_alternate_identifiers(xml) insert_related_identifiers(xml) + insert_sizes(xml) + insert_formats(xml) insert_version(xml) insert_rights_list(xml) insert_descriptions(xml) insert_geo_locations(xml) insert_funding_references(xml) @@ -195,9 +197,25 @@ attributes.merge({ 'relatedMetadataScheme' => related_identifier["relatedMetadataSchema"], 'schemeURI' => related_identifier["schemeUri"], 'schemeType' => related_identifier["schemeType"]}.compact) if %w(HasMetadata IsMetadataFor).include?(related_identifier["relationType"]) xml.relatedIdentifier(related_identifier["relatedIdentifier"], attributes) + end + end + end + + def insert_sizes(xml) + xml.sizes do + Array.wrap(sizes).each do |s| + xml.size(s) + end + end + end + + def insert_formats(xml) + xml.formats do + Array.wrap(formats).each do |f| + xml.format(f) end end end def insert_rights_list(xml)