|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.dataconversion.DataConverter
org.intermine.dataconversion.DBConverter
org.intermine.bio.dataconversion.BioDBConverter
org.intermine.bio.dataconversion.ChadoDBConverter
public class ChadoDBConverter
DataConverter to read from a Chado database into items
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
LOG
|
| Constructor Summary | |
|---|---|
ChadoDBConverter(Database database,
Model tgtModel,
ItemWriter writer)
Create a new ChadoDBConverter object. |
|
| Method Summary | |
|---|---|
ChadoProcessor |
findProcessor(java.lang.Class<? extends ChadoProcessor> cls)
Look at the list of completed processors and return the processor of the given type. |
java.util.Map<java.lang.Integer,OrganismData> |
getChadoIdToOrgDataMap()
Return a map from chado organism_id to OrganismData object for all the organisms that we are processing |
protected java.util.Map<OrganismData,java.lang.Integer> |
getChadoOrganismIds(java.sql.Connection conn)
Return a map from chado organism id to OrganismData for the organisms in the organism table in chado. |
java.util.List<ChadoProcessor> |
getCompletedProcessors()
|
protected java.sql.Connection |
getConnection()
Get the connection to use when processing. |
java.lang.String |
getDataSetTitle(int taxonId)
Default implementation that makes a data set title based on the data source name. |
java.util.Set<OrganismData> |
getOrganismsToProcess()
Return the OrganismData objects for the organisms listed in the source configuration. |
void |
process()
Process the data from the Database and write to the ItemWriter. |
void |
setOrganisms(java.lang.String organisms)
Set the taxon ids to use when creating the Organism Item for the new features. |
void |
setProcessors(java.lang.String processors)
Set the class names of the ChadoProcessors to run. |
| Methods inherited from class org.intermine.bio.dataconversion.BioDBConverter |
|---|
createSynonym, getChromosome, getDataSetItem, getDataSetItem, getDataSetItem, getDataSourceItem, getDataSourceItem, getDataSourceName, getOrganismItem, getSequenceOntologyRefId, makeLocation, setDataSourceName |
| Methods inherited from class org.intermine.dataconversion.DBConverter |
|---|
getDatabase |
| Methods inherited from class org.intermine.dataconversion.DataConverter |
|---|
addUniqueItemId, alias, createItem, getItemWriter, getModel, getUniqueItemId, newId, setStoreHook, store, store, store, store, store |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger LOG
| Constructor Detail |
|---|
public ChadoDBConverter(Database database,
Model tgtModel,
ItemWriter writer)
throws java.sql.SQLException
database - the database to read fromtgtModel - the Model used by the object store we will write to with the ItemWriterwriter - an ItemWriter used to handle the resultant Items
java.sql.SQLException - if we fail to get a database connection| Method Detail |
|---|
public void setOrganisms(java.lang.String organisms)
organisms - a space separated list of the organism abbreviations or taxon ids to look
up in the organism table eg. "Dmel Dpse"public void setProcessors(java.lang.String processors)
processors - a space separated list of the fully-qualified class names of module
processors to runpublic java.util.Map<java.lang.Integer,OrganismData> getChadoIdToOrgDataMap()
protected java.sql.Connection getConnection()
public void process()
throws java.lang.Exception
process in class DBConverterjava.lang.Exception - if there is a problem while processing
protected java.util.Map<OrganismData,java.lang.Integer> getChadoOrganismIds(java.sql.Connection conn)
throws java.sql.SQLException
conn - the db connectionorganismsToProcess2 -
java.sql.SQLException - if the is a database problempublic java.util.Set<OrganismData> getOrganismsToProcess()
public ChadoProcessor findProcessor(java.lang.Class<? extends ChadoProcessor> cls)
cls - the class
public java.lang.String getDataSetTitle(int taxonId)
getDataSetTitle in class BioDBConvertertaxonId - the taxon id
public java.util.List<ChadoProcessor> getCompletedProcessors()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||