Sha256: aef72b6596a445e387cc8996fb988c07a6d6eb68cc3cbe4e186c807e00d40c9c
Contents?: true
Size: 1.54 KB
Versions: 2
Compression:
Stored size: 1.54 KB
Contents
module Bolognese module Writers module DataciteJsonWriter def datacite_json 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bolognese-0.9.19 | lib/bolognese/writers/datacite_json_writer.rb |
bolognese-0.9.18 | lib/bolognese/writers/datacite_json_writer.rb |