bolognese 1.11.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/bolognese/datacite_utils.rb +17 -9
- data/lib/bolognese/metadata.rb +1 -6
- data/lib/bolognese/metadata_utils.rb +1 -1
- data/lib/bolognese/readers/bibtex_reader.rb +2 -2
- data/lib/bolognese/readers/citeproc_reader.rb +1 -1
- data/lib/bolognese/readers/codemeta_reader.rb +2 -2
- data/lib/bolognese/readers/crosscite_reader.rb +4 -1
- data/lib/bolognese/readers/crossref_reader.rb +3 -4
- data/lib/bolognese/readers/datacite_json_reader.rb +4 -1
- data/lib/bolognese/readers/datacite_reader.rb +19 -3
- data/lib/bolognese/readers/npm_reader.rb +1 -1
- data/lib/bolognese/readers/ris_reader.rb +2 -2
- data/lib/bolognese/readers/schema_org_reader.rb +3 -2
- data/lib/bolognese/utils.rb +21 -4
- data/lib/bolognese/version.rb +1 -1
- data/lib/bolognese/writers/bibtex_writer.rb +1 -1
- data/lib/bolognese/writers/codemeta_writer.rb +1 -1
- data/lib/bolognese/writers/csv_writer.rb +1 -1
- data/lib/bolognese/writers/datacite_json_writer.rb +6 -1
- 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 +1 -1
- data/resources/kernel-4/include/datacite-relationType-v4.xsd +2 -0
- data/resources/kernel-4/include/datacite-resourceType-v4.xsd +2 -0
- data/resources/kernel-4/metadata.xsd +11 -7
- data/resources/kernel-4.5/include/datacite-contributorType-v4.xsd +35 -0
- data/resources/kernel-4.5/include/datacite-dateType-v4.xsd +25 -0
- data/resources/kernel-4.5/include/datacite-descriptionType-v4.xsd +19 -0
- data/resources/kernel-4.5/include/datacite-funderIdentifierType-v4.xsd +16 -0
- data/resources/kernel-4.5/include/datacite-nameType-v4.xsd +10 -0
- data/resources/kernel-4.5/include/datacite-numberType-v4.xsd +12 -0
- data/resources/kernel-4.5/include/datacite-relatedIdentifierType-v4.xsd +34 -0
- data/resources/kernel-4.5/include/datacite-relationType-v4.xsd +53 -0
- data/resources/kernel-4.5/include/datacite-resourceType-v4.xsd +45 -0
- data/resources/kernel-4.5/include/datacite-titleType-v4.xsd +14 -0
- data/resources/kernel-4.5/include/xml.xsd +286 -0
- data/resources/kernel-4.5/metadata.xsd +711 -0
- data/spec/fixtures/datacite-example-full-v4.5.xml +255 -0
- data/spec/fixtures/datacite-seriesinformation.xml +7 -2
- data/spec/readers/bibtex_reader_spec.rb +2 -0
- data/spec/readers/citeproc_reader_spec.rb +3 -0
- data/spec/readers/codemeta_reader_spec.rb +4 -4
- data/spec/readers/crosscite_reader_spec.rb +2 -0
- data/spec/readers/crossref_reader_spec.rb +41 -41
- data/spec/readers/datacite_json_reader_spec.rb +2 -0
- data/spec/readers/datacite_reader_spec.rb +73 -42
- data/spec/readers/npm_reader_spec.rb +2 -0
- data/spec/readers/ris_reader_spec.rb +3 -0
- data/spec/readers/schema_org_reader_spec.rb +11 -11
- data/spec/writers/crosscite_writer_spec.rb +7 -0
- data/spec/writers/datacite_json_writer_spec.rb +38 -0
- data/spec/writers/datacite_writer_spec.rb +84 -5
- data/spec/writers/jats_writer_spec.rb +8 -0
- data/spec/writers/rdf_xml_writer_spec.rb +7 -0
- data/spec/writers/turtle_writer_spec.rb +18 -0
- metadata +15 -2
@@ -42,7 +42,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
42
42
|
{"subject"=>"taxonomy"},
|
43
43
|
{"subject"=>"mitochondrial genome"},
|
44
44
|
{"subject"=>"Parasites"}])
|
45
|
-
expect(subject.publisher).to eq("Dryad")
|
45
|
+
expect(subject.publisher).to eq({"name"=>"Dryad"})
|
46
46
|
expect(subject.agency).to eq("datacite")
|
47
47
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
48
48
|
end
|
@@ -65,7 +65,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
65
65
|
expect(subject.publication_year).to eq("2016")
|
66
66
|
expect(subject.related_identifiers.length).to eq(3)
|
67
67
|
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.5438/0000-00ss", "relatedIdentifierType"=>"DOI", "relationType"=>"IsPartOf")
|
68
|
-
expect(subject.publisher).to eq("DataCite")
|
68
|
+
expect(subject.publisher).to eq({"name"=>"DataCite"})
|
69
69
|
expect(subject.subjects).to eq([{"subject"=>"datacite"},
|
70
70
|
{"subject"=>"doi"},
|
71
71
|
{"subject"=>"metadata"},
|
@@ -96,7 +96,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
96
96
|
{"subject"=>"000 Computer science, knowledge, general works",
|
97
97
|
"subjectScheme"=>"DDC"}])
|
98
98
|
expect(subject.publication_year).to eq("2013")
|
99
|
-
expect(subject.publisher).to eq("Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik GmbH, Wadern/Saarbruecken, Germany")
|
99
|
+
expect(subject.publisher).to eq({"name"=>"Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik GmbH, Wadern/Saarbruecken, Germany"})
|
100
100
|
expect(subject.agency).to eq("datacite")
|
101
101
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.1")
|
102
102
|
end
|
@@ -149,7 +149,12 @@ describe Bolognese::Metadata, vcr: true do
|
|
149
149
|
expect(subject.language).to eq("en-US")
|
150
150
|
expect(subject.sizes).to eq(["4 kB"])
|
151
151
|
expect(subject.formats).to eq(["application/xml"])
|
152
|
-
expect(subject.publisher).to eq(
|
152
|
+
expect(subject.publisher).to eq(
|
153
|
+
{
|
154
|
+
"name"=>"DataCite",
|
155
|
+
"lang"=>"en",
|
156
|
+
}
|
157
|
+
)
|
153
158
|
expect(subject.agency).to eq("datacite")
|
154
159
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
155
160
|
end
|
@@ -166,7 +171,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
166
171
|
expect(subject.titles).to eq([{"lang"=>"en", "title"=>"Data underpinning - The Sun as a planet-host star: Proxies from SDO images for HARPS radial-velocity variations"}])
|
167
172
|
expect(subject.dates).to eq([{"date"=>"2016-01-20", "dateType"=>"Available"}, {"date"=>"2016", "dateType"=>"Issued"}])
|
168
173
|
expect(subject.publication_year).to eq("2016")
|
169
|
-
expect(subject.publisher).to eq("University of St Andrews")
|
174
|
+
expect(subject.publisher).to eq({"name"=>"University of St Andrews"})
|
170
175
|
expect(subject.agency).to eq("datacite")
|
171
176
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
172
177
|
end
|
@@ -185,7 +190,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
185
190
|
expect(subject.publication_year).to eq("2011")
|
186
191
|
expect(subject.sizes).to eq([])
|
187
192
|
expect(subject.subjects).to eq([{"subject"=>"Environmental research"}])
|
188
|
-
expect(subject.publisher).to eq("EvK2 CNR Committee")
|
193
|
+
expect(subject.publisher).to eq({"name"=>"EvK2 CNR Committee"})
|
189
194
|
expect(subject.agency).to eq("datacite")
|
190
195
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.2")
|
191
196
|
end
|
@@ -202,7 +207,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
202
207
|
expect(subject.types["citeproc"]).to eq("article")
|
203
208
|
expect(subject.creators).to eq([{"nameType"=>"Personal", "name"=>"Garza, Kristian", "givenName"=>"Kristian", "familyName"=>"Garza", "nameIdentifiers" => [], "affiliation" => []}])
|
204
209
|
expect(subject.titles).to eq([{"title"=>"Analysis Tools For Crossover Experiment Of Ui Using Choice Architecture"}])
|
205
|
-
expect(subject.descriptions.first["description"]).to start_with("
|
210
|
+
expect(subject.descriptions.first["description"]).to start_with(" \n\nThis tools are used to analyse the data produced by the Crosssover Experiment I designed to test Choice Architecture techniques as UI interventions in a SEEk4Science data catalogue. It contains:\n\n- Data structures for the experimental data.<br>\n- Visualisation functions<br>\n- Analysis functions\n\n## Installation\n\n- R<br>\n- python<br>\n- ipython 4\n\nClone and use.\n\n## Usage\n\n<br>\n```python<br>\nsource('parallel_plot.r')<br>\nwith(z, parallelset(trt,response, freq=count, alpha=0.2))<br>\n```\n\n<br>\n## Contributing\n\n1. Fork it!<br>\n2. Create your feature branch: `git checkout -b my-new-feature`<br>\n3. Commit your changes: `git commit -am 'Add some feature'`<br>\n4. Push to the branch: `git push origin my-new-feature`<br>\n5. Submit a pull request :D\n\n<br>\n## License\n\nThis work supports my PhD Thesis at University of Manchester.")
|
206
211
|
expect(subject.rights_list).to eq([{"rights"=>
|
207
212
|
"Creative Commons Attribution Non Commercial Share Alike 4.0 International",
|
208
213
|
"rightsIdentifier"=>"cc-by-nc-sa-4.0",
|
@@ -217,7 +222,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
217
222
|
expect(subject.subjects).to eq([{"subject"=>"choice architecture"},
|
218
223
|
{"subject"=>"crossover experiment"},
|
219
224
|
{"subject"=>"hci"}])
|
220
|
-
expect(subject.publisher).to eq("Zenodo")
|
225
|
+
expect(subject.publisher).to eq({"name"=>"Zenodo"})
|
221
226
|
expect(subject.agency).to eq("datacite")
|
222
227
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
223
228
|
end
|
@@ -243,7 +248,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
243
248
|
expect(subject.publication_year).to eq("2016")
|
244
249
|
expect(subject.related_identifiers.length).to eq(1)
|
245
250
|
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.6084/m9.figshare.4234751", "relatedIdentifierType"=>"DOI", "relationType"=>"IsIdenticalTo")
|
246
|
-
expect(subject.publisher).to eq("figshare")
|
251
|
+
expect(subject.publisher).to eq({"name"=>"figshare"})
|
247
252
|
expect(subject.subjects).to eq([
|
248
253
|
{"schemeUri"=>
|
249
254
|
"http://www.abs.gov.au/ausstats/abs@.nsf/0/6BB427AB9696C225CA2574180004463E",
|
@@ -286,7 +291,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
286
291
|
"schemeUri"=>"https://spdx.org/licenses/"}])
|
287
292
|
expect(subject.dates).to eq([{"date"=>"2015-06-14", "dateType"=>"Created"}, {"date"=>"2020-06-02", "dateType"=>"Updated"}, {"date"=>"2020", "dateType"=>"Issued"}])
|
288
293
|
expect(subject.publication_year).to eq("2020")
|
289
|
-
expect(subject.publisher).to eq("figshare")
|
294
|
+
expect(subject.publisher).to eq({"name"=>"figshare"})
|
290
295
|
expect(subject.subjects).to eq([{"subject"=>"Evolutionary Biology"},
|
291
296
|
{"subject"=>"FOS: Biological sciences", "subjectScheme"=>"Fields of Science and Technology (FOS)", "schemeUri"=>"http://www.oecd.org/science/inno/38235147.pdf"},
|
292
297
|
{"subject"=>"60412 Quantitative Genetics (incl. Disease and Trait Mapping Genetics)", "subjectScheme"=>"FOR", "schemeUri"=>"http://www.abs.gov.au/ausstats/abs@.nsf/0/6BB427AB9696C225CA2574180004463E"}])
|
@@ -338,7 +343,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
338
343
|
expect(subject.descriptions.first["description"]).to start_with("The dataset contains a sample of metadata describing papers")
|
339
344
|
expect(subject.dates).to eq([{"date"=>"2013-04-03", "dateType"=>"Issued"}])
|
340
345
|
expect(subject.publication_year).to eq("2013")
|
341
|
-
expect(subject.publisher).to eq("Zenodo")
|
346
|
+
expect(subject.publisher).to eq({"name"=>"Zenodo"})
|
342
347
|
expect(subject.funding_references).to eq([{"awardNumber"=>"246686",
|
343
348
|
"awardTitle"=>"Open Access Infrastructure for Research in Europe",
|
344
349
|
"awardUri"=>"info:eu-repo/grantAgreement/EC/FP7/246686/",
|
@@ -382,7 +387,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
382
387
|
expect(subject.descriptions.first["description"]).to start_with("The dataset contains a sample of metadata describing papers")
|
383
388
|
expect(subject.dates).to eq([{"date"=>"2013-04-03", "dateType"=>"Issued"}])
|
384
389
|
expect(subject.publication_year).to eq("2013")
|
385
|
-
expect(subject.publisher).to eq("Zenodo")
|
390
|
+
expect(subject.publisher).to eq({"name"=>"Zenodo"})
|
386
391
|
expect(subject.funding_references).to eq([{"awardNumber"=>"246686",
|
387
392
|
"awardTitle"=>"Open Access Infrastructure for Research in Europe",
|
388
393
|
"awardUri"=>"info:eu-repo/grantAgreement/EC/FP7/246686/",
|
@@ -409,7 +414,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
409
414
|
subject = Bolognese::Metadata.new(input: input)
|
410
415
|
expect(subject.types["schemaOrg"]).to eq("Collection")
|
411
416
|
expect(subject.language).to eq("de")
|
412
|
-
expect(subject.publisher).to eq("Universitätsbibliothek Tübingen")
|
417
|
+
expect(subject.publisher).to eq({"name"=>"Universitätsbibliothek Tübingen"})
|
413
418
|
expect(subject.publication_year).to eq("2015")
|
414
419
|
expect(subject.valid?).to be false
|
415
420
|
expect(subject.errors).to eq("13:0: ERROR: Element '{http://datacite.org/schema/kernel-2.2}publisher': This element is not expected. Expected is ( {http://datacite.org/schema/kernel-2.2}publicationYear ).")
|
@@ -532,7 +537,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
532
537
|
expect(subject.creators.length).to eq(1)
|
533
538
|
expect(subject.creators.first).to eq("familyName"=>"Fenner", "givenName"=>"Martin", "nameIdentifiers" => [{"nameIdentifier"=>"https://orcid.org/0000-0003-1419-2405", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "name"=>"Fenner, Martin")
|
534
539
|
expect(subject.titles).to eq([{"title"=>"Eating your own Dog Food"}])
|
535
|
-
expect(subject.publisher).to eq("DataCite")
|
540
|
+
expect(subject.publisher).to eq({"name"=>"DataCite"})
|
536
541
|
expect(subject.publication_year).to eq("2016")
|
537
542
|
expect(subject.related_identifiers).to eq([{"relatedIdentifier"=>"10.5438/0012",
|
538
543
|
"relatedIdentifierType"=>"DOI",
|
@@ -547,7 +552,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
547
552
|
"descriptionType"=>"SeriesInformation",
|
548
553
|
"lang"=>"en"},
|
549
554
|
{"description"=>
|
550
|
-
"Eating your own dog food is a slang term to describe that an organization should itself use the products and services it provides. For DataCite this means that we should use DOIs with appropriate metadata and strategies for long-term preservation for
|
555
|
+
"Eating your own dog food is a slang term to \n describe that an organization should itself use the products and services it provides. \n For DataCite this means that we should use DOIs with appropriate metadata and strategies for long-term preservation for...\n • Unicode Bullet Point: This is an example of a bullet point.\\u2605\n ■ Unicode Black Square: This is an example of a black square.",
|
551
556
|
"descriptionType"=>"Abstract"}])
|
552
557
|
expect(subject.container).to eq("firstPage"=>"3", "identifier"=>"10.5438/0000-00SS", "identifierType"=>"DOI", "issue"=>"9", "lastPage"=>"4", "title"=>"DataCite Blog", "type"=>"Series", "volume"=>"2")
|
553
558
|
end
|
@@ -562,7 +567,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
562
567
|
expect(subject.creators.length).to eq(3)
|
563
568
|
expect(subject.creators.first).to eq("familyName"=>"Schumann", "givenName"=>"Kai", "name"=>"Schumann, Kai", "nameType"=>"Personal", "nameIdentifiers" => [], "affiliation" => [])
|
564
569
|
expect(subject.titles).to eq([{"title"=>"Gridded results of swath bathymetric mapping of Disko Bay, Western Greenland, 2007-2008"}])
|
565
|
-
expect(subject.publisher).to eq("PANGAEA - Data Publisher for Earth & Environmental Science")
|
570
|
+
expect(subject.publisher).to eq({"name"=>"PANGAEA - Data Publisher for Earth & Environmental Science"})
|
566
571
|
expect(subject.publication_year).to eq("2011")
|
567
572
|
expect(subject.related_identifiers).to eq([{"relatedIdentifier"=>"10.5072/timeseries", "relatedIdentifierType"=>"DOI", "relationType"=>"Continues"}])
|
568
573
|
expect(subject.geo_locations).to eq([{"geoLocationPlace"=>"Disko Bay", "geoLocationPoint"=>{"pointLatitude"=>"69.000000", "pointLongitude"=>"-52.000000"}}])
|
@@ -579,7 +584,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
579
584
|
expect(subject.creators.length).to eq(6)
|
580
585
|
expect(subject.creators.first).to eq("familyName"=>"Bales", "givenName"=>"Roger", "name"=>"Bales, Roger", "nameType"=>"Personal", "affiliation" => [{"name"=>"UC Merced"}, {"name"=>"NSF"}], "nameIdentifiers" => [])
|
581
586
|
expect(subject.titles).to eq([{"title"=>"Southern Sierra Critical Zone Observatory (SSCZO), Providence Creek meteorological data, soil moisture and temperature, snow depth and air temperature"}])
|
582
|
-
expect(subject.publisher).to eq("UC Merced")
|
587
|
+
expect(subject.publisher).to eq({"name"=>"UC Merced"})
|
583
588
|
expect(subject.dates).to eq([{"date"=>"2014-10-17", "dateType"=>"Updated"}, {"date"=>"2016-03-14T17:02:02Z", "dateType"=>"Available"}, {"date"=>"2013", "dateType"=>"Issued"}])
|
584
589
|
expect(subject.publication_year).to eq("2013")
|
585
590
|
expect(subject.subjects).to eq([{"subject"=>"Earth sciences"},
|
@@ -659,7 +664,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
659
664
|
expect(subject.titles).to eq([{"title"=>"Dataset for \"Direct Evidence for Solid-Like Hydrogen in a Nanoporous Carbon Hydrogen Storage Material at Supercritical Temperatures\""}])
|
660
665
|
expect(subject.descriptions.first["description"]).to start_with("Dataset for Direct Evidence for Solid-Like Hydrogen")
|
661
666
|
expect(subject.publication_year).to eq("2015")
|
662
|
-
expect(subject.publisher).to eq("University of Bath")
|
667
|
+
expect(subject.publisher).to eq({"name"=>"University of Bath"})
|
663
668
|
expect(subject.funding_references.length).to eq(5)
|
664
669
|
expect(subject.funding_references.first).to eq("awardNumber" => "EP/J016454/1",
|
665
670
|
"awardTitle" => "SUPERGEN Hub Funding",
|
@@ -693,7 +698,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
693
698
|
expect(subject.titles).to eq([{"title"=>"Technical and Human Infrastructure for Open Research (THOR)"}])
|
694
699
|
expect(subject.descriptions.first["description"]).to start_with("Five years ago, a global infrastructure")
|
695
700
|
expect(subject.publication_year).to eq("2015")
|
696
|
-
expect(subject.publisher).to eq("DataCite")
|
701
|
+
expect(subject.publisher).to eq({"name"=>"DataCite"})
|
697
702
|
expect(subject.funding_references).to eq([{"awardNumber"=>"654039",
|
698
703
|
"awardTitle"=>"THOR – Technical and Human Infrastructure for Open Research",
|
699
704
|
"awardUri"=>"http://cordis.europa.eu/project/rcn/194927_en.html",
|
@@ -717,7 +722,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
717
722
|
expect(subject.titles).to eq([{"title"=>"МОДЕЛЬ СИСТЕМНОЙ ДИНАМИКИ ПРОЦЕССА ОБУЧЕНИЯ"}, {"title"=>"MODEL OF SYSTEM DYNAMICS OF PROCESS OF TRAINING", "titleType"=>"TranslatedTitle"}])
|
718
723
|
expect(subject.descriptions.first["description"]).to start_with("Актуальность данной работы обусловлена важностью учета в учебном процессе личностных качеств обучаем")
|
719
724
|
expect(subject.publication_year).to eq("2019")
|
720
|
-
expect(subject.publisher).to eq("МОДЕЛИРОВАНИЕ, ОПТИМИЗАЦИЯ И ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ")
|
725
|
+
expect(subject.publisher).to eq({"name"=>"МОДЕЛИРОВАНИЕ, ОПТИМИЗАЦИЯ И ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ"})
|
721
726
|
expect(subject.funding_references.length).to eq(1)
|
722
727
|
expect(subject.funding_references.first).to eq("awardNumber"=>"проект № 170100728", "funderName"=>"РФФИ")
|
723
728
|
expect(subject.agency).to eq("datacite")
|
@@ -770,7 +775,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
770
775
|
"rightsIdentifierScheme"=>"SPDX",
|
771
776
|
"rightsUri"=>"https://creativecommons.org/licenses/by-nd/2.0/legalcode",
|
772
777
|
"schemeUri"=>"https://spdx.org/licenses/"}])
|
773
|
-
expect(subject.publisher).to eq("Springer")
|
778
|
+
expect(subject.publisher).to eq({"name"=>"Springer"})
|
774
779
|
expect(subject.agency).to eq("datacite")
|
775
780
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
776
781
|
end
|
@@ -800,7 +805,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
800
805
|
"rightsIdentifierScheme"=>"SPDX",
|
801
806
|
"rightsUri"=>"https://creativecommons.org/licenses/by-nd/2.0/legalcode",
|
802
807
|
"schemeUri"=>"https://spdx.org/licenses/"}])
|
803
|
-
expect(subject.publisher).to eq("Springer")
|
808
|
+
expect(subject.publisher).to eq({"name"=>"Springer"})
|
804
809
|
expect(subject.agency).to eq("datacite")
|
805
810
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4.0")
|
806
811
|
end
|
@@ -829,7 +834,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
829
834
|
"rightsIdentifierScheme"=>"SPDX",
|
830
835
|
"rightsUri"=>"https://creativecommons.org/publicdomain/zero/1.0/legalcode",
|
831
836
|
"schemeUri"=>"https://spdx.org/licenses/"}])
|
832
|
-
expect(subject.publisher).to eq("Dryad Digital Repository")
|
837
|
+
expect(subject.publisher).to eq({"name"=>"Dryad Digital Repository"})
|
833
838
|
expect(subject.agency).to eq("datacite")
|
834
839
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
835
840
|
end
|
@@ -859,7 +864,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
859
864
|
"rightsIdentifierScheme"=>"SPDX",
|
860
865
|
"rightsUri"=>"https://creativecommons.org/licenses/by-nd/2.0/legalcode",
|
861
866
|
"schemeUri"=>"https://spdx.org/licenses/"}])
|
862
|
-
expect(subject.publisher).to eq("Springer")
|
867
|
+
expect(subject.publisher).to eq({"name"=>"Springer"})
|
863
868
|
expect(subject.agency).to eq("datacite")
|
864
869
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3.0")
|
865
870
|
end
|
@@ -883,7 +888,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
883
888
|
expect(subject.publication_year).to eq("2010")
|
884
889
|
expect(subject.related_identifiers.length).to eq(1)
|
885
890
|
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.5272/oldertestpub", "relatedIdentifierType"=>"DOI", "relationType"=>"IsPartOf")
|
886
|
-
expect(subject.publisher).to eq("Springer")
|
891
|
+
expect(subject.publisher).to eq({"name"=>"Springer"})
|
887
892
|
expect(subject.agency).to eq("datacite")
|
888
893
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.2")
|
889
894
|
end
|
@@ -917,7 +922,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
917
922
|
"rightsIdentifierScheme"=>"SPDX",
|
918
923
|
"rightsUri"=>"https://creativecommons.org/licenses/by-nd/2.0/legalcode",
|
919
924
|
"schemeUri"=>"https://spdx.org/licenses/"}])
|
920
|
-
expect(subject.publisher).to eq("Springer")
|
925
|
+
expect(subject.publisher).to eq({"name"=>"Springer"})
|
921
926
|
expect(subject.agency).to eq("datacite")
|
922
927
|
end
|
923
928
|
|
@@ -934,7 +939,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
934
939
|
expect(subject.titles).to eq([{"title"=>"LAMMPS Data-File Generator"}])
|
935
940
|
expect(subject.dates).to eq([{"date"=>"2018-07-18", "dateType"=>"Valid"}, {"date"=>"2018-07-18", "dateType"=>"Accepted"}, {"date"=>"2018", "dateType"=>"Issued"}])
|
936
941
|
expect(subject.publication_year).to eq("2018")
|
937
|
-
expect(subject.publisher).to eq("nanoHUB")
|
942
|
+
expect(subject.publisher).to eq({"name"=>"nanoHUB"})
|
938
943
|
expect(subject.agency).to eq("datacite")
|
939
944
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.2")
|
940
945
|
end
|
@@ -966,7 +971,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
966
971
|
expect(subject.creators).to eq([{"familyName"=>"Wong", "givenName"=>"Takmeng", "name"=>"Wong, Takmeng"}])
|
967
972
|
expect(subject.titles).to eq([{"title"=>"CERES Level 3 Cloud Type Historgram Terra+Aqua HDF file - Edition4"}])
|
968
973
|
expect(subject.publication_year).to eq("2016")
|
969
|
-
expect(subject.publisher).to eq("NASA Langley Atmospheric Science Data Center DAAC")
|
974
|
+
expect(subject.publisher).to eq({"name"=>"NASA Langley Atmospheric Science Data Center DAAC"})
|
970
975
|
expect(subject.agency).to eq("datacite")
|
971
976
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
972
977
|
end
|
@@ -1007,7 +1012,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
1007
1012
|
"subjectScheme"=>"CESSDA Topic Classification"}])
|
1008
1013
|
expect(subject.dates).to eq([{"date"=>"1995-12", "dateType"=>"Collected"}, {"date"=>"1996", "dateType"=>"Issued"}])
|
1009
1014
|
expect(subject.publication_year).to eq("1996")
|
1010
|
-
expect(subject.publisher).to eq("GESIS Data Archive")
|
1015
|
+
expect(subject.publisher).to eq({"name"=>"GESIS Data Archive"})
|
1011
1016
|
expect(subject.agency).to eq("datacite")
|
1012
1017
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
1013
1018
|
end
|
@@ -1029,7 +1034,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
1029
1034
|
expect(subject.container).to eq("firstPage"=>"Spain; 3353", "lastPage"=>"3356", "title"=>"23rd European Photovoltaic Solar Energy Conference and Exhibition", "type"=>"Series", "volume"=>"1-5 September 2008")
|
1030
1035
|
expect(subject.descriptions[1]["description"]).to start_with("Aim of this paper is the presentation")
|
1031
1036
|
expect(subject.subjects).to eq([{"subject"=>"PV Systems"}, {"subject"=>"Off-grid Applications"}])
|
1032
|
-
expect(subject.publisher).to eq("WIP-Munich")
|
1037
|
+
expect(subject.publisher).to eq({"name"=>"WIP-Munich"})
|
1033
1038
|
expect(subject.agency).to eq("datacite")
|
1034
1039
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.2")
|
1035
1040
|
end
|
@@ -1060,7 +1065,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
1060
1065
|
expect(subject.titles).to eq([{"title"=>"Messung der Bildunschaerfe in H.264-codierten Bildern und Videosequenzen"}])
|
1061
1066
|
expect(subject.dates).to eq([{"date"=>"2017", "dateType"=>"Issued"}])
|
1062
1067
|
expect(subject.publication_year).to eq("2017")
|
1063
|
-
expect(subject.publisher).to eq("Siemens AG")
|
1068
|
+
expect(subject.publisher).to eq({"name"=>"Siemens AG"})
|
1064
1069
|
expect(subject.agency).to eq("datacite")
|
1065
1070
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
1066
1071
|
end
|
@@ -1100,7 +1105,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
1100
1105
|
expect(subject.version_info).to eq("2")
|
1101
1106
|
expect(subject.dates).to eq([{"date"=>"2014-04-25", "dateType"=>"Available"}, {"date"=>"2015", "dateType"=>"Issued"}])
|
1102
1107
|
expect(subject.publication_year).to eq("2015")
|
1103
|
-
expect(subject.publisher).to eq("Royal Netherlands Meteorological Institute (KNMI)")
|
1108
|
+
expect(subject.publisher).to eq({"name"=>"Royal Netherlands Meteorological Institute (KNMI)"})
|
1104
1109
|
expect(subject.agency).to eq("datacite")
|
1105
1110
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
1106
1111
|
end
|
@@ -1126,7 +1131,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
1126
1131
|
expect(subject.titles).to eq([{"title"=>"Test license"}])
|
1127
1132
|
expect(subject.dates).to eq([{"date"=>"2018-01-12", "dateType"=>"Issued"}])
|
1128
1133
|
expect(subject.publication_year).to eq("2018")
|
1129
|
-
expect(subject.publisher).to eq("CaltechDATA")
|
1134
|
+
expect(subject.publisher).to eq({"name"=>"CaltechDATA"})
|
1130
1135
|
expect(subject.agency).to eq("datacite")
|
1131
1136
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
1132
1137
|
expect(subject.state).to eq("findable")
|
@@ -1143,7 +1148,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
1143
1148
|
expect(subject.titles).to eq([{"title"=>"Referee report. For: FL Regression Wellcome [version 1; referees: retracted]"}])
|
1144
1149
|
expect(subject.dates).to eq([{"date"=>"2018", "dateType"=>"Issued"}])
|
1145
1150
|
expect(subject.publication_year).to eq("2018")
|
1146
|
-
expect(subject.publisher).to eq("F1000 Research Limited")
|
1151
|
+
expect(subject.publisher).to eq({"name"=>"F1000 Research Limited"})
|
1147
1152
|
expect(subject.agency).to eq("datacite")
|
1148
1153
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
1149
1154
|
expect(subject.state).to eq("findable")
|
@@ -1162,7 +1167,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
1162
1167
|
expect(subject.creators.first).to eq("nameType"=>"Personal", "name"=>"Patel, Lina", "givenName"=>"Lina", "familyName"=>"Patel", "nameIdentifiers" => [], "affiliation" => [])
|
1163
1168
|
expect(subject.titles).to eq([{"title"=>"Referee report. For: Gates - add article keywords to the metatags [version 2; referees: 1 approved]"}])
|
1164
1169
|
expect(subject.publication_year).to eq("2018")
|
1165
|
-
expect(subject.publisher).to eq("Gates Open Research")
|
1170
|
+
expect(subject.publisher).to eq({"name"=>"Gates Open Research"})
|
1166
1171
|
expect(subject.agency).to eq("datacite")
|
1167
1172
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
1168
1173
|
end
|
@@ -1255,7 +1260,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
1255
1260
|
{"date"=>"2014", "dateType"=>"Copyrighted"},
|
1256
1261
|
{"date"=>"2009-10-01/2014-01-23", "dateType"=>"Created"}])
|
1257
1262
|
expect(subject.publication_year).to eq("2014")
|
1258
|
-
expect(subject.publisher).to eq("Deutsches Elektronen-Synchrotron, DESY, Hamburg")
|
1263
|
+
expect(subject.publisher).to eq({"name"=>"Deutsches Elektronen-Synchrotron, DESY, Hamburg"})
|
1259
1264
|
expect(subject.agency).to eq("datacite")
|
1260
1265
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
|
1261
1266
|
end
|
@@ -1280,7 +1285,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
1280
1285
|
expect(subject.titles.last).to eq("title"=>"MODEL OF SYSTEM DYNAMICS OF PROCESS OF TRAINING", "titleType"=>"TranslatedTitle")
|
1281
1286
|
expect(subject.dates).to eq([{"date"=>"2019-02-09", "dateType"=>"Issued"}])
|
1282
1287
|
expect(subject.publication_year).to eq("2019")
|
1283
|
-
expect(subject.publisher).to eq("МОДЕЛИРОВАНИЕ, ОПТИМИЗАЦИЯ И ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ")
|
1288
|
+
expect(subject.publisher).to eq({"name"=>"МОДЕЛИРОВАНИЕ, ОПТИМИЗАЦИЯ И ИНФОРМАЦИОННЫЕ ТЕХНОЛОГИИ"})
|
1284
1289
|
expect(subject.funding_references.count).to eq(1)
|
1285
1290
|
expect(subject.funding_references.first).to eq("awardNumber"=>"проект № 170100728", "funderName"=>"РФФИ")
|
1286
1291
|
expect(subject.agency).to eq("datacite")
|
@@ -1335,7 +1340,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
1335
1340
|
expect(subject.doi).to eq("10.5061/dryad.8515")
|
1336
1341
|
expect(subject.creators).to eq([{"nameIdentifiers"=> [{"nameIdentifier"=>"https://orcid.org/0000-0003-1419-2405", "nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}], "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner"}])
|
1337
1342
|
expect(subject.titles).to eq([{"title"=>"Eating your own Dog Food"}])
|
1338
|
-
expect(subject.publisher).to eq("DataCite")
|
1343
|
+
expect(subject.publisher).to eq({"name"=>"DataCite"})
|
1339
1344
|
expect(subject.publication_year).to eq("2016")
|
1340
1345
|
end
|
1341
1346
|
end
|
@@ -1362,7 +1367,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
1362
1367
|
expect(subject.formats).to eq(["application/tar"])
|
1363
1368
|
expect(subject.sizes).to eq(["15.7M"])
|
1364
1369
|
expect(subject.container).to eq("identifier"=>"https://www.ebi.ac.uk/miriam/main/datatypes/MIR:00000663", "identifierType"=>"URL", "title"=>"GTEx", "type"=>"DataRepository")
|
1365
|
-
expect(subject.publisher).to eq("GTEx")
|
1370
|
+
expect(subject.publisher).to eq({"name"=>"GTEx"})
|
1366
1371
|
expect(subject.funding_references.count).to eq(7)
|
1367
1372
|
expect(subject.funding_references.first).to eq("funderIdentifier"=>"https://doi.org/10.13039/100000052", "funderIdentifierType"=>"Crossref Funder ID", "funderName"=>"Common Fund of the Office of the Director of the NIH")
|
1368
1373
|
end
|
@@ -1379,7 +1384,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
1379
1384
|
expect(subject.creators.first).to eq("familyName"=>"Den Heijer", "givenName"=>"C", "name"=>"Den Heijer, C", "nameType"=>"Personal", "nameIdentifiers" => [], "affiliation" => [])
|
1380
1385
|
expect(subject.titles).to eq([{"lang"=>"en", "title"=>"Meteo measurements at the Sand Motor"}])
|
1381
1386
|
expect(subject.publication_year).to eq("2017")
|
1382
|
-
expect(subject.publisher).to eq("4TU.Centre for Research Data")
|
1387
|
+
expect(subject.publisher).to eq({"name"=>"4TU.Centre for Research Data"})
|
1383
1388
|
expect(subject.agency).to eq("datacite")
|
1384
1389
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
1385
1390
|
expect(subject.geo_locations.first["geoLocationPlace"]).to eq("Zandmotor, sand suppletion area on the Dutch coast.")
|
@@ -1445,7 +1450,12 @@ describe Bolognese::Metadata, vcr: true do
|
|
1445
1450
|
"schemeUri"=>"https://spdx.org/licenses/"
|
1446
1451
|
}
|
1447
1452
|
])
|
1448
|
-
expect(subject.publisher).to eq(
|
1453
|
+
expect(subject.publisher).to eq(
|
1454
|
+
{
|
1455
|
+
"name"=>"DataCite",
|
1456
|
+
"lang"=>"en",
|
1457
|
+
}
|
1458
|
+
)
|
1449
1459
|
expect(subject.agency).to eq("datacite")
|
1450
1460
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
1451
1461
|
expect(subject.related_items.last).to eq(
|
@@ -1683,7 +1693,12 @@ describe Bolognese::Metadata, vcr: true do
|
|
1683
1693
|
"schemeUri"=>"https://spdx.org/licenses/"
|
1684
1694
|
}
|
1685
1695
|
])
|
1686
|
-
expect(subject.publisher).to eq(
|
1696
|
+
expect(subject.publisher).to eq(
|
1697
|
+
{
|
1698
|
+
"name"=>"GigaScience Database",
|
1699
|
+
"lang"=>"en",
|
1700
|
+
}
|
1701
|
+
)
|
1687
1702
|
expect(subject.agency).to eq("datacite")
|
1688
1703
|
expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
|
1689
1704
|
end
|
@@ -1728,4 +1743,20 @@ describe Bolognese::Metadata, vcr: true do
|
|
1728
1743
|
)
|
1729
1744
|
end
|
1730
1745
|
|
1746
|
+
describe "Schema 4.5" do
|
1747
|
+
it "publisher with attributes" do
|
1748
|
+
input = fixture_path + "datacite-example-full-v4.5.xml"
|
1749
|
+
subject = Bolognese::Metadata.new(input: input)
|
1750
|
+
expect(subject.valid?).to be true
|
1751
|
+
expect(subject.publisher).to eq(
|
1752
|
+
{
|
1753
|
+
"name" => "Example Publisher",
|
1754
|
+
"publisherIdentifier" => "https://ror.org/04z8jg394",
|
1755
|
+
"publisherIdentifierScheme" => "ROR",
|
1756
|
+
"schemeUri" => "https://ror.org/",
|
1757
|
+
"lang" => "en",
|
1758
|
+
}
|
1759
|
+
)
|
1760
|
+
end
|
1761
|
+
end
|
1731
1762
|
end
|
@@ -38,6 +38,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
38
38
|
#expect(subject.url).to eq("https://blog.datacite.org/eating-your-own-dog-food")
|
39
39
|
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article", "reourceType"=>"NPM Package", "resourceTypeGeneral"=>"Software", "ris"=>"GEN", "schemaOrg"=>"SoftwareSourceCode")
|
40
40
|
expect(subject.creators).to eq([{"name"=>":(unav)", "nameType"=>"Organizational"}])
|
41
|
+
expect(subject.publisher).to eq(nil)
|
41
42
|
expect(subject.titles).to eq([{"title"=>"CITapp"}])
|
42
43
|
expect(subject.descriptions).to eq([{"description"=>"Concealed Information Test app", "descriptionType"=>"Abstract"}])
|
43
44
|
expect(subject.version_info).to eq("1.1.0")
|
@@ -54,6 +55,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
54
55
|
#expect(subject.url).to eq("https://blog.datacite.org/eating-your-own-dog-food")
|
55
56
|
expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article", "reourceType"=>"NPM Package", "resourceTypeGeneral"=>"Software", "ris"=>"GEN", "schemaOrg"=>"SoftwareSourceCode")
|
56
57
|
expect(subject.creators).to eq([{"affiliation"=>[], "familyName"=>"Brancotte", "givenName"=>"Bryan", "name"=>"Brancotte, Bryan", "nameIdentifiers"=>[], "nameType"=>"Personal"}])
|
58
|
+
expect(subject.publisher).to eq(nil)
|
57
59
|
expect(subject.titles).to eq([{"title"=>"edam-browser"}])
|
58
60
|
expect(subject.descriptions).to eq([{"description"=>
|
59
61
|
+ "The EDAM Browser is a client-side web-based visualization javascript widget. Its goals are to help describing bio-related resources and service with EDAM, and to facilitate and foster community contributions to EDAM.",
|
@@ -38,6 +38,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
38
38
|
"familyName"=>"Sankar",
|
39
39
|
"nameIdentifiers" => [],
|
40
40
|
"affiliation" => [])
|
41
|
+
expect(subject.publisher).to eq({"name"=>"(:unav)"})
|
41
42
|
expect(subject.titles).to eq([{"title"=>"Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"}])
|
42
43
|
expect(subject.descriptions.first["description"]).to start_with("Among various advantages, their small size makes model organisms preferred subjects of investigation.")
|
43
44
|
expect(subject.dates).to eq([{"date"=>"2014", "dateType"=>"Issued"}])
|
@@ -55,6 +56,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
55
56
|
expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
|
56
57
|
expect(subject.types).to eq("citeproc"=>"misc", "resourceTypeGeneral"=>"Dissertation", "ris"=>"THES", "schemaOrg"=>"Thesis")
|
57
58
|
expect(subject.creators).to eq([{"nameType"=>"Personal", "name"=>"Toparlar, Y.", "givenName"=>"Y.", "familyName"=>"Toparlar", "nameIdentifiers" => [], "affiliation" => []}])
|
59
|
+
expect(subject.publisher).to eq({"name"=>"Technische Universiteit Eindhoven"})
|
58
60
|
expect(subject.titles).to eq([{"title"=>"A multiscale analysis of the urban heat island effect"}])
|
59
61
|
expect(subject.descriptions.first["description"]).to start_with("Designing the climates of cities")
|
60
62
|
expect(subject.dates).to eq([{"date"=>"2018-04-25", "dateType"=>"Issued"}, {"date"=>"2018-04-25", "dateType"=>"Created"}])
|
@@ -68,6 +70,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
68
70
|
subject = Bolognese::Metadata.new(input: input, doi: doi)
|
69
71
|
expect(subject.valid?).to be true
|
70
72
|
expect(subject.id).to eq("https://doi.org/10.7554/elife.01567")
|
73
|
+
expect(subject.publisher).to eq({"name"=>"Drexel University"})
|
71
74
|
expect(subject.titles).to eq([{"title"=>"Validation of an Image-based Subject-Specific Dynamic Model of the Ankle Joint Complex and its Applications to the Study of the Effect of Articular Surface Morphology on Ankle Joint Mechanics"}])
|
72
75
|
expect(subject.descriptions.first["description"]).to eq(abs)
|
73
76
|
end
|
@@ -31,7 +31,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
31
31
|
expect(subject.publication_year).to eq("2016")
|
32
32
|
expect(subject.related_identifiers.length).to eq(3)
|
33
33
|
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.5438/55e5-t5c0", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
|
34
|
-
expect(subject.publisher).to eq("DataCite")
|
34
|
+
expect(subject.publisher).to eq({"name"=>"DataCite"})
|
35
35
|
end
|
36
36
|
|
37
37
|
it "BlogPosting with new DOI" do
|
@@ -59,7 +59,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
59
59
|
expect(subject.publication_year).to eq("2016")
|
60
60
|
expect(subject.related_identifiers.length).to eq(3)
|
61
61
|
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.5438/55e5-t5c0", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
|
62
|
-
expect(subject.publisher).to eq("DataCite")
|
62
|
+
expect(subject.publisher).to eq({"name"=>"DataCite"})
|
63
63
|
end
|
64
64
|
|
65
65
|
it "zenodo" do
|
@@ -104,7 +104,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
104
104
|
expect(subject.titles).to eq([{"title"=>"Hydrological and meteorological investigations in a lake near Kangerlussuaq, west Greenland"}])
|
105
105
|
expect(subject.creators.size).to eq(8)
|
106
106
|
expect(subject.creators.first).to eq("nameType" => "Personal", "name"=>"Johansson, Emma", "givenName"=>"Emma", "familyName"=>"Johansson")
|
107
|
-
expect(subject.publisher).to eq("PANGAEA")
|
107
|
+
expect(subject.publisher).to eq({"name"=>"PANGAEA"})
|
108
108
|
expect(subject.publication_year).to eq("2014")
|
109
109
|
end
|
110
110
|
|
@@ -169,7 +169,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
169
169
|
expect(subject.publication_year).to eq("2016")
|
170
170
|
expect(subject.related_identifiers.length).to eq(3)
|
171
171
|
expect(subject.related_identifiers.last).to eq("relatedIdentifier"=>"10.5438/55e5-t5c0", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
|
172
|
-
expect(subject.publisher).to eq("DataCite")
|
172
|
+
expect(subject.publisher).to eq({"name"=>"DataCite"})
|
173
173
|
end
|
174
174
|
|
175
175
|
it "GTEx dataset" do
|
@@ -189,7 +189,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
189
189
|
expect(subject.dates).to eq([{"date"=>"2017", "dateType"=>"Issued"}])
|
190
190
|
expect(subject.publication_year).to eq("2017")
|
191
191
|
expect(subject.container).to eq("title"=>"GTEx", "type"=>"DataRepository")
|
192
|
-
expect(subject.publisher).to eq("GTEx")
|
192
|
+
expect(subject.publisher).to eq({"name"=>"GTEx"})
|
193
193
|
expect(subject.funding_references.length).to eq(7)
|
194
194
|
expect(subject.funding_references.first).to eq("funderIdentifier"=>"https://doi.org/10.13039/100000052", "funderIdentifierType"=>"Crossref Funder ID", "funderName"=>"Common Fund of the Office of the Director of the NIH")
|
195
195
|
end
|
@@ -209,7 +209,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
209
209
|
expect(subject.subjects).to eq([{"subject"=>"topmed"}, {"subject"=>"whole genome sequencing"}])
|
210
210
|
expect(subject.dates).to eq([{"date"=>"2017-11-30", "dateType"=>"Issued"}])
|
211
211
|
expect(subject.publication_year).to eq("2017")
|
212
|
-
expect(subject.publisher).to eq("TOPMed")
|
212
|
+
expect(subject.publisher).to eq({"name"=>"TOPMed"})
|
213
213
|
expect(subject.related_identifiers).to eq([{"relatedIdentifier"=>"10.23725/2g4s-qv04", "relatedIdentifierType"=>"DOI", "relationType"=>"References", "resourceTypeGeneral"=>"Dataset"}])
|
214
214
|
expect(subject.funding_references).to eq([{"funderIdentifier"=>"https://doi.org/10.13039/100000050", "funderIdentifierType"=>"Crossref Funder ID", "funderName"=>"National Heart, Lung, and Blood Institute (NHLBI)"}])
|
215
215
|
end
|
@@ -240,7 +240,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
240
240
|
{"subject"=>"Sierra (mountain range)"}])
|
241
241
|
expect(subject.dates).to eq([{"date"=>"2013", "dateType"=>"Issued"}, {"date"=>"2014-10-17", "dateType"=>"Updated"}])
|
242
242
|
expect(subject.publication_year).to eq("2013")
|
243
|
-
expect(subject.publisher).to eq("UC Merced")
|
243
|
+
expect(subject.publisher).to eq({"name"=>"UC Merced"})
|
244
244
|
expect(subject.funding_references).to eq([{"funderName"=>"National Science Foundation, Division of Earth Sciences, Critical Zone Observatories"}])
|
245
245
|
expect(subject.geo_locations).to eq([{"geoLocationPlace"=>"Providence Creek (Lower, Upper and P301)", "geoLocationPoint"=>{"pointLatitude"=>"37.047756", "pointLongitude"=>"-119.221094"}}])
|
246
246
|
end
|
@@ -258,7 +258,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
258
258
|
expect(subject.titles).to eq([{"title"=>"Registry of all stations from the Tara Oceans Expedition (2009-2013)"}])
|
259
259
|
expect(subject.dates).to eq([{"date"=>"2015-02-03", "dateType"=>"Issued"}])
|
260
260
|
expect(subject.publication_year).to eq("2015")
|
261
|
-
expect(subject.publisher).to eq("PANGAEA")
|
261
|
+
expect(subject.publisher).to eq({"name"=>"PANGAEA"})
|
262
262
|
expect(subject.geo_locations).to eq([{"geoLocationBox"=>{"eastBoundLongitude"=>"174.9006", "northBoundLatitude"=>"79.6753", "southBoundLatitude"=>"-64.3088", "westBoundLongitude"=>"-168.5182"}}])
|
263
263
|
end
|
264
264
|
|
@@ -280,7 +280,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
280
280
|
expect(subject.subjects).to eq([{"subject"=>"topmed"}, {"subject"=>"whole genome sequencing"}])
|
281
281
|
expect(subject.dates).to eq([{"date"=>"2017-11-30", "dateType"=>"Issued"}])
|
282
282
|
expect(subject.publication_year).to eq("2017")
|
283
|
-
expect(subject.publisher).to eq("TOPMed")
|
283
|
+
expect(subject.publisher).to eq({"name"=>"TOPMed"})
|
284
284
|
expect(subject.funding_references).to eq([{"funderIdentifier"=>"https://doi.org/10.13039/100000050", "funderIdentifierType"=>"Crossref Funder ID", "funderName"=>"National Heart, Lung, and Blood Institute (NHLBI)"}])
|
285
285
|
end
|
286
286
|
|
@@ -299,7 +299,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
299
299
|
expect(subject.dates).to eq([{"date"=>"2019-01-09", "dateType"=>"Issued"}, {"date"=>"2019-01-09", "dateType"=>"Created"}, {"date"=>"2019-01-09", "dateType"=>"Updated"}])
|
300
300
|
expect(subject.publication_year).to eq("2019")
|
301
301
|
expect(subject.id).to eq("https://doi.org/10.23698/aida/drov")
|
302
|
-
expect(subject.publisher).to eq("AIDA")
|
302
|
+
expect(subject.publisher).to eq({"name"=>"AIDA"})
|
303
303
|
expect(subject.rights_list).to eq([{"rights"=>"Restricted access", "rightsUri"=>"https://datasets.aida.medtech4health.se/10.23698/aida/drov#license"}])
|
304
304
|
expect(subject.id).to eq("https://doi.org/10.23698/aida/drov")
|
305
305
|
end
|
@@ -332,7 +332,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
332
332
|
expect(subject.descriptions.first["description"]).to start_with("The dataset contains a sample of metadata describing papers")
|
333
333
|
expect(subject.dates).to eq([{"date"=>"2013-04-03", "dateType"=>"Issued"}])
|
334
334
|
expect(subject.publication_year).to eq("2013")
|
335
|
-
expect(subject.publisher).to eq("Zenodo")
|
335
|
+
expect(subject.publisher).to eq({"name"=>"Zenodo"})
|
336
336
|
expect(subject.funding_references).to eq([{"awardNumber"=>"246686",
|
337
337
|
"awardTitle"=>"Open Access Infrastructure for Research in Europe",
|
338
338
|
"awardUri"=>"info:eu-repo/grantAgreement/EC/FP7/246686/",
|
@@ -46,6 +46,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
46
46
|
expect(crosscite.dig("descriptions", 0, "description")).to start_with("Among various advantages, their small size makes model organisms preferred subjects of investigation.")
|
47
47
|
expect(crosscite.fetch("creators").count).to eq(5)
|
48
48
|
expect(crosscite.fetch("creators").first).to eq("nameType"=>"Personal", "name"=>"Sankar, Martial", "givenName"=>"Martial", "familyName"=>"Sankar")
|
49
|
+
expect(crosscite.fetch("publisher")).to eq({"name"=>"{eLife} Sciences Organisation, Ltd."})
|
49
50
|
end
|
50
51
|
|
51
52
|
it "BlogPosting Citeproc JSON" do
|
@@ -57,6 +58,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
57
58
|
expect(crosscite.fetch("titles")).to eq([{"title"=>"Eating your own Dog Food"}])
|
58
59
|
expect(crosscite.dig("descriptions", 0, "description")).to start_with("Eating your own dog food")
|
59
60
|
expect(crosscite.fetch("creators")).to eq([{"familyName"=>"Fenner", "givenName"=>"Martin", "name"=>"Fenner, Martin"}])
|
61
|
+
expect(crosscite.fetch("publisher")).to eq({"name"=>"DataCite"})
|
60
62
|
end
|
61
63
|
|
62
64
|
it "rdataone" do
|
@@ -67,6 +69,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
67
69
|
expect(crosscite["creators"].length).to eq(3)
|
68
70
|
expect(crosscite["creators"].last).to eq("nameType" => "Organizational", "name"=>"University Of California, Santa Barbara", "nameIdentifiers" => [], "affiliation" => [])
|
69
71
|
expect(crosscite["version"]).to eq("2.0.0")
|
72
|
+
expect(crosscite["publisher"]).to eq({"name"=>"https://cran.r-project.org"})
|
70
73
|
end
|
71
74
|
|
72
75
|
it "rdataone codemeta v2" do
|
@@ -77,6 +80,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
77
80
|
expect(crosscite["creators"].length).to eq(3)
|
78
81
|
expect(crosscite["creators"].last).to eq("nameType" => "Organizational", "name"=>"University Of California, Santa Barbara", "nameIdentifiers" => [], "affiliation" => [])
|
79
82
|
expect(crosscite["version"]).to eq("2.0.0")
|
83
|
+
expect(crosscite["publisher"]).to eq({"name"=>"https://cran.r-project.org"})
|
80
84
|
end
|
81
85
|
|
82
86
|
it "datacite database attributes" do
|
@@ -91,6 +95,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
91
95
|
expect(crosscite.fetch("publication_year")).to eq("2011")
|
92
96
|
expect(crosscite.fetch("provider_id")).to eq("dryad")
|
93
97
|
expect(crosscite.fetch("client_id")).to eq("dryad.dryad")
|
98
|
+
expect(crosscite.fetch("publisher")).to eq({"name"=>"Dryad"})
|
94
99
|
end
|
95
100
|
|
96
101
|
it "maremma" do
|
@@ -106,6 +111,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
106
111
|
[{"nameIdentifier"=>"https://orcid.org/0000-0003-0077-4738",
|
107
112
|
"nameIdentifierScheme"=>"ORCID", "schemeUri"=>"https://orcid.org"}],
|
108
113
|
"nameType"=>"Personal"}])
|
114
|
+
expect(crosscite.fetch("publisher")).to eq({"name"=>"DataCite"})
|
109
115
|
end
|
110
116
|
|
111
117
|
it "with data citation schema.org" do
|
@@ -117,6 +123,7 @@ describe Bolognese::Metadata, vcr: true do
|
|
117
123
|
expect(crosscite.fetch("related_identifiers").count).to eq(3)
|
118
124
|
expect(crosscite.fetch("related_identifiers").first).to eq("relatedIdentifier"=>"10.5438/0000-00ss", "relatedIdentifierType"=>"DOI", "relationType"=>"IsPartOf", "resourceTypeGeneral"=>"Text")
|
119
125
|
expect(crosscite.fetch("related_identifiers").last).to eq("relatedIdentifier"=>"10.5438/55e5-t5c0", "relatedIdentifierType"=>"DOI", "relationType"=>"References")
|
126
|
+
expect(crosscite.fetch("publisher")).to eq({"name"=>"DataCite"})
|
120
127
|
end
|
121
128
|
end
|
122
129
|
end
|