# ImportConfigurationCSV (ARX GUI Documentation)

org.deidentifier.arx.io

## Class ImportConfigurationCSV

- java.lang.Object
- - org.deidentifier.arx.io.ImportConfiguration
  - - org.deidentifier.arx.io.ImportConfigurationFile
    - - org.deidentifier.arx.io.ImportConfigurationCSV

-     public class ImportConfigurationCSV
      extends ImportConfigurationFile

  Configuration describing a CSV file.

- - ### Field Summary

    - ### Fields inherited from class org.deidentifier.arx.io.ImportConfiguration

      `columns`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ImportConfigurationCSV(java.lang.String fileLocation, java.nio.charset.Charset charset, boolean containsHeader)` Creates a new instance of this object.
    `ImportConfigurationCSV(java.lang.String fileLocation, java.nio.charset.Charset charset, char delimiter, boolean containsHeader)` Creates a new instance of this object.
    `ImportConfigurationCSV(java.lang.String fileLocation, java.nio.charset.Charset charset, char delimiter, char quote, boolean containsHeader)` Creates a new instance of this object.
    `ImportConfigurationCSV(java.lang.String fileLocation, java.nio.charset.Charset charset, char delimiter, char quote, char escape, boolean containsHeader)` Creates a new instance of this object.
    `ImportConfigurationCSV(java.lang.String fileLocation, java.nio.charset.Charset charset, char delimiter, char quote, char escape, char[] linebreak, boolean containsHeader)` Creates a new instance of this object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addColumn(ImportColumn column)` Adds a single column to import from This makes sure that only `ImportColumnCSV` can be added, otherwise an `IllegalArgumentException` will be thrown.
    `java.nio.charset.Charset` | `getCharset()` Returns the charset of the CSV file.
    `boolean` | `getContainsHeader()` Gets the contains header.
    `char` | `getDelimiter()` Gets the delimiter.
    `char` | `getEscape()` Gets the escape.
    `char[]` | `getLinebreak()` Gets the linebreak.
    `char` | `getQuote()` Gets the quote.
    `void` | `prepare(java.lang.String[] row)` Sets the indexes based on the header.
    `void` | `setContainsHeader(boolean containsHeader)` Sets the contains header.

    - ### Methods inherited from class org.deidentifier.arx.io.ImportConfigurationFile

      `getFileLocation, setFileLocation`

    - ### Methods inherited from class org.deidentifier.arx.io.ImportConfiguration

      `getColumns`

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

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

- - ### Constructor Detail

    - #### ImportConfigurationCSV

          public ImportConfigurationCSV(java.lang.String fileLocation,
                                java.nio.charset.Charset charset,
                                boolean containsHeader)

      Creates a new instance of this object.
      Parameters:
        `fileLocation` - `ImportConfigurationFile.setFileLocation(String)`
        `containsHeader` - `containsHeader`

    - #### ImportConfigurationCSV

          public ImportConfigurationCSV(java.lang.String fileLocation,
                                java.nio.charset.Charset charset,
                                char delimiter,
                                boolean containsHeader)

      Creates a new instance of this object.
      Parameters:
        `fileLocation` - `ImportConfigurationFile.setFileLocation(String)`
        `charset` - `charset`
        `delimiter` - `#separator`
        `containsHeader` - `containsHeader`

    - #### ImportConfigurationCSV

          public ImportConfigurationCSV(java.lang.String fileLocation,
                                java.nio.charset.Charset charset,
                                char delimiter,
                                char quote,
                                boolean containsHeader)

      Creates a new instance of this object.
      Parameters:
        `fileLocation` - `ImportConfigurationFile.setFileLocation(String)`
        `charset` - `charset`
        `delimiter` - `delimiter`
        `quote` - `quote`
        `containsHeader` - `containsHeader`

    - #### ImportConfigurationCSV

          public ImportConfigurationCSV(java.lang.String fileLocation,
                                java.nio.charset.Charset charset,
                                char delimiter,
                                char quote,
                                char escape,
                                boolean containsHeader)

      Creates a new instance of this object.
      Parameters:
        `fileLocation` - `ImportConfigurationFile.setFileLocation(String)`
        `charset` - `charset`
        `delimiter` - `delimiter`
        `quote` - `quote`
        `escape` - `escape`
        `containsHeader` - `containsHeader`

    - #### ImportConfigurationCSV

          public ImportConfigurationCSV(java.lang.String fileLocation,
                                java.nio.charset.Charset charset,
                                char delimiter,
                                char quote,
                                char escape,
                                char[] linebreak,
                                boolean containsHeader)

      Creates a new instance of this object.
      Parameters:
        `fileLocation` - the file location
        `charset` - the charset
        `delimiter` - the delimiter
        `quote` - the quote
        `escape` - the escape
        `linebreak` - the linebreak
        `containsHeader` - the contains header

  - ### Method Detail

    - #### addColumn

          public void addColumn(ImportColumn column)

      Adds a single column to import from This makes sure that only `ImportColumnCSV` can be added, otherwise an `IllegalArgumentException` will be thrown.
      Specified by:
        `addColumn` in class `ImportConfiguration`
      Parameters:
        `column` - A single column to import from, `ImportColumnCSV`

    - #### getCharset

          public java.nio.charset.Charset getCharset()

      Returns the charset of the CSV file.
      Returns:

    - #### getContainsHeader

          public boolean getContainsHeader()

      Gets the contains header.
      Returns:
        `containsHeader`

    - #### getDelimiter

          public char getDelimiter()

      Gets the delimiter.
      Returns:
        `delimiter`

    - #### getEscape

          public char getEscape()

      Gets the escape.
      Returns:
        `quote`

    - #### getLinebreak

          public char[] getLinebreak()

      Gets the linebreak.
      Returns:
        `linebreak`

    - #### getQuote

          public char getQuote()

      Gets the quote.
      Returns:
        `quote`

    - #### prepare

          public void prepare(java.lang.String[] row)

      Sets the indexes based on the header.
      Parameters:
        `row` - the row

    - #### setContainsHeader

          public void setContainsHeader(boolean containsHeader)

      Sets the contains header.
      Parameters:
        `containsHeader` - `containsHeader`