bolognese 1.8.18 → 1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/changelog.yml +36 -0
  3. data/CHANGELOG.md +1708 -0
  4. data/Gemfile.lock +46 -44
  5. data/lib/bolognese/author_utils.rb +6 -5
  6. data/lib/bolognese/datacite_utils.rb +69 -3
  7. data/lib/bolognese/metadata.rb +10 -5
  8. data/lib/bolognese/metadata_utils.rb +3 -2
  9. data/lib/bolognese/readers/bibtex_reader.rb +5 -4
  10. data/lib/bolognese/readers/citeproc_reader.rb +1 -1
  11. data/lib/bolognese/readers/crossref_reader.rb +3 -3
  12. data/lib/bolognese/readers/datacite_reader.rb +57 -11
  13. data/lib/bolognese/readers/ris_reader.rb +3 -3
  14. data/lib/bolognese/utils.rb +163 -46
  15. data/lib/bolognese/version.rb +1 -1
  16. data/resources/kernel-4.4/include/datacite-contributorType-v4.xsd +35 -0
  17. data/resources/kernel-4.4/include/datacite-dateType-v4.xsd +25 -0
  18. data/resources/kernel-4.4/include/datacite-descriptionType-v4.xsd +19 -0
  19. data/resources/kernel-4.4/include/datacite-funderIdentifierType-v4.xsd +16 -0
  20. data/resources/kernel-4.4/include/datacite-nameType-v4.xsd +10 -0
  21. data/resources/kernel-4.4/include/datacite-numberType-v4.xsd +12 -0
  22. data/resources/kernel-4.4/include/datacite-relatedIdentifierType-v4.xsd +34 -0
  23. data/resources/kernel-4.4/include/datacite-relationType-v4.xsd +51 -0
  24. data/resources/kernel-4.4/include/datacite-resourceType-v4.xsd +43 -0
  25. data/resources/kernel-4.4/include/datacite-titleType-v4.xsd +14 -0
  26. data/resources/kernel-4.4/include/xml.xsd +286 -0
  27. data/resources/kernel-4.4/metadata.xsd +707 -0
  28. data/resources/kernel-4/include/datacite-contributorType-v4.xsd +21 -21
  29. data/resources/kernel-4/include/datacite-dateType-v4.xsd +11 -11
  30. data/resources/kernel-4/include/datacite-descriptionType-v4.xsd +6 -6
  31. data/resources/kernel-4/include/datacite-funderIdentifierType-v4.xsd +5 -5
  32. data/resources/kernel-4/include/datacite-nameType-v4.xsd +2 -2
  33. data/resources/kernel-4/include/datacite-numberType-v4.xsd +12 -0
  34. data/resources/kernel-4/include/datacite-relatedIdentifierType-v4.xsd +19 -19
  35. data/resources/kernel-4/include/datacite-relationType-v4.xsd +36 -34
  36. data/resources/kernel-4/include/datacite-resourceType-v4.xsd +32 -17
  37. data/resources/kernel-4/include/datacite-titleType-v4.xsd +4 -4
  38. data/resources/kernel-4/metadata.xsd +297 -105
  39. data/spec/fixtures/datacite-example-dissertation-v4.4.xml +56 -0
  40. data/spec/fixtures/datacite-example-full-v4.4.xml +114 -0
  41. data/spec/fixtures/datacite-example-relateditems.xml +61 -0
  42. data/spec/fixtures/datacite-example-xs-string.xml +28 -0
  43. data/spec/fixtures/datacite-geolocationpolygons-multiple.xml +56 -0
  44. data/spec/metadata_spec.rb +1 -1
  45. data/spec/readers/bibtex_reader_spec.rb +2 -2
  46. data/spec/readers/crossref_reader_spec.rb +37 -37
  47. data/spec/readers/datacite_json_reader_spec.rb +1 -1
  48. data/spec/readers/datacite_reader_spec.rb +255 -4
  49. data/spec/readers/ris_reader_spec.rb +3 -3
  50. data/spec/writers/crosscite_writer_spec.rb +3 -3
  51. data/spec/writers/csv_writer_spec.rb +4 -4
  52. data/spec/writers/datacite_json_writer_spec.rb +3 -3
  53. data/spec/writers/datacite_writer_spec.rb +4 -4
  54. data/spec/writers/schema_org_writer_spec.rb +3 -3
  55. metadata +22 -2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bolognese (1.8.18)
4
+ bolognese (1.9)
5
5
  activesupport (>= 4.2.5)
6
6
  benchmark_methods (~> 0.7)
7
7
  bibtex-ruby (>= 5.1.0)
@@ -30,16 +30,16 @@ PATH
30
30
  GEM
31
31
  remote: https://rubygems.org/
32
32
  specs:
33
- activesupport (6.0.3.4)
33
+ activesupport (6.1.3)
34
34
  concurrent-ruby (~> 1.0, >= 1.0.2)
35
- i18n (>= 0.7, < 2)
36
- minitest (~> 5.1)
37
- tzinfo (~> 1.1)
38
- zeitwerk (~> 2.2, >= 2.2.2)
35
+ i18n (>= 1.6, < 2)
36
+ minitest (>= 5.1)
37
+ tzinfo (~> 2.0)
38
+ zeitwerk (~> 2.3)
39
39
  addressable (2.7.0)
40
40
  public_suffix (>= 2.0.2, < 5.0)
41
41
  benchmark_methods (0.7)
42
- bibtex-ruby (5.1.5)
42
+ bibtex-ruby (6.0.0)
43
43
  latex-decode (~> 0.0)
44
44
  builder (3.2.4)
45
45
  citeproc (1.0.10)
@@ -48,15 +48,16 @@ GEM
48
48
  citeproc (~> 1.0, >= 1.0.9)
49
49
  csl (~> 1.5)
50
50
  colorize (0.8.1)
51
- concurrent-ruby (1.1.7)
52
- crack (0.4.4)
51
+ concurrent-ruby (1.1.8)
52
+ crack (0.4.5)
53
+ rexml
53
54
  crass (1.0.6)
54
55
  csl (1.5.2)
55
56
  namae (~> 1.0)
56
57
  csl-styles (1.0.1.10)
57
58
  csl (~> 1.0)
58
59
  diff-lcs (1.4.4)
59
- docile (1.3.2)
60
+ docile (1.3.5)
60
61
  ebnf (2.1.2)
61
62
  htmlentities (~> 4.3)
62
63
  rdf (~> 3.1)
@@ -65,7 +66,7 @@ GEM
65
66
  edtf (3.0.6)
66
67
  activesupport (>= 3.0, < 7.0)
67
68
  excon (0.71.1)
68
- faraday (0.17.3)
69
+ faraday (0.17.4)
69
70
  multipart-post (>= 1.2, < 3)
70
71
  faraday-encoding (0.0.5)
71
72
  faraday
@@ -73,26 +74,26 @@ GEM
73
74
  faraday (>= 0.7.4, < 1.0)
74
75
  gender_detector (0.1.2)
75
76
  unicode_utils (>= 1.3.0)
76
- haml (5.2.0)
77
+ haml (5.2.1)
77
78
  temple (>= 0.8.0)
78
79
  tilt
79
80
  hamster (3.0.0)
80
81
  concurrent-ruby (~> 1.0)
81
82
  hashdiff (1.0.1)
82
83
  htmlentities (4.3.4)
83
- i18n (1.8.5)
84
+ i18n (1.8.9)
84
85
  concurrent-ruby (~> 1.0)
85
86
  iso8601 (0.9.1)
86
- json (2.3.1)
87
- json-canonicalization (0.2.0)
88
- json-ld (3.1.4)
87
+ json (2.5.1)
88
+ json-canonicalization (0.2.1)
89
+ json-ld (3.1.9)
89
90
  htmlentities (~> 4.3)
90
91
  json-canonicalization (~> 0.2)
91
92
  link_header (~> 0.0, >= 0.0.8)
92
93
  multi_json (~> 1.14)
93
94
  rack (~> 2.0)
94
95
  rdf (~> 3.1)
95
- json-ld-preloaded (3.1.3)
96
+ json-ld-preloaded (3.1.5)
96
97
  json-ld (~> 3.1)
97
98
  rdf (~> 3.1)
98
99
  jsonlint (0.3.0)
@@ -100,7 +101,7 @@ GEM
100
101
  optimist (~> 3)
101
102
  latex-decode (0.3.2)
102
103
  link_header (0.0.8)
103
- loofah (2.7.0)
104
+ loofah (2.9.0)
104
105
  crass (~> 1.0.2)
105
106
  nokogiri (>= 1.5.9)
106
107
  maremma (4.7.2)
@@ -115,13 +116,13 @@ GEM
115
116
  oj (>= 2.8.3)
116
117
  oj_mimic_json (~> 1.0, >= 1.0.1)
117
118
  mini_portile2 (2.4.0)
118
- minitest (5.14.2)
119
+ minitest (5.14.4)
119
120
  multi_json (1.15.0)
120
121
  multipart-post (2.1.1)
121
- namae (1.0.1)
122
+ namae (1.1.1)
122
123
  nokogiri (1.10.10)
123
124
  mini_portile2 (~> 2.4.0)
124
- oj (3.10.15)
125
+ oj (3.11.3)
125
126
  oj_mimic_json (1.0.1)
126
127
  optimist (3.0.1)
127
128
  postrank-uri (1.0.24)
@@ -133,43 +134,45 @@ GEM
133
134
  rack-test (0.8.3)
134
135
  rack (>= 1.0, < 3)
135
136
  rake (12.3.3)
136
- rdf (3.1.6)
137
+ rdf (3.1.13)
137
138
  hamster (~> 3.0)
138
139
  link_header (~> 0.0, >= 0.0.8)
139
140
  rdf-aggregate-repo (3.1.0)
140
141
  rdf (~> 3.1)
141
- rdf-rdfa (3.1.2)
142
- haml (~> 5.1)
142
+ rdf-rdfa (3.1.3)
143
+ haml (~> 5.2)
143
144
  htmlentities (~> 4.3)
144
- rdf (~> 3.1, >= 3.1.2)
145
+ rdf (~> 3.1, >= 3.1.13)
145
146
  rdf-aggregate-repo (~> 3.1)
146
- rdf-vocab (~> 3.1, >= 3.1.5)
147
+ rdf-vocab (~> 3.1, >= 3.1.11)
147
148
  rdf-xsd (~> 3.1)
148
- rdf-rdfxml (3.1.0)
149
+ rdf-rdfxml (3.1.1)
149
150
  htmlentities (~> 4.3)
150
151
  rdf (~> 3.1)
151
152
  rdf-rdfa (~> 3.1)
152
153
  rdf-xsd (~> 3.1)
153
- rdf-turtle (3.1.2)
154
- ebnf (~> 2.0)
155
- rdf (~> 3.1, >= 3.1.2)
156
- rdf-vocab (3.1.8)
157
- rdf (~> 3.1, >= 3.1.2)
158
- rdf-xsd (3.1.0)
154
+ rdf-turtle (3.1.3)
155
+ ebnf (~> 2.1)
156
+ rdf (~> 3.1, >= 3.1.8)
157
+ rdf-vocab (3.1.12)
158
+ rdf (~> 3.1, >= 3.1.12)
159
+ rdf-xsd (3.1.1)
159
160
  rdf (~> 3.1)
161
+ rexml (~> 3.2)
162
+ rexml (3.2.4)
160
163
  rspec (3.10.0)
161
164
  rspec-core (~> 3.10.0)
162
165
  rspec-expectations (~> 3.10.0)
163
166
  rspec-mocks (~> 3.10.0)
164
- rspec-core (3.10.0)
167
+ rspec-core (3.10.1)
165
168
  rspec-support (~> 3.10.0)
166
- rspec-expectations (3.10.0)
169
+ rspec-expectations (3.10.1)
167
170
  diff-lcs (>= 1.2.0, < 2.0)
168
171
  rspec-support (~> 3.10.0)
169
- rspec-mocks (3.10.0)
172
+ rspec-mocks (3.10.2)
170
173
  diff-lcs (>= 1.2.0, < 2.0)
171
174
  rspec-support (~> 3.10.0)
172
- rspec-support (3.10.0)
175
+ rspec-support (3.10.2)
173
176
  rspec-xsd (0.1.0)
174
177
  nokogiri (~> 1.6)
175
178
  rspec (~> 3)
@@ -182,18 +185,17 @@ GEM
182
185
  sxp (1.1.0)
183
186
  rdf (~> 3.1)
184
187
  temple (0.8.2)
185
- thor (1.0.1)
186
- thread_safe (0.3.6)
188
+ thor (1.1.0)
187
189
  tilt (2.0.10)
188
- tzinfo (1.2.7)
189
- thread_safe (~> 0.1)
190
+ tzinfo (2.0.4)
191
+ concurrent-ruby (~> 1.0)
190
192
  unicode_utils (1.4.0)
191
193
  vcr (3.0.3)
192
- webmock (3.9.3)
194
+ webmock (3.12.1)
193
195
  addressable (>= 2.3.6)
194
196
  crack (>= 0.3.2)
195
197
  hashdiff (>= 0.4.0, < 2.0.0)
196
- zeitwerk (2.4.1)
198
+ zeitwerk (2.4.2)
197
199
 
198
200
  PLATFORMS
199
201
  ruby
@@ -211,4 +213,4 @@ DEPENDENCIES
211
213
  webmock (~> 3.0, >= 3.0.1)
212
214
 
213
215
  BUNDLED WITH
214
- 2.1.4
216
+ 2.2.14
@@ -15,7 +15,7 @@ module Bolognese
15
15
  def get_one_author(author)
16
16
  # author is a string
17
17
  author = { "creatorName" => author } if author.is_a?(String)
18
-
18
+
19
19
  # malformed XML
20
20
  return nil if author.fetch("creatorName", nil).is_a?(Array)
21
21
 
@@ -31,17 +31,17 @@ module Bolognese
31
31
 
32
32
  name_identifiers = Array.wrap(author.fetch("nameIdentifier", nil)).map do |ni|
33
33
  if ni["nameIdentifierScheme"] == "ORCID"
34
- {
34
+ {
35
35
  "nameIdentifier" => normalize_orcid(ni["__content__"]),
36
36
  "schemeUri" => "https://orcid.org",
37
37
  "nameIdentifierScheme" => "ORCID" }.compact
38
38
  elsif ni["schemeURI"].present?
39
- {
39
+ {
40
40
  "nameIdentifier" => ni["schemeURI"].to_s + ni["__content__"].to_s,
41
41
  "schemeUri" => ni["schemeURI"].to_s,
42
42
  "nameIdentifierScheme" => ni["nameIdentifierScheme"] }.compact
43
43
  else
44
- {
44
+ {
45
45
  "nameIdentifier" => ni["__content__"],
46
46
  "schemeUri" => nil,
47
47
  "nameIdentifierScheme" => ni["nameIdentifierScheme"] }.compact
@@ -59,6 +59,7 @@ module Bolognese
59
59
  return author if family_name.present?
60
60
 
61
61
  if is_personal_name?(author)
62
+ Namae.options[:include_particle_in_family] = true
62
63
  names = Namae.parse(name)
63
64
  parsed_name = names.first
64
65
 
@@ -79,7 +80,7 @@ module Bolognese
79
80
  "affiliation" => Array.wrap(author.fetch("affiliation", nil)),
80
81
  "contributorType" => contributor_type }.compact
81
82
  else
82
- { "nameType" => name_type,
83
+ { "nameType" => name_type,
83
84
  "name" => name,
84
85
  "nameIdentifiers" => Array.wrap(name_identifiers),
85
86
  "affiliation" => Array.wrap(author.fetch("affiliation", nil)),
@@ -40,6 +40,7 @@ module Bolognese
40
40
  insert_language(xml)
41
41
  insert_alternate_identifiers(xml)
42
42
  insert_related_identifiers(xml)
43
+ insert_related_items(xml)
43
44
  insert_sizes(xml)
44
45
  insert_formats(xml)
45
46
  insert_version(xml)
@@ -86,7 +87,7 @@ module Bolognese
86
87
  end
87
88
  Array.wrap(person["affiliation"]).each do |affiliation|
88
89
  attributes = { "affiliationIdentifier" => affiliation["affiliationIdentifier"], "affiliationIdentifierScheme" => affiliation["affiliationIdentifierScheme"], "schemeURI" => affiliation["schemeUri"] }.compact
89
- xml.affiliation(affiliation["name"], attributes)
90
+ xml.affiliation(affiliation["name"], attributes)
90
91
  end
91
92
  end
92
93
 
@@ -209,6 +210,71 @@ module Bolognese
209
210
  end
210
211
  end
211
212
 
213
+ def insert_related_items(xml)
214
+ return xml unless related_items.present?
215
+
216
+ xml.relatedItems do
217
+ related_items.each do |related_item|
218
+ attributes = {
219
+ 'relatedItemType' => related_item["relatedItemType"],
220
+ 'relationType' => related_item["relationType"],
221
+ }.compact
222
+
223
+ xml.relatedItem(related_item["relatedItem"], attributes) do
224
+
225
+ xml.relatedItemIdentifier(related_item["relatedItemIdentifier"]['relatedItemIdentifier'],
226
+ {
227
+ 'relatedItemIdentifierType' => related_item["relatedItemIdentifier"]["relatedItemIdentifierType"],
228
+ 'relatedMetadataScheme' => related_item["relatedItemIdentifier"]["relatedMetadataScheme"],
229
+ 'schemeURI' => related_item["relatedItemIdentifier"]["schemeURI"],
230
+ 'schemeType' => related_item["relatedItemIdentifier"]["schemeType"],
231
+ }.compact
232
+ )
233
+
234
+ xml.creators do
235
+ Array.wrap(related_item['creators']).each do |au|
236
+ xml.creator do
237
+ insert_person(xml, au, "creator")
238
+ end
239
+ end
240
+ end
241
+
242
+ xml.titles do
243
+ Array.wrap(related_item['titles']).each do |title|
244
+ if title.is_a?(Hash)
245
+ t = title
246
+ else
247
+ t = {}
248
+ t["title"] = title
249
+ end
250
+
251
+ attributes = { 'titleType' => t["titleType"], 'xml:lang' => t["lang"] }.compact
252
+ xml.title(t["title"], attributes)
253
+ end
254
+ end
255
+
256
+ xml.publicationYear(related_item['publicationYear'])
257
+ xml.volume(related_item['volume'])
258
+ xml.issue(related_item['issue'])
259
+ xml.number(related_item['number'], {'numberType' => related_item['numberType']}.compact)
260
+ xml.firstPage(related_item['firstPage'])
261
+ xml.lastPage(related_item['lastPage'])
262
+ xml.publisher(related_item['publisher'])
263
+ xml.edition(related_item['edition'])
264
+
265
+ xml.contributors do
266
+ Array.wrap(related_item["contributors"]).each do |con|
267
+ xml.contributor("contributorType" => con["contributorType"] || "Other") do
268
+ insert_person(xml, con, "contributor")
269
+ end
270
+ end
271
+ end
272
+
273
+ end
274
+ end
275
+ end
276
+ end
277
+
212
278
  def insert_sizes(xml)
213
279
  xml.sizes do
214
280
  Array.wrap(sizes).each do |s|
@@ -238,12 +304,12 @@ module Bolognese
238
304
  r["rightsUri"] = normalize_id(rights)
239
305
  end
240
306
 
241
- attributes = {
307
+ attributes = {
242
308
  "rightsURI" => r["rightsUri"],
243
309
  "rightsIdentifier" => r["rightsIdentifier"],
244
310
  "rightsIdentifierScheme" => r["rightsIdentifierScheme"],
245
311
  "schemeURI" => r["schemeUri"],
246
- "xml:lang" => r["lang"]
312
+ "xml:lang" => r["lang"]
247
313
  }.compact
248
314
 
249
315
  xml.rights(r["rights"], attributes)
@@ -8,12 +8,12 @@ module Bolognese
8
8
 
9
9
  attr_accessor :string, :from, :sandbox, :meta, :regenerate, :issue, :show_errors
10
10
  attr_reader :doc, :page_start, :page_end
11
- attr_writer :id, :provider_id, :client_id, :doi, :identifiers, :creators, :contributors, :titles, :publisher,
11
+ attr_writer :id, :provider_id, :client_id, :doi, :identifiers, :creators, :contributors, :titles, :publisher,
12
12
  :rights_list, :dates, :publication_year, :volume, :url, :version_info,
13
13
  :subjects, :contributor, :descriptions, :language, :sizes,
14
14
  :formats, :schema_version, :meta, :container, :agency,
15
15
  :format, :funding_references, :state, :geo_locations,
16
- :types, :content_url, :related_identifiers, :style, :locale, :date_registered
16
+ :types, :content_url, :related_identifiers, :related_items, :style, :locale, :date_registered
17
17
 
18
18
  def initialize(options={})
19
19
  options.symbolize_keys!
@@ -42,7 +42,7 @@ module Bolognese
42
42
  filename = File.basename(options[:input])
43
43
  ext = File.extname(options[:input])
44
44
  if %w(.bib .ris .xml .json).include?(ext)
45
- hsh = {
45
+ hsh = {
46
46
  "url" => options[:url],
47
47
  "state" => options[:state],
48
48
  "date_registered" => options[:date_registered],
@@ -57,7 +57,7 @@ module Bolognese
57
57
  exit 1
58
58
  end
59
59
  else
60
- hsh = {
60
+ hsh = {
61
61
  "url" => options[:url],
62
62
  "state" => options[:state],
63
63
  "date_registered" => options[:date_registered],
@@ -112,6 +112,7 @@ module Bolognese
112
112
  :language,
113
113
  :geo_locations,
114
114
  :related_identifiers,
115
+ :related_items,
115
116
  :formats,
116
117
  :sizes
117
118
  ).compact
@@ -150,7 +151,7 @@ module Bolognese
150
151
  def errors
151
152
  meta.fetch("errors", nil) || datacite_errors(xml: datacite, schema_version: schema_version)
152
153
  end
153
-
154
+
154
155
  def descriptions
155
156
  @descriptions ||= meta.fetch("descriptions", nil)
156
157
  end
@@ -187,6 +188,10 @@ module Bolognese
187
188
  @related_identifiers ||= meta.fetch("related_identifiers", nil)
188
189
  end
189
190
 
191
+ def related_items
192
+ @related_items ||= meta.fetch("related_items", nil)
193
+ end
194
+
190
195
  def url
191
196
  @url ||= meta.fetch("url", nil)
192
197
  end
@@ -108,12 +108,12 @@ module Bolognese
108
108
  end
109
109
 
110
110
  def reverse
111
- { "citation" => Array.wrap(related_identifiers).select { |ri| ri["relationType"] == "IsReferencedBy" }.map do |r|
111
+ { "citation" => Array.wrap(related_identifiers).select { |ri| ri["relationType"] == "IsReferencedBy" }.map do |r|
112
112
  { "@id" => normalize_doi(r["relatedIdentifier"]),
113
113
  "@type" => r["resourceTypeGeneral"] || "ScholarlyArticle",
114
114
  "identifier" => r["relatedIdentifierType"] == "DOI" ? nil : to_identifier(r) }.compact
115
115
  end.unwrap,
116
- "isBasedOn" => Array.wrap(related_identifiers).select { |ri| ri["relationType"] == "IsSupplementTo" }.map do |r|
116
+ "isBasedOn" => Array.wrap(related_identifiers).select { |ri| ri["relationType"] == "IsSupplementTo" }.map do |r|
117
117
  { "@id" => normalize_doi(r["relatedIdentifier"]),
118
118
  "@type" => r["resourceTypeGeneral"] || "ScholarlyArticle",
119
119
  "identifier" => r["relatedIdentifierType"] == "DOI" ? nil : to_identifier(r) }.compact
@@ -193,6 +193,7 @@ module Bolognese
193
193
  "geo_locations" => geo_locations,
194
194
  "funding_references" => funding_references,
195
195
  "related_identifiers" => related_identifiers,
196
+ "related_items" => related_items,
196
197
  "schema_version" => schema_version,
197
198
  "provider_id" => provider_id,
198
199
  "client_id" => client_id,
@@ -31,12 +31,13 @@ module Bolognese
31
31
 
32
32
  meta = string.present? ? BibTeX.parse(string).first : OpenStruct.new
33
33
 
34
- schema_org = BIB_TO_SO_TRANSLATIONS[meta.try(:type).to_s] || "ScholarlyArticle"
34
+ bibtex_type = meta.try(:type).to_s
35
+ schema_org = BIB_TO_SO_TRANSLATIONS[bibtex_type] || "ScholarlyArticle"
35
36
  types = {
36
- "resourceTypeGeneral" => Metadata::SO_TO_DC_TRANSLATIONS[schema_org],
37
+ "resourceTypeGeneral" => Metadata::BIB_TO_DC_TRANSLATIONS[bibtex_type],
37
38
  "resourceType" => Bolognese::Utils::BIB_TO_CR_TRANSLATIONS[meta.try(:type).to_s] || meta.try(:type).to_s,
38
39
  "schemaOrg" => schema_org,
39
- "bibtex" => meta.type.to_s,
40
+ "bibtex" => bibtex_type,
40
41
  "citeproc" => BIB_TO_CP_TRANSLATIONS[meta.try(:type).to_s] || "misc",
41
42
  "ris" => BIB_TO_RIS_TRANSLATIONS[meta.try(:type).to_s] || "GEN"
42
43
  }.compact
@@ -60,7 +61,7 @@ module Bolognese
60
61
  container = if meta.try(:journal).present?
61
62
  first_page = meta.try(:pages).present? ? meta.try(:pages).split("-").map(&:strip)[0] : nil
62
63
  last_page = meta.try(:pages).present? ? meta.try(:pages).split("-").map(&:strip)[1] : nil
63
-
64
+
64
65
  { "type" => "Journal",
65
66
  "title" => meta.journal.to_s,
66
67
  "identifier" => meta.try(:issn).to_s.presence,