Sha256: 938e33f5903c4a7b04a3f27120f577a0b003a7cc4710ccd47ffd95ea707196d4

Contents?: true

Size: 1.72 KB

Versions: 24

Compression:

Stored size: 1.72 KB

Contents

module Bolognese
  module Writers
    module DataciteJsonWriter
      def datacite_json
        hsh = {
          "id" => identifier,
          "doi" => doi,
          "url" => b_url,
          "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_registered" => date_registered,
          "date_updated" => date_updated,
          "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,
          "version" => b_version,
          "rights" => license,
          "description" => description,
          "geo-location" => spatial_coverage,
          "funding-reference" => funding,
          "schemaVersion" => schema_version,
          "provider_id" => provider_id,
          "client_id" => client_id,
          "provider" => service_provider
        }.compact
        JSON.pretty_generate hsh.presence
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
bolognese-0.10.16 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.10.15 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.10.14 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.10.13 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.10.11 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.10.10 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.10.9 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.10.8 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.10.7 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.10.6 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.10.5 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.10.4 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.10.3 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.10.2 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.10 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.99 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.98 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.97 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.96 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.95 lib/bolognese/writers/datacite_json_writer.rb