Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fix ris import #2028

Merged
merged 5 commits into from
Sep 27, 2016
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
220 changes: 107 additions & 113 deletions src/main/java/net/sf/jabref/logic/importer/fileformat/RisImporter.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public void setUp() throws URISyntaxException {
@Parameters(name = "{0}")
public static Collection<String> fileNames() {
return Arrays.asList("RisImporterTest1", "RisImporterTest3", "RisImporterTest4a", "RisImporterTest4b",
"RisImporterTest4c", "RisImporterTest5a", "RisImporterTest5b", "RisImporterTest6");
"RisImporterTest4c", "RisImporterTest5a", "RisImporterTest5b", "RisImporterTest6",
"RisImporterTestDoiAndJournalTitle", "RisImporterTestScopus");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@incollection{,
author = {Barata, Catarina and Celebi, MEmre and Marques, JorgeS},
booktitle = {Dermoscopy Image Analysis},
comment = {doi:10.1201/b19107-2},
doi = {10.1201/b19107-2},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have seen that RisImporterTest3.ris specifies the both doi fields (M3 and DO) with the same doi string. Please move one of them to a different or new test file. This way the tests would have already showed that the DO field didn't import the doi.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've used the DO field in the TestDoiAndJournalFile.

issn = {978-1-4822-5326-9},
journal = {Dermoscopy Image Analysis},
month = {#sep#},
pages = {1-22},
publisher = {CRC Press},
series = {Digital Imaging and Computer Vision},
title = {Toward a Robust Analysis of Dermoscopy Images Acquired under Different Conditions},
title = {Toward a Robust Analysis of Dermoscopy Images Acquired under Different Conditions},
url = {http://dx.doi.org/10.1201/b19107-2},
year = {2015}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@article{,
abstract = {Toxic metals such as arsenic, cadmium, lead, and mercury are ubiquitous, have no beneficial role in human homeostasis, and contribute to noncommunicable chronic diseases. While novel drug targets for chronic disease are eagerly sought, potentially helpful agents that aid in detoxification of toxic elements, chelators, have largely been restricted to overt acute poisoning. Chelation, that is multiple coordination bonds between organic molecules and metals, is very common in the body and at the heart of enzymes with a metal cofactor such as copper or zinc. Peptides glutathione and metallothionein chelate both essential and toxic elements as they are sequestered, transported, and excreted. Enhancing natural chelation detoxification pathways, as well as use of pharmaceutical chelators against heavy metals are reviewed. Historical adverse outcomes with chelators, lessons learned in the art of using them, and successes using chelation to ameliorate renal, cardiovascular, and neurological conditions highlight the need for renewed attention to simple, safe, inexpensive interventions that offer potential to stem the tide of debilitating, expensive chronic disease.},
author = {Sears, Margaret E.},
comment = {23690738[pmid]},
database = {PMC},
issn = {1537-744X},
journal = {The Scientific World Journal},
month = {#mar#},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Y1 - 2013
PY - 2013/04/18
PY - 2013/02/15/received
PY - 2013/03/14/accepted
AB - Toxic metals such as arsenic, cadmium, lead, and mercury are ubiquitous, have no beneficial role in human homeostasis, and contribute to noncommunicable chronic diseases. While novel drug targets for chronic disease are eagerly sought, potentially helpful agents that aid in detoxification of toxic elements, chelators, have largely been restricted to overt acute poisoning. Chelation, that is multiple coordination bonds between organic molecules and metals, is very common in the body and at the heart of enzymes with a metal cofactor such as copper or zinc. Peptides glutathione and metallothionein chelate both essential and toxic elements as they are sequestered, transported, and excreted. Enhancing natural chelation detoxification pathways, as well as use of pharmaceutical chelators against heavy metals are reviewed. Historical adverse outcomes with chelators, lessons learned in the art of using them, and successes using chelation to ameliorate renal, cardiovascular, and neurological conditions highlight the need for renewed attention to simple, safe, inexpensive interventions that offer potential to stem the tide of debilitating, expensive chronic disease.
SP - 219840
VL - 2013
DO - 10.1155/2013/219840
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@patent{,
author = {some author},
month = dec,
year = {2014},
caption = {254},
edition = {5},
editor = {some editor},
language = {eng},
number = {25},
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the test files confuses me a lot...Isn't the purpose here to test the journal title and doi fields? So why are the fields not present in the file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah you're right... Don't know how I could forget them 😄

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
TY - PAT
AU - some author
A4 - some editor
LA - eng
CA - 254
ET - 5
IS - 25
DA - 2014/12/12
ER - dsfd

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
% Encoding: UTF-8

@Article{,
author = {Federico, S. and Grillo, A. and Herzog, W.},
title = {A transversely isotropic composite with a statistical distribution of spheroidal inclusions: A geometrical approach to overall properties},
journal = {Journal of the Mechanics and Physics of Solids},
year = {2004},
volume = {52},
number = {10},
pages = {2309--2327},
address = {Dipartimento di Metodologie Fisiche, Facoltà di Ingegneria, Univ. degli Studi di Catania, Catania, Italy},
comment = {Cited By :44 Export Date: 1 April 2016},
database = {Scopus},
keywords = {Composite, Inclusions, Statistical distribution, Transverse isotropy},
url = {http://www.scopus.com/inward/record.url?eid=2-s2.0-4544289390&partnerID=40&md5=ad1a4baab95650b103a3467b787b83aa},
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
TY - JOUR
TI - A transversely isotropic composite with a statistical distribution of spheroidal inclusions: A geometrical approach to overall properties
T2 - Journal of the Mechanics and Physics of Solids
VL - 52
IS - 10
SP - 2309
EP - 2327
PY - 2004
DO - 10.1016/j.jmps.2004.03.010
AU - Federico, S.
AU - Grillo, A.
AU - Herzog, W.
AD - Dipto. di Ingegneria Industriale, Facoltà di Ingegneria, Univ. degli Studi di Catania, Catania, Italy
AD - Human Performance Laboratory, Faculty of Kinesiology, University of Calgary, 2500 University Drive NW, Calgary, Alta. T2N 1N4, Canada
AD - Dipartimento di Metodologie Fisiche, Facoltà di Ingegneria, Univ. degli Studi di Catania, Catania, Italy
KW - Composite
KW - Inclusions
KW - Statistical distribution
KW - Transverse isotropy
N1 - Cited By :44
N1 - Export Date: 1 April 2016
M3 - Article
DB - Scopus
UR - http://www.scopus.com/inward/record.url?eid=2-s2.0-4544289390&partnerID=40&md5=ad1a4baab95650b103a3467b787b83aa
ER -