Package org.intermine.dataconversion
Class DBConverter
- java.lang.Object
-
- org.intermine.dataconversion.DataConverter
-
- org.intermine.dataconversion.DBConverter
-
public abstract class DBConverter extends DataConverter
A DataConverter that reads from a Database and writes to a ItemWriter- Author:
- Kim Rutherford
-
-
Constructor Summary
Constructors Constructor Description DBConverter(Database database, Model tgtModel, ItemWriter writer)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Database
getDatabase()
Get the Database that was passed to the constructor.abstract void
process()
Query from database and write items to the writer.-
Methods inherited from class org.intermine.dataconversion.DataConverter
addUniqueItemId, alias, close, createItem, getItemWriter, getModel, getUniqueItemId, newId, setStoreHook, store, store, store, store, store
-
-
-
-
Constructor Detail
-
DBConverter
public DBConverter(Database database, Model tgtModel, ItemWriter writer)
Constructor- Parameters:
writer
- an ItemWriter used to handle the resultant ItemstgtModel
- the Model used by the object store we will write to with the ItemWriterdatabase
- the database to read from
-
-
Method Detail
-
process
public abstract void process() throws java.lang.Exception
Query from database and write items to the writer.- Throws:
java.lang.Exception
- if there is a problem while processing
-
getDatabase
public Database getDatabase()
Get the Database that was passed to the constructor.- Returns:
- the Database
-
-