Klasse ImportAdapter

java.lang.Object
org.deidentifier.arx.io.ImportAdapter
Alle implementierten Schnittstellen:
Iterator<String[]>
Bekannte direkte Unterklassen:
ImportAdapterCSV, ImportAdapterExcel, ImportAdapterJDBC

public abstract class ImportAdapter extends Object implements Iterator<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.
  • Felddetails

    • dataTypes

      protected DataType<?>[] dataTypes
      Array of datatypes describing the columns.
    • indexes

      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.
  • Konstruktordetails

    • ImportAdapter

      protected ImportAdapter(ImportConfiguration config)
      Creates a new instance of this object with given configuration.
      Parameter:
      config - config
  • Methodendetails

    • create

      public static ImportAdapter create(ImportConfiguration config) throws IOException
      Factory method This will return an appropriate ImportAdapter for each implemented data source ImportAdapter. Refer to the specific ImportAdapter itself for details.
      Parameter:
      config - config
      Gibt zurück:
      Specific ImportAdapter for given configuration
      Löst aus:
      IOException
    • getConfig

      public ImportConfiguration getConfig()
      Returns the configuration used by the import adapter.
      Gibt zurück:
      config
    • getHeader

      public String[] getHeader()
      Returns the header.
      Gibt zurück:
    • getLength

      public Integer getLength()
      Returns the number of records, if available, null otherwise
      Gibt zurück:
    • getProgress

      public abstract int getProgress()
      Returns the percentage of data has has already been imported.
      Gibt zurück:
      Percentage of data already imported, 0 - 100
    • getColumnDatatypes

      protected DataType<?>[] getColumnDatatypes()
      Returns an array with datatypes of columns that should be imported.
      Gibt zurück:
      Array containing datatypes of columns that should be imported