org.deidentifier.arx

## Class DataHandleOutput

- java.lang.Object
- - org.deidentifier.arx.DataHandle
  - - org.deidentifier.arx.DataHandleOutput

    public class DataHandleOutput
    extends DataHandle

An implementation of the class DataHandle for output data.

Author:
  Fabian Prasser, Florian Kohlmayer

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `getAttributeName(int col)` Returns the name of the specified column.
`DataType<?>` `getDataType(java.lang.String attribute)` Returns the according data type.
`int` `getGeneralization(java.lang.String attribute)` Returns the generalization level for the attribute.
`int` `getNumColumns()` Returns the number of columns in the dataset.
`int` `getNumRows()` Returns the number of rows in the dataset.
`StatisticsBuilder` `getStatistics()` Returns an object providing access to basic descriptive statistics about the data represented by this handle.
`java.lang.String` `getValue(int row, int col)` Returns the value in the specified cell.
`boolean` `isOptimized()` Has this handle been optimized with local recoding?
`java.util.Iterator<java.lang.String[]>` `iterator()` Iterator.
`boolean` `replace(int column, java.lang.String original, java.lang.String replacement)` Replaces the original value with the replacement in the given column.
`void` `write(java.io.OutputStream out)` Internal method: writes some data into the output stream

### Methods inherited from class org.deidentifier.arx.DataHandle

`getColumnIndexOf, getDate, getDefinition, getDistinctValues, getDouble, getFloat, getInt, getLong, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getNonConformingValues, getNumConformingValues, getRiskEstimator, getRiskEstimator, getRiskEstimator, getRiskEstimator, getRiskEstimator, getRiskEstimator, getRiskEstimator, getTransformation, getView, isOutlier, isReleased, isSuppressed, release, render, save, save, save, save, save, save, save, save, save, sort, sort, sort, sort, swap`

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

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

### Method Detail

#### getAttributeName

    public java.lang.String getAttributeName(int col)

Description copied from class: `DataHandle`
Returns the name of the specified column.

Specified by:
  `getAttributeName` in class `DataHandle`
Parameters:
  `col` - The column index
Returns:
  the attribute name

#### getDataType

    public DataType<?> getDataType(java.lang.String attribute)

Description copied from class: `DataHandle`
Returns the according data type.

Overrides:
  `getDataType` in class `DataHandle`
Parameters:
  `attribute` - the attribute
Returns:
  the data type

#### getGeneralization

    public int getGeneralization(java.lang.String attribute)

Description copied from class: `DataHandle`
Returns the generalization level for the attribute.

Specified by:
  `getGeneralization` in class `DataHandle`
Parameters:
  `attribute` - the attribute
Returns:
  the generalization

#### getNumColumns

    public int getNumColumns()

Description copied from class: `DataHandle`
Returns the number of columns in the dataset.

Specified by:
  `getNumColumns` in class `DataHandle`
Returns:
  the num columns

#### getNumRows

    public int getNumRows()

Description copied from class: `DataHandle`
Returns the number of rows in the dataset.

Specified by:
  `getNumRows` in class `DataHandle`
Returns:
  the num rows

#### getStatistics

    public StatisticsBuilder getStatistics()

Description copied from class: `DataHandle`
Returns an object providing access to basic descriptive statistics about the data represented by this handle.

Specified by:
  `getStatistics` in class `DataHandle`
Returns:
  the statistics

#### getValue

    public java.lang.String getValue(int row,
                                     int col)

Description copied from class: `DataHandle`
Returns the value in the specified cell.

Specified by:
  `getValue` in class `DataHandle`
Parameters:
  `row` - The cell's row index
  `col` - The cell's column index
Returns:
  the value

#### isOptimized

    public boolean isOptimized()

Description copied from class: `DataHandle`
Has this handle been optimized with local recoding?

Overrides:
  `isOptimized` in class `DataHandle`
Returns:

#### iterator

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

Iterator.

Specified by:
  `iterator` in class `DataHandle`
Returns:
  the iterator

#### replace

    public boolean replace(int column,
                           java.lang.String original,
                           java.lang.String replacement)

Description copied from class: `DataHandle`
Replaces the original value with the replacement in the given column. Only supported by handles for input data.

Overrides:
  `replace` in class `DataHandle`
Parameters:
  `column` - the column
  `original` - the original
  `replacement` - the replacement
Returns:
  Whether the original value was found

#### write

    public void write(java.io.OutputStream out)
               throws java.io.IOException

Internal method: writes some data into the output stream

Parameters:
  `out` -
Throws:
  `java.io.IOException`