6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/bolognese/writers/datacite_json_writer.rb', line 6
def datacite_json
hsh = {
"id" => identifier,
"doi" => doi,
"url" => url,
"creators" => creators,
"titles" => titles,
"publisher" => publisher,
"periodical" => periodical,
"types" => to_datacite_json(types, first: true),
"subjects" => to_datacite_json(subjects),
"contributors" => contributors,
"dates" => to_datacite_json(dates),
"publicationYear" => publication_year,
"language" => language,
"alternateIdentifiers" => to_datacite_json(alternate_identifiers),
"relatedIdentifiers" => to_datacite_json(related_identifiers),
"sizes" => sizes,
"formats" => formats,
"version" => version_info,
"rightsList" => to_datacite_json(rights_list),
"descriptions" => to_datacite_json(descriptions),
"geoLocations" => to_datacite_json(geo_locations),
"fundingReferences" => to_datacite_json(funding_references),
"schemaVersion" => schema_version,
"providerId" => provider_id,
"clientIsd" => client_id,
"agency" => agency
}.compact
JSON.pretty_generate hsh.presence
end
|