bolognese 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/bolognese/author_utils.rb +1 -1
  4. data/lib/bolognese/datacite_utils.rb +51 -55
  5. data/lib/bolognese/metadata.rb +16 -16
  6. data/lib/bolognese/metadata_utils.rb +5 -5
  7. data/lib/bolognese/readers/bibtex_reader.rb +4 -4
  8. data/lib/bolognese/readers/citeproc_reader.rb +9 -6
  9. data/lib/bolognese/readers/codemeta_reader.rb +7 -4
  10. data/lib/bolognese/readers/crossref_reader.rb +23 -17
  11. data/lib/bolognese/readers/datacite_json_reader.rb +21 -19
  12. data/lib/bolognese/readers/datacite_reader.rb +30 -66
  13. data/lib/bolognese/readers/ris_reader.rb +6 -3
  14. data/lib/bolognese/readers/schema_org_reader.rb +12 -9
  15. data/lib/bolognese/utils.rb +15 -14
  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 +3 -3
  19. data/lib/bolognese/writers/crosscite_writer.rb +6 -6
  20. data/lib/bolognese/writers/datacite_json_writer.rb +9 -9
  21. data/lib/bolognese/writers/jats_writer.rb +4 -4
  22. data/lib/bolognese/writers/ris_writer.rb +4 -4
  23. data/lib/bolognese/writers/schema_org_writer.rb +6 -6
  24. data/spec/author_utils_spec.rb +1 -1
  25. data/spec/datacite_utils_spec.rb +2 -2
  26. data/spec/fixtures/crosscite.json +26 -16
  27. data/spec/fixtures/datacite.json +20 -14
  28. data/spec/fixtures/datacite_software.json +10 -6
  29. data/spec/readers/bibtex_reader_spec.rb +6 -6
  30. data/spec/readers/citeproc_reader_spec.rb +3 -3
  31. data/spec/readers/codemeta_reader_spec.rb +14 -14
  32. data/spec/readers/crosscite_reader_spec.rb +8 -9
  33. data/spec/readers/crossref_reader_spec.rb +31 -28
  34. data/spec/readers/datacite_json_reader_spec.rb +20 -6
  35. data/spec/readers/datacite_reader_spec.rb +94 -93
  36. data/spec/readers/ris_reader_spec.rb +5 -5
  37. data/spec/readers/schema_org_reader_spec.rb +41 -34
  38. data/spec/utils_spec.rb +3 -3
  39. data/spec/writers/bibtex_writer_spec.rb +1 -1
  40. data/spec/writers/citeproc_writer_spec.rb +1 -1
  41. data/spec/writers/codemeta_writer_spec.rb +15 -15
  42. data/spec/writers/crosscite_writer_spec.rb +16 -16
  43. data/spec/writers/datacite_json_writer_spec.rb +17 -17
  44. data/spec/writers/datacite_writer_spec.rb +26 -26
  45. data/spec/writers/ris_writer_spec.rb +2 -1
  46. metadata +2 -2
@@ -9,23 +9,23 @@ module Bolognese
9
9
  "doi" => doi,
10
10
  "url" => url,
11
11
  "creator" => creator,
12
- "title" => title,
12
+ "titles" => titles,
13
13
  "publisher" => publisher,
14
- "resource-type-general" => types["resource_type_general"],
15
- "resource-type" => types["resource_type"],
16
- "subject" => keywords.present? ? keywords.split(", ") : nil,
14
+ "periodical" => periodical,
15
+ "types" => to_datacite_json(types, first: true),
16
+ "subjects" => to_datacite_json(subjects),
17
17
  "contributor" => contributor,
18
18
  "dates" => to_datacite_json(dates),
19
19
  "publication-year" => publication_year,
20
20
  "language" => language,
21
- "alternate-identifiers" => alternate_identifiers,
21
+ "alternate-identifiers" => to_datacite_json(alternate_identifiers),
22
22
  "related-identifiers" => to_datacite_json(related_identifiers),
23
- "size" => size,
23
+ "sizes" => sizes,
24
24
  "formats" => formats,
25
25
  "version" => version,
26
- "rights" => rights,
27
- "description" => description,
28
- "geo-location" => geo_location,
26
+ "rights-list" => to_datacite_json(rights_list),
27
+ "descriptions" => to_datacite_json(descriptions),
28
+ "geo-locations" => to_datacite_json(geo_locations),
29
29
  "funding-references" => to_datacite_json(funding_references),
30
30
  "schema-version" => schema_version,
31
31
  "provider-id" => provider_id,
@@ -69,9 +69,9 @@ module Bolognese
69
69
 
70
70
  def insert_citation_title(xml)
71
71
  case publication_type.fetch('publication-type', nil)
72
- when "data" then xml.send("data-title", parse_attributes(title, content: "text", first: true))
73
- when "journal" then xml.send("article-title", parse_attributes(title, content: "text", first: true))
74
- when "chapter" then xml.send("chapter-title", parse_attributes(title, content: "text", first: true))
72
+ when "data" then xml.send("data-title", parse_attributes(titles, content: "title", first: true))
73
+ when "journal" then xml.send("article-title", parse_attributes(titles, content: "title", first: true))
74
+ when "chapter" then xml.send("chapter-title", parse_attributes(titles, content: "title", first: true))
75
75
  end
76
76
  end
77
77
 
@@ -79,7 +79,7 @@ module Bolognese
79
79
  if is_article? || is_data? || is_chapter?
80
80
  xml.source(periodical && periodical["title"] || publisher)
81
81
  else
82
- xml.source(parse_attributes(title, content: "text", first: true))
82
+ xml.source(parse_attributes(titles, content: "title", first: true))
83
83
  end
84
84
  end
85
85
 
@@ -6,13 +6,13 @@ module Bolognese
6
6
  def ris
7
7
  {
8
8
  "TY" => types["ris"],
9
- "T1" => parse_attributes(title, content: "text", first: true),
9
+ "T1" => parse_attributes(titles, content: "title", first: true),
10
10
  "T2" => periodical && periodical["title"],
11
11
  "AU" => to_ris(creator),
12
12
  "DO" => doi,
13
13
  "UR" => url,
14
- "AB" => parse_attributes(description, content: "text", first: true),
15
- "KW" => Array.wrap(keywords).map { |k| parse_attributes(k, content: "text", first: true) }.presence,
14
+ "AB" => parse_attributes(descriptions, content: "description", first: true),
15
+ "KW" => Array.wrap(subjects).map { |k| parse_attributes(k, content: "subject", first: true) }.presence,
16
16
  "PY" => publication_year,
17
17
  "PB" => publisher,
18
18
  "LA" => language,
@@ -20,7 +20,7 @@ module Bolognese
20
20
  "IS" => issue,
21
21
  "SP" => first_page,
22
22
  "EP" => last_page,
23
- "SN" => Array.wrap(related_identifiers).find { |ri| ri["relation_type"] == "IsPartOf" }.to_h.fetch("id", nil),
23
+ "SN" => Array.wrap(related_identifiers).find { |ri| ri["relation_type"] == "IsPartOf" }.to_h.fetch("related_identifier", nil),
24
24
  "ER" => ""
25
25
  }.compact.map { |k, v| v.is_a?(Array) ? v.map { |vi| "#{k} - #{vi}" }.join("\r\n") : "#{k} - #{v}" }.join("\r\n")
26
26
  end
@@ -10,22 +10,22 @@ module Bolognese
10
10
  "identifier" => to_schema_org_identifier(identifier, alternate_identifiers: alternate_identifiers),
11
11
  "url" => url,
12
12
  "additionalType" => types["resource_type"],
13
- "name" => parse_attributes(title, content: "text", first: true),
13
+ "name" => parse_attributes(titles, content: "title", first: true),
14
14
  "author" => to_schema_org(creator),
15
15
  "editor" => to_schema_org(contributor),
16
- "description" => parse_attributes(description, content: "text", first: true),
17
- "license" => Array.wrap(rights).map { |l| l["id"] }.compact.unwrap,
16
+ "description" => parse_attributes(descriptions, content: "description", first: true),
17
+ "license" => Array.wrap(rights_list).map { |l| l["rights_uri"] }.compact.unwrap,
18
18
  "version" => version,
19
- "keywords" => keywords.present? ? Array.wrap(keywords).map { |k| parse_attributes(k, content: "text", first: true) }.join(", ") : nil,
19
+ "keywords" => subjects.present? ? Array.wrap(subjects).map { |k| parse_attributes(k, content: "subject", first: true) }.join(", ") : nil,
20
20
  "inLanguage" => language,
21
- "contentSize" => Array.wrap(size).unwrap,
21
+ "contentSize" => Array.wrap(sizes).unwrap,
22
22
  "encodingFormat" => Array.wrap(formats).unwrap,
23
23
  "dateCreated" => get_date(dates, "Created"),
24
24
  "datePublished" => get_date(dates, "Issued"),
25
25
  "dateModified" => get_date(dates, "Updated"),
26
26
  "pageStart" => first_page,
27
27
  "pageEnd" => last_page,
28
- "spatialCoverage" => to_schema_org_spatial_coverage(geo_location),
28
+ "spatialCoverage" => to_schema_org_spatial_coverage(geo_locations),
29
29
  "sameAs" => to_schema_org_relation(related_identifiers: related_identifiers, relation_type: "IsIdenticalTo"),
30
30
  "isPartOf" => to_schema_org_relation(related_identifiers: related_identifiers, relation_type: "IsPartOf"),
31
31
  "hasPart" => to_schema_org_relation(related_identifiers: related_identifiers, relation_type: "HasPart"),
@@ -85,7 +85,7 @@ describe Bolognese::Metadata, vcr: true do
85
85
  subject = Bolognese::Metadata.new(input: input, from: "datacite")
86
86
  meta = Maremma.from_xml(subject.raw).fetch("resource", {})
87
87
  response = subject.get_authors(meta.dig("creators", "creator"))
88
- expect(response).to eq("name" => "Enos, Ryan (Harvard University); Fowler, Anthony (University Of Chicago); Vavreck, Lynn (UCLA)")
88
+ expect(response).to eq([{"name" => "Enos, Ryan (Harvard University); Fowler, Anthony (University Of Chicago); Vavreck, Lynn (UCLA)"}])
89
89
  end
90
90
 
91
91
  it "hyper-authorship" do
@@ -19,7 +19,7 @@ describe Bolognese::Metadata, vcr: true do
19
19
  it "insert" do
20
20
  xml = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') { |xml| subject.insert_creators(xml) }.to_xml
21
21
  response = Maremma.from_xml(xml)
22
- expect(response.dig("creators", "creator").first).to eq("creatorName"=>"Ollomo, Benjamin", "givenName"=>"Benjamin", "familyName"=>"Ollomo")
22
+ expect(response.dig("creators", "creator").first).to eq("creatorName"=>{"__content__"=>"Ollomo, Benjamin", "nameType"=>"Personal"}, "familyName"=>"Ollomo", "givenName"=>"Benjamin")
23
23
  end
24
24
  end
25
25
 
@@ -117,7 +117,7 @@ describe Bolognese::Metadata, vcr: true do
117
117
  context "insert_related_identifiers" do
118
118
  it "related_identifier" do
119
119
  expect(subject.related_identifiers.length).to eq(6)
120
- expect(subject.related_identifiers.first).to eq("id"=>"10.5061/dryad.8515/1", "related_identifier_type"=>"DOI", "relation_type"=>"HasPart")
120
+ expect(subject.related_identifiers.first).to eq("related_identifier"=>"10.5061/dryad.8515/1", "related_identifier_type"=>"DOI", "relation_type"=>"HasPart")
121
121
  end
122
122
 
123
123
  it "insert" do
@@ -9,37 +9,47 @@
9
9
  "bibtex": "misc",
10
10
  "ris": "COMP"
11
11
  },
12
- "creator": {
12
+ "creator": [{
13
13
  "type": "Person",
14
14
  "name": "Kristian Garza",
15
15
  "givenName": "Kristian",
16
16
  "familyName": "Garza"
17
- },
18
- "title": [{
19
- "text": "Analysis Tools for Crossover Experiment of UI using Choice Architecture"
17
+ }],
18
+ "titles": [{
19
+ "title": "Analysis Tools for Crossover Experiment of UI using Choice Architecture"
20
20
  }],
21
21
  "publisher": "Zenodo",
22
- "keywords": ["choice architecture", "crossover experiment", "hci"],
22
+ "subjects": [
23
+ {
24
+ "subject": "choice architecture"
25
+ },
26
+ {
27
+ "subject": "crossover experiment"
28
+ },
29
+ {
30
+ "subject": "hci"
31
+ }
32
+ ],
23
33
  "dates": {
24
34
  "date": "2016-03-27",
25
35
  "date-type": "Issued"
26
36
  },
27
37
  "publication_year": "2016",
28
- "alternate_identifiers": {
29
- "type": "URL",
30
- "name": "http://zenodo.org/record/48440"
31
- },
32
- "rights": [{
33
- "name": "Open Access"
38
+ "alternate_identifiers": [{
39
+ "alternative_identifier_type": "URL",
40
+ "alternative_identifier": "http://zenodo.org/record/48440"
41
+ }],
42
+ "rights_list": [{
43
+ "rights": "Open Access"
34
44
  },
35
45
  {
36
- "id": "https://creativecommons.org/licenses/by-nc-sa/4.0",
37
- "name": "Creative Commons Attribution-NonCommercial-ShareAlike"
46
+ "rights_uri": "https://creativecommons.org/licenses/by-nc-sa/4.0",
47
+ "rights": "Creative Commons Attribution-NonCommercial-ShareAlike"
38
48
  }
39
49
  ],
40
- "description": [{
41
- "type": "Abstract",
42
- "text": "This 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."
50
+ "descriptions": [{
51
+ "description_type": "Abstract",
52
+ "description": "This 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."
43
53
  }],
44
54
  "schema_version": "http://datacite.org/schema/kernel-4",
45
55
  "provider": "DataCite",
@@ -9,22 +9,28 @@
9
9
  "ris": "RPRT"
10
10
  },
11
11
  "doi": "10.5438/4K3M-NYVG",
12
- "creator": {
12
+ "creator": [{
13
13
  "type": "Person",
14
14
  "id": "http://orcid.org/0000-0003-1419-2405",
15
15
  "name": "Fenner, Martin",
16
16
  "givenName": "Martin",
17
17
  "familyName": "Fenner"
18
- },
19
- "title": [{
20
- "text": "Eating your own Dog Food"
18
+ }],
19
+ "titles": [{
20
+ "title": "Eating your own Dog Food"
21
21
  }],
22
22
  "publisher": "DataCite",
23
23
  "publication-year": "2016",
24
- "subject": [
25
- "datacite",
26
- "doi",
27
- "metadata"
24
+ "subjects": [
25
+ {
26
+ "subject": "datacite"
27
+ },
28
+ {
29
+ "subject": "doi"
30
+ },
31
+ {
32
+ "subject": "metadata"
33
+ }
28
34
  ],
29
35
  "dates": [
30
36
  {
@@ -48,25 +54,25 @@
48
54
  ],
49
55
  "related-identifiers": [
50
56
  {
51
- "id": "10.5438/0000-00ss",
57
+ "related-identifier": "10.5438/0000-00ss",
52
58
  "related-identifier-type": "DOI",
53
59
  "relation-type": "IsPartOf"
54
60
  },
55
61
  {
56
- "id": "10.5438/0012",
62
+ "related-identifier": "10.5438/0012",
57
63
  "related-identifier-type": "DOI",
58
64
  "relation-type": "References"
59
65
  },
60
66
  {
61
- "id": "10.5438/55e5-t5c0",
67
+ "related-identifier": "10.5438/55e5-t5c0",
62
68
  "related-identifier-type": "DOI",
63
69
  "relation-type": "References"
64
70
  }
65
71
  ],
66
72
  "version": "1.0",
67
- "description": [{
68
- "type": "Abstract",
69
- "text": "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..."
73
+ "descriptions": [{
74
+ "description-type": "Abstract",
75
+ "description": "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..."
70
76
  }],
71
77
  "schema-version": "http://datacite.org/schema/kernel-4",
72
78
  "provider": "DataCite"
@@ -1,17 +1,21 @@
1
1
  {
2
2
  "id": "https://doi.org/10.5063/f1m61h5x",
3
+ "types": {
4
+ "resource-type-general": "Software",
5
+ "resource-type": "Software"
6
+ },
3
7
  "doi": "10.5063/F1M61H5X",
4
- "creator": {
8
+ "creator": [{
5
9
  "type": "Person",
6
10
  "name": "Matthew B. Jones",
7
11
  "givenName": "Matthew B.",
8
12
  "familyName": "Jones"
9
- },
10
- "title": "dataone: R interface to the DataONE network of data repositories",
13
+ }],
14
+ "titles": [{
15
+ "title": "dataone: R interface to the DataONE network of data repositories"
16
+ }],
11
17
  "publisher": "KNB Data Repository",
12
18
  "publication-year": "2016",
13
- "resource-type-general": "Software",
14
- "resource-type": "Software",
15
- "schemaVersion": "http://datacite.org/schema/kernel-3",
19
+ "schema-version": "http://datacite.org/schema/kernel-3",
16
20
  "provider": "DataCite"
17
21
  }
@@ -33,12 +33,12 @@ describe Bolognese::Metadata, vcr: true do
33
33
  expect(subject.url).to eq("http://elifesciences.org/lookup/doi/10.7554/eLife.01567")
34
34
  expect(subject.creator.length).to eq(5)
35
35
  expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Martial Sankar", "givenName"=>"Martial", "familyName"=>"Sankar")
36
- expect(subject.title).to eq([{"text"=>"Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"}])
37
- expect(subject.description.first["text"]).to start_with("Among various advantages, their small size makes model organisms preferred subjects of investigation.")
38
- expect(subject.rights.first["id"]).to eq("http://creativecommons.org/licenses/by/3.0/")
36
+ expect(subject.titles).to eq([{"title"=>"Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"}])
37
+ expect(subject.descriptions.first["description"]).to start_with("Among various advantages, their small size makes model organisms preferred subjects of investigation.")
38
+ expect(subject.rights_list.first["rights_uri"]).to eq("http://creativecommons.org/licenses/by/3.0/")
39
39
  expect(subject.dates).to eq([{"date"=>"2014", "date_type"=>"Issued"}])
40
40
  expect(subject.publication_year).to eq("2014")
41
- expect(subject.related_identifiers).to eq([{"id"=>"2050-084X", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"eLife", "type"=>"Periodical"}])
41
+ expect(subject.related_identifiers).to eq([{"related_identifier"=>"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
@@ -50,8 +50,8 @@ describe Bolognese::Metadata, vcr: true do
50
50
  expect(subject.identifier).to eq("https://doi.org/10.7554/elife.01567")
51
51
  expect(subject.types).to eq("bibtex"=>"phdthesis", "citeproc"=>"thesis", "resource_type"=>"Dissertation", "resource_type_general"=>"Text", "ris"=>"THES", "type"=>"Thesis")
52
52
  expect(subject.creator).to eq([{"type"=>"Person", "name"=>"Y. Toparlar", "givenName"=>"Y.", "familyName"=>"Toparlar"}])
53
- expect(subject.title).to eq([{"text"=>"A multiscale analysis of the urban heat island effect: from city averaged temperatures to the energy demand of individual buildings"}])
54
- expect(subject.description.first["text"]).to start_with("Designing the climates of cities")
53
+ expect(subject.titles).to eq([{"title"=>"A multiscale analysis of the urban heat island effect: from city averaged temperatures to the energy demand of individual buildings"}])
54
+ expect(subject.descriptions.first["description"]).to start_with("Designing the climates of cities")
55
55
  expect(subject.dates).to eq([{"date"=>"2018", "date_type"=>"Issued"}])
56
56
  expect(subject.publication_year).to eq("2018")
57
57
  end
@@ -19,9 +19,9 @@ describe Bolognese::Metadata, vcr: true do
19
19
  expect(subject.identifier).to eq("https://doi.org/10.5438/4k3m-nyvg")
20
20
  expect(subject.url).to eq("https://blog.datacite.org/eating-your-own-dog-food")
21
21
  expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"post-weblog", "resource_type_general"=>"Text", "ris"=>"GEN", "type"=>"BlogPosting")
22
- expect(subject.creator).to eq("type"=>"Person", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner")
23
- expect(subject.title).to eq([{"text"=>"Eating your own Dog Food"}])
24
- expect(subject.description.first["text"]).to start_with("Eating your own dog food")
22
+ expect(subject.creator).to eq([{"familyName"=>"Fenner", "givenName"=>"Martin", "name"=>"Martin Fenner", "type"=>"Person"}])
23
+ expect(subject.titles).to eq([{"title"=>"Eating your own Dog Food"}])
24
+ expect(subject.descriptions.first["description"]).to start_with("Eating your own dog food")
25
25
  expect(subject.dates).to eq([{"date"=>"2016-12-20", "date_type"=>"Issued"}])
26
26
  expect(subject.publication_year).to eq("2016")
27
27
  end
@@ -21,10 +21,10 @@ describe Bolognese::Metadata, vcr: true do
21
21
  expect(subject.identifier).to eq("https://doi.org/10.5438/qeg0-3gm3")
22
22
  expect(subject.url).to eq("https://github.com/datacite/maremma")
23
23
  expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resource_type_general"=>"Software", "ris"=>"COMP", "type"=>"SoftwareSourceCode")
24
- expect(subject.creator).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner")
25
- expect(subject.title).to eq([{"text"=>"Maremma: a Ruby library for simplified network calls"}])
26
- expect(subject.description.first["text"]).to start_with("Ruby utility library for network requests")
27
- expect(subject.keywords).to eq(["faraday", "excon", "net/http"])
24
+ expect(subject.creator).to eq([{"type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner"}])
25
+ expect(subject.titles).to eq([{"title"=>"Maremma: a Ruby library for simplified network calls"}])
26
+ expect(subject.descriptions.first["description"]).to start_with("Ruby utility library for network requests")
27
+ expect(subject.subjects).to eq([{"subject"=>"faraday"}, {"subject"=>"excon"}, {"subject"=>"net/http"}])
28
28
  expect(subject.dates).to eq([{"date"=>"2017-02-24", "date_type"=>"Issued"}, {"date"=>"2015-11-28", "date_type"=>"Created"}, {"date"=>"2017-02-24", "date_type"=>"Updated"}])
29
29
  expect(subject.publication_year).to eq("2017")
30
30
  expect(subject.publisher).to eq("DataCite")
@@ -47,9 +47,9 @@ describe Bolognese::Metadata, vcr: true do
47
47
  "givenName"=>"Peter",
48
48
  "familyName"=>"Slaughter"},
49
49
  {"type"=>"Organization", "name"=>"University Of California, Santa Barbara"}])
50
- expect(subject.title).to eq([{"text"=>"R Interface to the DataONE REST API"}])
51
- expect(subject.description.first["text"]).to start_with("Provides read and write access to data and metadata")
52
- expect(subject.keywords).to eq(["data sharing", "data repository", "DataONE"])
50
+ expect(subject.titles).to eq([{"title"=>"R Interface to the DataONE REST API"}])
51
+ expect(subject.descriptions.first["description"]).to start_with("Provides read and write access to data and metadata")
52
+ expect(subject.subjects).to eq([{"subject"=>"data sharing"}, {"subject"=>"data repository"}, {"subject"=>"DataONE"}])
53
53
  expect(subject.version).to eq("2.0.0")
54
54
  expect(subject.dates).to eq([{"date"=>"2016-05-27", "date_type"=>"Issued"}, {"date"=>"2016-05-27", "date_type"=>"Created"}, {"date"=>"2016-05-27", "date_type"=>"Updated"}])
55
55
  expect(subject.publication_year).to eq("2016")
@@ -63,10 +63,10 @@ describe Bolognese::Metadata, vcr: true do
63
63
  expect(subject.identifier).to eq("https://doi.org/10.5438/qeg0-3gm3")
64
64
  expect(subject.url).to eq("https://github.com/datacite/maremma")
65
65
  expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resource_type_general"=>"Software", "ris"=>"COMP", "type"=>"SoftwareSourceCode")
66
- expect(subject.creator).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner")
67
- expect(subject.title).to eq([{"text"=>"Maremma: a Ruby library for simplified network calls"}])
68
- expect(subject.description.first["text"]).to start_with("Simplifies network calls")
69
- expect(subject.keywords).to eq(["faraday", "excon", "net/http"])
66
+ expect(subject.creator).to eq([{"type"=>"Person", "id"=>"http://orcid.org/0000-0003-0077-4738", "name"=>"Martin Fenner", "givenName"=>"Martin", "familyName"=>"Fenner"}])
67
+ expect(subject.titles).to eq([{"title"=>"Maremma: a Ruby library for simplified network calls"}])
68
+ expect(subject.descriptions.first["description"]).to start_with("Simplifies network calls")
69
+ expect(subject.subjects).to eq([{"subject"=>"faraday"}, {"subject"=>"excon"}, {"subject"=>"net/http"}])
70
70
  expect(subject.dates).to eq([{"date"=>"2017-02-24", "date_type"=>"Issued"}, {"date"=>"2015-11-28", "date_type"=>"Created"}, {"date"=>"2017-02-24", "date_type"=>"Updated"}])
71
71
  expect(subject.publication_year).to eq("2017")
72
72
  expect(subject.publisher).to eq("DataCite")
@@ -81,9 +81,9 @@ describe Bolognese::Metadata, vcr: true do
81
81
  expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resource_type_general"=>"Software", "ris"=>"COMP", "type"=>"SoftwareSourceCode")
82
82
  expect(subject.creator.size).to eq(4)
83
83
  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")
84
- expect(subject.title).to eq([{"text"=>"DOI Registrations for Software"}])
85
- expect(subject.description.first["text"]).to start_with("Analysis of DataCite DOIs registered for software")
86
- expect(subject.keywords).to eq(["doi", "software", "codemeta"])
84
+ expect(subject.titles).to eq([{"title"=>"DOI Registrations for Software"}])
85
+ expect(subject.descriptions.first["description"]).to start_with("Analysis of DataCite DOIs registered for software")
86
+ expect(subject.subjects).to eq([{"subject"=>"doi"}, {"subject"=>"software"}, {"subject"=>"codemeta"}])
87
87
  expect(subject.dates).to eq([{"date"=>"2018-05-17", "date_type"=>"Issued"}, {"date"=>"2018-03-09", "date_type"=>"Created"}, {"date"=>"2018-05-17", "date_type"=>"Updated"}])
88
88
  expect(subject.publication_year).to eq("2018")
89
89
  expect(subject.publisher).to eq("DataCite")
@@ -15,13 +15,12 @@ describe Bolognese::Metadata, vcr: true do
15
15
 
16
16
  context "get crosscite metadata" do
17
17
  it "SoftwareSourceCode" do
18
- puts subject.errors
19
- #expect(subject.valid?).to be true
18
+ expect(subject.valid?).to be true
20
19
  expect(subject.identifier).to eq("https://doi.org/10.5281/zenodo.48440")
21
20
  expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"other", "resource_type"=>"Software", "resource_type_general"=>"Software", "ris"=>"COMP", "type"=>"SoftwareSourceCode")
22
- expect(subject.creator).to eq("type"=>"Person", "familyName" => "Garza", "givenName" => "Kristian", "name" => "Kristian Garza")
23
- expect(subject.title).to eq([{"text"=>"Analysis Tools for Crossover Experiment of UI using Choice Architecture"}])
24
- expect(subject.description.first["text"]).to start_with("This tools are used to analyse the data produced by the Crosssover Experiment")
21
+ expect(subject.creator).to eq([{"type"=>"Person", "familyName" => "Garza", "givenName" => "Kristian", "name" => "Kristian Garza"}])
22
+ expect(subject.titles).to eq([{"title"=>"Analysis Tools for Crossover Experiment of UI using Choice Architecture"}])
23
+ expect(subject.descriptions.first["description"]).to start_with("This tools are used to analyse the data produced by the Crosssover Experiment")
25
24
  expect(subject.dates).to eq("date"=>"2016-03-27", "date-type"=>"Issued")
26
25
  expect(subject.publication_year).to eq("2016")
27
26
  end
@@ -29,12 +28,12 @@ describe Bolognese::Metadata, vcr: true do
29
28
  it "SoftwareSourceCode as string" do
30
29
  input = IO.read(fixture_path + "crosscite.json")
31
30
  subject = Bolognese::Metadata.new(input: input)
32
- #expect(subject.valid?).to be true
31
+ expect(subject.valid?).to be true
33
32
  expect(subject.identifier).to eq("https://doi.org/10.5281/zenodo.48440")
34
33
  expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"other", "resource_type"=>"Software", "resource_type_general"=>"Software", "ris"=>"COMP", "type"=>"SoftwareSourceCode")
35
- expect(subject.creator).to eq("type"=>"Person", "familyName" => "Garza", "givenName" => "Kristian", "name" => "Kristian Garza")
36
- expect(subject.title).to eq([{"text"=>"Analysis Tools for Crossover Experiment of UI using Choice Architecture"}])
37
- expect(subject.description.first["text"]).to start_with("This tools are used to analyse the data produced by the Crosssover Experiment")
34
+ expect(subject.creator).to eq([{"type"=>"Person", "familyName" => "Garza", "givenName" => "Kristian", "name" => "Kristian Garza"}])
35
+ expect(subject.titles).to eq([{"title"=>"Analysis Tools for Crossover Experiment of UI using Choice Architecture"}])
36
+ expect(subject.descriptions.first["description"]).to start_with("This tools are used to analyse the data produced by the Crosssover Experiment")
38
37
  expect(subject.dates).to eq("date"=>"2016-03-27", "date-type"=>"Issued")
39
38
  expect(subject.publication_year).to eq("2016")
40
39
  end
@@ -23,23 +23,26 @@ describe Bolognese::Metadata, vcr: true do
23
23
  expect(subject.url).to eq("https://elifesciences.org/articles/01567")
24
24
  expect(subject.creator.length).to eq(5)
25
25
  expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Martial Sankar", "givenName"=>"Martial", "familyName"=>"Sankar")
26
- expect(subject.rights).to eq([{"id"=>"http://creativecommons.org/licenses/by/3.0"}])
27
- expect(subject.title).to eq([{"text"=>"Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"}])
26
+ expect(subject.rights_list).to eq([{"rights_uri"=>"http://creativecommons.org/licenses/by/3.0"}])
27
+ expect(subject.titles).to eq([{"title"=>"Automated quantitative histology reveals vascular morphodynamics during Arabidopsis hypocotyl secondary growth"}])
28
28
  expect(subject.dates).to eq([{"date"=>"2014-02-11", "date_type"=>"Issued"}, {"date"=>"2018-08-23T13:41:49Z", "date_type"=>"Updated"}])
29
29
  expect(subject.publication_year).to eq("2014")
30
30
  expect(subject.periodical).to eq("issn"=>"2050-084X", "title"=>"eLife", "type"=>"Periodical")
31
31
  expect(subject.related_identifiers.length).to eq(27)
32
- expect(subject.related_identifiers.first).to eq("id"=>"2050-084X", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"eLife", "type"=>"Periodical")
33
- expect(subject.related_identifiers.last).to eq("id" => "10.1038/ncb2764",
32
+ expect(subject.related_identifiers.first).to eq("related_identifier"=>"2050-084X", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"eLife", "type"=>"Periodical")
33
+ expect(subject.related_identifiers.last).to eq("related_identifier" => "10.1038/ncb2764",
34
34
  "related_identifier_type" => "DOI",
35
35
  "relation_type" => "References",
36
36
  "title" => "A screen for morphological complexity identifies regulators of switch-like transitions between discrete cell shapes")
37
37
  expect(subject.funding_references).to eq([{"funder_name"=>"SystemsX"},
38
38
  {"funder_identifier"=>"https://doi.org/10.13039/501100003043",
39
+ "funder_identifier_type"=>"Crossref Funder ID",
39
40
  "funder_name"=>"EMBO"},
40
41
  {"funder_identifier"=>"https://doi.org/10.13039/501100001711",
42
+ "funder_identifier_type"=>"Crossref Funder ID",
41
43
  "funder_name"=>"Swiss National Science Foundation"},
42
44
  {"funder_identifier"=>"https://doi.org/10.13039/501100006390",
45
+ "funder_identifier_type"=>"Crossref Funder ID",
43
46
  "funder_name"=>"University of Lausanne"}])
44
47
  expect(subject.service_provider).to eq("Crossref")
45
48
  end
@@ -54,14 +57,14 @@ describe Bolognese::Metadata, vcr: true do
54
57
  expect(subject.creator.length).to eq(5)
55
58
  expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Markus Ralser", "givenName"=>"Markus", "familyName"=>"Ralser")
56
59
  expect(subject.contributor).to eq("contributorType"=>"Editor", "familyName"=>"Janbon", "givenName"=>"Guilhem", "name"=>"Guilhem Janbon", "type"=>"Person")
57
- expect(subject.title).to eq([{"text"=>"Triose Phosphate Isomerase Deficiency Is Caused by Altered Dimerization–Not Catalytic Inactivity–of the Mutant Enzymes"}])
58
- expect(subject.rights).to eq([{"id"=>"http://creativecommons.org/licenses/by/4.0"}])
60
+ expect(subject.titles).to eq([{"title"=>"Triose Phosphate Isomerase Deficiency Is Caused by Altered Dimerization–Not Catalytic Inactivity–of the Mutant Enzymes"}])
61
+ expect(subject.rights_list).to eq([{"rights_uri"=>"http://creativecommons.org/licenses/by/4.0"}])
59
62
  expect(subject.dates).to eq([{"date"=>"2006-12-20", "date_type"=>"Issued"}, {"date"=>"2017-06-17T12:26:15Z", "date_type"=>"Updated"}])
60
63
  expect(subject.publication_year).to eq("2006")
61
64
  expect(subject.first_page).to eq("e30")
62
65
  expect(subject.related_identifiers.length).to eq(62)
63
- expect(subject.related_identifiers.first).to eq("id"=>"1932-6203", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"PLoS ONE", "type"=>"Periodical")
64
- 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.")
66
+ expect(subject.related_identifiers.first).to eq("related_identifier"=>"1932-6203", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"PLoS ONE", "type"=>"Periodical")
67
+ expect(subject.related_identifiers.last).to eq("related_identifier"=>"10.1056/nejm199109123251104", "relation_type"=>"References", "related_identifier_type"=>"DOI", "title"=>"Efficacy of statewide neonatal screening for cystic fibrosis by assay of trypsinogen concentrations.")
65
68
  expect(subject.periodical).to eq("issn"=>"1932-6203", "title"=>"PLoS ONE", "type"=>"Periodical")
66
69
  expect(subject.service_provider).to eq("Crossref")
67
70
  end
@@ -75,9 +78,9 @@ describe Bolognese::Metadata, vcr: true do
75
78
  expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resource_type"=>"PostedContent", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
76
79
  expect(subject.creator.count).to eq(11)
77
80
  expect(subject.creator.last).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-4060-7360", "name"=>"Timothy Clark", "givenName"=>"Timothy", "familyName"=>"Clark")
78
- expect(subject.title).to eq([{"text"=>"A Data Citation Roadmap for Scholarly Data Repositories"}])
79
- expect(subject.alternate_identifiers).to eq("biorxiv;097196v2")
80
- expect(subject.description.first["text"]).to start_with("This article presents a practical roadmap")
81
+ expect(subject.titles).to eq([{"title"=>"A Data Citation Roadmap for Scholarly Data Repositories"}])
82
+ expect(subject.alternate_identifiers).to eq("alternate_identifier"=>"biorxiv;097196v2", "alternate_identifier_type"=>"Publisher ID")
83
+ expect(subject.descriptions.first["description"]).to start_with("This article presents a practical roadmap")
81
84
  expect(subject.dates).to eq([{"date"=>"2017-10-09", "date_type"=>"Issued"}, {"date"=>"2017-10-10T05:10:49Z", "date_type"=>"Updated"}])
82
85
  expect(subject.publication_year).to eq("2017")
83
86
  expect(subject.publisher).to eq("bioRxiv")
@@ -92,15 +95,15 @@ describe Bolognese::Metadata, vcr: true do
92
95
  expect(subject.url).to eq("http://doi.wiley.com/10.1890/0012-9658(2006)87[2832:TIOPMA]2.0.CO;2")
93
96
  expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resource_type"=>"JournalArticle", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
94
97
  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"}])
95
- expect(subject.rights).to eq([{"id"=>"http://doi.wiley.com/10.1002/tdm_license_1.1"}])
96
- expect(subject.title).to eq([{"text"=>"THE IMPACT OF PARASITE MANIPULATION AND PREDATOR FORAGING BEHAVIOR ON PREDATOR–PREY COMMUNITIES"}])
98
+ expect(subject.rights_list).to eq([{"rights_uri"=>"http://doi.wiley.com/10.1002/tdm_license_1.1"}])
99
+ expect(subject.titles).to eq([{"title"=>"THE IMPACT OF PARASITE MANIPULATION AND PREDATOR FORAGING BEHAVIOR ON PREDATOR–PREY COMMUNITIES"}])
97
100
  expect(subject.dates).to eq([{"date"=>"2006-11", "date_type"=>"Issued"}, {"date"=>"2018-08-02T21:20:01Z", "date_type"=>"Updated"}])
98
101
  expect(subject.publication_year).to eq("2006")
99
102
  expect(subject.first_page).to eq("2832")
100
103
  expect(subject.last_page).to eq("2841")
101
104
  expect(subject.related_identifiers.length).to eq(34)
102
- expect(subject.related_identifiers.first).to eq("id"=>"0012-9658", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"Ecology", "type"=>"Periodical")
103
- expect(subject.related_identifiers.last).to eq("id"=>"10.1098/rspb.2002.2213", "related_identifier_type"=>"DOI", "relation_type"=>"References")
105
+ expect(subject.related_identifiers.first).to eq("related_identifier"=>"0012-9658", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"Ecology", "type"=>"Periodical")
106
+ expect(subject.related_identifiers.last).to eq("related_identifier"=>"10.1098/rspb.2002.2213", "related_identifier_type"=>"DOI", "relation_type"=>"References")
104
107
  expect(subject.periodical).to eq("issn"=>"0012-9658", "title"=>"Ecology", "type"=>"Periodical")
105
108
  expect(subject.service_provider).to eq("Crossref")
106
109
  end
@@ -114,15 +117,15 @@ describe Bolognese::Metadata, vcr: true do
114
117
  expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resource_type"=>"JournalArticle", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
115
118
  expect(subject.creator.length).to eq(7)
116
119
  expect(subject.creator[2]).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0003-2043-4925", "name"=>"Beatriz Hernandez", "givenName"=>"Beatriz", "familyName"=>"Hernandez")
117
- expect(subject.rights).to eq([{"id"=>"http://creativecommons.org/licenses/by/3.0"}])
118
- expect(subject.title).to eq([{"text"=>"Delineating a Retesting Zone Using Receiver Operating Characteristic Analysis on Serial QuantiFERON Tuberculosis Test Results in US Healthcare Workers"}])
120
+ expect(subject.rights_list).to eq([{"rights_uri"=>"http://creativecommons.org/licenses/by/3.0"}])
121
+ expect(subject.titles).to eq([{"title"=>"Delineating a Retesting Zone Using Receiver Operating Characteristic Analysis on Serial QuantiFERON Tuberculosis Test Results in US Healthcare Workers"}])
119
122
  expect(subject.dates).to eq([{"date"=>"2012", "date_type"=>"Issued"}, {"date"=>"2016-08-02T18:42:41Z", "date_type"=>"Updated"}])
120
123
  expect(subject.publication_year).to eq("2012")
121
124
  expect(subject.first_page).to eq("1")
122
125
  expect(subject.last_page).to eq("7")
123
126
  expect(subject.related_identifiers.length).to eq(18)
124
- expect(subject.related_identifiers.first).to eq("id"=>"2090-1836", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"Pulmonary Medicine", "type"=>"Periodical")
125
- expect(subject.related_identifiers.last).to eq("id"=>"10.1378/chest.12-0045", "related_identifier_type"=>"DOI", "relation_type"=>"References")
127
+ expect(subject.related_identifiers.first).to eq("related_identifier"=>"2090-1836", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"Pulmonary Medicine", "type"=>"Periodical")
128
+ expect(subject.related_identifiers.last).to eq("related_identifier"=>"10.1378/chest.12-0045", "related_identifier_type"=>"DOI", "relation_type"=>"References")
126
129
  expect(subject.periodical).to eq("issn"=>"2090-1836", "title"=>"Pulmonary Medicine", "type"=>"Periodical")
127
130
  expect(subject.service_provider).to eq("Crossref")
128
131
  end
@@ -136,10 +139,10 @@ describe Bolognese::Metadata, vcr: true do
136
139
  expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resource_type"=>"JournalArticle", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
137
140
  expect(subject.creator.length).to eq(10)
138
141
  expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Sarah E. Beck", "givenName"=>"Sarah E.", "familyName"=>"Beck")
139
- expect(subject.title).to eq([{"text"=>"Paving the path to HIV neurotherapy: Predicting SIV CNS disease"}])
142
+ expect(subject.titles).to eq([{"title"=>"Paving the path to HIV neurotherapy: Predicting SIV CNS disease"}])
140
143
  expect(subject.dates).to eq([{"date"=>"2015-07", "date_type"=>"Issued"}, {"date"=>"2017-06-23T08:44:48Z", "date_type"=>"Updated"}])
141
144
  expect(subject.publication_year).to eq("2015")
142
- expect(subject.related_identifiers).to eq([{"id"=>"00142999", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"European Journal of Pharmacology", "type"=>"Periodical"}])
145
+ expect(subject.related_identifiers).to eq([{"related_identifier"=>"00142999", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"European Journal of Pharmacology", "type"=>"Periodical"}])
143
146
  expect(subject.periodical).to eq("issn"=>"00142999", "title"=>"European Journal of Pharmacology", "type"=>"Periodical")
144
147
  expect(subject.service_provider).to eq("Crossref")
145
148
  end
@@ -153,8 +156,8 @@ describe Bolognese::Metadata, vcr: true do
153
156
  expect(subject.types).to eq("bibtex"=>"misc", "citeproc"=>"article-journal", "resource_type"=>"SaComponent", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
154
157
  expect(subject.creator.length).to eq(2)
155
158
  expect(subject.creator.first).to eq("type"=>"Person", "name"=>"G. Fermi", "givenName"=>"G.", "familyName"=>"Fermi")
156
- expect(subject.title).to eq([{"text"=>"THE CRYSTAL STRUCTURE OF HUMAN DEOXYHAEMOGLOBIN AT 1.74 ANGSTROMS RESOLUTION"}])
157
- expect(subject.description).to eq([{"text"=>"x-ray diffraction structure", "type"=>"Other"}])
159
+ expect(subject.titles).to eq([{"title"=>"THE CRYSTAL STRUCTURE OF HUMAN DEOXYHAEMOGLOBIN AT 1.74 ANGSTROMS RESOLUTION"}])
160
+ expect(subject.descriptions).to eq([{"description"=>"x-ray diffraction structure", "description_type"=>"Other"}])
158
161
  expect(subject.dates).to eq([{"date"=>"1984-07-17", "date_type"=>"Issued"}, {"date"=>"2014-05-27T16:45:59Z", "date_type"=>"Updated"}])
159
162
  expect(subject.publication_year).to eq("1984")
160
163
  expect(subject.publisher).to eq("(:unav)")
@@ -170,7 +173,7 @@ describe Bolognese::Metadata, vcr: true do
170
173
  expect(subject.types).to eq("bibtex"=>"inbook", "citeproc"=>"chapter", "resource_type"=>"BookChapter", "resource_type_general"=>"Text", "ris"=>"CHAP", "type"=>"Chapter")
171
174
  expect(subject.creator.length).to eq(2)
172
175
  expect(subject.creator.first).to eq("type"=>"Person", "name"=>"Ronald L. Diercks", "givenName"=>"Ronald L.", "familyName"=>"Diercks")
173
- expect(subject.title).to eq([{"text"=>"Clinical Symptoms and Physical Examinations"}])
176
+ expect(subject.titles).to eq([{"title"=>"Clinical Symptoms and Physical Examinations"}])
174
177
  expect(subject.dates).to eq([{"date"=>"2015", "date_type"=>"Issued"}, {"date"=>"2015-04-14T02:31:13Z", "date_type"=>"Updated"}])
175
178
  expect(subject.publication_year).to eq("2015")
176
179
  expect(subject.publisher).to eq("Springer Berlin Heidelberg")
@@ -186,13 +189,13 @@ describe Bolognese::Metadata, vcr: true do
186
189
  expect(subject.types).to eq("bibtex"=>"article", "citeproc"=>"article-journal", "resource_type"=>"JournalArticle", "resource_type_general"=>"Text", "ris"=>"JOUR", "type"=>"ScholarlyArticle")
187
190
  expect(subject.creator.length).to eq(3)
188
191
  expect(subject.creator.first).to eq("type"=>"Person", "id"=>"http://orcid.org/0000-0002-4156-3761", "name"=>"Nico Dissmeyer", "givenName"=>"Nico", "familyName"=>"Dissmeyer")
189
- expect(subject.title).to eq([{"text"=>"Life and death of proteins after protease cleavage: protein degradation by the N-end rule pathway"}])
190
- expect(subject.rights).to eq([{"id"=>"http://doi.wiley.com/10.1002/tdm_license_1.1"}, {"id"=>"http://onlinelibrary.wiley.com/termsAndConditions"}])
192
+ expect(subject.titles).to eq([{"title"=>"Life and death of proteins after protease cleavage: protein degradation by the N-end rule pathway"}])
193
+ expect(subject.rights_list).to eq([{"rights_uri"=>"http://doi.wiley.com/10.1002/tdm_license_1.1"}, {"rights_uri"=>"http://onlinelibrary.wiley.com/termsAndConditions"}])
191
194
  expect(subject.dates).to eq([{"date"=>"2018-05", "date_type"=>"Issued"}, {"date"=>"2018-08-07T05:52:14Z", "date_type"=>"Updated"}])
192
195
  expect(subject.publication_year).to eq("2018")
193
196
  expect(subject.related_identifiers.length).to eq(49)
194
- expect(subject.related_identifiers.first).to eq("id"=>"0028646X", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"New Phytologist", "type"=>"Periodical")
195
- 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")
197
+ expect(subject.related_identifiers.first).to eq("related_identifier"=>"0028646X", "related_identifier_type"=>"ISSN", "relation_type"=>"IsPartOf", "title"=>"New Phytologist", "type"=>"Periodical")
198
+ expect(subject.related_identifiers.last).to eq("related_identifier"=>"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")
196
199
  expect(subject.periodical).to eq("issn"=>"0028646X", "title"=>"New Phytologist", "type"=>"Periodical")
197
200
  expect(subject.service_provider).to eq("Crossref")
198
201
  end