org.deidentifier.arx

## Class Data

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

Direct Known Subclasses:
  Data.DefaultData

    public abstract class Data
    extends java.lang.Object

Represents input data for the ARX framework.

Author:
  Fabian Prasser, Florian Kohlmayer

### Nested Class Summary

Nested Classes
`static class` `Data.DefaultData` The default implementation of a data object.

### Constructor Summary

Constructors
Constructor and Description
`Data()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static Data.DefaultData` `create()` Creates a new default data object.
`static Data` `create(DataSource source)` Creates a new data object from the given data source specification.
`static Data` `create(java.io.File file, java.nio.charset.Charset charset)` Creates a new data object from a CSV file.
`static Data` `create(java.io.File file, java.nio.charset.Charset charset, char delimiter)` Creates a new data object from a CSV file.
`static Data` `create(java.io.File file, java.nio.charset.Charset charset, char delimiter, char quote)` Creates a new data object from a CSV file.
`static Data` `create(java.io.File file, java.nio.charset.Charset charset, char delimiter, char quote, char escape)` Creates a new data object from a CSV file.
`static Data` `create(java.io.File file, java.nio.charset.Charset charset, char delimiter, char quote, char escape, char[] linebreak)` Creates a new data object from a CSV file.
`static Data` `create(java.io.File file, java.nio.charset.Charset charset, CSVSyntax config)` Creates a new data object from a CSV file.
`static Data` `create(java.io.File file, java.nio.charset.Charset charset, CSVSyntax config, CSVOptions options)` Creates a new data object from a CSV file.
`static Data` `create(java.io.File file, java.nio.charset.Charset charset, CSVSyntax config, DataType<?>[] datatypes)` Creates a new data object from a CSV file.
`static Data` `create(java.io.InputStream stream, java.nio.charset.Charset charset)` Creates a new data object from a CSV file.
`static Data` `create(java.io.InputStream stream, java.nio.charset.Charset charset, char delimiter)` Creates a new data object from a CSV file.
`static Data` `create(java.io.InputStream stream, java.nio.charset.Charset charset, char delimiter, char quote)` Creates a new data object from a CSV file.
`static Data` `create(java.io.InputStream stream, java.nio.charset.Charset charset, char delimiter, char quote, char escape)` Creates a new data object from a CSV file.
`static Data` `create(java.io.InputStream stream, java.nio.charset.Charset charset, char delimiter, char quote, char escape, char[] linebreak)` Creates a new data object from a CSV file.
`static Data` `create(java.io.InputStream stream, java.nio.charset.Charset charset, char delimiter, int length)` Creates a new data object from a CSV file.
`static Data` `create(java.io.InputStream stream, java.nio.charset.Charset charset, CSVSyntax config)` Creates a new data object from a CSV file.
`static Data` `create(java.io.InputStream stream, java.nio.charset.Charset charset, CSVSyntax config, DataType<?>[] datatypes)` Creates a new data object from a CSV file.
`static Data` `create(java.util.Iterator<java.lang.String[]> iterator)` Creates a new data object from an iterator over tuples.
`static Data` `create(java.util.Iterator<java.lang.String[]> iterator, java.lang.Integer length)` Creates a new data object from an iterator over tuples.
`static Data` `create(java.util.List<java.lang.String[]> list)` Creates a new data object from a list.
`static Data` `create(java.lang.String[][] array)` Creates a new data object from a two-dimensional string array.
`static Data` `create(java.lang.String path, java.nio.charset.Charset charset)` Creates a new data object from a CSV file.
`static Data` `create(java.lang.String path, java.nio.charset.Charset charset, char delimiter)` Creates a new data object from a CSV file.
`static Data` `create(java.lang.String path, java.nio.charset.Charset charset, char delimiter, char quote)` Creates a new data object from a CSV file.
`static Data` `create(java.lang.String path, java.nio.charset.Charset charset, char delimiter, char quote, char escape)` Creates a new data object from a CSV file.
`static Data` `create(java.lang.String path, java.nio.charset.Charset charset, char delimiter, char quote, char escape, char[] linebreak)` Creates a new data object from a CSV file.
`static Data` `create(java.lang.String path, java.nio.charset.Charset charset, CSVSyntax config, CSVOptions options)` Creates a new data object from a CSV file.
`static Data` `create(java.lang.String path, java.nio.charset.Charset charset, CSVSyntax config, DataType<?>[] datatypes)` Creates a new data object from a CSV file.
`DataDefinition` `getDefinition()` Returns the data definition.
`DataHandle` `getHandle()` Returns a data handle.

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

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

### Constructor Detail

#### Data

    public Data()

### Method Detail

#### create

    public static Data.DefaultData create()

Creates a new default data object.

Returns:
  A Data object

#### create

    public static Data create(DataSource source)
                       throws java.io.IOException

Creates a new data object from the given data source specification.

Parameters:
  `source` - The source that should be used to import data
Returns:
  Data object as described by the data source
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.File file,
                              java.nio.charset.Charset charset)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `file` - the file
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.File file,
                              java.nio.charset.Charset charset,
                              char delimiter)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `file` - A file
  `delimiter` - The utilized separator character
Returns:
  A Data object
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.File file,
                              java.nio.charset.Charset charset,
                              char delimiter,
                              char quote)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `file` - A file
  `delimiter` - The utilized separator character
  `quote` - The delimiter for strings
Returns:
  A Data object
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.File file,
                              java.nio.charset.Charset charset,
                              char delimiter,
                              char quote,
                              char escape)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `file` - the file
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.File file,
                              java.nio.charset.Charset charset,
                              char delimiter,
                              char quote,
                              char escape,
                              char[] linebreak)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `file` - the file
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
  `linebreak` - the linebreak
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.File file,
                              java.nio.charset.Charset charset,
                              CSVSyntax config)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `file` - the file
  `config` - the config
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.File file,
                              java.nio.charset.Charset charset,
                              CSVSyntax config,
                              CSVOptions options)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `file` - the file
  `config` - the config
  `options` - the options
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.File file,
                              java.nio.charset.Charset charset,
                              CSVSyntax config,
                              DataType<?>[] datatypes)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `file` - the file
  `config` - the config
  `datatypes` - the datatypes
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.InputStream stream,
                              java.nio.charset.Charset charset)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `stream` - the stream
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.InputStream stream,
                              java.nio.charset.Charset charset,
                              char delimiter)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `stream` - An input stream
  `delimiter` - The utilized separator character
Returns:
  A Data object
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.InputStream stream,
                              java.nio.charset.Charset charset,
                              char delimiter,
                              int length)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `stream` - An input stream
  `delimiter` - The utilized separator character
  `length` - For improved memory requirements
Returns:
  A Data object
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.InputStream stream,
                              java.nio.charset.Charset charset,
                              char delimiter,
                              char quote)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `stream` - An input stream
  `delimiter` - The utilized separator character
  `quote` - The delimiter for strings
Returns:
  A Data object
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.InputStream stream,
                              java.nio.charset.Charset charset,
                              char delimiter,
                              char quote,
                              char escape)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `stream` - the stream
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.InputStream stream,
                              java.nio.charset.Charset charset,
                              char delimiter,
                              char quote,
                              char escape,
                              char[] linebreak)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `stream` - the stream
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
  `linebreak` - the linebreak
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.InputStream stream,
                              java.nio.charset.Charset charset,
                              CSVSyntax config)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `stream` - the stream
  `config` - the config
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.io.InputStream stream,
                              java.nio.charset.Charset charset,
                              CSVSyntax config,
                              DataType<?>[] datatypes)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `stream` - the stream
  `config` - the config
  `datatypes` - the datatypes
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.util.Iterator<java.lang.String[]> iterator)

Creates a new data object from an iterator over tuples.

Parameters:
  `iterator` - An iterator
Returns:
  A Data object

#### create

    public static Data create(java.util.Iterator<java.lang.String[]> iterator,
                              java.lang.Integer length)

Creates a new data object from an iterator over tuples.

Parameters:
  `iterator` - An iterator
  `length` - number of records to load
Returns:
  A data object

#### create

    public static Data create(java.util.List<java.lang.String[]> list)

Creates a new data object from a list.

Parameters:
  `list` - The list
Returns:
  A Data object

#### create

    public static Data create(java.lang.String path,
                              java.nio.charset.Charset charset)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `path` - the path
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.lang.String path,
                              java.nio.charset.Charset charset,
                              char delimiter)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `path` - A path to the file
  `delimiter` - The utilized separator character
Returns:
  A Data object
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.lang.String path,
                              java.nio.charset.Charset charset,
                              char delimiter,
                              char quote)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `path` - A path to the file
  `delimiter` - The utilized separator character
  `quote` - The delimiter for strings
Returns:
  A Data object
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.lang.String path,
                              java.nio.charset.Charset charset,
                              char delimiter,
                              char quote,
                              char escape)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `path` - the path
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.lang.String path,
                              java.nio.charset.Charset charset,
                              char delimiter,
                              char quote,
                              char escape,
                              char[] linebreak)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `path` - the path
  `delimiter` - the delimiter
  `quote` - the quote
  `escape` - the escape
  `linebreak` - the linebreak
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.lang.String path,
                              java.nio.charset.Charset charset,
                              CSVSyntax config,
                              CSVOptions options)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `path` - the path
  `config` - the config
  `options` - the options
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.lang.String path,
                              java.nio.charset.Charset charset,
                              CSVSyntax config,
                              DataType<?>[] datatypes)
                       throws java.io.IOException

Creates a new data object from a CSV file. Assumes that the file contains a header.

Parameters:
  `path` - the path
  `config` - the config
  `datatypes` - the datatypes
Returns:
  the data
Throws:
  `java.io.IOException` - Signals that an I/O exception has occurred.

#### create

    public static Data create(java.lang.String[][] array)

Creates a new data object from a two-dimensional string array.

Parameters:
  `array` - The array
Returns:
  A Data object

#### getDefinition

    public DataDefinition getDefinition()

Returns the data definition.

Returns:
  the definition

#### getHandle

    public DataHandle getHandle()

Returns a data handle.

Returns:
  the handle