Klasse ImportAdapterCSV

java.lang.Object
org.deidentifier.arx.io.ImportAdapter
org.deidentifier.arx.io.ImportAdapterCSV
Alle implementierten Schnittstellen:
Iterator<String[]>

public class ImportAdapterCSV extends ImportAdapter
Import adapter for CSV files This adapter can import data from a CSV file. The CSV file itself is described by an appropriate ImportConfigurationCSV object. Internally this class makes use of CSVDataInput to read the CSV file on a line by line basis. A counting input stream (@link CountingInputStream} is used in order for Ungültige Eingabe: "to be able to return the percentage of data that has already been processed. @author Karol Babioch @author Fabian Prasser"
  • Feldübersicht

    Von Klasse geerbte Felder org.deidentifier.arx.io.ImportAdapter

    dataTypes, header, indexes
  • Konstruktorübersicht

    Konstruktoren
    Modifizierer
    Konstruktor
    Beschreibung
    protected
    Creates a new instance of this object with given configuration.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    protected int[]
    Returns an array with indexes of columns that should be imported Only columns listed within
    Ungültige Referenz
    #column
    will be imported.
    Returns the number of records, if available, null otherwise
    int
    Returns the percentage of data that has already been returned This divides the amount of bytes that have already been read by the amount of total bytes and casts the result into a percentage.
    boolean
    Indicates whether there is another element to return This returns true when the CSV file has another line, which would be assigned to row during the last iteration of next().
    Returns the next row The returned element is sorted as defined by
    Ungültige Referenz
    ImportColumn#index
    and contains as many elements as there are columns selected to import from ImportAdapter.indexes.
    void
    Dummy.

    Von Klasse geerbte Methoden org.deidentifier.arx.io.ImportAdapter

    create, getColumnDatatypes, getConfig, getHeader

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Von Schnittstelle geerbte Methoden java.util.Iterator

    forEachRemaining
  • Konstruktordetails

    • ImportAdapterCSV

      protected ImportAdapterCSV(ImportConfigurationCSV config) throws IOException
      Creates a new instance of this object with given configuration.
      Parameter:
      config - config
      Löst aus:
      IOException - In case file doesn't contain actual data
  • Methodendetails

    • getLength

      public Integer getLength()
      Beschreibung aus Klasse kopiert: ImportAdapter
      Returns the number of records, if available, null otherwise
      Setzt außer Kraft:
      getLength in Klasse ImportAdapter
      Gibt zurück:
    • getProgress

      public int getProgress()
      Returns the percentage of data that has already been returned This divides the amount of bytes that have already been read by the amount of total bytes and casts the result into a percentage.
      Angegeben von:
      getProgress in Klasse ImportAdapter
      Gibt zurück:
    • hasNext

      public boolean hasNext()
      Indicates whether there is another element to return This returns true when the CSV file has another line, which would be assigned to row during the last iteration of next().
      Gibt zurück:
    • next

      public String[] next()
      Returns the next row The returned element is sorted as defined by
      Ungültige Referenz
      ImportColumn#index
      and contains as many elements as there are columns selected to import from ImportAdapter.indexes. The first row will always contain the names of the columns. headerReturned is used to keep track of that.
      Gibt zurück:
    • remove

      public void remove()
      Dummy.
    • getIndexesToImport

      protected int[] getIndexesToImport()
      Returns an array with indexes of columns that should be imported Only columns listed within
      Ungültige Referenz
      #column
      will be imported. This iterates over the list of columns and returns an array with indexes of columns that should be imported.
      Gibt zurück:
      Array containing indexes of columns that should be imported