|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.iastate.jtm.jmed.PubMedFetcher
public class PubMedFetcher
Retrive abstracts from Medline given a list of PMIDs or last query's history.
| Field Summary | |
|---|---|
static Limits |
GET_FASTA
|
static Limits |
GET_XML
|
| Constructor Summary | |
|---|---|
PubMedFetcher()
Create a new instance of PubMedFetcher with default buffer size. |
|
PubMedFetcher(int size)
Create a new instance of PubMedFetcher with specified buffer size. |
|
PubMedFetcher(MedlineParser pmp)
Create a new instance of PubMedFetcher with default buffer size and a specified MedlineParser. |
|
PubMedFetcher(java.lang.String tool,
java.lang.String email)
Create a new instance of PubMedFetcher with a tool name and email address. |
|
| Method Summary | |
|---|---|
void |
fetchFasta(java.io.File gifile,
java.io.File outfile)
|
void |
fetchPlain(java.io.File listfile,
java.io.File outDir)
Fetch abstracts given PMIDs in a file. |
void |
fetchPlain(java.io.File listfile,
java.lang.String outDir,
int size)
Fetch abstracts given a PMID file. |
void |
fetchPlain(Limits history,
java.io.File outDir)
Fetch abstracts given a query history. |
void |
fetchPlain(Limits history,
java.lang.String outDir,
int size)
Fetch abstracts given a query history. |
void |
fetchPlain(java.lang.String[] pmidList,
int listSize,
java.io.File outDir)
Fetch abstracts given a list of PMIDs. |
void |
fetchPlain(java.lang.String[] pmidList,
int listSize,
java.lang.String outDir,
int size)
Fetch abstracts given a list of PMIDs. |
java.io.InputStream |
fetchStream(Limits limits)
Retrieve abstracts from query history. |
java.io.InputStream |
fetchStream(java.lang.String[] pmids)
|
java.io.InputStream |
fetchStream(java.lang.String[] pmids,
int offset,
int count)
|
java.io.InputStream |
fetchStream(java.lang.String[] pmids,
int offset,
int count,
Limits limits)
|
java.io.InputStream |
fetchStream(java.lang.String[] pmids,
Limits limits)
|
void |
fetchXml(java.io.File listfile,
java.io.File output,
boolean compress)
Fetch abstracts given PMIDs in a file. |
void |
fetchXml(java.io.File listfile,
java.lang.String output,
int size,
boolean compress)
Fetch abstracts given a PMID file. |
void |
fetchXml(Limits history,
java.io.File output,
boolean compress)
Fetch abstracts given a query history. |
void |
fetchXml(Limits history,
java.lang.String output,
int size,
boolean compress)
Fetch abstracts given a query history. |
void |
fetchXml(java.lang.String[] pmidList,
int listSize,
java.io.File output,
boolean compress)
Fetch abstracts given a list of PMIDs. |
void |
fetchXml(java.lang.String[] pmidList,
int listSize,
java.lang.String output,
int size,
boolean compress)
Fetch abstracts given a list of PMIDs. |
static java.lang.String[] |
getPmidFromFile(java.lang.String pfile)
Read PMID list from a file. |
static void |
main(java.lang.String[] args)
|
void |
outputStream(java.io.InputStream stream,
java.io.Writer writer)
|
void |
setDatabase(int db)
|
void |
setParser(MedlineParser p)
Set the fetcher's parser. |
void |
setVerbose(boolean v)
Set verbose mode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Limits GET_XML
public static final Limits GET_FASTA
| Constructor Detail |
|---|
public PubMedFetcher()
public PubMedFetcher(int size)
size - buffer sizepublic PubMedFetcher(MedlineParser pmp)
pmp - MedlineParser
public PubMedFetcher(java.lang.String tool,
java.lang.String email)
tool - applicaiton nameemail - email address| Method Detail |
|---|
public void setDatabase(int db)
public void setParser(MedlineParser p)
p - the parserpublic void setVerbose(boolean v)
v - whether or not show more info
public static java.lang.String[] getPmidFromFile(java.lang.String pfile)
throws java.io.IOException
pfile - the PMID file.
java.io.IOException
public void fetchXml(java.io.File listfile,
java.io.File output,
boolean compress)
throws java.io.IOException,
org.dom4j.DocumentException
listfile - input PMID fileoutput - output filecompress - compress output files
java.io.IOException
org.dom4j.DocumentException
public void fetchXml(java.io.File listfile,
java.lang.String output,
int size,
boolean compress)
throws java.io.IOException,
org.dom4j.DocumentException
listfile - the PMID fileoutput - prefix of output filessize - number of abstracts per filecompress - compress output files
java.io.IOException
org.dom4j.DocumentException
public void fetchXml(java.lang.String[] pmidList,
int listSize,
java.io.File output,
boolean compress)
throws java.io.IOException,
org.dom4j.DocumentException
pmidList - the array of PMIDslistSize - effective size of the array (may smaller than its actual size)output - output filecompress - compress output files
java.io.IOException
org.dom4j.DocumentException
public void fetchXml(java.lang.String[] pmidList,
int listSize,
java.lang.String output,
int size,
boolean compress)
throws java.io.IOException,
org.dom4j.DocumentException
pmidList - the list of PMIDslistSize - effective size of the list (may be smaller than its actual size)output - prefix of output filessize - number of abstracts per filecompress - compress output files
java.io.IOException
org.dom4j.DocumentException
public void fetchXml(Limits history,
java.io.File output,
boolean compress)
throws org.xml.sax.SAXException,
java.io.IOException
history - the query historyoutput - the output filecompress - compress output files
org.xml.sax.SAXException
java.io.IOException
public void fetchXml(Limits history,
java.lang.String output,
int size,
boolean compress)
throws org.xml.sax.SAXException,
org.dom4j.DocumentException,
java.io.IOException
history - the query historyoutput - prefix of output filessize - number of abstracts per filecompress - compress output files
org.xml.sax.SAXException
org.dom4j.DocumentException
java.io.IOException
public void fetchPlain(java.io.File listfile,
java.io.File outDir)
throws java.io.IOException,
org.dom4j.DocumentException,
org.xml.sax.SAXException
listfile - the input file of PMIDsoutDir - output directory
java.io.IOException
org.dom4j.DocumentException
org.xml.sax.SAXException
public void fetchPlain(java.io.File listfile,
java.lang.String outDir,
int size)
throws java.io.IOException,
org.dom4j.DocumentException,
org.xml.sax.SAXException
listfile - the PMID fileoutDir - prefix of output directoriessize - number of abstracts per directory
java.io.IOException
org.dom4j.DocumentException
org.xml.sax.SAXException
public void fetchPlain(java.lang.String[] pmidList,
int listSize,
java.io.File outDir)
throws java.io.IOException,
org.dom4j.DocumentException,
org.xml.sax.SAXException
pmidList - the list of PMIDslistSize - effective size of the PMID array (may be smaller
than its actual sizeoutDir - output directory
java.io.IOException
org.dom4j.DocumentException
org.xml.sax.SAXException
public void fetchPlain(java.lang.String[] pmidList,
int listSize,
java.lang.String outDir,
int size)
throws java.io.IOException,
org.dom4j.DocumentException,
org.xml.sax.SAXException
pmidList - the list of PMIDslistSize - effective list size (may be smaller than its actual size)outDir - prefix of output directoriessize - number of abstracts per directory
java.io.IOException
org.dom4j.DocumentException
org.xml.sax.SAXException
public void fetchPlain(Limits history,
java.io.File outDir)
throws org.xml.sax.SAXException,
org.dom4j.DocumentException,
java.io.IOException
history - the query historyoutDir - output directory
org.xml.sax.SAXException
org.dom4j.DocumentException
java.io.IOException
public void fetchPlain(Limits history,
java.lang.String outDir,
int size)
throws org.dom4j.DocumentException,
java.io.IOException,
org.xml.sax.SAXException
history - the query historyoutDir - prefix of output directoriessize - number of abstracts per directory
org.dom4j.DocumentException
java.io.IOException
org.xml.sax.SAXException
public void fetchFasta(java.io.File gifile,
java.io.File outfile)
throws java.io.IOException
java.io.IOException
public java.io.InputStream fetchStream(java.lang.String[] pmids,
Limits limits)
throws java.io.IOException
java.io.IOException
public java.io.InputStream fetchStream(java.lang.String[] pmids)
throws java.io.IOException
java.io.IOException
public java.io.InputStream fetchStream(java.lang.String[] pmids,
int offset,
int count)
throws java.io.IOException
java.io.IOException
public java.io.InputStream fetchStream(java.lang.String[] pmids,
int offset,
int count,
Limits limits)
throws java.io.IOException
java.io.IOException
public java.io.InputStream fetchStream(Limits limits)
throws java.io.IOException
limits - containing query history.ps - output destination (may be null).
java.io.IOException
public void outputStream(java.io.InputStream stream,
java.io.Writer writer)
throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
args - the command line arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||