org.deidentifier.arx.io

## Class ImportAdapter

- java.lang.Object
- - org.deidentifier.arx.io.ImportAdapter

All Implemented Interfaces:
  java.util.Iterator<java.lang.String[]>

Direct Known Subclasses:
  ImportAdapterCSV, ImportAdapterExcel, ImportAdapterJDBC

    public abstract class ImportAdapter
    extends java.lang.Object
    implements java.util.Iterator<java.lang.String[]>

Base adapter for all data sources This defines properties and methods that all data source import adapters have in common. Data sources itself are described by `ImportConfiguration`.

Author:
  Karol Babioch, Fabian Prasser

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
`static ImportAdapter` `create(ImportConfiguration config)` Factory method This will return an appropriate ImportAdapter for each implemented data source `ImportAdapter`.
`ImportConfiguration` `getConfig()` Returns the configuration used by the import adapter.
`java.lang.String[]` `getHeader()` Returns the header.
`java.lang.Integer` `getLength()` Returns the number of records, if available, null otherwise
`abstract int` `getProgress()` Returns the percentage of data has has already been imported.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Iterator

`forEachRemaining, hasNext, next, remove`

### Method Detail

#### create

    public static ImportAdapter create(ImportConfiguration config)
                                throws java.io.IOException

Factory method This will return an appropriate ImportAdapter for each implemented data source `ImportAdapter`. Refer to the specific ImportAdapter itself for details.

Parameters:
  `config` - `config`
Returns:
  Specific ImportAdapter for given configuration
Throws:
  `java.io.IOException`

#### getConfig

    public ImportConfiguration getConfig()

Returns the configuration used by the import adapter.

Returns:
  `config`

#### getHeader

    public java.lang.String[] getHeader()

Returns the header.

Returns:

#### getLength

    public java.lang.Integer getLength()

Returns the number of records, if available, null otherwise

Returns:

#### getProgress

    public abstract int getProgress()

Returns the percentage of data has has already been imported.

Returns:
  Percentage of data already imported, 0 - 100