Package org.intermine.bio.dataconversion
Class EntrezOrganismRetriever
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- org.intermine.bio.dataconversion.EntrezOrganismRetriever
-
public class EntrezOrganismRetriever extends org.apache.tools.ant.TaskClass to fill in organism information using Entrez.
-
-
Field Summary
Fields Modifier and Type Field Description protected static intBATCH_SIZEprotected static java.lang.StringESUMMARY_URLprotected static org.apache.log4j.LoggerLOG
-
Constructor Summary
Constructors Constructor Description EntrezOrganismRetriever()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()For each Organism in the objectstore, retreive it's details from entrez using the taxon and fill in the details in the organism object.protected java.util.Map<java.lang.String,Organism>getOrganisms(org.intermine.objectstore.ObjectStore os)Retrieve the organisms to be updatedprotected static java.io.ReadergetReader(java.lang.Integer id)protected java.io.ReadergetReader(java.util.Set<java.lang.String> ids)Obtain the pubmed esummary information for the organismsvoidsetOsAlias(java.lang.String osAlias)Set the ObjectStore alias.voidsetOutputFile(java.lang.String outputFile)Set the output file name-
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
-
-
-
Field Detail
-
LOG
protected static final org.apache.log4j.Logger LOG
-
ESUMMARY_URL
protected static final java.lang.String ESUMMARY_URL
- See Also:
- Constant Field Values
-
BATCH_SIZE
protected static final int BATCH_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setOsAlias
public void setOsAlias(java.lang.String osAlias)
Set the ObjectStore alias.- Parameters:
osAlias- The ObjectStore alias
-
setOutputFile
public void setOutputFile(java.lang.String outputFile)
Set the output file name- Parameters:
outputFile- The output file name
-
execute
public void execute()
For each Organism in the objectstore, retreive it's details from entrez using the taxon and fill in the details in the organism object.- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException- if an error occurs
-
getOrganisms
protected java.util.Map<java.lang.String,Organism> getOrganisms(org.intermine.objectstore.ObjectStore os)
Retrieve the organisms to be updated- Parameters:
os- the ObjectStore to read from- Returns:
- a Map from taxonid to Organism object
-
getReader
protected java.io.Reader getReader(java.util.Set<java.lang.String> ids) throws java.lang.ExceptionObtain the pubmed esummary information for the organisms- Parameters:
ids- the taxon ids of the organisms- Returns:
- a Reader for the information
- Throws:
java.lang.Exception- if an error occurs
-
getReader
protected static java.io.Reader getReader(java.lang.Integer id) throws java.lang.Exception- Parameters:
id- organism id- Returns:
- reader
- Throws:
java.lang.Exception- if something goes wrong
-
-