Sha256: 6cf58dd71251d1b060242ccd3e8ab7deb2716880d1014a64bdb189395aa3cd29

Contents?: true

Size: 1.73 KB

Versions: 32

Compression:

Stored size: 1.73 KB

Contents

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

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
bolognese-0.9.86 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.85 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.84 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.83 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.82 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.81 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.80 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.79 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.78 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.77 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.76 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.75 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.74 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.73 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.72 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.71 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.70 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.69 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.68 lib/bolognese/writers/datacite_json_writer.rb
bolognese-0.9.67 lib/bolognese/writers/datacite_json_writer.rb