public class DataHandleOutput extends DataHandle
Modifier and Type | Class and Description |
---|---|
class |
DataHandleOutput.ResultIterator
The class ResultIterator.
|
dataTypes, definition, header, node, registry, statistics, subset
Modifier | Constructor and Description |
---|---|
protected |
DataHandleOutput(ARXResult result,
org.deidentifier.arx.DataRegistry registry,
org.deidentifier.arx.framework.data.DataManager manager,
org.deidentifier.arx.framework.data.Data outputGeneralized,
org.deidentifier.arx.framework.data.Data outputMicroaggregated,
ARXLattice.ARXNode node,
DataDefinition definition,
ARXConfiguration config)
Instantiates a new handle.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doRelease()
Releases all resources.
|
java.lang.String |
getAttributeName(int col)
Gets the attribute name.
|
protected ARXConfiguration |
getConfiguration()
Returns the ARXConfiguration that is currently being used, null if this is an input handle
|
DataType<?> |
getDataType(java.lang.String attribute)
Returns the according data type.
|
protected DataType<?>[][] |
getDataTypeArray()
Creates the data type array.
|
protected java.lang.String[] |
getDistinctValues(int col,
boolean ignoreSuppression,
DataHandleInternal.InterruptHandler handler)
Gets the distinct values.
|
int |
getGeneralization(java.lang.String attribute)
Returns the generalization level for the attribute.
|
protected int[][] |
getInputBuffer()
Returns the input buffer
|
int |
getNumColumns()
Gets the num columns.
|
int |
getNumRows()
Gets the num rows.
|
protected org.deidentifier.arx.framework.data.Data |
getOutputBufferGeneralized()
Returns the output buffer
|
protected org.deidentifier.arx.framework.data.Data |
getOutputBufferMicroaggregated()
Returns the output buffer
|
java.lang.String |
getValue(int row,
int col)
Gets the value.
|
protected int |
internalCompare(int row1,
int row2,
int[] columns,
boolean ascending)
A negative integer, zero, or a positive integer as the first argument is
less than, equal to, or greater than the second.
|
protected java.lang.String |
internalGetValue(int row,
int col,
boolean ignoreSuppression)
Gets the value internal.
|
protected boolean |
internalIsOutlier(int row)
Returns whether the given row is an outlier.
|
protected boolean |
internalReplace(int column,
java.lang.String original,
java.lang.String replacement)
Internal replacement method.
|
protected void |
internalSwap(int row1,
int row2)
Swap internal.
|
protected boolean |
isAnonymous()
Returns whether the data represented by this handle is anonymous
|
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.
|
protected void |
setOptimized(boolean optimized)
Marks this handle as optimized
|
void |
updateData(DataHandle data,
java.util.Map<java.lang.String,DataType<?>> types,
int[] outliers)
Used to update data when loading projects after local recoding.
|
protected void |
updateDataTypes(int[] transformation)
Used to update data types after local recoding
|
checkColumn, checkColumns, checkRegistry, checkRow, getBaseDataType, getColumnIndexOf, getDate, getDefinition, getDistinctValues, getDouble, getFloat, getInt, getLong, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getNonConformingValues, getNumConformingValues, getRegistry, getRiskEstimator, getRiskEstimator, getRiskEstimator, getRiskEstimator, getRiskEstimator, getRiskEstimator, getStatistics, getTransformation, getView, isOrphaned, isOutlier, release, save, save, save, save, save, save, save, save, save, setRegistry, setView, sort, sort, sort, sort, swap
protected DataHandleOutput(ARXResult result, org.deidentifier.arx.DataRegistry registry, org.deidentifier.arx.framework.data.DataManager manager, org.deidentifier.arx.framework.data.Data outputGeneralized, org.deidentifier.arx.framework.data.Data outputMicroaggregated, ARXLattice.ARXNode node, DataDefinition definition, ARXConfiguration config)
result
- registry
- manager
- outputGeneralized
- outputMicroaggregated
- node
- definition
- config
- public java.lang.String getAttributeName(int col)
getAttributeName
in class DataHandle
col
- the colpublic DataType<?> getDataType(java.lang.String attribute)
DataHandle
getDataType
in class DataHandle
attribute
- the attributepublic int getGeneralization(java.lang.String attribute)
DataHandle
getGeneralization
in class DataHandle
attribute
- the attributepublic int getNumColumns()
getNumColumns
in class DataHandle
public int getNumRows()
getNumRows
in class DataHandle
public java.lang.String getValue(int row, int col)
getValue
in class DataHandle
row
- the rowcol
- the colpublic boolean isOptimized()
DataHandle
isOptimized
in class DataHandle
public java.util.Iterator<java.lang.String[]> iterator()
iterator
in class DataHandle
public boolean replace(int column, java.lang.String original, java.lang.String replacement)
DataHandle
replace
in class DataHandle
column
- the columnoriginal
- the originalreplacement
- the replacementpublic void updateData(DataHandle data, java.util.Map<java.lang.String,DataType<?>> types, int[] outliers)
data
- types
- protected void doRelease()
doRelease
in class DataHandle
protected ARXConfiguration getConfiguration()
DataHandle
getConfiguration
in class DataHandle
protected DataType<?>[][] getDataTypeArray()
getDataTypeArray
in class DataHandle
protected java.lang.String[] getDistinctValues(int col, boolean ignoreSuppression, DataHandleInternal.InterruptHandler handler)
getDistinctValues
in class DataHandle
col
- the columnignoreSuppression
- handler
- protected int[][] getInputBuffer()
protected org.deidentifier.arx.framework.data.Data getOutputBufferGeneralized()
protected org.deidentifier.arx.framework.data.Data getOutputBufferMicroaggregated()
protected int internalCompare(int row1, int row2, int[] columns, boolean ascending)
internalCompare
in class DataHandle
row1
- the row1row2
- the row2columns
- the columnsascending
- the ascendingprotected java.lang.String internalGetValue(int row, int col, boolean ignoreSuppression)
internalGetValue
in class DataHandle
row
- the rowcol
- the colprotected boolean internalIsOutlier(int row)
row
- protected boolean internalReplace(int column, java.lang.String original, java.lang.String replacement)
DataHandle
internalReplace
in class DataHandle
column
- the columnoriginal
- the originalreplacement
- the replacementprotected void internalSwap(int row1, int row2)
row1
- the row1row2
- the row2protected boolean isAnonymous()
DataHandle
isAnonymous
in class DataHandle
protected void setOptimized(boolean optimized)
optimized
- protected void updateDataTypes(int[] transformation)
transformation
-