public class DataHandleOutput extends DataHandle
columnToDataType, definition, header, headerMap, node, registry, 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.
|
protected |
DataHandleOutput(ARXResult result,
org.deidentifier.arx.DataRegistry registry,
org.deidentifier.arx.framework.data.DataManager manager,
java.io.InputStream stream,
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)
Returns the name of the specified column.
|
protected DataType<?>[] |
getColumnToDataType()
Creates the data type array.
|
protected boolean[] |
getColumnToSuppressionStatus(ARXConfiguration config,
DataDefinition definition)
Returns the suppression status for each attribute
|
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 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 org.deidentifier.arx.framework.data.DataMatrix |
getInputBuffer()
Returns the input buffer
|
int |
getNumColumns()
Returns the number of columns in the dataset.
|
int |
getNumRows()
Returns the number of rows in the dataset.
|
protected org.deidentifier.arx.framework.data.Data |
getOutputBufferGeneralized()
Returns the output buffer
|
protected org.deidentifier.arx.framework.data.Data |
getOutputBufferMicroaggregated()
Returns the output buffer
|
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.
|
protected int |
getValueIdentifier(int column,
java.lang.String value)
Returns the internal value identifier
|
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 int |
internalGetEncodedValue(int row,
int col,
boolean ignoreSuppression)
Internal representation of get encoded value.
|
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 |
internalIsOutlier(int row,
int[] columns)
Returns whether this is an outlier regarding the given columns.
|
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
|
protected void |
updateDataTypes(int[] transformation)
Used to update data types after local recoding
|
void |
write(java.io.OutputStream out)
Internal method: writes some data into the output stream
|
checkColumn, checkColumns, checkReleased, 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, getRiskEstimator, getTransformation, getView, isOutlier, isReleased, isSuppressed, release, render, save, save, save, save, save, save, save, save, save, setHeader, setRegistry, setView, sort, sort, sort, sort, swapprotected 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 - protected DataHandleOutput(ARXResult result, org.deidentifier.arx.DataRegistry registry, org.deidentifier.arx.framework.data.DataManager manager, java.io.InputStream stream, ARXLattice.ARXNode node, DataDefinition definition, ARXConfiguration config) throws java.lang.ClassNotFoundException, java.io.IOException
result - registry - manager - stream - node - definition - config - java.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic java.lang.String getAttributeName(int col)
DataHandlegetAttributeName in class DataHandlecol - The column indexpublic DataType<?> getDataType(java.lang.String attribute)
DataHandlegetDataType in class DataHandleattribute - the attributepublic int getGeneralization(java.lang.String attribute)
DataHandlegetGeneralization in class DataHandleattribute - the attributepublic int getNumColumns()
DataHandlegetNumColumns in class DataHandlepublic int getNumRows()
DataHandlegetNumRows in class DataHandlepublic StatisticsBuilder getStatistics()
DataHandlegetStatistics in class DataHandlepublic java.lang.String getValue(int row,
int col)
DataHandlegetValue in class DataHandlerow - The cell's row indexcol - The cell's column indexpublic boolean isOptimized()
DataHandleisOptimized in class DataHandlepublic java.util.Iterator<java.lang.String[]> iterator()
iterator in class DataHandlepublic boolean replace(int column,
java.lang.String original,
java.lang.String replacement)
DataHandlereplace in class DataHandlecolumn - the columnoriginal - the originalreplacement - the replacementpublic void write(java.io.OutputStream out)
throws java.io.IOException
out - java.io.IOExceptionprotected void doRelease()
doRelease in class DataHandleprotected DataType<?>[] getColumnToDataType()
getColumnToDataType in class DataHandleprotected boolean[] getColumnToSuppressionStatus(ARXConfiguration config, DataDefinition definition)
config - definition - protected ARXConfiguration getConfiguration()
DataHandlegetConfiguration in class DataHandleprotected java.lang.String[] getDistinctValues(int col,
boolean ignoreSuppression,
DataHandleInternal.InterruptHandler handler)
getDistinctValues in class DataHandlecol - the columnignoreSuppression - handler - protected org.deidentifier.arx.framework.data.DataMatrix getInputBuffer()
protected org.deidentifier.arx.framework.data.Data getOutputBufferGeneralized()
protected org.deidentifier.arx.framework.data.Data getOutputBufferMicroaggregated()
protected int getValueIdentifier(int column,
java.lang.String value)
DataHandlegetValueIdentifier in class DataHandleprotected int internalCompare(int row1,
int row2,
int[] columns,
boolean ascending)
internalCompare in class DataHandlerow1 - row2 - columns - ascending - protected int internalGetEncodedValue(int row,
int col,
boolean ignoreSuppression)
DataHandleinternalGetEncodedValue in class DataHandlerow - the rowcol - the colprotected java.lang.String internalGetValue(int row,
int col,
boolean ignoreSuppression)
internalGetValue in class DataHandlerow - the rowcol - the colprotected boolean internalIsOutlier(int row)
row - protected boolean internalIsOutlier(int row,
int[] columns)
DataHandletrue will be returned.internalIsOutlier in class DataHandleprotected boolean internalReplace(int column,
java.lang.String original,
java.lang.String replacement)
DataHandleinternalReplace in class DataHandlecolumn - the columnoriginal - the originalreplacement - the replacementprotected void internalSwap(int row1,
int row2)
row1 - the row1row2 - the row2protected boolean isAnonymous()
DataHandleisAnonymous in class DataHandleprotected void setOptimized(boolean optimized)
optimized - protected void updateDataTypes(int[] transformation)
transformation -