bolognese 0.15.9 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +7 -6
  3. data/bolognese.gemspec +1 -0
  4. data/lib/bolognese/datacite_utils.rb +19 -51
  5. data/lib/bolognese/doi_utils.rb +1 -1
  6. data/lib/bolognese/metadata_utils.rb +43 -125
  7. data/lib/bolognese/readers/bibtex_reader.rb +21 -10
  8. data/lib/bolognese/readers/citeproc_reader.rb +20 -12
  9. data/lib/bolognese/readers/codemeta_reader.rb +8 -3
  10. data/lib/bolognese/readers/crossref_reader.rb +41 -50
  11. data/lib/bolognese/readers/datacite_json_reader.rb +17 -40
  12. data/lib/bolognese/readers/datacite_reader.rb +78 -93
  13. data/lib/bolognese/readers/ris_reader.rb +20 -11
  14. data/lib/bolognese/readers/schema_org_reader.rb +62 -29
  15. data/lib/bolognese/utils.rb +90 -17
  16. data/lib/bolognese/version.rb +1 -1
  17. data/lib/bolognese/writers/bibtex_writer.rb +2 -2
  18. data/lib/bolognese/writers/codemeta_writer.rb +1 -2
  19. data/lib/bolognese/writers/crosscite_writer.rb +10 -29
  20. data/lib/bolognese/writers/datacite_json_writer.rb +18 -28
  21. data/lib/bolognese/writers/jats_writer.rb +4 -4
  22. data/lib/bolognese/writers/ris_writer.rb +3 -2
  23. data/lib/bolognese/writers/schema_org_writer.rb +16 -15
  24. data/spec/author_utils_spec.rb +3 -3
  25. data/spec/datacite_utils_spec.rb +4 -14
  26. data/spec/fixtures/crosscite.json +3 -3
  27. data/spec/fixtures/crossref.ris +1 -0
  28. data/spec/fixtures/datacite-example-geolocation-2.xml +140 -0
  29. data/spec/fixtures/datacite-example-geolocation.xml +66 -0
  30. data/spec/fixtures/datacite.json +33 -12
  31. data/spec/fixtures/datacite_software_missing_comma.json +1 -1
  32. data/spec/fixtures/schema_org_geolocation.json +82 -0
  33. data/spec/fixtures/schema_org_geoshape.json +550 -0
  34. data/spec/fixtures/schema_org_gtex.json +1 -1
  35. data/spec/fixtures/schema_org_list.json +1 -1
  36. data/spec/fixtures/schema_org_topmed.json +1 -1
  37. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/default.yml +3 -3
  38. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_bibtex.yml +3 -3
  39. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_citation.yml +4 -4
  40. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_crossref.yml +3 -3
  41. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_datacite.yml +3 -3
  42. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_jats.yml +3 -3
  43. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/crossref/to_schema_org.yml +3 -3
  44. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/default.yml +3 -3
  45. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_bibtex.yml +3 -3
  46. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_citation.yml +4 -4
  47. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite.yml +3 -3
  48. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_datacite_json.yml +3 -3
  49. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_jats.yml +3 -3
  50. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/convert_from_id/datacite/to_schema_org.yml +3 -3
  51. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/crossref.yml +2 -2
  52. data/spec/fixtures/vcr_cassettes/Bolognese_CLI/find_from_format_by_id/datacite.yml +2 -2
  53. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_datacite_metadata/change_state.yml +3 -3
  54. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/change_datacite_metadata/change_title.yml +3 -3
  55. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/crossref.yml +3 -3
  56. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/datacite.yml +11 -11
  57. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/medra.yml +3 -3
  58. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/doi_registration_agency/not_found.yml +3 -3
  59. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref.yml +5 -5
  60. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/crossref_doi_not_url.yml +5 -5
  61. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite.yml +5 -5
  62. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/datacite_doi_http.yml +5 -5
  63. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/github.yml +3 -3
  64. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/orcid.yml +3 -3
  65. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/schema_org.yml +3 -3
  66. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_by_ID/unknown_DOI_registration_agency.yml +5 -5
  67. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/bibtex.yml +3 -3
  68. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/citeproc.yml +3 -3
  69. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/codemeta.yml +3 -3
  70. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crosscite.yml +3 -3
  71. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/crossref.yml +3 -3
  72. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite.yml +3 -3
  73. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/datacite_json.yml +3 -3
  74. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/ris.yml +3 -3
  75. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_file/schema_org.yml +3 -3
  76. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/find_from_format_from_string/crosscite.yml +3 -3
  77. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_ORCID_ID.yml +3 -3
  78. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_SICI_DOI.yml +3 -3
  79. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/DOI_with_data_citation.yml +3 -3
  80. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/book_chapter.yml +3 -3
  81. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/dataset.yml +3 -3
  82. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/date_in_future.yml +3 -3
  83. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article.yml +3 -3
  84. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/journal_article_with.yml +3 -3
  85. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/not_found_error.yml +3 -3
  86. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_crossref_metadata/posted_content.yml +3 -3
  87. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/BlogPosting.yml +3 -3
  88. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_test_system.yml +3 -3
  89. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_in_with_related_id_system.yml +3 -3
  90. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/DOI_not_found.yml +3 -3
  91. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Dataset.yml +3 -3
  92. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding.yml +3 -3
  93. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Funding_schema_version_4.yml +3 -3
  94. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/Referee_report_in_test_system.yml +3 -3
  95. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_only_full_name.yml +3 -3
  96. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_scheme.yml +3 -3
  97. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/author_with_wrong_orcid_scheme.yml +3 -3
  98. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/content_url.yml +12 -12
  99. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/date.yml +3 -3
  100. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/dissertation.yml +3 -3
  101. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/doi_with_sign.yml +3 -3
  102. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/empty_subject.yml +3 -3
  103. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/funding_schema_version_3.yml +3 -3
  104. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/is_identical_to.yml +3 -3
  105. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/keywords_with_attributes.yml +3 -3
  106. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/leading_and_trailing_whitespace.yml +3 -3
  107. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_author_names_in_one_creatorName.yml +3 -3
  108. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/multiple_licenses.yml +3 -3
  109. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/series-information.yml +3 -3
  110. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/subject_scheme.yml +3 -3
  111. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/get_datacite_metadata/xs_string_attributes.yml +3 -3
  112. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/DOI_RA_not_Crossref_or_DataCite.yml +2 -2
  113. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/handle_input/unknown_DOI_prefix.yml +2 -2
  114. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/missing_comma.yml +3 -3
  115. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/nil.yml +3 -3
  116. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/overlapping_keys.yml +3 -3
  117. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/jsonlint/valid.yml +3 -3
  118. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_ris/BlogPosting_schema_org.yml +16 -20
  119. data/spec/fixtures/vcr_cassettes/Bolognese_Metadata/write_metadata_as_schema_org/geo_location_box.yml +42 -0
  120. data/spec/readers/bibtex_reader_spec.rb +5 -5
  121. data/spec/readers/citeproc_reader_spec.rb +1 -2
  122. data/spec/readers/codemeta_reader_spec.rb +9 -9
  123. data/spec/readers/crosscite_reader_spec.rb +2 -2
  124. data/spec/readers/crossref_reader_spec.rb +55 -48
  125. data/spec/readers/datacite_json_reader_spec.rb +5 -4
  126. data/spec/readers/datacite_reader_spec.rb +150 -114
  127. data/spec/readers/ris_reader_spec.rb +5 -5
  128. data/spec/readers/schema_org_reader_spec.rb +62 -48
  129. data/spec/utils_spec.rb +4 -4
  130. data/spec/writers/crosscite_writer_spec.rb +21 -17
  131. data/spec/writers/datacite_json_writer_spec.rb +8 -8
  132. data/spec/writers/datacite_writer_spec.rb +17 -18
  133. data/spec/writers/ris_writer_spec.rb +26 -18
  134. data/spec/writers/schema_org_writer_spec.rb +45 -18
  135. data/spec/writers/turtle_writer_spec.rb +1 -1
  136. metadata +22 -3
@@ -0,0 +1,42 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://search.datacite.org/api?fl=doi,url,xml,state,allocator_symbol,datacentre_symbol,media,minted,updated&q=doi:10.1594/pangaea.842237&wt=json
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Mozilla/5.0 (compatible; Maremma/4.1.1; +https://github.com/datacite/maremma)
12
+ Accept:
13
+ - text/html,application/json,application/xml;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ Date:
20
+ - Wed, 31 Oct 2018 18:02:12 GMT
21
+ Content-Type:
22
+ - application/json;charset=UTF-8
23
+ Connection:
24
+ - keep-alive
25
+ Server:
26
+ - nginx/1.10.3 (Ubuntu)
27
+ Access-Control-Allow-Origin:
28
+ - "*"
29
+ Access-Control-Allow-Methods:
30
+ - GET, POST, PUT, DELETE, OPTIONS
31
+ Access-Control-Allow-Headers:
32
+ - DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization
33
+ Access-Control-Expose-Headers:
34
+ - DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Authorization
35
+ body:
36
+ encoding: ASCII-8BIT
37
+ string: '{"responseHeader":{"status":0,"QTime":2},"response":{"numFound":1,"start":0,"docs":[{"datacentre_symbol":"TIB.PANGAEA","url":"https://doi.pangaea.de/10.1594/PANG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YXRpdHVkZT4KICAgICAgICA8bm9ydGhCb3VuZExhdGl0dWRlPjc5LjY3NTM8L25vcnRoQm91bmRMYXRpdHVkZT4KICAgICAgPC9nZW9Mb2NhdGlvbkJveD4KICAgIDwvZ2VvTG9jYXRpb24+CiAgPC9nZW9Mb2NhdGlvbnM+CjwvcmVzb3VyY2U+","allocator_symbol":"TIB","minted":"2015-04-22T03:11:36Z","state":"findable","updated":"2018-09-30T22:52:26Z","doi":"10.1594/PANGAEA.842237"}]}}
38
+
39
+ '
40
+ http_version:
41
+ recorded_at: Wed, 31 Oct 2018 18:02:12 GMT
42
+ recorded_with: VCR 3.0.3
@@ -32,13 +32,13 @@ describe Bolognese::Metadata, vcr: true do
32
32
  expect(subject.type).to eq("ScholarlyArticle")
33
33
  expect(subject.b_url).to eq("http://elifesciences.org/lookup/doi/10.7554/eLife.01567")
34
34
  expect(subject.resource_type_general).to eq("Text")
35
- expect(subject.author.length).to eq(5)
36
- expect(subject.author.first).to eq("type"=>"Person", "name"=>"Martial Sankar", "givenName"=>"Martial", "familyName"=>"Sankar")
35
+ expect(subject.creator.length).to eq(5)
36
+ expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Martial Sankar", "givenName"=>"Martial", "familyName"=>"Sankar")
37
37
  expect(subject.title).to eq("Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth")
38
38
  expect(subject.description["text"]).to start_with("Among various advantages, their small size makes model organisms preferred subjects of investigation.")
39
- expect(subject.license["id"]).to eq("http://creativecommons.org/licenses/by/3.0/")
39
+ expect(subject.rights["id"]).to eq("http://creativecommons.org/licenses/by/3.0/")
40
40
  expect(subject.date_published).to eq("2014")
41
- expect(subject.is_part_of).to eq("type"=>"Periodical", "title"=>"eLife", "issn"=>"2050-084X")
41
+ expect(subject.related_identifiers).to eq([{"id"=>"2050-084X", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"eLife", "type"=>"Periodical"}])
42
42
  end
43
43
 
44
44
  it "DOI does not exist" do
@@ -54,7 +54,7 @@ describe Bolognese::Metadata, vcr: true do
54
54
  expect(subject.type).to eq("Thesis")
55
55
  expect(subject.resource_type_general).to eq("Text")
56
56
  expect(subject.additional_type).to eq("Dissertation")
57
- expect(subject.author).to eq([{"type"=>"Person", "name"=>"Y. Toparlar", "givenName"=>"Y.", "familyName"=>"Toparlar"}])
57
+ expect(subject.creator).to eq([{"type"=>"Person", "name"=>"Y. Toparlar", "givenName"=>"Y.", "familyName"=>"Toparlar"}])
58
58
  expect(subject.title).to eq("A multiscale analysis of the urban heat island effect: from city averaged temperatures to the energy demand of individual buildings")
59
59
  expect(subject.description["text"]).to start_with("Designing the climates of cities")
60
60
  expect(subject.date_published).to eq("2018")
@@ -20,11 +20,10 @@ describe Bolognese::Metadata, vcr: true do
20
20
  expect(subject.b_url).to eq("https://blog.datacite.org/eating-your-own-dog-food")
21
21
  expect(subject.type).to eq("BlogPosting")
22
22
  expect(subject.resource_type_general).to eq("Text")
23
- expect(subject.author).to eq("type"=>"Person", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner")
23
+ expect(subject.creator).to eq("type"=>"Person", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner")
24
24
  expect(subject.title).to eq("Eating your own Dog Food")
25
25
  expect(subject.description["text"]).to start_with("Eating your own dog food")
26
26
  expect(subject.date_published).to eq("2016-12-20")
27
- expect(subject.is_part_of).to eq("type"=>"Periodical", "title"=>"DataCite Blog")
28
27
  end
29
28
  end
30
29
  end
@@ -21,11 +21,11 @@ describe Bolognese::Metadata, vcr: true do
21
21
  expect(subject.identifier).to eq("https://doi.org/10.5438/qeg0-3gm3")
22
22
  expect(subject.b_url).to eq("https://github.com/datacite/maremma")
23
23
  expect(subject.type).to eq("SoftwareSourceCode")
24
- expect(subject.author).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner")
24
+ expect(subject.creator).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner")
25
25
  expect(subject.title).to eq("Maremma: a Ruby library for simplified network calls")
26
26
  expect(subject.description["text"]).to start_with("Ruby utility library for network requests")
27
27
  expect(subject.keywords).to eq(["faraday", "excon", "net/http"])
28
- expect(subject.date_created).to eq("2015-11-28")
28
+ expect(subject.dates).to eq("2015-11-28")
29
29
  expect(subject.date_published).to eq("2017-02-24")
30
30
  expect(subject.date_modified).to eq("2017-02-24")
31
31
  expect(subject.publisher).to eq("DataCite")
@@ -37,7 +37,7 @@ describe Bolognese::Metadata, vcr: true do
37
37
  expect(subject.identifier).to eq("https://doi.org/10.5063/f1m61h5x")
38
38
  expect(subject.b_url).to eq("https://github.com/DataONEorg/rdataone")
39
39
  expect(subject.type).to eq("SoftwareSourceCode")
40
- expect(subject.author).to eq( [{"type"=>"Person",
40
+ expect(subject.creator).to eq( [{"type"=>"Person",
41
41
  "id"=>"http://orcid.org/0000-0003-0077-4738",
42
42
  "name"=>"Matt Jones",
43
43
  "givenName"=>"Matt",
@@ -52,7 +52,7 @@ describe Bolognese::Metadata, vcr: true do
52
52
  expect(subject.description["text"]).to start_with("Provides read and write access to data and metadata")
53
53
  expect(subject.keywords).to eq(["data sharing", "data repository", "DataONE"])
54
54
  expect(subject.b_version).to eq("2.0.0")
55
- expect(subject.date_created).to eq("2016-05-27")
55
+ expect(subject.dates).to eq("2016-05-27")
56
56
  expect(subject.date_published).to eq("2016-05-27")
57
57
  expect(subject.date_modified).to eq("2016-05-27")
58
58
  expect(subject.publisher).to eq("https://cran.r-project.org")
@@ -65,11 +65,11 @@ describe Bolognese::Metadata, vcr: true do
65
65
  expect(subject.identifier).to eq("https://doi.org/10.5438/qeg0-3gm3")
66
66
  expect(subject.b_url).to eq("https://github.com/datacite/maremma")
67
67
  expect(subject.type).to eq("SoftwareSourceCode")
68
- expect(subject.author).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner")
68
+ expect(subject.creator).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner")
69
69
  expect(subject.title).to eq("Maremma: a Ruby library for simplified network calls")
70
70
  expect(subject.description["text"]).to start_with("Simplifies network calls")
71
71
  expect(subject.keywords).to eq(["faraday", "excon", "net/http"])
72
- expect(subject.date_created).to eq("2015-11-28")
72
+ expect(subject.dates).to eq("2015-11-28")
73
73
  expect(subject.date_published).to eq("2017-02-24")
74
74
  expect(subject.date_modified).to eq("2017-02-24")
75
75
  expect(subject.publisher).to eq("DataCite")
@@ -82,12 +82,12 @@ describe Bolognese::Metadata, vcr: true do
82
82
  expect(subject.identifier).to eq("https://doi.org/10.5438/wr0x-e194")
83
83
  expect(subject.b_url).to eq("https://github.com/datacite/metadata-reports")
84
84
  expect(subject.type).to eq("SoftwareSourceCode")
85
- expect(subject.author.size).to eq(4)
86
- expect(subject.author.last).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0001-8135-3489", "name"=>"Lars Holm Nielsen", "givenName"=>"Lars Holm", "familyName"=>"Nielsen")
85
+ expect(subject.creator.size).to eq(4)
86
+ expect(subject.creator.last).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0001-8135-3489", "name"=>"Lars Holm Nielsen", "givenName"=>"Lars Holm", "familyName"=>"Nielsen")
87
87
  expect(subject.title).to eq("DOI Registrations for Software")
88
88
  expect(subject.description["text"]).to start_with("Analysis of DataCite DOIs registered for software")
89
89
  expect(subject.keywords).to eq(["doi", "software", "codemeta"])
90
- expect(subject.date_created).to eq("2018-03-09")
90
+ expect(subject.dates).to eq("2018-03-09")
91
91
  expect(subject.date_published).to eq("2018-05-17")
92
92
  expect(subject.date_modified).to eq("2018-05-17")
93
93
  expect(subject.publisher).to eq("DataCite")
@@ -19,7 +19,7 @@ describe Bolognese::Metadata, vcr: true do
19
19
  expect(subject.identifier).to eq("https://doi.org/10.5281/zenodo.48440")
20
20
  expect(subject.type).to eq("SoftwareSourceCode")
21
21
  expect(subject.resource_type_general).to eq("Software")
22
- expect(subject.author).to eq("type"=>"Person", "familyName" => "Garza", "givenName" => "Kristian", "name" => "Kristian Garza")
22
+ expect(subject.creator).to eq("type"=>"Person", "familyName" => "Garza", "givenName" => "Kristian", "name" => "Kristian Garza")
23
23
  expect(subject.title).to eq("Analysis Tools for Crossover Experiment of UI using Choice Architecture")
24
24
  expect(subject.description["text"]).to start_with("This tools are used to analyse the data produced by the Crosssover Experiment")
25
25
  expect(subject.date_published).to eq("2016-03-27")
@@ -32,7 +32,7 @@ describe Bolognese::Metadata, vcr: true do
32
32
  expect(subject.identifier).to eq("https://doi.org/10.5281/zenodo.48440")
33
33
  expect(subject.type).to eq("SoftwareSourceCode")
34
34
  expect(subject.resource_type_general).to eq("Software")
35
- expect(subject.author).to eq("type"=>"Person", "familyName" => "Garza", "givenName" => "Kristian", "name" => "Kristian Garza")
35
+ expect(subject.creator).to eq("type"=>"Person", "familyName" => "Garza", "givenName" => "Kristian", "name" => "Kristian Garza")
36
36
  expect(subject.title).to eq("Analysis Tools for Crossover Experiment of UI using Choice Architecture")
37
37
  expect(subject.description["text"]).to start_with("This tools are used to analyse the data produced by the Crosssover Experiment")
38
38
  expect(subject.date_published).to eq("2016-03-27")
@@ -26,27 +26,27 @@ describe Bolognese::Metadata, vcr: true do
26
26
  expect(subject.ris_type).to eq("JOUR")
27
27
  expect(subject.citeproc_type).to eq("article-journal")
28
28
  expect(subject.resource_type_general).to eq("Text")
29
- expect(subject.author.length).to eq(5)
30
- expect(subject.author.first).to eq("type"=>"Person", "name"=>"Martial Sankar", "givenName"=>"Martial", "familyName"=>"Sankar")
31
- expect(subject.license).to eq("id"=>"http://creativecommons.org/licenses/by/3.0")
29
+ expect(subject.creator.length).to eq(5)
30
+ expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Martial Sankar", "givenName"=>"Martial", "familyName"=>"Sankar")
31
+ expect(subject.rights).to eq("id"=>"http://creativecommons.org/licenses/by/3.0")
32
32
  expect(subject.title).to eq("Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth")
33
33
  expect(subject.date_published).to eq("2014-02-11")
34
34
  expect(subject.publication_year).to eq(2014)
35
35
  expect(subject.date_modified).to eq("2018-08-23T13:41:49Z")
36
- expect(subject.is_part_of).to eq("type"=>"Periodical", "title"=>"eLife", "issn"=>"2050-084X")
37
- expect(subject.container_title).to eq("eLife")
38
- expect(subject.references.count).to eq(26)
39
- expect(subject.references[20]).to eq("id"=>"https://doi.org/10.5061/dryad.b835k", "type"=>"CreativeWork", "title" => "Data from: Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth")
40
- expect(subject.funding).to eq([{"type"=>"Organization", "name"=>"SystemsX"},
41
- {"type"=>"Organization",
42
- "id"=>"https://doi.org/10.13039/501100003043",
43
- "name"=>"EMBO"},
44
- {"type"=>"Organization",
45
- "id"=>"https://doi.org/10.13039/501100001711",
46
- "name"=>"Swiss National Science Foundation"},
47
- {"type"=>"Organization",
48
- "id"=>"https://doi.org/10.13039/501100006390",
49
- "name"=>"University of Lausanne"}])
36
+ expect(subject.periodical).to eq("issn"=>"2050-084X", "title"=>"eLife", "type"=>"Periodical")
37
+ expect(subject.related_identifiers.length).to eq(27)
38
+ expect(subject.related_identifiers.first).to eq("id"=>"2050-084X", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"eLife", "type"=>"Periodical")
39
+ expect(subject.related_identifiers.last).to eq("id" => "10.1038/ncb2764",
40
+ "related_identifier_type" => "DOI",
41
+ "relation_type" => "References",
42
+ "title" => "A screen for morphological complexity identifies regulators of switch-like transitions between discrete cell shapes")
43
+ expect(subject.funding_references).to eq([{"funder_name"=>"SystemsX"},
44
+ {"funder_identifier"=>"https://doi.org/10.13039/501100003043",
45
+ "funder_name"=>"EMBO"},
46
+ {"funder_identifier"=>"https://doi.org/10.13039/501100001711",
47
+ "funder_name"=>"Swiss National Science Foundation"},
48
+ {"funder_identifier"=>"https://doi.org/10.13039/501100006390",
49
+ "funder_name"=>"University of Lausanne"}])
50
50
  expect(subject.service_provider).to eq("Crossref")
51
51
  end
52
52
 
@@ -62,17 +62,19 @@ describe Bolognese::Metadata, vcr: true do
62
62
  expect(subject.ris_type).to eq("JOUR")
63
63
  expect(subject.citeproc_type).to eq("article-journal")
64
64
  expect(subject.resource_type_general).to eq("Text")
65
- expect(subject.author.length).to eq(5)
66
- expect(subject.author.first).to eq("type"=>"Person", "name"=>"Markus Ralser", "givenName"=>"Markus", "familyName"=>"Ralser")
65
+ expect(subject.creator.length).to eq(5)
66
+ expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Markus Ralser", "givenName"=>"Markus", "familyName"=>"Ralser")
67
67
  expect(subject.editor).to eq("type"=>"Person", "name"=>"Guilhem Janbon", "givenName"=>"Guilhem", "familyName"=>"Janbon")
68
68
  expect(subject.title).to eq("Triose Phosphate Isomerase Deficiency Is Caused by Altered Dimerization–Not Catalytic Inactivity–of the Mutant Enzymes")
69
- expect(subject.license).to eq("id"=>"http://creativecommons.org/licenses/by/4.0")
69
+ expect(subject.rights).to eq("id"=>"http://creativecommons.org/licenses/by/4.0")
70
70
  expect(subject.date_published).to eq("2006-12-20")
71
71
  expect(subject.publication_year).to eq(2006)
72
72
  expect(subject.date_modified).to eq("2017-06-17T12:26:15Z")
73
73
  expect(subject.first_page).to eq("e30")
74
- expect(subject.is_part_of).to eq("type"=>"Periodical", "title"=>"PLoS ONE", "issn"=>"1932-6203")
75
- expect(subject.container_title).to eq("PLoS ONE")
74
+ expect(subject.related_identifiers.length).to eq(62)
75
+ expect(subject.related_identifiers.first).to eq("id"=>"1932-6203", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"PLoS ONE", "type"=>"Periodical")
76
+ expect(subject.related_identifiers.last).to eq("id"=>"10.1056/nejm199109123251104", "relation_type"=>"References", "related_identifier_type"=>"DOI", "title"=>"Efficacy of statewide neonatal screening for cystic fibrosis by assay of trypsinogen concentrations.")
77
+ expect(subject.periodical).to eq("issn"=>"1932-6203", "title"=>"PLoS ONE", "type"=>"Periodical")
76
78
  expect(subject.service_provider).to eq("Crossref")
77
79
  end
78
80
 
@@ -88,14 +90,13 @@ describe Bolognese::Metadata, vcr: true do
88
90
  expect(subject.ris_type).to eq("JOUR")
89
91
  expect(subject.citeproc_type).to eq("article-journal")
90
92
  expect(subject.resource_type_general).to eq("Text")
91
- expect(subject.author.count).to eq(11)
92
- expect(subject.author.last).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-4060-7360", "name"=>"Timothy Clark", "givenName"=>"Timothy", "familyName"=>"Clark")
93
+ expect(subject.creator.count).to eq(11)
94
+ expect(subject.creator.last).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-4060-7360", "name"=>"Timothy Clark", "givenName"=>"Timothy", "familyName"=>"Clark")
93
95
  expect(subject.title).to eq("A Data Citation Roadmap for Scholarly Data Repositories")
94
- expect(subject.alternate_identifier).to eq("biorxiv;097196v2")
96
+ expect(subject.alternate_identifiers).to eq("biorxiv;097196v2")
95
97
  expect(subject.description["text"]).to start_with("This article presents a practical roadmap")
96
98
  expect(subject.date_published).to eq("2017-10-09")
97
99
  expect(subject.date_modified).to eq("2017-10-10T05:10:49Z")
98
- expect(subject.is_part_of).to be_nil
99
100
  expect(subject.publisher).to eq("bioRxiv")
100
101
  expect(subject.service_provider).to eq("Crossref")
101
102
  end
@@ -109,15 +110,17 @@ describe Bolognese::Metadata, vcr: true do
109
110
  expect(subject.type).to eq("ScholarlyArticle")
110
111
  expect(subject.additional_type).to eq("JournalArticle")
111
112
  expect(subject.resource_type_general).to eq("Text")
112
- expect(subject.author).to eq([{"type"=>"Person", "name"=>"A. Fenton", "givenName"=>"A.", "familyName"=>"Fenton"}, {"type"=>"Person", "name"=>"S. A. Rands", "givenName"=>"S. A.", "familyName"=>"Rands"}])
113
- expect(subject.license).to eq("id"=>"http://doi.wiley.com/10.1002/tdm_license_1.1")
113
+ expect(subject.creator).to eq([{"type"=>"Person", "name"=>"A. Fenton", "givenName"=>"A.", "familyName"=>"Fenton"}, {"type"=>"Person", "name"=>"S. A. Rands", "givenName"=>"S. A.", "familyName"=>"Rands"}])
114
+ expect(subject.rights).to eq("id"=>"http://doi.wiley.com/10.1002/tdm_license_1.1")
114
115
  expect(subject.title).to eq("THE IMPACT OF PARASITE MANIPULATION AND PREDATOR FORAGING BEHAVIOR ON PREDATOR–PREY COMMUNITIES")
115
116
  expect(subject.date_published).to eq("2006-11")
116
117
  expect(subject.date_modified).to eq("2018-08-02T21:20:01Z")
117
118
  expect(subject.first_page).to eq("2832")
118
119
  expect(subject.last_page).to eq("2841")
119
- expect(subject.is_part_of).to eq("type"=>"Periodical", "title"=>"Ecology", "issn"=>"0012-9658")
120
- expect(subject.container_title).to eq("Ecology")
120
+ expect(subject.related_identifiers.length).to eq(34)
121
+ expect(subject.related_identifiers.first).to eq("id"=>"0012-9658", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"Ecology", "type"=>"Periodical")
122
+ expect(subject.related_identifiers.last).to eq("id"=>"10.1098/rspb.2002.2213", "related_identifier_type"=>"DOI", "relation_type"=>"References")
123
+ expect(subject.periodical).to eq("issn"=>"0012-9658", "title"=>"Ecology", "type"=>"Periodical")
121
124
  expect(subject.service_provider).to eq("Crossref")
122
125
  end
123
126
 
@@ -130,16 +133,18 @@ describe Bolognese::Metadata, vcr: true do
130
133
  expect(subject.type).to eq("ScholarlyArticle")
131
134
  expect(subject.additional_type).to eq("JournalArticle")
132
135
  expect(subject.resource_type_general).to eq("Text")
133
- expect(subject.author.length).to eq(7)
134
- expect(subject.author[2]).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-2043-4925", "name"=>"Beatriz Hernandez", "givenName"=>"Beatriz", "familyName"=>"Hernandez")
135
- expect(subject.license).to eq("id"=>"http://creativecommons.org/licenses/by/3.0")
136
+ expect(subject.creator.length).to eq(7)
137
+ expect(subject.creator[2]).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-2043-4925", "name"=>"Beatriz Hernandez", "givenName"=>"Beatriz", "familyName"=>"Hernandez")
138
+ expect(subject.rights).to eq("id"=>"http://creativecommons.org/licenses/by/3.0")
136
139
  expect(subject.title).to eq("Delineating a Retesting Zone Using Receiver Operating Characteristic Analysis on Serial QuantiFERON Tuberculosis Test Results in US Healthcare Workers")
137
140
  expect(subject.date_published).to eq("2012")
138
141
  expect(subject.date_modified).to eq("2016-08-02T18:42:41Z")
139
142
  expect(subject.first_page).to eq("1")
140
143
  expect(subject.last_page).to eq("7")
141
- expect(subject.is_part_of).to eq("type"=>"Periodical", "title"=>"Pulmonary Medicine", "issn"=>"2090-1836")
142
- expect(subject.container_title).to eq("Pulmonary Medicine")
144
+ expect(subject.related_identifiers.length).to eq(18)
145
+ expect(subject.related_identifiers.first).to eq("id"=>"2090-1836", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"Pulmonary Medicine", "type"=>"Periodical")
146
+ expect(subject.related_identifiers.last).to eq("id"=>"10.1378/chest.12-0045", "related_identifier_type"=>"DOI", "relation_type"=>"References")
147
+ expect(subject.periodical).to eq("issn"=>"2090-1836", "title"=>"Pulmonary Medicine", "type"=>"Periodical")
143
148
  expect(subject.service_provider).to eq("Crossref")
144
149
  end
145
150
 
@@ -152,13 +157,13 @@ describe Bolognese::Metadata, vcr: true do
152
157
  expect(subject.type).to eq("ScholarlyArticle")
153
158
  expect(subject.additional_type).to eq("JournalArticle")
154
159
  expect(subject.resource_type_general).to eq("Text")
155
- expect(subject.author.length).to eq(10)
156
- expect(subject.author.first).to eq("type"=>"Person", "name"=>"Sarah E. Beck", "givenName"=>"Sarah E.", "familyName"=>"Beck")
160
+ expect(subject.creator.length).to eq(10)
161
+ expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Sarah E. Beck", "givenName"=>"Sarah E.", "familyName"=>"Beck")
157
162
  expect(subject.title).to eq("Paving the path to HIV neurotherapy: Predicting SIV CNS disease")
158
163
  expect(subject.date_published).to eq("2015-07")
159
164
  expect(subject.date_modified).to eq("2017-06-23T08:44:48Z")
160
- expect(subject.is_part_of).to eq("type"=>"Periodical", "title"=>"European Journal of Pharmacology", "issn"=>"00142999")
161
- expect(subject.container_title).to eq("European Journal of Pharmacology")
165
+ expect(subject.related_identifiers).to eq([{"id"=>"00142999", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"European Journal of Pharmacology", "type"=>"Periodical"}])
166
+ expect(subject.periodical).to eq("issn"=>"00142999", "title"=>"European Journal of Pharmacology", "type"=>"Periodical")
162
167
  expect(subject.service_provider).to eq("Crossref")
163
168
  end
164
169
 
@@ -174,8 +179,8 @@ describe Bolognese::Metadata, vcr: true do
174
179
  expect(subject.bibtex_type).to eq("misc")
175
180
  expect(subject.ris_type).to eq("JOUR")
176
181
  expect(subject.citeproc_type).to eq("article-journal")
177
- expect(subject.author.length).to eq(2)
178
- expect(subject.author.first).to eq("type"=>"Person", "name"=>"G. Fermi", "givenName"=>"G.", "familyName"=>"Fermi")
182
+ expect(subject.creator.length).to eq(2)
183
+ expect(subject.creator.first).to eq("type"=>"Person", "name"=>"G. Fermi", "givenName"=>"G.", "familyName"=>"Fermi")
179
184
  expect(subject.title).to eq("THE CRYSTAL STRUCTURE OF HUMAN DEOXYHAEMOGLOBIN AT 1.74 ANGSTROMS RESOLUTION")
180
185
  expect(subject.description).to eq("x-ray diffraction structure")
181
186
  expect(subject.date_published).to eq("1984-07-17")
@@ -197,8 +202,8 @@ describe Bolognese::Metadata, vcr: true do
197
202
  expect(subject.bibtex_type).to eq("inbook")
198
203
  expect(subject.ris_type).to eq("CHAP")
199
204
  expect(subject.citeproc_type).to eq("chapter")
200
- expect(subject.author.length).to eq(2)
201
- expect(subject.author.first).to eq("type"=>"Person", "name"=>"Ronald L. Diercks", "givenName"=>"Ronald L.", "familyName"=>"Diercks")
205
+ expect(subject.creator.length).to eq(2)
206
+ expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Ronald L. Diercks", "givenName"=>"Ronald L.", "familyName"=>"Diercks")
202
207
  expect(subject.title).to eq("Clinical Symptoms and Physical Examinations")
203
208
  expect(subject.date_published).to eq("2015")
204
209
  expect(subject.date_modified).to eq("2015-04-14T02:31:13Z")
@@ -215,14 +220,16 @@ describe Bolognese::Metadata, vcr: true do
215
220
  expect(subject.type).to eq("ScholarlyArticle")
216
221
  expect(subject.additional_type).to eq("JournalArticle")
217
222
  expect(subject.resource_type_general).to eq("Text")
218
- expect(subject.author.length).to eq(3)
219
- expect(subject.author.first).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0002-4156-3761", "name"=>"Nico Dissmeyer", "givenName"=>"Nico", "familyName"=>"Dissmeyer")
223
+ expect(subject.creator.length).to eq(3)
224
+ expect(subject.creator.first).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0002-4156-3761", "name"=>"Nico Dissmeyer", "givenName"=>"Nico", "familyName"=>"Dissmeyer")
220
225
  expect(subject.title).to eq("Life and death of proteins after protease cleavage: protein degradation by the N-end rule pathway")
221
- expect(subject.license).to eq([{"id"=>"http://doi.wiley.com/10.1002/tdm_license_1.1"}, {"id"=>"http://onlinelibrary.wiley.com/termsAndConditions"}])
226
+ expect(subject.rights).to eq([{"id"=>"http://doi.wiley.com/10.1002/tdm_license_1.1"}, {"id"=>"http://onlinelibrary.wiley.com/termsAndConditions"}])
222
227
  expect(subject.date_published).to eq("2018-05")
223
228
  expect(subject.date_modified).to eq("2018-08-07T05:52:14Z")
224
- expect(subject.is_part_of).to eq("type"=>"Periodical", "title"=>"New Phytologist", "issn"=>"0028646X")
225
- expect(subject.container_title).to eq("New Phytologist")
229
+ expect(subject.related_identifiers.length).to eq(49)
230
+ expect(subject.related_identifiers.first).to eq("id"=>"0028646X", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"New Phytologist", "type"=>"Periodical")
231
+ expect(subject.related_identifiers.last).to eq("id"=>"10.1002/pmic.201400530", "relation_type"=>"References", "related_identifier_type"=>"DOI", "title"=>"Quantitative proteomics analysis of the Arg/N-end rule pathway of targeted degradation in Arabidopsis roots")
232
+ expect(subject.periodical).to eq("issn"=>"0028646X", "title"=>"New Phytologist", "type"=>"Periodical")
226
233
  expect(subject.service_provider).to eq("Crossref")
227
234
  end
228
235
 
@@ -20,12 +20,13 @@ describe Bolognese::Metadata, vcr: true do
20
20
  expect(subject.type).to eq("ScholarlyArticle")
21
21
  expect(subject.additional_type).to eq("BlogPosting")
22
22
  expect(subject.resource_type_general).to eq("Text")
23
- expect(subject.author).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-1419-2405", "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner")
23
+ expect(subject.creator).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-1419-2405", "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner")
24
24
  expect(subject.title).to eq("Eating your own Dog Food")
25
- expect(subject.alternate_identifier).to eq("type"=>"Local accession number", "name"=>"MS-49-3632-5083")
25
+ expect(subject.alternate_identifiers).to eq([{"alternate-identifier"=>"MS-49-3632-5083", "alternate-identifier-type"=>"Local accession number"}])
26
26
  expect(subject.date_published).to eq("2016-12-20")
27
- expect(subject.is_part_of).to eq("id"=>"https://doi.org/10.5438/0000-00ss")
28
- expect(subject.references).to eq([{"id"=>"https://doi.org/10.5438/0012"}, {"id"=>"https://doi.org/10.5438/55e5-t5c0"}])
27
+ expect(subject.related_identifiers.length).to eq(3)
28
+ expect(subject.related_identifiers.first).to eq("id"=>"10.5438/0000-00ss", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf")
29
+ expect(subject.related_identifiers.last).to eq("id"=>"10.5438/55e5-t5c0", "related_identifier_type"=>"DOI", "relation_type"=>"References")
29
30
  expect(subject.service_provider).to eq("DataCite")
30
31
  end
31
32
 
@@ -25,14 +25,14 @@ describe Bolognese::Metadata, vcr: true do
25
25
  expect(subject.resource_type_general).to eq("Dataset")
26
26
  expect(subject.ris_type).to eq("DATA")
27
27
  expect(subject.citeproc_type).to eq("dataset")
28
- expect(subject.author.length).to eq(8)
29
- expect(subject.author.first).to eq("type"=>"Person", "name"=>"Benjamin Ollomo", "givenName"=>"Benjamin", "familyName"=>"Ollomo")
28
+ expect(subject.creator.length).to eq(8)
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
- expect(subject.alternate_identifier).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
- expect(subject.license).to eq("id"=>"http://creativecommons.org/publicdomain/zero/1.0")
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
+ expect(subject.rights).to eq("id"=>"http://creativecommons.org/publicdomain/zero/1.0")
33
33
  expect(subject.date_published).to eq("2011")
34
- expect(subject.has_part).to eq([{"type"=>"CreativeWork", "id"=>"https://doi.org/10.5061/dryad.8515/1"}, {"type"=>"CreativeWork", "id"=>"https://doi.org/10.5061/dryad.8515/2"}])
35
- expect(subject.is_referenced_by).to eq("type"=>"CreativeWork", "id"=>"https://doi.org/10.1371/journal.ppat.1000446")
34
+ expect(subject.related_identifiers.length).to eq(6)
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")
37
37
  expect(subject.service_provider).to eq("DataCite")
38
38
  expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
@@ -48,14 +48,14 @@ describe Bolognese::Metadata, vcr: true do
48
48
  expect(subject.resource_type_general).to eq("Text")
49
49
  expect(subject.ris_type).to eq("RPRT")
50
50
  expect(subject.citeproc_type).to eq("article-journal")
51
- expect(subject.author).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0003-1419-2405", "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner")
51
+ expect(subject.creator).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0003-1419-2405", "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner")
52
52
  expect(subject.title).to eq("Eating your own Dog Food")
53
- expect(subject.alternate_identifier).to eq("type"=>"Local accession number", "name"=>"MS-49-3632-5083")
53
+ expect(subject.alternate_identifiers).to eq("type"=>"Local accession number", "name"=>"MS-49-3632-5083")
54
54
  expect(subject.description["text"]).to start_with("Eating your own dog food")
55
55
  expect(subject.date_published).to eq("2016-12-20")
56
56
  expect(subject.date_modified).to eq("2016-12-20")
57
- expect(subject.is_part_of).to eq("type"=>"CreativeWork", "id"=>"https://doi.org/10.5438/0000-00ss")
58
- expect(subject.references).to eq([{"type"=>"CreativeWork", "id"=>"https://doi.org/10.5438/0012"}, {"type"=>"CreativeWork", "id"=>"https://doi.org/10.5438/55e5-t5c0"}])
57
+ expect(subject.related_identifiers.length).to eq(3)
58
+ expect(subject.related_identifiers.last).to eq("id"=>"10.5438/0000-00ss", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf")
59
59
  expect(subject.publisher).to eq("DataCite")
60
60
  expect(subject.service_provider).to eq("DataCite")
61
61
  expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
@@ -69,7 +69,7 @@ describe Bolognese::Metadata, vcr: true do
69
69
  expect(subject.type).to eq("ScholarlyArticle")
70
70
  expect(subject.additional_type).to eq("ConferencePaper")
71
71
  expect(subject.resource_type_general).to eq("Text")
72
- expect(subject.author).to eq("type"=>"Person", "name"=>"Nathaniel Johnston", "givenName"=>"Nathaniel", "familyName"=>"Johnston")
72
+ expect(subject.creator).to eq("type"=>"Person", "name"=>"Nathaniel Johnston", "givenName"=>"Nathaniel", "familyName"=>"Johnston")
73
73
  expect(subject.title).to eq("The Minimum Size of Qubit Unextendible Product Bases")
74
74
  expect(subject.description["text"]).to start_with("We investigate the problem of constructing unextendible product bases in the qubit case")
75
75
  expect(subject.date_published).to eq("2013")
@@ -86,8 +86,8 @@ describe Bolognese::Metadata, vcr: true do
86
86
  expect(subject.type).to eq("Dataset")
87
87
  expect(subject.additional_type).to eq("Dataset")
88
88
  expect(subject.resource_type_general).to eq("Audiovisual")
89
- expect(subject.author.length).to eq(14)
90
- expect(subject.author.first).to eq("type"=>"Person", "name"=>"Haywood, Raphaelle Dawn", "givenName"=>"Raphaelle Dawn", "familyName"=>"Haywood")
89
+ expect(subject.creator.length).to eq(14)
90
+ expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Haywood, Raphaelle Dawn", "givenName"=>"Raphaelle Dawn", "familyName"=>"Haywood")
91
91
  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
92
  expect(subject.date_published).to eq("2016")
93
93
  expect(subject.publisher).to eq("University of St Andrews")
@@ -104,12 +104,13 @@ describe Bolognese::Metadata, vcr: true do
104
104
  expect(subject.resource_type_general).to eq("Software")
105
105
  expect(subject.ris_type).to eq("COMP")
106
106
  expect(subject.citeproc_type).to eq("article")
107
- expect(subject.author).to eq("type"=>"Person", "name"=>"Kristian Garza", "givenName"=>"Kristian", "familyName"=>"Garza")
107
+ expect(subject.creator).to eq("type"=>"Person", "name"=>"Kristian Garza", "givenName"=>"Kristian", "familyName"=>"Garza")
108
108
  expect(subject.title).to eq("Analysis Tools For Crossover Experiment Of Ui Using Choice Architecture")
109
109
  expect(subject.description["text"]).to start_with("This tools are used to analyse the data produced by the Crosssover Experiment")
110
- expect(subject.license).to eq([{"id"=>"https://creativecommons.org/licenses/by-nc-sa/4.0", "name"=>"Creative Commons Attribution-NonCommercial-ShareAlike"}, {"name"=>"Open Access"}])
110
+ 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
111
  expect(subject.date_published).to eq("2016-03-27")
112
- expect(subject.is_supplement_to).to eq("type"=>"CreativeWork", "id"=>"https://github.com/kjgarza/frame_experiment_analysis/tree/v1.0")
112
+ expect(subject.related_identifiers.length).to eq(1)
113
+ 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")
113
114
  expect(subject.publisher).to eq("Zenodo")
114
115
  expect(subject.service_provider).to eq("DataCite")
115
116
  expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
@@ -123,13 +124,14 @@ describe Bolognese::Metadata, vcr: true do
123
124
  expect(subject.type).to eq("Dataset")
124
125
  expect(subject.additional_type).to eq("Dataset")
125
126
  expect(subject.resource_type_general).to eq("Dataset")
126
- expect(subject.author.count).to eq(11)
127
- expect(subject.author.first).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0002-2410-9671", "name"=>"Alexander Junge", "givenName"=>"Alexander", "familyName"=>"Junge")
127
+ expect(subject.creator.count).to eq(11)
128
+ expect(subject.creator.first).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0002-2410-9671", "name"=>"Alexander Junge", "givenName"=>"Alexander", "familyName"=>"Junge")
128
129
  expect(subject.title).to eq("RAIN v1")
129
130
  expect(subject.description["text"]).to start_with("<b>RAIN: RNA–protein Association and Interaction Networks")
130
- expect(subject.license).to eq("id"=>"https://creativecommons.org/licenses/by/4.0", "name"=>"CC-BY")
131
+ expect(subject.rights).to eq("id"=>"https://creativecommons.org/licenses/by/4.0", "name"=>"CC-BY")
131
132
  expect(subject.date_published).to eq("2016")
132
- expect(subject.is_identical_to).to eq("type"=>"CreativeWork", "id"=>"https://doi.org/10.6084/m9.figshare.4234751")
133
+ expect(subject.related_identifiers.length).to eq(1)
134
+ expect(subject.related_identifiers.last).to eq("id"=>"10.6084/m9.figshare.4234751", "related_identifier_type"=>"DOI", "relation_type"=>"IsIdenticalTo")
133
135
  expect(subject.publisher).to eq("Figshare")
134
136
  expect(subject.service_provider).to eq("DataCite")
135
137
  expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3")
@@ -142,13 +144,18 @@ describe Bolognese::Metadata, vcr: true do
142
144
  expect(subject.identifier).to eq("https://doi.org/10.5281/zenodo.1239")
143
145
  expect(subject.type).to eq("Dataset")
144
146
  expect(subject.resource_type_general).to eq("Dataset")
145
- expect(subject.author.length).to eq(4)
146
- expect(subject.author.first).to eq("type"=>"Person", "name"=>"Jahn, Najko", "givenName"=>"Najko", "familyName"=>"Jahn")
147
+ expect(subject.creator.length).to eq(4)
148
+ expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Jahn, Najko", "givenName"=>"Najko", "familyName"=>"Jahn")
147
149
  expect(subject.title).to eq("Publication Fp7 Funding Acknowledgment - Plos Openaire")
148
150
  expect(subject.description["text"]).to start_with("The dataset contains a sample of metadata describing papers")
149
151
  expect(subject.date_published).to eq("2013-04-03")
150
152
  expect(subject.publisher).to eq("Zenodo")
151
- expect(subject.funding).to eq("type"=>"Award", "identifier"=>"246686", "funder"=>{"type"=>"Organization", "id"=>"https://doi.org/10.13039/501100000780", "name"=>"European Commission"}, "name" => "Open Access Infrastructure for Research in Europe", "url" => "info:eu-repo/grantAgreement/EC/FP7/246686/")
153
+ expect(subject.funding_references).to eq([{"award_number"=>"246686",
154
+ "award_title"=>"Open Access Infrastructure for Research in Europe",
155
+ "award_uri"=>"info:eu-repo/grantAgreement/EC/FP7/246686/",
156
+ "funder_identifier"=>"https://doi.org/10.13039/501100000780",
157
+ "funder_identifier_type"=>"Crossref Funder ID",
158
+ "funder_name"=>"European Commission"}])
152
159
  expect(subject.service_provider).to eq("DataCite")
153
160
  expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
154
161
  end
@@ -159,21 +166,57 @@ describe Bolognese::Metadata, vcr: true do
159
166
  expect(subject.type).to eq("CreativeWork")
160
167
  expect(subject.resource_type_general).to be_nil
161
168
  expect(subject.valid?).to be false
162
- puts subject.errors
163
169
  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 ).")
164
170
  end
165
171
 
166
172
  it "schema 4.0" do
167
173
  input = fixture_path + 'schema_4.0.xml'
168
174
  subject = Bolognese::Metadata.new(input: input)
169
- puts subject.errors
170
175
  expect(subject.valid?).to be true
171
176
  expect(subject.identifier).to eq("https://doi.org/10.6071/z7wc73")
172
177
  expect(subject.type).to eq("Dataset")
173
178
  expect(subject.additional_type).to eq("dataset")
174
179
  expect(subject.resource_type_general).to eq("Dataset")
175
- expect(subject.author.length).to eq(6)
176
- expect(subject.author.first).to eq("familyName"=>"Bales", "givenName"=>"Roger", "name"=>"Roger Bales", "type"=>"Person")
180
+ expect(subject.creator.length).to eq(6)
181
+ expect(subject.creator.first).to eq("familyName"=>"Bales", "givenName"=>"Roger", "name"=>"Roger Bales", "type"=>"Person")
182
+ end
183
+
184
+ it "geo_location" do
185
+ input = fixture_path + 'datacite-example-geolocation.xml'
186
+ doi = "10.5072/geoPointExample"
187
+ subject = Bolognese::Metadata.new(input: input, doi: doi)
188
+ expect(subject.valid?).to be true
189
+ expect(subject.identifier).to eq("https://doi.org/10.5072/geopointexample")
190
+ expect(subject.doi).to eq("10.5072/geopointexample")
191
+ expect(subject.creator.length).to eq(3)
192
+ expect(subject.creator.first).to eq("familyName"=>"Schumann", "givenName"=>"Kai", "name"=>"Kai Schumann", "type"=>"Person")
193
+ expect(subject.title).to eq("Gridded results of swath bathymetric mapping of Disko Bay, Western Greenland, 2007-2008")
194
+ expect(subject.publisher).to eq("PANGAEA - Data Publisher for Earth & Environmental Science")
195
+ expect(subject.publication_year).to eq(2011)
196
+ expect(subject.related_identifiers).to eq([{"id"=>"10.5072/timeseries", "related_identifier_type"=>"DOI", "relation_type"=>"Continues"}])
197
+ expect(subject.geo_location).to eq([{"geo_location_place"=>"Disko Bay", "geo_location_point"=>{"point_latitude"=>"69.000000", "point_longitude"=>"-52.000000"}}])
198
+ end
199
+
200
+ it "geo_location_box" do
201
+ input = fixture_path + 'datacite-example-geolocation-2.xml'
202
+ doi = "10.6071/Z7WC73"
203
+ subject = Bolognese::Metadata.new(input: input, doi: doi)
204
+ expect(subject.valid?).to be true
205
+ expect(subject.identifier).to eq("https://doi.org/10.6071/z7wc73")
206
+ expect(subject.doi).to eq("10.6071/z7wc73")
207
+ expect(subject.creator.length).to eq(6)
208
+ expect(subject.creator.first).to eq("familyName"=>"Bales", "givenName"=>"Roger", "name"=>"Roger Bales", "type"=>"Person")
209
+ 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
+ expect(subject.publisher).to eq("UC Merced")
211
+ expect(subject.publication_year).to eq(2013)
212
+ expect(subject.geo_location).to eq([{"geo_location_box"=>
213
+ {"east_bound_longitude"=>"-119.182",
214
+ "north_bound_latitude"=>"37.075",
215
+ "south_bound_latitude"=>"37.046",
216
+ "west_bound_longitude"=>"-119.211"},
217
+ "geo_location_place"=>"Providence Creek (Lower, Upper and P301)",
218
+ "geo_location_point"=>
219
+ {"point_latitude"=>"37.047756", "point_longitude"=>"-119.221094"}}])
177
220
  end
178
221
 
179
222
  it "author only full name" do
@@ -182,8 +225,8 @@ describe Bolognese::Metadata, vcr: true do
182
225
  expect(subject.valid?).to be true
183
226
  expect(subject.identifier).to eq("https://doi.org/10.14457/kmitl.res.2006.17")
184
227
  expect(subject.type).to eq("Dataset")
185
- expect(subject.author.length).to eq(1)
186
- expect(subject.author.first).to eq(["name", "กัญจนา แซ่เตียว"])
228
+ expect(subject.creator.length).to eq(1)
229
+ expect(subject.creator.first).to eq(["name", "กัญจนา แซ่เตียว"])
187
230
  end
188
231
 
189
232
  it "multiple author names in one creatorName" do
@@ -192,7 +235,7 @@ describe Bolognese::Metadata, vcr: true do
192
235
  expect(subject.valid?).to be true
193
236
  expect(subject.identifier).to eq("https://doi.org/10.7910/dvn/eqtqyo")
194
237
  expect(subject.type).to eq("Dataset")
195
- expect(subject.author).to eq("name" => "Enos, Ryan (Harvard University); Fowler, Anthony (University Of Chicago); Vavreck, Lynn (UCLA)")
238
+ expect(subject.creator).to eq("name" => "Enos, Ryan (Harvard University); Fowler, Anthony (University Of Chicago); Vavreck, Lynn (UCLA)")
196
239
  end
197
240
 
198
241
  it "author with scheme" do
@@ -201,8 +244,8 @@ describe Bolognese::Metadata, vcr: true do
201
244
  expect(subject.valid?).to be true
202
245
  expect(subject.identifier).to eq("https://doi.org/10.18429/jacow-ipac2016-tupmy003")
203
246
  expect(subject.type).to eq("ScholarlyArticle")
204
- expect(subject.author.length).to eq(12)
205
- expect(subject.author.first).to eq("type"=>"Person", "id"=>"http://jacow.org/JACoW-00077389", "name"=>"Masashi Otani", "givenName"=>"Masashi", "familyName"=>"Otani")
247
+ expect(subject.creator.length).to eq(12)
248
+ expect(subject.creator.first).to eq("type"=>"Person", "id"=>"http://jacow.org/JACoW-00077389", "name"=>"Masashi Otani", "givenName"=>"Masashi", "familyName"=>"Otani")
206
249
  end
207
250
 
208
251
  it "author with wrong orcid scheme" do
@@ -211,8 +254,8 @@ describe Bolognese::Metadata, vcr: true do
211
254
  expect(subject.valid?).to be true
212
255
  expect(subject.identifier).to eq("https://doi.org/10.2314/coscv1")
213
256
  expect(subject.type).to eq("ScholarlyArticle")
214
- expect(subject.author.length).to eq(14)
215
- expect(subject.author.first).to include("type"=>"Person", "name"=>"Lambert Heller", "givenName"=>"Lambert", "familyName"=>"Heller")
257
+ expect(subject.creator.length).to eq(14)
258
+ expect(subject.creator.first).to include("type"=>"Person", "name"=>"Lambert Heller", "givenName"=>"Lambert", "familyName"=>"Heller")
216
259
  end
217
260
 
218
261
  it "keywords with attributes" do
@@ -231,14 +274,19 @@ describe Bolognese::Metadata, vcr: true do
231
274
  expect(subject.type).to eq("Dataset")
232
275
  expect(subject.additional_type).to eq("Dataset")
233
276
  expect(subject.resource_type_general).to eq("Dataset")
234
- expect(subject.author.length).to eq(2)
235
- expect(subject.author.first).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0001-8740-8284", "name"=>"Bimbo, Nuno", "givenName"=>"Nuno", "familyName"=>"Bimbo")
277
+ expect(subject.creator.length).to eq(2)
278
+ expect(subject.creator.first).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0001-8740-8284", "name"=>"Bimbo, Nuno", "givenName"=>"Nuno", "familyName"=>"Bimbo")
236
279
  expect(subject.title).to eq("Dataset for \"Direct Evidence for Solid-Like Hydrogen in a Nanoporous Carbon Hydrogen Storage Material at Supercritical Temperatures\"")
237
280
  expect(subject.description.first["text"]).to start_with("Dataset for Direct Evidence for Solid-Like Hydrogen")
238
281
  expect(subject.date_published).to eq("2015")
239
282
  expect(subject.publisher).to eq("University of Bath")
240
- expect(subject.funding.length).to eq(5)
241
- expect(subject.funding.first).to eq("type"=>"Award", "name"=>"SUPERGEN Hub Funding", "identifier"=>"EP/J016454/1", "funder" => {"type"=>"Organization", "id"=>"https://doi.org/10.13039/501100000266", "name"=>"Engineering and Physical Sciences Research Council (EPSRC)"})
283
+ expect(subject.funding_references.length).to eq(5)
284
+ expect(subject.funding_references.first).to eq("award_number" => "EP/J016454/1",
285
+ "award_title" => "SUPERGEN Hub Funding",
286
+ "award_uri" => "EP/J016454/1",
287
+ "funder_identifier" => "https://doi.org/10.13039/501100000266",
288
+ "funder_identifier_type" => "Crossref Funder ID",
289
+ "funder_name" => "Engineering and Physical Sciences Research Council (EPSRC)")
242
290
  expect(subject.service_provider).to eq("DataCite")
243
291
  expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
244
292
  end
@@ -253,17 +301,18 @@ describe Bolognese::Metadata, vcr: true do
253
301
  expect(subject.resource_type_general).to eq("Collection")
254
302
  expect(subject.ris_type).to eq("GEN")
255
303
  expect(subject.citeproc_type).to eq("article")
256
- expect(subject.author.length).to eq(24)
257
- expect(subject.author.first).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0001-5331-6592", "name"=>"Farquhar, Adam", "givenName"=>"Adam", "familyName"=>"Farquhar")
304
+ expect(subject.creator.length).to eq(24)
305
+ expect(subject.creator.first).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0001-5331-6592", "name"=>"Farquhar, Adam", "givenName"=>"Adam", "familyName"=>"Farquhar")
258
306
  expect(subject.title).to eq("Technical and Human Infrastructure for Open Research (THOR)")
259
307
  expect(subject.description["text"]).to start_with("Five years ago, a global infrastructure")
260
308
  expect(subject.date_published).to eq("2015")
261
309
  expect(subject.publisher).to eq("DataCite")
262
- expect(subject.funding).to eq("type"=>"Award",
263
- "funder" => {"type"=>"Organization", "id"=>"https://doi.org/10.13039/501100000780", "name"=>"European Commission"},
264
- "identifier" => "654039",
265
- "name" => "THOR – Technical and Human Infrastructure for Open Research",
266
- "url" => "http://cordis.europa.eu/project/rcn/194927_en.html")
310
+ expect(subject.funding_references).to eq([{"award_number"=>"654039",
311
+ "award_title"=>"THOR Technical and Human Infrastructure for Open Research",
312
+ "award_uri"=>"http://cordis.europa.eu/project/rcn/194927_en.html",
313
+ "funder_identifier"=>"https://doi.org/10.13039/501100000780",
314
+ "funder_identifier_type"=>"Crossref Funder ID",
315
+ "funder_name"=>"European Commission"}])
267
316
  expect(subject.service_provider).to eq("DataCite")
268
317
  expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
269
318
  end
@@ -278,13 +327,13 @@ describe Bolognese::Metadata, vcr: true do
278
327
  expect(subject.resource_type_general).to eq("Text")
279
328
  expect(subject.ris_type).to eq("RPRT")
280
329
  expect(subject.citeproc_type).to eq("article-journal")
281
- expect(subject.author).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0003-1419-2405", "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner")
330
+ expect(subject.creator).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0003-1419-2405", "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner")
282
331
  expect(subject.title).to eq("Eating your own Dog Food")
283
- expect(subject.alternate_identifier).to eq("type"=>"Local accession number", "name"=>"MS-49-3632-5083")
332
+ expect(subject.alternate_identifiers).to eq("type"=>"Local accession number", "name"=>"MS-49-3632-5083")
284
333
  expect(subject.date_published).to eq("2016-12-20")
285
334
  expect(subject.publication_year).to eq(2016)
286
- expect(subject.is_part_of).to eq("type"=>"CreativeWork", "id"=>"https://doi.org/10.5438/0000-00ss")
287
- expect(subject.references).to eq([{"type"=>"CreativeWork", "id"=>"https://doi.org/10.5438/0012"}, {"type"=>"CreativeWork", "id"=>"https://doi.org/10.5438/55e5-t5c0"}])
335
+ expect(subject.related_identifiers.length).to eq(3)
336
+ expect(subject.related_identifiers.last).to eq("id"=>"10.5438/0000-00ss", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf")
288
337
  expect(subject.service_provider).to eq("DataCite")
289
338
  end
290
339
 
@@ -298,13 +347,14 @@ describe Bolognese::Metadata, vcr: true do
298
347
  expect(subject.resource_type_general).to eq("Text")
299
348
  expect(subject.ris_type).to eq("BOOK")
300
349
  expect(subject.citeproc_type).to eq("book")
301
- expect(subject.author).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
350
+ expect(subject.creator).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
302
351
  expect(subject.title).to eq(["Właściwości rzutowań podprzestrzeniowych", {"title_type"=>"TranslatedTitle", "text"=>"Translation of Polish titles"}])
303
- expect(subject.alternate_identifier).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
352
+ expect(subject.alternate_identifiers).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
304
353
  expect(subject.date_published).to eq("2010")
305
354
  expect(subject.publication_year).to eq(2010)
306
- expect(subject.is_part_of).to eq("type"=>"CreativeWork", "id"=>"https://doi.org/10.5272/oldertestpub")
307
- expect(subject.license).to eq("id"=>"http://creativecommons.org/licenses/by-nd/2.0", "name"=>"Creative Commons Attribution-NoDerivs 2.0 Generic")
355
+ expect(subject.related_identifiers.length).to eq(1)
356
+ expect(subject.related_identifiers.last).to eq("id"=>"10.5272/oldertestpub", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf", "resource_type_general"=>"Text")
357
+ expect(subject.rights).to eq("id"=>"http://creativecommons.org/licenses/by-nd/2.0", "name"=>"Creative Commons Attribution-NoDerivs 2.0 Generic")
308
358
  expect(subject.publisher).to eq("Springer")
309
359
  expect(subject.service_provider).to eq("DataCite")
310
360
  expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4")
@@ -320,13 +370,14 @@ describe Bolognese::Metadata, vcr: true do
320
370
  expect(subject.resource_type_general).to eq("Text")
321
371
  expect(subject.ris_type).to eq("BOOK")
322
372
  expect(subject.citeproc_type).to eq("book")
323
- expect(subject.author).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
373
+ expect(subject.creator).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
324
374
  expect(subject.title).to eq(["Właściwości rzutowań podprzestrzeniowych", {"title_type"=>"TranslatedTitle", "text"=>"Translation of Polish titles"}])
325
- expect(subject.alternate_identifier).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
375
+ expect(subject.alternate_identifiers).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
326
376
  expect(subject.date_published).to eq("2010")
327
377
  expect(subject.publication_year).to eq(2010)
328
- expect(subject.is_part_of).to eq("type"=>"CreativeWork", "id"=>"https://doi.org/10.5272/oldertestpub")
329
- expect(subject.license).to eq("id"=>"http://creativecommons.org/licenses/by-nd/2.0", "name"=>"Creative Commons Attribution-NoDerivs 2.0 Generic")
378
+ expect(subject.related_identifiers.length).to eq(1)
379
+ expect(subject.related_identifiers.last).to eq("id"=>"10.5272/oldertestpub", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf")
380
+ expect(subject.rights).to eq("id"=>"http://creativecommons.org/licenses/by-nd/2.0", "name"=>"Creative Commons Attribution-NoDerivs 2.0 Generic")
330
381
  expect(subject.publisher).to eq("Springer")
331
382
  expect(subject.service_provider).to eq("DataCite")
332
383
  expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-4.0")
@@ -342,13 +393,14 @@ describe Bolognese::Metadata, vcr: true do
342
393
  expect(subject.resource_type_general).to eq("Text")
343
394
  expect(subject.ris_type).to eq("BOOK")
344
395
  expect(subject.citeproc_type).to eq("book")
345
- expect(subject.author).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
396
+ expect(subject.creator).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
346
397
  expect(subject.title).to eq(["Właściwości rzutowań podprzestrzeniowych", {"title_type"=>"TranslatedTitle", "text"=>"Translation of Polish titles"}])
347
- expect(subject.alternate_identifier).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
398
+ expect(subject.alternate_identifiers).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
348
399
  expect(subject.date_published).to eq("2010")
349
400
  expect(subject.publication_year).to eq(2010)
350
- expect(subject.is_part_of).to eq("type"=>"CreativeWork", "id"=>"https://doi.org/10.5272/oldertestpub")
351
- expect(subject.license).to eq("id"=>"http://creativecommons.org/licenses/by-nd/2.0", "name"=>"Creative Commons Attribution-NoDerivs 2.0 Generic")
401
+ expect(subject.related_identifiers.length).to eq(1)
402
+ expect(subject.related_identifiers.last).to eq("id"=>"10.5272/oldertestpub", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf")
403
+ expect(subject.rights).to eq("id"=>"http://creativecommons.org/licenses/by-nd/2.0", "name"=>"Creative Commons Attribution-NoDerivs 2.0 Generic")
352
404
  expect(subject.publisher).to eq("Springer")
353
405
  expect(subject.service_provider).to eq("DataCite")
354
406
  expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-3.0")
@@ -364,12 +416,13 @@ describe Bolognese::Metadata, vcr: true do
364
416
  expect(subject.resource_type_general).to eq("Text")
365
417
  expect(subject.ris_type).to eq("BOOK")
366
418
  expect(subject.citeproc_type).to eq("book")
367
- expect(subject.author).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
419
+ expect(subject.creator).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
368
420
  expect(subject.title).to eq(["Właściwości rzutowań podprzestrzeniowych", {"title_type"=>"TranslatedTitle", "text"=>"Translation of Polish titles"}])
369
- expect(subject.alternate_identifier).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
421
+ expect(subject.alternate_identifiers).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
370
422
  expect(subject.date_published).to eq("2010")
371
423
  expect(subject.publication_year).to eq(2010)
372
- expect(subject.is_part_of).to eq("type"=>"CreativeWork", "id"=>"https://doi.org/10.5272/oldertestpub")
424
+ expect(subject.related_identifiers.length).to eq(1)
425
+ expect(subject.related_identifiers.last).to eq("id"=>"10.5272/oldertestpub", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf")
373
426
  expect(subject.publisher).to eq("Springer")
374
427
  expect(subject.service_provider).to eq("DataCite")
375
428
  expect(subject.schema_version).to eq("http://datacite.org/schema/kernel-2.2")
@@ -383,16 +436,17 @@ describe Bolognese::Metadata, vcr: true do
383
436
  expect(subject.type).to eq("Book")
384
437
  expect(subject.additional_type).to eq("Monograph")
385
438
  expect(subject.resource_type_general).to eq("Text")
386
- expect(subject.author).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
439
+ expect(subject.creator).to eq([{"type"=>"Person", "name"=>"John Smith", "givenName"=>"John", "familyName"=>"Smith"}, {"name"=>"つまらないものですが"}])
387
440
  expect(subject.title).to eq(["Właściwości rzutowań podprzestrzeniowych", {"title_type"=>"TranslatedTitle", "text"=>"Translation of Polish titles"}])
388
- expect(subject.alternate_identifier).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
441
+ expect(subject.alternate_identifiers).to eq("type"=>"ISBN", "name"=>"937-0-4523-12357-6")
389
442
  expect(subject.date_published).to eq("2010")
390
- expect(subject.content_size).to eq("256 pages")
391
- expect(subject.content_format).to eq("pdf")
443
+ expect(subject.size).to eq("256 pages")
444
+ expect(subject.b_format).to eq("pdf")
392
445
  expect(subject.content_url).to eq("https://example.org/report.pdf")
393
446
  expect(subject.publication_year).to eq(2010)
394
- expect(subject.is_part_of).to eq("type"=>"CreativeWork", "id"=>"https://doi.org/10.5272/oldertestpub")
395
- expect(subject.license).to eq("id"=>"http://creativecommons.org/licenses/by-nd/2.0", "name"=>"Creative Commons Attribution-NoDerivs 2.0 Generic")
447
+ expect(subject.related_identifiers.length).to eq(1)
448
+ expect(subject.related_identifiers.last).to eq("id"=>"10.5272/oldertestpub", "related_identifier_type"=>"DOI", "relation_type"=>"IsPartOf", "resource_type_general"=>"Text")
449
+ expect(subject.rights).to eq("id"=>"http://creativecommons.org/licenses/by-nd/2.0", "name"=>"Creative Commons Attribution-NoDerivs 2.0 Generic")
396
450
  expect(subject.publisher).to eq("Springer")
397
451
  expect(subject.service_provider).to eq("DataCite")
398
452
  end
@@ -405,8 +459,8 @@ describe Bolognese::Metadata, vcr: true do
405
459
  expect(subject.type).to eq("SoftwareSourceCode")
406
460
  expect(subject.additional_type).to eq("Simulation Tool")
407
461
  expect(subject.resource_type_general).to eq("Software")
408
- expect(subject.author.length).to eq(5)
409
- expect(subject.author.first).to eq("type"=>"Person", "name"=>"Carlos PatiñO", "givenName"=>"Carlos", "familyName"=>"PatiñO")
462
+ expect(subject.creator.length).to eq(5)
463
+ expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Carlos PatiñO", "givenName"=>"Carlos", "familyName"=>"PatiñO")
410
464
  expect(subject.title).to eq("LAMMPS Data-File Generator")
411
465
  expect(subject.date_published).to eq("2018")
412
466
  expect(subject.publication_year).to eq(2018)
@@ -422,7 +476,7 @@ describe Bolognese::Metadata, vcr: true do
422
476
  expect(subject.identifier).to eq("https://doi.org/10.5067/terra+aqua/ceres/cldtyphist_l3.004")
423
477
  expect(subject.type).to eq("Dataset")
424
478
  expect(subject.resource_type_general).to eq("Dataset")
425
- expect(subject.author).to eq("type"=>"Person", "name"=>"Takmeng Wong", "givenName"=>"Takmeng", "familyName"=>"Wong")
479
+ expect(subject.creator).to eq("type"=>"Person", "name"=>"Takmeng Wong", "givenName"=>"Takmeng", "familyName"=>"Wong")
426
480
  expect(subject.title).to eq("CERES Level 3 Cloud Type Historgram Terra+Aqua HDF file - Edition4")
427
481
  expect(subject.date_published).to eq("2016")
428
482
  expect(subject.publisher).to eq("NASA Langley Atmospheric Science Data Center DAAC")
@@ -437,7 +491,7 @@ describe Bolognese::Metadata, vcr: true do
437
491
  expect(subject.identifier).to eq("https://doi.org/10.4232/1.2745")
438
492
  expect(subject.type).to eq("Dataset")
439
493
  expect(subject.resource_type_general).to eq("Dataset")
440
- expect(subject.author).to eq("type"=>"Organization", "name"=>"Europäische Kommission")
494
+ expect(subject.creator).to eq("type"=>"Organization", "name"=>"Europäische Kommission")
441
495
  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"}])
442
496
  expect(subject.keywords).to eq([{"subject_scheme"=>"ZA", "text"=>"KAT12 International Institutions, Relations, Conditions"}])
443
497
  expect(subject.date_published).to eq("1996")
@@ -454,11 +508,11 @@ describe Bolognese::Metadata, vcr: true do
454
508
  expect(subject.type).to eq("ScholarlyArticle")
455
509
  expect(subject.additional_type).to eq("Article")
456
510
  expect(subject.resource_type_general).to eq("Text")
457
- expect(subject.author.length).to eq(3)
458
- expect(subject.author.first).to eq("type"=>"Person", "name"=>"P. Llamas", "givenName"=>"P.", "familyName"=>"Llamas")
511
+ expect(subject.creator.length).to eq(3)
512
+ expect(subject.creator.first).to eq("type"=>"Person", "name"=>"P. Llamas", "givenName"=>"P.", "familyName"=>"Llamas")
459
513
  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")
460
514
  expect(subject.date_published).to eq("2008")
461
- expect(subject.container_title).to eq("23rd European Photovoltaic Solar Energy Conference and Exhibition, 1-5 September 2008, Valencia, Spain; 3353-3356")
515
+ expect(subject.periodical).to eq("title"=>"23rd European Photovoltaic Solar Energy Conference and Exhibition, 1-5 September 2008, Valencia, Spain; 3353-3356", "type"=>"Periodical")
462
516
  expect(subject.description["text"]).to start_with("Aim of this paper is the presentation")
463
517
  expect(subject.publisher).to eq("WIP-Munich")
464
518
  expect(subject.service_provider).to eq("DataCite")
@@ -471,7 +525,7 @@ describe Bolognese::Metadata, vcr: true do
471
525
  expect(subject.valid?).to be true
472
526
  expect(subject.doi).to eq("10.23725/8na3-9s47")
473
527
  expect(subject.identifier).to eq("https://doi.org/10.23725/8na3-9s47")
474
- expect(subject.alternate_identifier).to include({"name"=>"3b33f6b9338fccab0901b7d317577ea3", "type"=>"md5"}, {"name"=>"ark:/99999/fk41CrU4eszeLUDe", "type"=>"minid"}, {"name"=>"dg.4503/c3d66dc9-58da-411c-83c4-dd656aa3c4b7", "type"=>"dataguid"})
528
+ expect(subject.alternate_identifiers).to include({"name"=>"3b33f6b9338fccab0901b7d317577ea3", "type"=>"md5"}, {"name"=>"ark:/99999/fk41CrU4eszeLUDe", "type"=>"minid"}, {"name"=>"dg.4503/c3d66dc9-58da-411c-83c4-dd656aa3c4b7", "type"=>"dataguid"})
475
529
  expect(subject.content_url).to include("s3://cgp-commons-public/topmed_open_access/197bc047-e917-55ed-852d-d563cdbc50e4/NWD165827.recab.cram", "gs://topmed-irc-share/public/NWD165827.recab.cram")
476
530
  end
477
531
 
@@ -483,7 +537,7 @@ describe Bolognese::Metadata, vcr: true do
483
537
  expect(subject.type).to eq("Dataset")
484
538
  expect(subject.additional_type).to eq("Disclosure")
485
539
  expect(subject.resource_type_general).to eq("Dataset")
486
- expect(subject.author).to eq("name"=>"Anonymous")
540
+ expect(subject.creator).to eq("name"=>"Anonymous")
487
541
  expect(subject.title).to eq( "Messung der Bildunschaerfe in H.264-codierten Bildern und Videosequenzen")
488
542
  expect(subject.date_published).to eq("2017")
489
543
  expect(subject.publisher).to eq("Siemens AG")
@@ -499,7 +553,7 @@ describe Bolognese::Metadata, vcr: true do
499
553
  expect(subject.type).to eq("Dataset")
500
554
  expect(subject.additional_type).to eq("Satellite data")
501
555
  expect(subject.resource_type_general).to eq("Dataset")
502
- expect(subject.author).to eq([{"type"=>"Person",
556
+ expect(subject.creator).to eq([{"type"=>"Person",
503
557
  "id"=>"https://orcid.org/0000-0002-0077-5338",
504
558
  "name"=>"Ronald Van Der A",
505
559
  "givenName"=>"Ronald",
@@ -538,7 +592,7 @@ describe Bolognese::Metadata, vcr: true do
538
592
  expect(subject.identifier).to eq("https://handle.test.datacite.org/10.22002/d1.694")
539
593
  expect(subject.type).to eq("Dataset")
540
594
  expect(subject.resource_type_general).to eq("Dataset")
541
- expect(subject.author).to eq("name"=>"Tester")
595
+ expect(subject.creator).to eq("name"=>"Tester")
542
596
  expect(subject.title).to eq("Test license")
543
597
  expect(subject.date_published).to eq("2018-01-12")
544
598
  expect(subject.publication_year).to eq(2018)
@@ -557,8 +611,8 @@ describe Bolognese::Metadata, vcr: true do
557
611
  expect(subject.resource_type_general).to eq("Text")
558
612
  expect(subject.ris_type).to eq("RPRT")
559
613
  expect(subject.citeproc_type).to eq("article-journal")
560
- expect(subject.author.length).to eq(5)
561
- expect(subject.author.first).to eq("type"=>"Person", "name"=>"Lina Patel", "givenName"=>"Lina", "familyName"=>"Patel")
614
+ expect(subject.creator.length).to eq(5)
615
+ expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Lina Patel", "givenName"=>"Lina", "familyName"=>"Patel")
562
616
  expect(subject.title).to eq("Referee report. For: Gates - add article keywords to the metatags [version 2; referees: 1 approved]")
563
617
  expect(subject.date_published).to eq("2018")
564
618
  expect(subject.publisher).to eq("Gates Open Research")
@@ -569,7 +623,7 @@ describe Bolognese::Metadata, vcr: true do
569
623
  it "missing creator" do
570
624
  input = fixture_path + "datacite_missing_creator.xml"
571
625
  subject = Bolognese::Metadata.new(input: input, regenerate: true)
572
- expect(subject.author).to be_nil
626
+ expect(subject.creator).to be_nil
573
627
  expect(subject.valid?).to be false
574
628
  expect(subject.errors).to eq("4:0: ERROR: Element '{http://datacite.org/schema/kernel-4}creators': Missing child element(s). Expected is ( {http://datacite.org/schema/kernel-4}creator ).")
575
629
  end
@@ -577,7 +631,7 @@ describe Bolognese::Metadata, vcr: true do
577
631
  it "malformed creator" do
578
632
  input = fixture_path + "datacite_malformed_creator.xml"
579
633
  subject = Bolognese::Metadata.new(input: input, regenerate: false)
580
- expect(subject.author).to be_nil
634
+ expect(subject.creator).to be_nil
581
635
  expect(subject.valid?).to be false
582
636
  expect(subject.errors).to eq("16:0: ERROR: Element '{http://datacite.org/schema/kernel-4}creatorName': This element is not expected. Expected is ( {http://datacite.org/schema/kernel-4}affiliation ).")
583
637
  end
@@ -586,7 +640,7 @@ describe Bolognese::Metadata, vcr: true do
586
640
  input = fixture_path + "funding_reference.xml"
587
641
  subject = Bolognese::Metadata.new(input: input, regenerate: false)
588
642
  expect(subject.valid?).to be false
589
- expect(subject.funding).to eq("name"=>"Agency for Science, Technology and Research (Singapore)", "type"=>"Organization")
643
+ expect(subject.funding_references).to eq([{"funder_name"=>"Agency for Science, Technology and Research (Singapore)"}])
590
644
  expect(subject.errors.first).to eq("31:0: ERROR: Element '{http://datacite.org/schema/kernel-4}fundingReference': Missing child element(s). Expected is one of ( {http://datacite.org/schema/kernel-4}funderName, {http://datacite.org/schema/kernel-4}funderIdentifier, {http://datacite.org/schema/kernel-4}awardNumber, {http://datacite.org/schema/kernel-4}awardTitle ).")
591
645
  end
592
646
 
@@ -600,7 +654,7 @@ describe Bolognese::Metadata, vcr: true do
600
654
  expect(subject.type).to eq("Thesis")
601
655
  expect(subject.bibtex_type).to eq("phdthesis")
602
656
  expect(subject.citeproc_type).to eq("thesis")
603
- expect(subject.author).to eq("type"=>"Person", "name"=>"Heiko Conrad", "givenName"=>"Heiko", "familyName"=>"Conrad")
657
+ expect(subject.creator).to eq("type"=>"Person", "name"=>"Heiko Conrad", "givenName"=>"Heiko", "familyName"=>"Conrad")
604
658
  expect(subject.title).to eq("Dynamics of colloids in molecular glass forming liquids studied via X-ray photon correlation spectroscopy")
605
659
  expect(subject.date_published).to eq("2014")
606
660
  expect(subject.publisher).to eq("Deutsches Elektronen-Synchrotron, DESY, Hamburg")
@@ -653,7 +707,7 @@ describe Bolognese::Metadata, vcr: true do
653
707
  expect(subject.valid?).to be true
654
708
  expect(subject.identifier).to eq("https://doi.org/10.5061/dryad.8515")
655
709
  expect(subject.doi).to eq("10.5061/dryad.8515")
656
- expect(subject.author).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0003-1419-2405", "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner")
710
+ expect(subject.creator).to eq("type"=>"Person", "id"=>"https://orcid.org/0000-0003-1419-2405", "name"=>"Fenner, Martin", "givenName"=>"Martin", "familyName"=>"Fenner")
657
711
  expect(subject.title).to eq("Eating your own Dog Food")
658
712
  expect(subject.publisher).to eq("DataCite")
659
713
  expect(subject.publication_year).to eq(2016)
@@ -672,35 +726,17 @@ describe Bolognese::Metadata, vcr: true do
672
726
  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")
673
727
  expect(subject.type).to eq("Dataset")
674
728
  expect(subject.additional_type).to eq("DroNc-seq data")
675
- expect(subject.author).to eq("name"=>"The GTEx Consortium", "type"=>"Organization")
729
+ expect(subject.creator).to eq("name"=>"The GTEx Consortium", "type"=>"Organization")
676
730
  expect(subject.title).to eq("DroNc-seq data")
677
731
  expect(subject.keywords).to eq(["gtex", "annotation", "phenotype", "gene regulation", "transcriptomics"])
678
732
  expect(subject.date_published).to eq("2017")
679
- expect(subject.is_supplement_to).to eq("id"=>"https://doi.org/10.1038/nmeth.4407", "type"=>"CreativeWork")
680
- expect(subject.content_format).to eq("application/tar")
681
- expect(subject.content_size).to eq("15.7M")
682
- expect(subject.container_title).to eq("GTEx")
733
+ expect(subject.related_identifiers.length).to eq(4)
734
+ 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
+ expect(subject.b_format).to eq("application/tar")
736
+ expect(subject.size).to eq("15.7M")
737
+ expect(subject.periodical).to eq("id"=>"https://www.ebi.ac.uk/miriam/main/datatypes/MIR:00000663", "title"=>"GTEx", "type"=>"DataCatalog")
683
738
  expect(subject.publisher).to eq("GTEx")
684
- expect(subject.funding).to eq([{"id"=>"https://doi.org/10.13039/100000052",
685
- "name"=>"Common Fund of the Office of the Director of the NIH",
686
- "type"=>"Organization"},
687
- {"id"=>"https://doi.org/10.13039/100000054",
688
- "name"=>"National Cancer Institute (NCI)",
689
- "type"=>"Organization"},
690
- {"id"=>"https://doi.org/10.13039/100000051",
691
- "name"=>"National Human Genome Research Institute (NHGRI)",
692
- "type"=>"Organization"},
693
- {"id"=>"https://doi.org/10.13039/100000050",
694
- "name"=>"National Heart, Lung, and Blood Institute (NHLBI)",
695
- "type"=>"Organization"},
696
- {"id"=>"https://doi.org/10.13039/100000026",
697
- "name"=>"National Institute on Drug Abuse (NIDA)",
698
- "type"=>"Organization"},
699
- {"id"=>"https://doi.org/10.13039/100000025",
700
- "name"=>"National Institute of Mental Health (NIMH)",
701
- "type"=>"Organization"},
702
- {"id"=>"https://doi.org/10.13039/100000065",
703
- "name"=>"National Institute of Neurological Disorders and Stroke (NINDS)",
704
- "type"=>"Organization"}])
739
+ expect(subject.funding_references.count).to eq(7)
740
+ expect(subject.funding_references.first).to eq("funder_identifier"=>"https://doi.org/10.13039/100000052", "funder_identifier_type"=>"Crossref Funder ID", "funder_name"=>"Common Fund of the Office of the Director of the NIH")
705
741
  end
706
742
  end