org.deidentifier.arx

## Class DataSource

- java.lang.Object
- - org.deidentifier.arx.DataSource

    public class DataSource
    extends java.lang.Object

This class provides configuration options for importing data from CSV-files, from Excel-files or via a JDBC connection.

Author:
  Fabian Prasser, Florian Kohlmayer

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `addColumn(int index)` Adds a new column.
`void` `addColumn(int index, DataType<?> datatype)` Adds a new column.
`void` `addColumn(int index, DataType<?> datatype, boolean cleansing)` Adds a new column.
`void` `addColumn(int index, java.lang.String alias)` Adds a new column.
`void` `addColumn(int index, java.lang.String alias, DataType<?> datatype)` Adds a new column.
`void` `addColumn(int index, java.lang.String alias, DataType<?> datatype, boolean cleansing)` Adds a new column.
`void` `addColumn(java.lang.String name)` Adds a new column.
`void` `addColumn(java.lang.String name, DataType<?> datatype)` Adds a new column.
`void` `addColumn(java.lang.String name, DataType<?> datatype, boolean cleansing)` Adds a new column.
`void` `addColumn(java.lang.String name, java.lang.String alias)` Adds a new column.
`void` `addColumn(java.lang.String name, java.lang.String alias, DataType<?> datatype)` Adds a new column.
`void` `addColumn(java.lang.String name, java.lang.String alias, DataType<?> datatype, boolean cleansing)` Adds a new column.
`static DataSource` `createCSVSource(java.io.File file, java.nio.charset.Charset charset, char separator, boolean containsHeader)` Creates a CSV data source.
`static DataSource` `createCSVSource(java.lang.String file, java.nio.charset.Charset charset, char separator, boolean containsHeader)` Creates a CSV data source.
`static DataSource` `createExcelSource(java.io.File file, int sheetIndex, boolean containsHeader)` Creates an Excel data source.
`static DataSource` `createExcelSource(java.lang.String file, int sheetIndex, boolean containsHeader)` Creates an Excel data source.
`static DataSource` `createJDBCSource(java.lang.String url, java.lang.String table)` Creates a JDBC data source.
`static DataSource` `createJDBCSource(java.lang.String url, java.lang.String user, java.lang.String password, java.lang.String table)` Creates a JDBC data source.

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

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

### Method Detail

#### createCSVSource

    public static DataSource createCSVSource(java.io.File file,
                                             java.nio.charset.Charset charset,
                                             char separator,
                                             boolean containsHeader)

Creates a CSV data source.

Parameters:
  `file` -
  `separator` -
  `containsHeader` -
Returns:

#### createCSVSource

    public static DataSource createCSVSource(java.lang.String file,
                                             java.nio.charset.Charset charset,
                                             char separator,
                                             boolean containsHeader)

Creates a CSV data source.

Parameters:
  `file` -
  `separator` -
  `containsHeader` -
Returns:

#### createExcelSource

    public static DataSource createExcelSource(java.io.File file,
                                               int sheetIndex,
                                               boolean containsHeader)

Creates an Excel data source.

Parameters:
  `file` -
  `sheetIndex` -
  `containsHeader` -
Returns:

#### createExcelSource

    public static DataSource createExcelSource(java.lang.String file,
                                               int sheetIndex,
                                               boolean containsHeader)

Creates an Excel data source.

Parameters:
  `file` -
  `sheetIndex` -
  `containsHeader` -
Returns:

#### createJDBCSource

    public static DataSource createJDBCSource(java.lang.String url,
                                              java.lang.String table)
                                       throws java.sql.SQLException

Creates a JDBC data source.

Parameters:
  `url` -
  `table` -
Returns:
Throws:
  `java.sql.SQLException`

#### createJDBCSource

    public static DataSource createJDBCSource(java.lang.String url,
                                              java.lang.String user,
                                              java.lang.String password,
                                              java.lang.String table)
                                       throws java.sql.SQLException

Creates a JDBC data source.

Parameters:
  `url` -
  `user` -
  `password` -
  `table` -
Returns:
Throws:
  `java.sql.SQLException`

#### addColumn

    public void addColumn(int index)

Adds a new column.

Parameters:
  `index` -

#### addColumn

    public void addColumn(int index,
                          DataType<?> datatype)

Adds a new column.

Parameters:
  `index` -
  `datatype` -

#### addColumn

    public void addColumn(int index,
                          DataType<?> datatype,
                          boolean cleansing)

Adds a new column.

Parameters:
  `index` -
  `datatype` -

#### addColumn

    public void addColumn(int index,
                          java.lang.String alias)

Adds a new column.

Parameters:
  `index` -
  `alias` -

#### addColumn

    public void addColumn(int index,
                          java.lang.String alias,
                          DataType<?> datatype)

Adds a new column.

Parameters:
  `index` -
  `alias` -
  `datatype` -

#### addColumn

    public void addColumn(int index,
                          java.lang.String alias,
                          DataType<?> datatype,
                          boolean cleansing)

Adds a new column.

Parameters:
  `index` -
  `alias` -
  `datatype` -
  `cleansing` -

#### addColumn

    public void addColumn(java.lang.String name)

Adds a new column.

Parameters:
  `name` -

#### addColumn

    public void addColumn(java.lang.String name,
                          DataType<?> datatype)

Adds a new column.

Parameters:
  `name` -
  `datatype` -

#### addColumn

    public void addColumn(java.lang.String name,
                          DataType<?> datatype,
                          boolean cleansing)

Adds a new column.

Parameters:
  `name` -
  `datatype` -
  `cleansing` -

#### addColumn

    public void addColumn(java.lang.String name,
                          java.lang.String alias)

Adds a new column.

Parameters:
  `name` -
  `alias` -

#### addColumn

    public void addColumn(java.lang.String name,
                          java.lang.String alias,
                          DataType<?> datatype)

Adds a new column.

Parameters:
  `name` -
  `alias` -
  `datatype` -

#### addColumn

    public void addColumn(java.lang.String name,
                          java.lang.String alias,
                          DataType<?> datatype,
                          boolean cleansing)

Adds a new column.

Parameters:
  `name` -
  `alias` -
  `datatype` -
  `cleansing` -