bolognese 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/bolognese/datacite_utils.rb +8 -9
- data/lib/bolognese/metadata.rb +7 -44
- data/lib/bolognese/metadata_utils.rb +2 -2
- data/lib/bolognese/readers/bibtex_reader.rb +18 -7
- data/lib/bolognese/readers/citeproc_reader.rb +26 -11
- data/lib/bolognese/readers/codemeta_reader.rb +17 -16
- data/lib/bolognese/readers/crossref_reader.rb +23 -15
- data/lib/bolognese/readers/datacite_json_reader.rb +19 -11
- data/lib/bolognese/readers/datacite_reader.rb +15 -15
- data/lib/bolognese/readers/ris_reader.rb +14 -8
- data/lib/bolognese/readers/schema_org_reader.rb +17 -11
- data/lib/bolognese/utils.rb +22 -5
- data/lib/bolognese/version.rb +1 -1
- data/lib/bolognese/writers/bibtex_writer.rb +1 -1
- data/lib/bolognese/writers/codemeta_writer.rb +3 -3
- data/lib/bolognese/writers/crosscite_writer.rb +3 -10
- data/lib/bolognese/writers/datacite_json_writer.rb +5 -8
- data/lib/bolognese/writers/jats_writer.rb +3 -3
- data/lib/bolognese/writers/ris_writer.rb +1 -1
- data/lib/bolognese/writers/schema_org_writer.rb +7 -7
- data/spec/datacite_utils_spec.rb +8 -7
- data/spec/fixtures/crosscite.json +13 -8
- data/spec/fixtures/datacite.json +8 -4
- data/spec/fixtures/datacite_software.json +0 -1
- data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_date/publication_date.yml +37 -0
- data/spec/readers/bibtex_reader_spec.rb +6 -10
- data/spec/readers/citeproc_reader_spec.rb +3 -3
- data/spec/readers/codemeta_reader_spec.rb +12 -16
- data/spec/readers/crosscite_reader_spec.rb +9 -8
- data/spec/readers/crossref_reader_spec.rb +27 -63
- data/spec/readers/datacite_json_reader_spec.rb +3 -4
- data/spec/readers/datacite_reader_spec.rb +156 -142
- data/spec/readers/ris_reader_spec.rb +6 -7
- data/spec/readers/schema_org_reader_spec.rb +26 -25
- data/spec/utils_spec.rb +8 -0
- data/spec/writers/bibtex_writer_spec.rb +1 -1
- data/spec/writers/citeproc_writer_spec.rb +1 -1
- data/spec/writers/crosscite_writer_spec.rb +6 -5
- data/spec/writers/datacite_writer_spec.rb +14 -17
- metadata +3 -2
@@ -20,17 +20,17 @@ describe Bolognese::Metadata, vcr: true do
|
|
20
20
|
expect(subject.valid?).to be true
|
21
21
|
expect(subject.identifier).to eq("https://doi.org/10.5061/dryad.8515")
|
22
22
|
expect(subject.url).to eq("http://datadryad.org/resource/doi:10.5061/dryad.8515")
|
23
|
-
expect(subject.type).to eq("Dataset")
|
24
|
-
expect(subject.
|
25
|
-
expect(subject.resource_type_general).to eq("Dataset")
|
26
|
-
expect(subject.
|
27
|
-
expect(subject.
|
23
|
+
expect(subject.types["type"]).to eq("Dataset")
|
24
|
+
expect(subject.types["resource_type"]).to eq("DataPackage")
|
25
|
+
expect(subject.types["resource_type_general"]).to eq("Dataset")
|
26
|
+
expect(subject.types["ris"]).to eq("DATA")
|
27
|
+
expect(subject.types["citeproc"]).to eq("dataset")
|
28
28
|
expect(subject.creator.length).to eq(8)
|
29
29
|
expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Benjamin Ollomo", "givenName"=>"Benjamin", "familyName"=>"Ollomo")
|
30
30
|
expect(subject.title).to eq("Data from: A new malaria agent in African hominids.")
|
31
31
|
expect(subject.alternate_identifiers).to eq("type"=>"citation", "name"=>"Ollomo B, Durand P, Prugnolle F, Douzery EJP, Arnathau C, Nkoghe D, Leroy E, Renaud F (2009) A new malaria agent in African hominids. PLoS Pathogens 5(5): e1000446.")
|
32
32
|
expect(subject.rights).to eq("id"=>"http://creativecommons.org/publicdomain/zero/1.0")
|
33
|
-
expect(subject.
|
33
|
+
expect(subject.publication_year).to eq("2011")
|
34
34
|
expect(subject.related_identifiers.length).to eq(6)
|
35
35
|
expect(subject.related_identifiers.last).to eq("id"=>"19478877", "related_identifier_type"=>"PMID", "relation_type"=>"IsSupplementTo")
|
36
36
|
expect(subject.publisher).to eq("Dryad Digital Repository")
|
@@ -43,17 +43,18 @@ describe Bolognese::Metadata, vcr: true do
|
|
43
43
|
subject = Bolognese::Metadata.new(input: input)
|
44
44
|
expect(subject.valid?).to be true
|
45
45
|
expect(subject.identifier).to eq("https://doi.org/10.5438/4k3m-nyvg")
|
46
|
-
expect(subject.type).to eq("ScholarlyArticle")
|
47
|
-
expect(subject.
|
48
|
-
expect(subject.resource_type_general).to eq("Text")
|
49
|
-
expect(subject.
|
50
|
-
expect(subject.
|
46
|
+
expect(subject.types["type"]).to eq("ScholarlyArticle")
|
47
|
+
expect(subject.types["resource_type"]).to eq("BlogPosting")
|
48
|
+
expect(subject.types["resource_type_general"]).to eq("Text")
|
49
|
+
expect(subject.types["ris"]).to eq("RPRT")
|
50
|
+
expect(subject.types["bibtex"]).to eq("article")
|
51
|
+
expect(subject.types["citeproc"]).to eq("article-journal")
|
51
52
|
expect(subject.creator).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0003-1419-2405", "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner")
|
52
53
|
expect(subject.title).to eq("Eating your own Dog Food")
|
53
54
|
expect(subject.alternate_identifiers).to eq("type"=>"Local accession number", "name"=>"MS-49-3632-5083")
|
54
55
|
expect(subject.description["text"]).to start_with("Eating your own dog food")
|
55
|
-
expect(subject.
|
56
|
-
expect(subject.
|
56
|
+
expect(subject.dates).to eq([{"date"=>"2016-12-20", "date_type"=>"Created"}, {"date"=>"2016-12-20", "date_type"=>"Issued"}, {"date"=>"2016-12-20", "date_type"=>"Updated"}])
|
57
|
+
expect(subject.publication_year).to eq("2016")
|
57
58
|
expect(subject.related_identifiers.length).to eq(3)
|
58
59
|
expect(subject.related_identifiers.last).to eq("id"=>"10.5438/0000-00ss", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf")
|
59
60
|
expect(subject.publisher).to eq("DataCite")
|
@@ -66,13 +67,14 @@ describe Bolognese::Metadata, vcr: true do
|
|
66
67
|
subject = Bolognese::Metadata.new(input: input)
|
67
68
|
expect(subject.valid?).to be true
|
68
69
|
expect(subject.identifier).to eq("https://doi.org/10.4230/lipics.tqc.2013.93")
|
69
|
-
expect(subject.type).to eq("ScholarlyArticle")
|
70
|
-
expect(subject.
|
71
|
-
expect(subject.resource_type_general).to eq("Text")
|
70
|
+
expect(subject.types["type"]).to eq("ScholarlyArticle")
|
71
|
+
expect(subject.types["resource_type"]).to eq("ConferencePaper")
|
72
|
+
expect(subject.types["resource_type_general"]).to eq("Text")
|
72
73
|
expect(subject.creator).to eq("type"=>"Person", "name"=>"Nathaniel Johnston", "givenName"=>"Nathaniel", "familyName"=>"Johnston")
|
73
74
|
expect(subject.title).to eq("The Minimum Size of Qubit Unextendible Product Bases")
|
74
75
|
expect(subject.description["text"]).to start_with("We investigate the problem of constructing unextendible product bases in the qubit case")
|
75
|
-
expect(subject.
|
76
|
+
expect(subject.dates).to eq([{"date"=>"2013-11-05", "date_type"=>"Available"}, {"date"=>"2013", "date_type"=>"Issued"}])
|
77
|
+
expect(subject.publication_year).to eq("2013")
|
76
78
|
expect(subject.publisher).to eq("Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik GmbH, Wadern/Saarbruecken, Germany")
|
77
79
|
expect(subject.service_provider).to eq("DataCite")
|
78
80
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.1")
|
@@ -83,13 +85,14 @@ describe Bolognese::Metadata, vcr: true do
|
|
83
85
|
subject = Bolognese::Metadata.new(input: input)
|
84
86
|
expect(subject.valid?).to be true
|
85
87
|
expect(subject.identifier).to eq("https://doi.org/10.17630/bb43e6a3-72e0-464c-9fdd-fbe5d3e56a09")
|
86
|
-
expect(subject.type).to eq("Dataset")
|
87
|
-
expect(subject.
|
88
|
-
expect(subject.resource_type_general).to eq("Audiovisual")
|
88
|
+
expect(subject.types["type"]).to eq("Dataset")
|
89
|
+
expect(subject.types["resource_type"]).to eq("Dataset")
|
90
|
+
expect(subject.types["resource_type_general"]).to eq("Audiovisual")
|
89
91
|
expect(subject.creator.length).to eq(14)
|
90
92
|
expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Haywood, Raphaelle Dawn", "givenName"=>"Raphaelle Dawn", "familyName"=>"Haywood")
|
91
93
|
expect(subject.title).to eq("lang"=>"en", "text"=>"Data underpinning - The Sun as a planet-host star: Proxies from SDO images for HARPS radial-velocity variations")
|
92
|
-
expect(subject.
|
94
|
+
expect(subject.dates).to eq([{"date"=>"2016-01-20", "date_type"=>"Available"}, {"date"=>"2016", "date_type"=>"Issued"}])
|
95
|
+
expect(subject.publication_year).to eq("2016")
|
93
96
|
expect(subject.publisher).to eq("University of St Andrews")
|
94
97
|
expect(subject.service_provider).to eq("DataCite")
|
95
98
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
@@ -100,15 +103,16 @@ describe Bolognese::Metadata, vcr: true do
|
|
100
103
|
subject = Bolognese::Metadata.new(input: input)
|
101
104
|
expect(subject.valid?).to be true
|
102
105
|
expect(subject.identifier).to eq("https://doi.org/10.5281/zenodo.48440")
|
103
|
-
expect(subject.type).to eq("SoftwareSourceCode")
|
104
|
-
expect(subject.resource_type_general).to eq("Software")
|
105
|
-
expect(subject.
|
106
|
-
expect(subject.
|
106
|
+
expect(subject.types["type"]).to eq("SoftwareSourceCode")
|
107
|
+
expect(subject.types["resource_type_general"]).to eq("Software")
|
108
|
+
expect(subject.types["ris"]).to eq("COMP")
|
109
|
+
expect(subject.types["citeproc"]).to eq("article")
|
107
110
|
expect(subject.creator).to eq("type"=>"Person", "name"=>"Kristian Garza", "givenName"=>"Kristian", "familyName"=>"Garza")
|
108
111
|
expect(subject.title).to eq("Analysis Tools For Crossover Experiment Of Ui Using Choice Architecture")
|
109
112
|
expect(subject.description["text"]).to start_with("This tools are used to analyse the data produced by the Crosssover Experiment")
|
110
113
|
expect(subject.rights).to eq([{"id"=>"https://creativecommons.org/licenses/by-nc-sa/4.0", "name"=>"Creative Commons Attribution-NonCommercial-ShareAlike"}, {"name"=>"Open Access"}])
|
111
|
-
expect(subject.
|
114
|
+
expect(subject.dates).to eq([{"date"=>"2016-03-27", "date_type"=>"Issued"}])
|
115
|
+
expect(subject.publication_year).to eq("2016")
|
112
116
|
expect(subject.related_identifiers.length).to eq(1)
|
113
117
|
expect(subject.related_identifiers.last).to eq("id"=>"https://github.com/kjgarza/frame_experiment_analysis/tree/v1.0", "related_identifier_type"=>"URL", "relation_type"=>"IsSupplementTo")
|
114
118
|
expect(subject.publisher).to eq("Zenodo")
|
@@ -121,15 +125,16 @@ describe Bolognese::Metadata, vcr: true do
|
|
121
125
|
subject = Bolognese::Metadata.new(input: input)
|
122
126
|
expect(subject.valid?).to be true
|
123
127
|
expect(subject.identifier).to eq("https://doi.org/10.6084/m9.figshare.4234751.v1")
|
124
|
-
expect(subject.type).to eq("Dataset")
|
125
|
-
expect(subject.
|
126
|
-
expect(subject.resource_type_general).to eq("Dataset")
|
128
|
+
expect(subject.types["type"]).to eq("Dataset")
|
129
|
+
expect(subject.types["resource_type"]).to eq("Dataset")
|
130
|
+
expect(subject.types["resource_type_general"]).to eq("Dataset")
|
127
131
|
expect(subject.creator.count).to eq(11)
|
128
132
|
expect(subject.creator.first).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0002-2410-9671", "name"=>"Alexander Junge", "givenName"=>"Alexander", "familyName"=>"Junge")
|
129
133
|
expect(subject.title).to eq("RAIN v1")
|
130
134
|
expect(subject.description["text"]).to start_with("<b>RAIN: RNA–protein Association and Interaction Networks")
|
131
135
|
expect(subject.rights).to eq("id"=>"https://creativecommons.org/licenses/by/4.0", "name"=>"CC-BY")
|
132
|
-
expect(subject.
|
136
|
+
expect(subject.dates).to eq([{"date"=>"2016-11-16", "date_type"=>"Created"}, {"date"=>"2016-11-16", "date_type"=>"Updated"}, {"date"=>"2016", "date_type"=>"Issued"}])
|
137
|
+
expect(subject.publication_year).to eq("2016")
|
133
138
|
expect(subject.related_identifiers.length).to eq(1)
|
134
139
|
expect(subject.related_identifiers.last).to eq("id"=>"10.6084/m9.figshare.4234751", "related_identifier_type"=>"DOI", "relation_type"=>"IsIdenticalTo")
|
135
140
|
expect(subject.publisher).to eq("Figshare")
|
@@ -142,13 +147,14 @@ describe Bolognese::Metadata, vcr: true do
|
|
142
147
|
subject = Bolognese::Metadata.new(input: input)
|
143
148
|
expect(subject.valid?).to be true
|
144
149
|
expect(subject.identifier).to eq("https://doi.org/10.5281/zenodo.1239")
|
145
|
-
expect(subject.type).to eq("Dataset")
|
146
|
-
expect(subject.resource_type_general).to eq("Dataset")
|
150
|
+
expect(subject.types["type"]).to eq("Dataset")
|
151
|
+
expect(subject.types["resource_type_general"]).to eq("Dataset")
|
147
152
|
expect(subject.creator.length).to eq(4)
|
148
153
|
expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Jahn, Najko", "givenName"=>"Najko", "familyName"=>"Jahn")
|
149
154
|
expect(subject.title).to eq("Publication Fp7 Funding Acknowledgment - Plos Openaire")
|
150
155
|
expect(subject.description["text"]).to start_with("The dataset contains a sample of metadata describing papers")
|
151
|
-
expect(subject.
|
156
|
+
expect(subject.dates).to eq([{"date"=>"2013-04-03", "date_type"=>"Issued"}])
|
157
|
+
expect(subject.publication_year).to eq("2013")
|
152
158
|
expect(subject.publisher).to eq("Zenodo")
|
153
159
|
expect(subject.funding_references).to eq([{"award_number"=>"246686",
|
154
160
|
"award_title"=>"Open Access Infrastructure for Research in Europe",
|
@@ -163,8 +169,8 @@ describe Bolognese::Metadata, vcr: true do
|
|
163
169
|
it "missing resource_type_general" do
|
164
170
|
input = fixture_path + 'vivli.xml'
|
165
171
|
subject = Bolognese::Metadata.new(input: input)
|
166
|
-
expect(subject.type).to eq("CreativeWork")
|
167
|
-
expect(subject.resource_type_general).to be_nil
|
172
|
+
expect(subject.types["type"]).to eq("CreativeWork")
|
173
|
+
expect(subject.types["resource_type_general"]).to be_nil
|
168
174
|
expect(subject.valid?).to be false
|
169
175
|
expect(subject.errors).to eq("2:0: ERROR: Element '{http://datacite.org/schema/kernel-4}resource': Missing child element(s). Expected is one of ( {http://datacite.org/schema/kernel-4}resourceType, {http://datacite.org/schema/kernel-4}subjects, {http://datacite.org/schema/kernel-4}contributors, {http://datacite.org/schema/kernel-4}language, {http://datacite.org/schema/kernel-4}alternateIdentifiers, {http://datacite.org/schema/kernel-4}relatedIdentifiers, {http://datacite.org/schema/kernel-4}sizes, {http://datacite.org/schema/kernel-4}formats, {http://datacite.org/schema/kernel-4}rightsList, {http://datacite.org/schema/kernel-4}descriptions ).")
|
170
176
|
end
|
@@ -174,9 +180,9 @@ describe Bolognese::Metadata, vcr: true do
|
|
174
180
|
subject = Bolognese::Metadata.new(input: input)
|
175
181
|
expect(subject.valid?).to be true
|
176
182
|
expect(subject.identifier).to eq("https://doi.org/10.6071/z7wc73")
|
177
|
-
expect(subject.type).to eq("Dataset")
|
178
|
-
expect(subject.
|
179
|
-
expect(subject.resource_type_general).to eq("Dataset")
|
183
|
+
expect(subject.types["type"]).to eq("Dataset")
|
184
|
+
expect(subject.types["resource_type"]).to eq("dataset")
|
185
|
+
expect(subject.types["resource_type_general"]).to eq("Dataset")
|
180
186
|
expect(subject.creator.length).to eq(6)
|
181
187
|
expect(subject.creator.first).to eq("familyName"=>"Bales", "givenName"=>"Roger", "name"=>"Roger Bales", "type"=>"Person")
|
182
188
|
end
|
@@ -192,7 +198,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
192
198
|
expect(subject.creator.first).to eq("familyName"=>"Schumann", "givenName"=>"Kai", "name"=>"Kai Schumann", "type"=>"Person")
|
193
199
|
expect(subject.title).to eq("Gridded results of swath bathymetric mapping of Disko Bay, Western Greenland, 2007-2008")
|
194
200
|
expect(subject.publisher).to eq("PANGAEA - Data Publisher for Earth & Environmental Science")
|
195
|
-
expect(subject.publication_year).to eq(2011)
|
201
|
+
expect(subject.publication_year).to eq("2011")
|
196
202
|
expect(subject.related_identifiers).to eq([{"id"=>"10.5072/timeseries", "related_identifier_type"=>"DOI", "relation_type"=>"Continues"}])
|
197
203
|
expect(subject.geo_location).to eq([{"geo_location_place"=>"Disko Bay", "geo_location_point"=>{"point_latitude"=>"69.000000", "point_longitude"=>"-52.000000"}}])
|
198
204
|
end
|
@@ -208,7 +214,8 @@ describe Bolognese::Metadata, vcr: true do
|
|
208
214
|
expect(subject.creator.first).to eq("familyName"=>"Bales", "givenName"=>"Roger", "name"=>"Roger Bales", "type"=>"Person")
|
209
215
|
expect(subject.title).to eq("Southern Sierra Critical Zone Observatory (SSCZO), Providence Creek\n meteorological data, soil moisture and temperature, snow depth and air\n temperature")
|
210
216
|
expect(subject.publisher).to eq("UC Merced")
|
211
|
-
expect(subject.
|
217
|
+
expect(subject.dates).to eq([{"date"=>"2014-10-17", "date_type"=>"Updated"}, {"date"=>"2016-03-14T17:02:02Z", "date_type"=>"Available"}, {"date"=>"2013", "date_type"=>"Issued"}])
|
218
|
+
expect(subject.publication_year).to eq("2013")
|
212
219
|
expect(subject.geo_location).to eq([{"geo_location_box"=>
|
213
220
|
{"east_bound_longitude"=>"-119.182",
|
214
221
|
"north_bound_latitude"=>"37.075",
|
@@ -224,7 +231,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
224
231
|
subject = Bolognese::Metadata.new(input: input)
|
225
232
|
expect(subject.valid?).to be true
|
226
233
|
expect(subject.identifier).to eq("https://doi.org/10.14457/kmitl.res.2006.17")
|
227
|
-
expect(subject.type).to eq("Dataset")
|
234
|
+
expect(subject.types["type"]).to eq("Dataset")
|
228
235
|
expect(subject.creator.length).to eq(1)
|
229
236
|
expect(subject.creator.first).to eq(["name", "กัญจนา แซ่เตียว"])
|
230
237
|
end
|
@@ -234,7 +241,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
234
241
|
subject = Bolognese::Metadata.new(input: input)
|
235
242
|
expect(subject.valid?).to be true
|
236
243
|
expect(subject.identifier).to eq("https://doi.org/10.7910/dvn/eqtqyo")
|
237
|
-
expect(subject.type).to eq("Dataset")
|
244
|
+
expect(subject.types["type"]).to eq("Dataset")
|
238
245
|
expect(subject.creator).to eq("name" => "Enos, Ryan (Harvard University); Fowler, Anthony (University Of Chicago); Vavreck, Lynn (UCLA)")
|
239
246
|
end
|
240
247
|
|
@@ -243,7 +250,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
243
250
|
subject = Bolognese::Metadata.new(input: input)
|
244
251
|
expect(subject.valid?).to be true
|
245
252
|
expect(subject.identifier).to eq("https://doi.org/10.18429/jacow-ipac2016-tupmy003")
|
246
|
-
expect(subject.type).to eq("ScholarlyArticle")
|
253
|
+
expect(subject.types["type"]).to eq("ScholarlyArticle")
|
247
254
|
expect(subject.creator.length).to eq(12)
|
248
255
|
expect(subject.creator.first).to eq("type"=>"Person", "id"=>"http://jacow.org/JACoW-00077389", "name"=>"Masashi Otani", "givenName"=>"Masashi", "familyName"=>"Otani")
|
249
256
|
end
|
@@ -253,7 +260,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
253
260
|
subject = Bolognese::Metadata.new(input: input)
|
254
261
|
expect(subject.valid?).to be true
|
255
262
|
expect(subject.identifier).to eq("https://doi.org/10.2314/coscv1")
|
256
|
-
expect(subject.type).to eq("ScholarlyArticle")
|
263
|
+
expect(subject.types["type"]).to eq("ScholarlyArticle")
|
257
264
|
expect(subject.creator.length).to eq(14)
|
258
265
|
expect(subject.creator.first).to include("type"=>"Person", "name"=>"Lambert Heller", "givenName"=>"Lambert", "familyName"=>"Heller")
|
259
266
|
end
|
@@ -271,14 +278,14 @@ describe Bolognese::Metadata, vcr: true do
|
|
271
278
|
subject = Bolognese::Metadata.new(input: input)
|
272
279
|
expect(subject.valid?).to be true
|
273
280
|
expect(subject.identifier).to eq("https://doi.org/10.15125/bath-00114")
|
274
|
-
expect(subject.type).to eq("Dataset")
|
275
|
-
expect(subject.
|
276
|
-
expect(subject.resource_type_general).to eq("Dataset")
|
281
|
+
expect(subject.types["type"]).to eq("Dataset")
|
282
|
+
expect(subject.types["resource_type"]).to eq("Dataset")
|
283
|
+
expect(subject.types["resource_type_general"]).to eq("Dataset")
|
277
284
|
expect(subject.creator.length).to eq(2)
|
278
285
|
expect(subject.creator.first).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0001-8740-8284", "name"=>"Bimbo, Nuno", "givenName"=>"Nuno", "familyName"=>"Bimbo")
|
279
286
|
expect(subject.title).to eq("Dataset for \"Direct Evidence for Solid-Like Hydrogen in a Nanoporous Carbon Hydrogen Storage Material at Supercritical Temperatures\"")
|
280
287
|
expect(subject.description.first["text"]).to start_with("Dataset for Direct Evidence for Solid-Like Hydrogen")
|
281
|
-
expect(subject.
|
288
|
+
expect(subject.publication_year).to eq("2015")
|
282
289
|
expect(subject.publisher).to eq("University of Bath")
|
283
290
|
expect(subject.funding_references.length).to eq(5)
|
284
291
|
expect(subject.funding_references.first).to eq("award_number" => "EP/J016454/1",
|
@@ -296,16 +303,16 @@ describe Bolognese::Metadata, vcr: true do
|
|
296
303
|
subject = Bolognese::Metadata.new(input: input)
|
297
304
|
expect(subject.valid?).to be true
|
298
305
|
expect(subject.identifier).to eq("https://doi.org/10.5438/6423")
|
299
|
-
expect(subject.type).to eq("Collection")
|
300
|
-
expect(subject.
|
301
|
-
expect(subject.resource_type_general).to eq("Collection")
|
302
|
-
expect(subject.
|
303
|
-
expect(subject.
|
306
|
+
expect(subject.types["type"]).to eq("Collection")
|
307
|
+
expect(subject.types["resource_type"]).to eq("Project")
|
308
|
+
expect(subject.types["resource_type_general"]).to eq("Collection")
|
309
|
+
expect(subject.types["ris"]).to eq("GEN")
|
310
|
+
expect(subject.types["citeproc"]).to eq("article")
|
304
311
|
expect(subject.creator.length).to eq(24)
|
305
312
|
expect(subject.creator.first).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0001-5331-6592", "name"=>"Farquhar, Adam", "givenName"=>"Adam", "familyName"=>"Farquhar")
|
306
313
|
expect(subject.title).to eq("Technical and Human Infrastructure for Open Research (THOR)")
|
307
314
|
expect(subject.description["text"]).to start_with("Five years ago, a global infrastructure")
|
308
|
-
expect(subject.
|
315
|
+
expect(subject.publication_year).to eq("2015")
|
309
316
|
expect(subject.publisher).to eq("DataCite")
|
310
317
|
expect(subject.funding_references).to eq([{"award_number"=>"654039",
|
311
318
|
"award_title"=>"THOR – Technical and Human Infrastructure for Open Research",
|
@@ -322,16 +329,16 @@ describe Bolognese::Metadata, vcr: true do
|
|
322
329
|
subject = Bolognese::Metadata.new(input: input)
|
323
330
|
expect(subject.valid?).to be true
|
324
331
|
expect(subject.identifier).to eq("https://doi.org/10.5438/4k3m-nyvg")
|
325
|
-
expect(subject.type).to eq("ScholarlyArticle")
|
326
|
-
expect(subject.
|
327
|
-
expect(subject.resource_type_general).to eq("Text")
|
328
|
-
expect(subject.
|
329
|
-
expect(subject.
|
332
|
+
expect(subject.types["type"]).to eq("ScholarlyArticle")
|
333
|
+
expect(subject.types["resource_type"]).to eq("BlogPosting")
|
334
|
+
expect(subject.types["resource_type_general"]).to eq("Text")
|
335
|
+
expect(subject.types["ris"]).to eq("RPRT")
|
336
|
+
expect(subject.types["citeproc"]).to eq("article-journal")
|
330
337
|
expect(subject.creator).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0003-1419-2405", "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner")
|
331
338
|
expect(subject.title).to eq("Eating your own Dog Food")
|
332
339
|
expect(subject.alternate_identifiers).to eq("type"=>"Local accession number", "name"=>"MS-49-3632-5083")
|
333
|
-
expect(subject.
|
334
|
-
expect(subject.publication_year).to eq(2016)
|
340
|
+
expect(subject.dates).to eq([{"date"=>"2016-12-20", "date_type"=>"Created"}, {"date"=>"2016-12-20", "date_type"=>"Issued"}, {"date"=>"2016-12-20", "date_type"=>"Updated"}])
|
341
|
+
expect(subject.publication_year).to eq("2016")
|
335
342
|
expect(subject.related_identifiers.length).to eq(3)
|
336
343
|
expect(subject.related_identifiers.last).to eq("id"=>"10.5438/0000-00ss", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf")
|
337
344
|
expect(subject.service_provider).to eq("DataCite")
|
@@ -342,16 +349,16 @@ describe Bolognese::Metadata, vcr: true do
|
|
342
349
|
subject = Bolognese::Metadata.new(input: input)
|
343
350
|
expect(subject.valid?).to be true
|
344
351
|
expect(subject.identifier).to eq("https://doi.org/10.5072/testpub")
|
345
|
-
expect(subject.type).to eq("Book")
|
346
|
-
expect(subject.
|
347
|
-
expect(subject.resource_type_general).to eq("Text")
|
348
|
-
expect(subject.
|
349
|
-
expect(subject.
|
352
|
+
expect(subject.types["type"]).to eq("Book")
|
353
|
+
expect(subject.types["resource_type"]).to eq("Monograph")
|
354
|
+
expect(subject.types["resource_type_general"]).to eq("Text")
|
355
|
+
expect(subject.types["ris"]).to eq("BOOK")
|
356
|
+
expect(subject.types["citeproc"]).to eq("book")
|
350
357
|
expect(subject.creator).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
|
351
358
|
expect(subject.title).to eq(["Właściwości rzutowań podprzestrzeniowych", {"title_type"=>"TranslatedTitle", "text"=>"Translation of Polish titles"}])
|
352
359
|
expect(subject.alternate_identifiers).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
|
353
|
-
expect(subject.
|
354
|
-
expect(subject.publication_year).to eq(2010)
|
360
|
+
expect(subject.dates).to eq([{"date"=>"2012-12-13", "date_type"=>"Other"}, {"date"=>"2010", "date_type"=>"Issued"}])
|
361
|
+
expect(subject.publication_year).to eq("2010")
|
355
362
|
expect(subject.related_identifiers.length).to eq(1)
|
356
363
|
expect(subject.related_identifiers.last).to eq("id"=>"10.5272/oldertestpub", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf", "resource_type_general"=>"Text")
|
357
364
|
expect(subject.rights).to eq("id"=>"http://creativecommons.org/licenses/by-nd/2.0", "name"=>"Creative Commons Attribution-NoDerivs 2.0 Generic")
|
@@ -365,16 +372,15 @@ describe Bolognese::Metadata, vcr: true do
|
|
365
372
|
subject = Bolognese::Metadata.new(input: input)
|
366
373
|
expect(subject.valid?).to be true
|
367
374
|
expect(subject.identifier).to eq("https://doi.org/10.5072/testpub")
|
368
|
-
expect(subject.type).to eq("Book")
|
369
|
-
expect(subject.
|
370
|
-
expect(subject.resource_type_general).to eq("Text")
|
371
|
-
expect(subject.
|
372
|
-
expect(subject.
|
375
|
+
expect(subject.types["type"]).to eq("Book")
|
376
|
+
expect(subject.types["resource_type"]).to eq("Monograph")
|
377
|
+
expect(subject.types["resource_type_general"]).to eq("Text")
|
378
|
+
expect(subject.types["ris"]).to eq("BOOK")
|
379
|
+
expect(subject.types["citeproc"]).to eq("book")
|
373
380
|
expect(subject.creator).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
|
374
381
|
expect(subject.title).to eq(["Właściwości rzutowań podprzestrzeniowych", {"title_type"=>"TranslatedTitle", "text"=>"Translation of Polish titles"}])
|
375
382
|
expect(subject.alternate_identifiers).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
|
376
|
-
expect(subject.
|
377
|
-
expect(subject.publication_year).to eq(2010)
|
383
|
+
expect(subject.publication_year).to eq("2010")
|
378
384
|
expect(subject.related_identifiers.length).to eq(1)
|
379
385
|
expect(subject.related_identifiers.last).to eq("id"=>"10.5272/oldertestpub", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf")
|
380
386
|
expect(subject.rights).to eq("id"=>"http://creativecommons.org/licenses/by-nd/2.0", "name"=>"Creative Commons Attribution-NoDerivs 2.0 Generic")
|
@@ -388,16 +394,15 @@ describe Bolognese::Metadata, vcr: true do
|
|
388
394
|
subject = Bolognese::Metadata.new(input: input)
|
389
395
|
expect(subject.valid?).to be true
|
390
396
|
expect(subject.identifier).to eq("https://doi.org/10.5072/testpub")
|
391
|
-
expect(subject.type).to eq("Book")
|
392
|
-
expect(subject.
|
393
|
-
expect(subject.resource_type_general).to eq("Text")
|
394
|
-
expect(subject.
|
395
|
-
expect(subject.
|
397
|
+
expect(subject.types["type"]).to eq("Book")
|
398
|
+
expect(subject.types["resource_type"]).to eq("Monograph")
|
399
|
+
expect(subject.types["resource_type_general"]).to eq("Text")
|
400
|
+
expect(subject.types["ris"]).to eq("BOOK")
|
401
|
+
expect(subject.types["citeproc"]).to eq("book")
|
396
402
|
expect(subject.creator).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
|
397
403
|
expect(subject.title).to eq(["Właściwości rzutowań podprzestrzeniowych", {"title_type"=>"TranslatedTitle", "text"=>"Translation of Polish titles"}])
|
398
404
|
expect(subject.alternate_identifiers).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
|
399
|
-
expect(subject.
|
400
|
-
expect(subject.publication_year).to eq(2010)
|
405
|
+
expect(subject.publication_year).to eq("2010")
|
401
406
|
expect(subject.related_identifiers.length).to eq(1)
|
402
407
|
expect(subject.related_identifiers.last).to eq("id"=>"10.5272/oldertestpub", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf")
|
403
408
|
expect(subject.rights).to eq("id"=>"http://creativecommons.org/licenses/by-nd/2.0", "name"=>"Creative Commons Attribution-NoDerivs 2.0 Generic")
|
@@ -411,16 +416,16 @@ describe Bolognese::Metadata, vcr: true do
|
|
411
416
|
subject = Bolognese::Metadata.new(input: input)
|
412
417
|
expect(subject.valid?).to be true
|
413
418
|
expect(subject.identifier).to eq("https://doi.org/10.5072/testpub")
|
414
|
-
expect(subject.type).to eq("Book")
|
415
|
-
expect(subject.
|
416
|
-
expect(subject.resource_type_general).to eq("Text")
|
417
|
-
expect(subject.
|
418
|
-
expect(subject.
|
419
|
+
expect(subject.types["type"]).to eq("Book")
|
420
|
+
expect(subject.types["resource_type"]).to eq("Monograph")
|
421
|
+
expect(subject.types["resource_type_general"]).to eq("Text")
|
422
|
+
expect(subject.types["ris"]).to eq("BOOK")
|
423
|
+
expect(subject.types["citeproc"]).to eq("book")
|
419
424
|
expect(subject.creator).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
|
420
425
|
expect(subject.title).to eq(["Właściwości rzutowań podprzestrzeniowych", {"title_type"=>"TranslatedTitle", "text"=>"Translation of Polish titles"}])
|
421
426
|
expect(subject.alternate_identifiers).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
|
422
|
-
expect(subject.
|
423
|
-
expect(subject.publication_year).to eq(2010)
|
427
|
+
expect(subject.dates).to eq([{"date"=>"2009-04-29", "date_type"=>"StartDate"}, {"date"=>"2010-01-05", "date_type"=>"EndDate"}, {"date"=>"2010", "date_type"=>"Issued"}])
|
428
|
+
expect(subject.publication_year).to eq("2010")
|
424
429
|
expect(subject.related_identifiers.length).to eq(1)
|
425
430
|
expect(subject.related_identifiers.last).to eq("id"=>"10.5272/oldertestpub", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf")
|
426
431
|
expect(subject.publisher).to eq("Springer")
|
@@ -433,17 +438,18 @@ describe Bolognese::Metadata, vcr: true do
|
|
433
438
|
subject = Bolognese::Metadata.new(input: input, doi: "10.5072/testpub2", content_url: "https://example.org/report.pdf")
|
434
439
|
expect(subject.valid?).to be true
|
435
440
|
expect(subject.identifier).to eq("https://doi.org/10.5072/testpub2")
|
436
|
-
expect(subject.type).to eq("Book")
|
437
|
-
expect(subject.
|
438
|
-
expect(subject.resource_type_general).to eq("Text")
|
441
|
+
expect(subject.types["type"]).to eq("Book")
|
442
|
+
expect(subject.types["resource_type"]).to eq("Monograph")
|
443
|
+
expect(subject.types["resource_type_general"]).to eq("Text")
|
439
444
|
expect(subject.creator).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
|
440
445
|
expect(subject.title).to eq(["Właściwości rzutowań podprzestrzeniowych", {"title_type"=>"TranslatedTitle", "text"=>"Translation of Polish titles"}])
|
441
446
|
expect(subject.alternate_identifiers).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
|
442
|
-
expect(subject.
|
447
|
+
expect(subject.dates).to eq([{"date"=>"2012-12-13", "date_type"=>"Other"}, {"date"=>"2010", "date_type"=>"Issued"}])
|
448
|
+
expect(subject.publication_year).to eq("2010")
|
443
449
|
expect(subject.size).to eq("256 pages")
|
444
450
|
expect(subject.formats).to eq("pdf")
|
445
451
|
expect(subject.content_url).to eq("https://example.org/report.pdf")
|
446
|
-
expect(subject.publication_year).to eq(2010)
|
452
|
+
expect(subject.publication_year).to eq("2010")
|
447
453
|
expect(subject.related_identifiers.length).to eq(1)
|
448
454
|
expect(subject.related_identifiers.last).to eq("id"=>"10.5272/oldertestpub", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf", "resource_type_general"=>"Text")
|
449
455
|
expect(subject.rights).to eq("id"=>"http://creativecommons.org/licenses/by-nd/2.0", "name"=>"Creative Commons Attribution-NoDerivs 2.0 Generic")
|
@@ -456,14 +462,14 @@ describe Bolognese::Metadata, vcr: true do
|
|
456
462
|
subject = Bolognese::Metadata.new(input: input)
|
457
463
|
expect(subject.valid?).to be true
|
458
464
|
expect(subject.identifier).to eq("https://doi.org/10.4231/d38g8fk8b")
|
459
|
-
expect(subject.type).to eq("SoftwareSourceCode")
|
460
|
-
expect(subject.
|
461
|
-
expect(subject.resource_type_general).to eq("Software")
|
465
|
+
expect(subject.types["type"]).to eq("SoftwareSourceCode")
|
466
|
+
expect(subject.types["resource_type"]).to eq("Simulation Tool")
|
467
|
+
expect(subject.types["resource_type_general"]).to eq("Software")
|
462
468
|
expect(subject.creator.length).to eq(5)
|
463
469
|
expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Carlos PatiñO", "givenName"=>"Carlos", "familyName"=>"PatiñO")
|
464
470
|
expect(subject.title).to eq("LAMMPS Data-File Generator")
|
465
|
-
expect(subject.
|
466
|
-
expect(subject.publication_year).to eq(2018)
|
471
|
+
expect(subject.dates).to eq([{"date"=>"2018-07-18", "date_type"=>"Valid"}, {"date"=>"2018-07-18", "date_type"=>"Accepted"}, {"date"=>"2018", "date_type"=>"Issued"}])
|
472
|
+
expect(subject.publication_year).to eq("2018")
|
467
473
|
expect(subject.publisher).to eq("nanoHUB")
|
468
474
|
expect(subject.service_provider).to eq("DataCite")
|
469
475
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.2")
|
@@ -474,11 +480,11 @@ describe Bolognese::Metadata, vcr: true do
|
|
474
480
|
subject = Bolognese::Metadata.new(input: input)
|
475
481
|
expect(subject.valid?).to be true
|
476
482
|
expect(subject.identifier).to eq("https://doi.org/10.5067/terra+aqua/ceres/cldtyphist_l3.004")
|
477
|
-
expect(subject.type).to eq("Dataset")
|
478
|
-
expect(subject.resource_type_general).to eq("Dataset")
|
483
|
+
expect(subject.types["type"]).to eq("Dataset")
|
484
|
+
expect(subject.types["resource_type_general"]).to eq("Dataset")
|
479
485
|
expect(subject.creator).to eq("type"=>"Person", "name"=>"Takmeng Wong", "givenName"=>"Takmeng", "familyName"=>"Wong")
|
480
486
|
expect(subject.title).to eq("CERES Level 3 Cloud Type Historgram Terra+Aqua HDF file - Edition4")
|
481
|
-
expect(subject.
|
487
|
+
expect(subject.publication_year).to eq("2016")
|
482
488
|
expect(subject.publisher).to eq("NASA Langley Atmospheric Science Data Center DAAC")
|
483
489
|
expect(subject.service_provider).to eq("DataCite")
|
484
490
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
@@ -489,12 +495,13 @@ describe Bolognese::Metadata, vcr: true do
|
|
489
495
|
subject = Bolognese::Metadata.new(input: input)
|
490
496
|
expect(subject.valid?).to be true
|
491
497
|
expect(subject.identifier).to eq("https://doi.org/10.4232/1.2745")
|
492
|
-
expect(subject.type).to eq("Dataset")
|
493
|
-
expect(subject.resource_type_general).to eq("Dataset")
|
498
|
+
expect(subject.types["type"]).to eq("Dataset")
|
499
|
+
expect(subject.types["resource_type_general"]).to eq("Dataset")
|
494
500
|
expect(subject.creator).to eq("type"=>"Organization", "name"=>"Europäische Kommission")
|
495
501
|
expect(subject.title).to eq([{"lang"=>"de", "text"=>"Flash Eurobarometer 54 (Madrid Summit)"}, {"lang"=>"en", "text"=>"Flash Eurobarometer 54 (Madrid Summit)"}, {"title_type"=>"Subtitle","lang"=>"de", "text"=>"The Common European Currency"}, {"title_type"=>"Subtitle", "lang"=>"en", "text"=>"The Common European Currency"}])
|
496
502
|
expect(subject.keywords).to eq([{"subject_scheme"=>"ZA", "text"=>"KAT12 International Institutions, Relations, Conditions"}])
|
497
|
-
expect(subject.
|
503
|
+
expect(subject.dates).to eq([{"date"=>"1995-12", "date_type"=>"Collected"}, {"date"=>"1996", "date_type"=>"Issued"}])
|
504
|
+
expect(subject.publication_year).to eq("1996")
|
498
505
|
expect(subject.publisher).to eq("GESIS Data Archive")
|
499
506
|
expect(subject.service_provider).to eq("DataCite")
|
500
507
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
@@ -505,13 +512,14 @@ describe Bolognese::Metadata, vcr: true do
|
|
505
512
|
subject = Bolognese::Metadata.new(input: input)
|
506
513
|
expect(subject.valid?).to be true
|
507
514
|
expect(subject.identifier).to eq("https://doi.org/10.4229/23rdeupvsec2008-5co.8.3")
|
508
|
-
expect(subject.type).to eq("ScholarlyArticle")
|
509
|
-
expect(subject.
|
510
|
-
expect(subject.resource_type_general).to eq("Text")
|
515
|
+
expect(subject.types["type"]).to eq("ScholarlyArticle")
|
516
|
+
expect(subject.types["resource_type"]).to eq("Article")
|
517
|
+
expect(subject.types["resource_type_general"]).to eq("Text")
|
511
518
|
expect(subject.creator.length).to eq(3)
|
512
519
|
expect(subject.creator.first).to eq("type"=>"Person", "name"=>"P. Llamas", "givenName"=>"P.", "familyName"=>"Llamas")
|
513
520
|
expect(subject.title).to eq("Rural Electrification With Hybrid Power Systems Based on Renewables - Technical System Configurations From the Point of View of the European Industry")
|
514
|
-
expect(subject.
|
521
|
+
expect(subject.dates).to eq([{"date"=>"2008-11-01", "date_type"=>"Valid"}, {"date"=>"2008", "date_type"=>"Issued"}])
|
522
|
+
expect(subject.publication_year).to eq("2008")
|
515
523
|
expect(subject.periodical).to eq("title"=>"23rd European Photovoltaic Solar Energy Conference and Exhibition, 1-5 September 2008, Valencia, Spain; 3353-3356", "type"=>"Periodical")
|
516
524
|
expect(subject.description["text"]).to start_with("Aim of this paper is the presentation")
|
517
525
|
expect(subject.publisher).to eq("WIP-Munich")
|
@@ -534,12 +542,13 @@ describe Bolognese::Metadata, vcr: true do
|
|
534
542
|
subject = Bolognese::Metadata.new(input: input)
|
535
543
|
expect(subject.valid?).to be true
|
536
544
|
expect(subject.identifier).to eq("https://doi.org/10.18169/papdeottx00502")
|
537
|
-
expect(subject.type).to eq("Dataset")
|
538
|
-
expect(subject.
|
539
|
-
expect(subject.resource_type_general).to eq("Dataset")
|
545
|
+
expect(subject.types["type"]).to eq("Dataset")
|
546
|
+
expect(subject.types["resource_type"]).to eq("Disclosure")
|
547
|
+
expect(subject.types["resource_type_general"]).to eq("Dataset")
|
540
548
|
expect(subject.creator).to eq("name"=>"Anonymous")
|
541
549
|
expect(subject.title).to eq( "Messung der Bildunschaerfe in H.264-codierten Bildern und Videosequenzen")
|
542
|
-
expect(subject.
|
550
|
+
expect(subject.dates).to eq([{"date"=>"07.04.2017", "date_type"=>"Available"}, {"date"=>"2017", "date_type"=>"Issued"}])
|
551
|
+
expect(subject.publication_year).to eq("2017")
|
543
552
|
expect(subject.publisher).to eq("Siemens AG")
|
544
553
|
expect(subject.service_provider).to eq("DataCite")
|
545
554
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
@@ -550,9 +559,9 @@ describe Bolognese::Metadata, vcr: true do
|
|
550
559
|
subject = Bolognese::Metadata.new(input: input)
|
551
560
|
expect(subject.valid?).to be true
|
552
561
|
expect(subject.identifier).to eq("https://doi.org/10.21944/temis-ozone-msr2")
|
553
|
-
expect(subject.type).to eq("Dataset")
|
554
|
-
expect(subject.
|
555
|
-
expect(subject.resource_type_general).to eq("Dataset")
|
562
|
+
expect(subject.types["type"]).to eq("Dataset")
|
563
|
+
expect(subject.types["resource_type"]).to eq("Satellite data")
|
564
|
+
expect(subject.types["resource_type_general"]).to eq("Dataset")
|
556
565
|
expect(subject.creator).to eq([{"type"=>"Person",
|
557
566
|
"id"=>"https://orcid.org/0000-0002-0077-5338",
|
558
567
|
"name"=>"Ronald Van Der A",
|
@@ -569,7 +578,8 @@ describe Bolognese::Metadata, vcr: true do
|
|
569
578
|
"familyName"=>"Eskes"}])
|
570
579
|
expect(subject.title).to eq("Multi-Sensor Reanalysis (MSR) of total ozone, version 2")
|
571
580
|
expect(subject.version).to eq("2")
|
572
|
-
expect(subject.
|
581
|
+
expect(subject.dates).to eq([{"date"=>"2014-04-25", "date_type"=>"Available"}, {"date"=>"1970-04-01 / (:tba)", "date_type"=>"Collected"}, {"date"=>"2015", "date_type"=>"Issued"}])
|
582
|
+
expect(subject.publication_year).to eq("2015")
|
573
583
|
expect(subject.publisher).to eq("Royal Netherlands Meteorological Institute (KNMI)")
|
574
584
|
expect(subject.service_provider).to eq("DataCite")
|
575
585
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
@@ -590,12 +600,12 @@ describe Bolognese::Metadata, vcr: true do
|
|
590
600
|
subject = Bolognese::Metadata.new(input: input, sandbox: true)
|
591
601
|
expect(subject.valid?).to be true
|
592
602
|
expect(subject.identifier).to eq("https://handle.test.datacite.org/10.22002/d1.694")
|
593
|
-
expect(subject.type).to eq("Dataset")
|
594
|
-
expect(subject.resource_type_general).to eq("Dataset")
|
603
|
+
expect(subject.types["type"]).to eq("Dataset")
|
604
|
+
expect(subject.types["resource_type_general"]).to eq("Dataset")
|
595
605
|
expect(subject.creator).to eq("name"=>"Tester")
|
596
606
|
expect(subject.title).to eq("Test license")
|
597
|
-
expect(subject.
|
598
|
-
expect(subject.publication_year).to eq(2018)
|
607
|
+
expect(subject.dates).to eq([{"date"=>"2018-01-12", "date_type"=>"Issued"}])
|
608
|
+
expect(subject.publication_year).to eq("2018")
|
599
609
|
expect(subject.publisher).to eq("CaltechDATA")
|
600
610
|
expect(subject.service_provider).to eq("DataCite")
|
601
611
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
@@ -607,14 +617,14 @@ describe Bolognese::Metadata, vcr: true do
|
|
607
617
|
subject = Bolognese::Metadata.new(input: input, sandbox: true)
|
608
618
|
expect(subject.valid?).to be true
|
609
619
|
expect(subject.identifier).to eq("https://handle.test.datacite.org/10.21956/gatesopenres.530.r190")
|
610
|
-
expect(subject.type).to eq("ScholarlyArticle")
|
611
|
-
expect(subject.resource_type_general).to eq("Text")
|
612
|
-
expect(subject.
|
613
|
-
expect(subject.
|
620
|
+
expect(subject.types["type"]).to eq("ScholarlyArticle")
|
621
|
+
expect(subject.types["resource_type_general"]).to eq("Text")
|
622
|
+
expect(subject.types["ris"]).to eq("RPRT")
|
623
|
+
expect(subject.types["citeproc"]).to eq("article-journal")
|
614
624
|
expect(subject.creator.length).to eq(5)
|
615
625
|
expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Lina Patel", "givenName"=>"Lina", "familyName"=>"Patel")
|
616
626
|
expect(subject.title).to eq("Referee report. For: Gates - add article keywords to the metatags [version 2; referees: 1 approved]")
|
617
|
-
expect(subject.
|
627
|
+
expect(subject.publication_year).to eq("2018")
|
618
628
|
expect(subject.publisher).to eq("Gates Open Research")
|
619
629
|
expect(subject.service_provider).to eq("DataCite")
|
620
630
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
@@ -649,14 +659,17 @@ describe Bolognese::Metadata, vcr: true do
|
|
649
659
|
subject = Bolognese::Metadata.new(input: input)
|
650
660
|
expect(subject.valid?).to be true
|
651
661
|
expect(subject.identifier).to eq("https://doi.org/10.3204/desy-2014-01645")
|
652
|
-
expect(subject.resource_type_general).to eq("Text")
|
653
|
-
expect(subject.
|
654
|
-
expect(subject.type).to eq("Thesis")
|
655
|
-
expect(subject.
|
656
|
-
expect(subject.
|
662
|
+
expect(subject.types["resource_type_general"]).to eq("Text")
|
663
|
+
expect(subject.types["resource_type"]).to eq("Dissertation")
|
664
|
+
expect(subject.types["type"]).to eq("Thesis")
|
665
|
+
expect(subject.types["bibtex"]).to eq("phdthesis")
|
666
|
+
expect(subject.types["citeproc"]).to eq("thesis")
|
657
667
|
expect(subject.creator).to eq("type"=>"Person", "name"=>"Heiko Conrad", "givenName"=>"Heiko", "familyName"=>"Conrad")
|
658
668
|
expect(subject.title).to eq("Dynamics of colloids in molecular glass forming liquids studied via X-ray photon correlation spectroscopy")
|
659
|
-
expect(subject.
|
669
|
+
expect(subject.dates).to eq([{"date"=>"2014", "date_type"=>"Issued"},
|
670
|
+
{"date"=>"2014", "date_type"=>"Copyrighted"},
|
671
|
+
{"date"=>"2009-10-01/2014-01-23", "date_type"=>"Created"}])
|
672
|
+
expect(subject.publication_year).to eq("2014")
|
660
673
|
expect(subject.publisher).to eq("Deutsches Elektronen-Synchrotron, DESY, Hamburg")
|
661
674
|
expect(subject.service_provider).to eq("DataCite")
|
662
675
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
@@ -667,11 +680,11 @@ describe Bolognese::Metadata, vcr: true do
|
|
667
680
|
subject = Bolognese::Metadata.new(input: input)
|
668
681
|
expect(subject.valid?).to be true
|
669
682
|
expect(subject.identifier).to eq("https://doi.org/10.4121/uuid:3926db30-f712-4394-aebc-75976070e91f")
|
670
|
-
expect(subject.type).to eq("Dataset")
|
671
|
-
expect(subject.resource_type_general).to eq("Dataset")
|
683
|
+
expect(subject.types["type"]).to eq("Dataset")
|
684
|
+
expect(subject.types["resource_type_general"]).to eq("Dataset")
|
672
685
|
expect(subject.title).to eq("BPI Challenge 2012")
|
673
|
-
expect(subject.
|
674
|
-
expect(subject.publication_year).to eq(2012)
|
686
|
+
expect(subject.dates).to eq([{"date"=>"2011-10-01/2012-03-14", "date_type"=>"Other"}, {"date"=>"2012", "date_type"=>"Issued"}])
|
687
|
+
expect(subject.publication_year).to eq("2012")
|
675
688
|
expect(subject.state).to eq("findable")
|
676
689
|
end
|
677
690
|
end
|
@@ -683,7 +696,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
683
696
|
expect(subject.identifier).to eq("https://doi.org/10.5061/dryad.8515")
|
684
697
|
expect(subject.doi).to eq("10.5061/dryad.8515")
|
685
698
|
expect(subject.url).to eq("http://datadryad.org/resource/doi:10.5061/dryad.8515")
|
686
|
-
expect(subject.type).to eq("Dataset")
|
699
|
+
expect(subject.types["type"]).to eq("Dataset")
|
687
700
|
expect(subject.title).to eq("A new malaria agent in African hominids.")
|
688
701
|
end
|
689
702
|
|
@@ -693,7 +706,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
693
706
|
expect(subject.identifier).to eq("https://doi.org/10.5061/dryad.8515")
|
694
707
|
expect(subject.doi).to eq("10.5061/dryad.8515")
|
695
708
|
expect(subject.url).to eq("http://datadryad.org/resource/doi:10.5061/dryad.8515")
|
696
|
-
expect(subject.type).to eq("Dataset")
|
709
|
+
expect(subject.types["type"]).to eq("Dataset")
|
697
710
|
expect(subject.title).to eq("Data from: A new malaria agent in African hominids.")
|
698
711
|
expect(subject.state).to eq("registered")
|
699
712
|
end
|
@@ -710,7 +723,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
710
723
|
expect(subject.creator).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0003-1419-2405", "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner")
|
711
724
|
expect(subject.title).to eq("Eating your own Dog Food")
|
712
725
|
expect(subject.publisher).to eq("DataCite")
|
713
|
-
expect(subject.publication_year).to eq(2016)
|
726
|
+
expect(subject.publication_year).to eq("2016")
|
714
727
|
end
|
715
728
|
end
|
716
729
|
|
@@ -724,12 +737,13 @@ describe Bolognese::Metadata, vcr: true do
|
|
724
737
|
expect(subject.identifier).to eq("https://doi.org/10.25491/9hx8-ke93")
|
725
738
|
expect(subject.url).to eq("https://ors.datacite.org/doi:/10.25491/9hx8-ke93")
|
726
739
|
expect(subject.content_url).to eq("https://storage.googleapis.com/gtex_analysis_v7/single_tissue_eqtl_data/GTEx_Analysis_v7_eQTL_expression_matrices.tar.gz")
|
727
|
-
expect(subject.type).to eq("Dataset")
|
728
|
-
expect(subject.
|
740
|
+
expect(subject.types["type"]).to eq("Dataset")
|
741
|
+
expect(subject.types["resource_type"]).to eq("DroNc-seq data")
|
729
742
|
expect(subject.creator).to eq("name"=>"The GTEx Consortium", "type"=>"Organization")
|
730
743
|
expect(subject.title).to eq("DroNc-seq data")
|
731
744
|
expect(subject.keywords).to eq(["gtex", "annotation", "phenotype", "gene regulation", "transcriptomics"])
|
732
|
-
expect(subject.
|
745
|
+
expect(subject.dates).to eq([{"date"=>"2017", "date_type"=>"Issued"}])
|
746
|
+
expect(subject.publication_year).to eq("2017")
|
733
747
|
expect(subject.related_identifiers.length).to eq(4)
|
734
748
|
expect(subject.related_identifiers.last).to eq("id"=>"https://www.ebi.ac.uk/miriam/main/datatypes/MIR:00000663", "related_identifier_type"=>"URL", "relation_type"=>"IsPartOf")
|
735
749
|
expect(subject.formats).to eq("application/tar")
|