Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
Correct parsing of the metadata JSON blob from the UI. (#121)
Browse files Browse the repository at this point in the history
* Correct parsing of the metadata JSON blob from the UI.

The metadata blob used for updated testing is copied verbatim from:
#119 (comment)

Changes include:
- No longer using or supporting Manuscript.manuscriptUrl
- Publication resource is no longer consulted for metadata
- DOI is parsed from crossref metadata
- Journal ID is no longer parsed
- No longer consult 'JScholarship' metadata in the blob, it has nothing needed by Deposit Services
- Embarog metadata is parsed from the common metadata
- Article metadata no longer has a boolean for 'underEmbargo', it simply provides the 'embargoLiftDate'; the caller is responsible for determining if the embargo still applies.

Closes #119

* Latest blob, update tests.

* Update to latest blob?

* nlmta
  • Loading branch information
emetsger authored Jun 24, 2018
1 parent 4183355 commit 02f558c
Show file tree
Hide file tree
Showing 21 changed files with 799 additions and 289 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"metadata" : "[{\"id\":\"JScholarship\",\"data\":{\"under-embargo\":\"true\",\"Embargo-end-date\":\"09/25/19\",\"embargo\":\"NON-EXCLUSIVE LICENSE FOR USE OF MATERIALS This non-exclusive license defines the terms for the deposit of Materials in all formats into the digital repository of materials collected, preserved and made available through the Johns Hopkins Digital Repository, JScholarship. The Contributor hereby grants to Johns Hopkins a royalty free, non-exclusive worldwide license to use, re-use, display, distribute, transmit, publish, re-publish or copy the Materials, either digitally or in print, or in any other medium, now or hereafter known, for the purpose of including the Materials hereby licensed in the collection of materials in the Johns Hopkins Digital Repository for educational use worldwide. In some cases, access to content may be restricted according to provisions established in negotiation with the copyright holder. This license shall not authorize the commercial use of the Materials by Johns Hopkins or any other person or organization, but such Materials shall be restricted to non-profit educational use. Persons may apply for commercial use by contacting the copyright holder. Copyright and any other intellectual property right in or to the Materials shall not be transferred by this agreement and shall remain with the Contributor, or the Copyright holder if different from the Contributor. Other than this limited license, the Contributor or Copyright holder retains all rights, title, copyright and other interest in the images licensed. If the submission contains material for which the Contributor does not hold copyright, the Contributor represents that s/he has obtained the permission of the Copyright owner to grant Johns Hopkins the rights required by this license, and that such third-party owned material is clearly identified and acknowledged within the text or content of the submission. If the submission is based upon work that has been sponsored or supported by an agency or organization other than Johns Hopkins, the Contributor represents that s/he has fulfilled any right of review or other obligations required by such contract or agreement. Johns Hopkins will not make any alteration, other than as allowed by this license, to your submission. This agreement embodies the entire agreement of the parties. No modification of this agreement shall be of any effect unless it is made in writing and signed by all of the parties to the agreement.\",\"agreement-to-embargo\":\"true\"}},{\"id\":\"common\",\"data\":{\"title\":\"Specific protein supplementation using soya, casein or whey differentially affects regional gut growth and luminal growth factor bioactivity in rats; implications for the treatment of gut injury and stimulating repair\",\"journal-title\":\"Food Funct.\",\"journal-title-short\":\"Food Funct.\",\"volume\":\"9\",\"issue\":\"1\",\"abstract\":\"Differential enhancement of luminal growth factor bioactivity and targeted regional gut growth occurs dependent on dietary protein supplement.\",\"subjects\":\"Food Science,General Medicine\",\"URL\":\"http://dx.doi.org/10.1039/c7fo01251a\",\"authors\":[{\"author\":\"Tania Marchbank\",\"orcid\":\"http://orcid.org/0000-0003-2076-9098\"},{\"author\":\"Nikki Mandir\"},{\"author\":\"Denis Calnan\"},{\"author\":\"Robert A. Goodlad\"},{\"author\":\"Theo Podas\"},{\"author\":\"Raymond J. Playford\",\"orcid\":\"http://orcid.org/0000-0003-1235-8504\"}]}},{\"id\":\"nih\",\"data\":{\"journal-NLMTA-ID\":\"TD452689\",\"ISSN\":\"2042-6496,2042-650X\"}}]",
"metadata" : "[{\"id\":\"common\", \"data\":{\"title\":\"Electrogenerated chemiluminescence of Ru(bpy)32+ at a black phosphorus quantum dot modified electrode and its sensing application\", \"journal-title\":\"The Analyst\", \"volume\":\"143\", \"issue\":\"1\", \"ISSN\":\"0003-2654,1364-5528\", \"abstract\":\"Strong anodic electrogenerated chemiluminescence (ECL) of Ru(bpy)32+ can be obtained under neutral conditions at a black phosphorus quantum dot (BPQD) modified electrode due to the catalytic effect of BPQDs. Dopamine exhibits an apparent inhibiting effect on the ECL signal, and as a result, can be sensitively detected.\", \"authors\":[{\"author\":\"Lei Zhang\"}, {\"author\":\"KaiJin Tian\"}, {\"author\":\"YongPing Dong\", \"orcid\":\"http://orcid.org/0000-0002-0455-9982\"}, {\"author\":\"HouCheng Ding\"}, {\"author\":\"ChengMing Wang\"}], \"Embargo-end-date\":\"2018-06-30\"}}, {\"id\":\"crossref\", \"data\":{\"doi\":\"10.1039/c7an01617d\", \"publisher\":\"Royal Society of Chemistry (RSC)\", \"journal-title-short\":\"Analyst\"}}, {\"id\":\"JScholarship\", \"data\":{\"embargo\":\"NON-EXCLUSIVE LICENSE FOR USE OF MATERIALS This non-exclusive license defines the terms for the deposit of Materials in all formats into the digital repository of materials collected, preserved and made available through the Johns Hopkins Digital Repository, JScholarship. The Contributor hereby grants to Johns Hopkins a royalty free, non-exclusive worldwide license to use, re-use, display, distribute, transmit, publish, re-publish or copy the Materials, either digitally or in print, or in any other medium, now or hereafter known, for the purpose of including the Materials hereby licensed in the collection of materials in the Johns Hopkins Digital Repository for educational use worldwide. In some cases, access to content may be restricted according to provisions established in negotiation with the copyright holder. This license shall not authorize the commercial use of the Materials by Johns Hopkins or any other person or organization, but such Materials shall be restricted to non-profit educational use. Persons may apply for commercial use by contacting the copyright holder. Copyright and any other intellectual property right in or to the Materials shall not be transferred by this agreement and shall remain with the Contributor, or the Copyright holder if different from the Contributor. Other than this limited license, the Contributor or Copyright holder retains all rights, title, copyright and other interest in the images licensed. If the submission contains material for which the Contributor does not hold copyright, the Contributor represents that s/he has obtained the permission of the Copyright owner to grant Johns Hopkins the rights required by this license, and that such third-party owned material is clearly identified and acknowledged within the text or content of the submission. If the submission is based upon work that has been sponsored or supported by an agency or organization other than Johns Hopkins, the Contributor represents that s/he has fulfilled any right of review or other obligations required by such contract or agreement. Johns Hopkins will not make any alteration, other than as allowed by this license, to your submission. This agreement embodies the entire agreement of the parties. No modification of this agreement shall be of any effect unless it is made in writing and signed by all of the parties to the agreement.\", \"agreement-to-deposit\":\"true\"}}]",
"source" : "pass",
"submitted" : true,
"submittedDate" : "2017-06-02T00:00:00.000Z",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"metadata" : "[{\"id\":\"JScholarship\",\"data\":{\"under-embargo\":\"true\",\"Embargo-end-date\":\"09/25/19\",\"embargo\":\"NON-EXCLUSIVE LICENSE FOR USE OF MATERIALS This non-exclusive license defines the terms for the deposit of Materials in all formats into the digital repository of materials collected, preserved and made available through the Johns Hopkins Digital Repository, JScholarship. The Contributor hereby grants to Johns Hopkins a royalty free, non-exclusive worldwide license to use, re-use, display, distribute, transmit, publish, re-publish or copy the Materials, either digitally or in print, or in any other medium, now or hereafter known, for the purpose of including the Materials hereby licensed in the collection of materials in the Johns Hopkins Digital Repository for educational use worldwide. In some cases, access to content may be restricted according to provisions established in negotiation with the copyright holder. This license shall not authorize the commercial use of the Materials by Johns Hopkins or any other person or organization, but such Materials shall be restricted to non-profit educational use. Persons may apply for commercial use by contacting the copyright holder. Copyright and any other intellectual property right in or to the Materials shall not be transferred by this agreement and shall remain with the Contributor, or the Copyright holder if different from the Contributor. Other than this limited license, the Contributor or Copyright holder retains all rights, title, copyright and other interest in the images licensed. If the submission contains material for which the Contributor does not hold copyright, the Contributor represents that s/he has obtained the permission of the Copyright owner to grant Johns Hopkins the rights required by this license, and that such third-party owned material is clearly identified and acknowledged within the text or content of the submission. If the submission is based upon work that has been sponsored or supported by an agency or organization other than Johns Hopkins, the Contributor represents that s/he has fulfilled any right of review or other obligations required by such contract or agreement. Johns Hopkins will not make any alteration, other than as allowed by this license, to your submission. This agreement embodies the entire agreement of the parties. No modification of this agreement shall be of any effect unless it is made in writing and signed by all of the parties to the agreement.\",\"agreement-to-embargo\":\"true\"}},{\"id\":\"common\",\"data\":{\"title\":\"Specific protein supplementation using soya, casein or whey differentially affects regional gut growth and luminal growth factor bioactivity in rats; implications for the treatment of gut injury and stimulating repair\",\"journal-title\":\"Food Funct.\",\"journal-title-short\":\"Food Funct.\",\"volume\":\"9\",\"issue\":\"1\",\"abstract\":\"Differential enhancement of luminal growth factor bioactivity and targeted regional gut growth occurs dependent on dietary protein supplement.\",\"subjects\":\"Food Science,General Medicine\",\"URL\":\"http://dx.doi.org/10.1039/c7fo01251a\",\"authors\":[{\"author\":\"Tania Marchbank\",\"orcid\":\"http://orcid.org/0000-0003-2076-9098\"},{\"author\":\"Nikki Mandir\"},{\"author\":\"Denis Calnan\"},{\"author\":\"Robert A. Goodlad\"},{\"author\":\"Theo Podas\"},{\"author\":\"Raymond J. Playford\",\"orcid\":\"http://orcid.org/0000-0003-1235-8504\"}]}},{\"id\":\"nih\",\"data\":{\"journal-NLMTA-ID\":\"TD452689\",\"ISSN\":\"2042-6496,2042-650X\"}}]",
"metadata" : "[{\"id\":\"common\", \"data\":{\"title\":\"Electrogenerated chemiluminescence of Ru(bpy)32+ at a black phosphorus quantum dot modified electrode and its sensing application\", \"journal-title\":\"The Analyst\", \"volume\":\"143\", \"issue\":\"1\", \"ISSN\":\"0003-2654,1364-5528\", \"abstract\":\"Strong anodic electrogenerated chemiluminescence (ECL) of Ru(bpy)32+ can be obtained under neutral conditions at a black phosphorus quantum dot (BPQD) modified electrode due to the catalytic effect of BPQDs. Dopamine exhibits an apparent inhibiting effect on the ECL signal, and as a result, can be sensitively detected.\", \"authors\":[{\"author\":\"Lei Zhang\"}, {\"author\":\"KaiJin Tian\"}, {\"author\":\"YongPing Dong\", \"orcid\":\"http://orcid.org/0000-0002-0455-9982\"}, {\"author\":\"HouCheng Ding\"}, {\"author\":\"ChengMing Wang\"}], \"Embargo-end-date\":\"2018-06-30\"}}, {\"id\":\"crossref\", \"data\":{\"doi\":\"10.1039/c7an01617d\", \"publisher\":\"Royal Society of Chemistry (RSC)\", \"journal-title-short\":\"Analyst\"}}, {\"id\":\"JScholarship\", \"data\":{\"embargo\":\"NON-EXCLUSIVE LICENSE FOR USE OF MATERIALS This non-exclusive license defines the terms for the deposit of Materials in all formats into the digital repository of materials collected, preserved and made available through the Johns Hopkins Digital Repository, JScholarship. The Contributor hereby grants to Johns Hopkins a royalty free, non-exclusive worldwide license to use, re-use, display, distribute, transmit, publish, re-publish or copy the Materials, either digitally or in print, or in any other medium, now or hereafter known, for the purpose of including the Materials hereby licensed in the collection of materials in the Johns Hopkins Digital Repository for educational use worldwide. In some cases, access to content may be restricted according to provisions established in negotiation with the copyright holder. This license shall not authorize the commercial use of the Materials by Johns Hopkins or any other person or organization, but such Materials shall be restricted to non-profit educational use. Persons may apply for commercial use by contacting the copyright holder. Copyright and any other intellectual property right in or to the Materials shall not be transferred by this agreement and shall remain with the Contributor, or the Copyright holder if different from the Contributor. Other than this limited license, the Contributor or Copyright holder retains all rights, title, copyright and other interest in the images licensed. If the submission contains material for which the Contributor does not hold copyright, the Contributor represents that s/he has obtained the permission of the Copyright owner to grant Johns Hopkins the rights required by this license, and that such third-party owned material is clearly identified and acknowledged within the text or content of the submission. If the submission is based upon work that has been sponsored or supported by an agency or organization other than Johns Hopkins, the Contributor represents that s/he has fulfilled any right of review or other obligations required by such contract or agreement. Johns Hopkins will not make any alteration, other than as allowed by this license, to your submission. This agreement embodies the entire agreement of the parties. No modification of this agreement shall be of any effect unless it is made in writing and signed by all of the parties to the agreement.\", \"agreement-to-deposit\":\"true\"}}]",
"source" : "pass",
"submitted" : true,
"submittedDate" : "2017-06-02T00:00:00.000Z",
Expand Down
Loading

0 comments on commit 02f558c

Please sign in to comment.