Download Pubmed Abstracts in Java
Does anyone have an implementation of a program that dow开发者_高级运维nloads pubmed abstracts with title, author, date, and content to separate plaintext files given a MESH term?
http://www.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/DOC/esoap_java_help.html has an example. It worked for me like a charm.
I posted the code as a maven project on github
There is a built-in function for downloading different type of files (for example XML, CSV, and plain text files) right on the PubMed homepage. Just make a search and then select "Send to" where you'll be given a plethora of options.
As an alternative to esoap you can also use RESTful API.
Assuming that you want to get all articles with MESH keyword: galactosylceramides
then your query would look like:
http://www.ebi.ac.uk/europepmc/webservices/rest/search/resulttype=core&query=KW:galactosylceramides
Of course, you have to parse xml result, but I don't think it's a big problem.
There is an example here, but not in Java. http://www.ncbi.nlm.nih.gov/books/NBK25500/
精彩评论