Package org.intermine.dataconversion
Class FileConverter
- java.lang.Object
-
- org.intermine.dataconversion.DataConverter
-
- org.intermine.dataconversion.FileConverter
-
public abstract class FileConverter extends DataConverter
Parent class for DataConverters that read from files- Author:
- Mark Woodbridge
-
-
Constructor Summary
Constructors Constructor Description FileConverter(ItemWriter writer, Model model)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.io.File
getCurrentFile()
Return the File that is currently being converted.abstract void
process(java.io.Reader reader)
Perform the currentFile conversionvoid
setCurrentFile(java.io.File currentFile)
Set the current File that is being processed.-
Methods inherited from class org.intermine.dataconversion.DataConverter
addUniqueItemId, alias, close, createItem, getItemWriter, getModel, getUniqueItemId, newId, setStoreHook, store, store, store, store, store
-
-
-
-
Constructor Detail
-
FileConverter
public FileConverter(ItemWriter writer, Model model)
Constructor- Parameters:
writer
- the Writer used to output the resultant itemsmodel
- the data model
-
-
Method Detail
-
process
public abstract void process(java.io.Reader reader) throws java.lang.Exception
Perform the currentFile conversion- Parameters:
reader
- BufferedReader used as input- Throws:
java.lang.Exception
- if an error occurs during processing
-
setCurrentFile
public void setCurrentFile(java.io.File currentFile)
Set the current File that is being processed. Called by FileConverterTask.execute().- Parameters:
currentFile
- the current File that is being processed
-
getCurrentFile
public java.io.File getCurrentFile()
Return the File that is currently being converted.- Returns:
- the current File
-
-