Sha256: f35be2195bf3179dd35521a93f8a2b1c11f19a6c28eb91a600ab7b264eb95303
Contents?: true
Size: 1.58 KB
Versions: 13
Compression:
Stored size: 1.58 KB
Contents
module Bolognese module Writers module DataciteJsonWriter def datacite_json return nil unless valid? hsh = { "id" => id, "doi" => doi, "creator" => author, "title" => title, "publisher" => publisher, "resource_type_general" => resource_type_general, "resource_type" => additional_type, "subject" => keywords.present? ? keywords.split(", ") : nil, "contributor" => contributor, "date_accepted" => date_accepted, "date_available" => date_available, "date_copyrighted" => date_copyrighted, "date_collected" => date_collected, "date_created" => date_created, "date_published" => date_published, "date_modified" => date_modified, "date_submitted" => date_submitted, "date_valid" => date_valid, "publication_year" => publication_year, "language" => language, "alternate_identifier" => alternate_name, "references" => references, "is_referenced_by" => is_referenced_by, "is_part_of" => is_part_of, "has_part" => has_part, "size" => content_size, "format" => format, "version" => version, "rights" => license, "description" => description, "geo-location" => spatial_coverage, "funding-reference" => funding, "schemaVersion" => schema_version, "provider" => provider }.compact JSON.pretty_generate hsh.presence end end end end
Version data entries
13 entries across 13 versions & 1 rubygems