public abstract class ImportAdapter
extends java.lang.Object
implements java.util.Iterator<java.lang.String[]>
ImportConfiguration
.Modifier and Type | Field and Description |
---|---|
protected DataType<?>[] |
dataTypes
Array of datatypes describing the columns.
|
protected java.lang.String[] |
header
The header.
|
protected int[] |
indexes
Indexes of columns that should be imported
This keeps track of columns that should be imported, as not all columns
will necessarily be imported.
|
Modifier | Constructor and Description |
---|---|
protected |
ImportAdapter(ImportConfiguration config)
Creates a new instance of this object with given configuration.
|
Modifier and Type | Method and Description |
---|---|
static ImportAdapter |
create(ImportConfiguration config)
Factory method
This will return an appropriate ImportAdapter for each implemented data
source
ImportAdapter . |
protected DataType<?>[] |
getColumnDatatypes()
Returns an array with datatypes of columns that should be imported.
|
ImportConfiguration |
getConfig()
Returns the configuration used by the import adapter.
|
java.lang.String[] |
getHeader()
Returns the header.
|
abstract int |
getProgress()
Returns the percentage of data has has already been imported.
|
protected java.lang.String[] header
protected DataType<?>[] dataTypes
protected int[] indexes
protected ImportAdapter(ImportConfiguration config)
config
- config
public static ImportAdapter create(ImportConfiguration config) throws java.io.IOException
ImportAdapter
. Refer to the specific ImportAdapter itself
for details.config
- config
java.io.IOException
public ImportConfiguration getConfig()
config
public java.lang.String[] getHeader()
public abstract int getProgress()
protected DataType<?>[] getColumnDatatypes()