Package mgui.io.domestic.datasources
Class ImportDataTableLoader
java.lang.Object
mgui.io.FileLoader
mgui.io.domestic.datasources.ImportDataTableLoader
- All Implemented Interfaces:
InterfaceIO
,IconObject
- Direct Known Subclasses:
ImportDataTableTextLoader
public abstract class ImportDataTableLoader extends FileLoader
Imports data from an external format into a new
DataSource
table.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description protected DataSource
data_source
Fields inherited from class mgui.io.FileLoader
dataFile, dataURL, options
-
Constructor Summary
Constructors Constructor Description ImportDataTableLoader()
-
Method Summary
Modifier and Type Method Description abstract boolean
loadDataTable(java.lang.String name, java.util.ArrayList<DataField> fields, java.util.ArrayList<java.lang.Boolean> include, ProgressUpdater progress_bar)
Loads data from the current data file into a new data table, which will be created indata_source
.void
setDataSource(DataSource source)
Sets the current DataSource for this loader.Methods inherited from class mgui.io.FileLoader
getComplementIOType, getFailureMessage, getFile, getIOType, getObjectIcon, getOptions, getProgressMessage, getSuccessMessage, getSupportedObjects, getTitle, getWriterComplement, load, load, load, loadObject, loadObject, loadObject, loadObject, setFile, setOptions, setURL, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
data_source
-
-
Constructor Details
-
ImportDataTableLoader
public ImportDataTableLoader()
-
-
Method Details
-
setDataSource
Sets the current DataSource for this loader.- Parameters:
source
-
-
loadDataTable
public abstract boolean loadDataTable(java.lang.String name, java.util.ArrayList<DataField> fields, java.util.ArrayList<java.lang.Boolean> include, ProgressUpdater progress_bar) throws java.io.IOExceptionLoads data from the current data file into a new data table, which will be created indata_source
. Input file and data source must already have been set.- Parameters:
data_source
- Data source to contain the new data tablefields
- Fields defining the import of data and the new tableinclude
- Specifies which fields to include in the new tableprogress_bar
- Optional progress updater- Returns:
- Success of the import
- Throws:
java.io.IOException
-