# ImportAdapter (ARX API Documentation)

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`.

- - ### Method Summary

    Methods
    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`.
    `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.

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

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

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

      `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:

    - #### getProgress

          public abstract int getProgress()

      Returns the percentage of data has has already been imported.
      Returns:
        Percentage of data already imported, 0 - 100