Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[master]
- Feature #809: import pubmed central id (pmc) field from medline
- Fix undoing Cleanup/Convert to Biblatex
- Adapted pattern to parse DBLP entries
- Partial fix for bug 913: fixed export for .ods and .sxc (by yaragg)
Expand Down
17 changes: 12 additions & 5 deletions src/main/java/net/sf/jabref/imports/MedlineHandler.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2003-2011 JabRef contributors.
/* Copyright (C) 2003-2014 JabRef contributors.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
Expand Down Expand Up @@ -38,14 +38,14 @@ public class MedlineHandler extends DefaultHandler
inMedlineID = false, inURL=false,
inIssue = false, inPubDate = false,
inUrl=false, inForename=false, inAbstractText=false, inMedlineDate=false,
inPubMedID=false, inDescriptorName=false,inDoi=false,inPii=false,
inPubMedID=false, inDescriptorName=false,inDoi=false,inPii=false,inPmc=false,
inAffiliation=false, inMeshHeader=false, inQualifierName=false,
inLanguage=false, inPst=false;
String title="", journal="", keywords ="",author="",
lastName="",suffix="",year="",forename="", abstractText="", affiliation="";
String month="",volume="",lastname="",initials="",number="",page="",medlineID="",url="",MedlineDate="";
String series="",editor="",booktitle="",type="article",key="",address="",
pubmedid="",doi="",pii="", majorTopic = "", minorTopics = "", language = "", pst= "";
pubmedid="",doi="",pii="", pmc="",majorTopic = "", minorTopics = "", language = "", pst= "";
ArrayList<String> authors=new ArrayList<String>();
TreeSet<String> descriptors = new TreeSet<String>(); // To gather keywords
int rowNum=0;
Expand Down Expand Up @@ -117,6 +117,8 @@ else if(localName.equals("ArticleId")){
inDoi=true;
else if(value.equals("pii"))
inPii=true;
else if(value.equals("pmc"))
inPmc=true;

}
}
Expand Down Expand Up @@ -194,6 +196,8 @@ public void endElement( String uri, String localName, String qName ) {
}
if(!pii.equals(""))
b.setField("pii",pii);
if(!pmc.equals(""))
b.setField("pmc",pmc);
if(!affiliation.equals("")) {
b.setField("institution",affiliation.replaceAll("#", "\\\\#"));
}
Expand All @@ -212,7 +216,7 @@ public void endElement( String uri, String localName, String qName ) {
title="";
journal="";
keywords ="";
doi=""; pii="";
doi=""; pii=""; pmc="";
year="";
forename="";
lastName="";
Expand Down Expand Up @@ -293,7 +297,9 @@ else if(localName.equals("ArticleId")){
if(inDoi)
inDoi=false;
else if(inPii)
inPii=false;}
inPii=false;
else if(inPmc)
inPmc=false;}
}

public void characters( char[] data, int start, int length ) {
Expand Down Expand Up @@ -332,6 +338,7 @@ else if(inForename){
else if(inMedlineDate){ MedlineDate += new String(data,start,length);}
else if(inDoi){ doi=new String(data,start,length);}
else if(inPii){ pii=new String(data,start,length);}
else if(inPmc){ pmc=new String(data,start,length);}
else if(inAffiliation){ affiliation = new String(data,start,length);}
}

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/help/About.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ <h2>Contributions from:</h2>
Yara Grassi Gouffon,
Leonardo Haddad Carlos
Sascha Hunold,
Philip Johnson,
Bernd Kalbfuss,
Martin K&auml;hmer,
Ervin Kolenovic,
Expand Down