Package org.deidentifier.arx
Klasse DataHandleOutput
java.lang.Object
org.deidentifier.arx.DataHandle
org.deidentifier.arx.DataHandleOutput
An implementation of the class DataHandle for output data.
-
Feldübersicht
Von Klasse geerbte Felder org.deidentifier.arx.DataHandle
columnToDataType, definition, header, headerMap, node, registry, subset -
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedDataHandleOutput(ARXResult result, org.deidentifier.arx.DataRegistry registry, org.deidentifier.arx.framework.data.DataManager manager, InputStream stream, ARXLattice.ARXNode node, DataDefinition definition, ARXConfiguration config) Instantiates a new handle.protectedDataHandleOutput(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. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected voidReleases all resources.getAttributeName(int col) Returns the name of the specified column.protected DataType<?>[]Creates the data type array.protected boolean[]getColumnToSuppressionStatus(ARXConfiguration config, DataDefinition definition) Returns the suppression status for each attributeprotected ARXConfigurationReturns the ARXConfiguration that is currently being used, null if this is an input handleDataType<?> getDataType(String attribute) Returns the according data type.protected String[]getDistinctValues(int col, boolean ignoreSuppression, DataHandleInternal.InterruptHandler handler) Gets the distinct values.intgetGeneralization(String attribute) Returns the generalization level for the attribute.protected org.deidentifier.arx.framework.data.DataMatrixReturns the input bufferintReturns the number of columns in the dataset.intReturns the number of rows in the dataset.protected org.deidentifier.arx.framework.data.DataReturns the output bufferprotected org.deidentifier.arx.framework.data.DataReturns the output bufferReturns an object providing access to basic descriptive statistics about the data represented by this handle.getValue(int row, int col) Returns the value in the specified cell.protected intgetValueIdentifier(int column, String value) Returns the internal value identifierprotected intinternalCompare(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 intinternalGetEncodedValue(int row, int col, boolean ignoreSuppression) Internal representation of get encoded value.protected StringinternalGetValue(int row, int col, boolean ignoreSuppression) Gets the value internal.protected booleaninternalIsOutlier(int row) Returns whether the given row is an outlier.protected booleaninternalIsOutlier(int row, int[] columns) Returns whether this is an outlier regarding the given columns.protected booleaninternalReplace(int column, String original, String replacement) Internal replacement method.protected voidinternalSwap(int row1, int row2) Swap internal.protected booleanReturns whether the data represented by this handle is anonymousbooleanHas this handle been optimized with local recoding?iterator()Returns an iterator over the data.booleanReplaces the original value with the replacement in the given column.protected voidsetOptimized(boolean optimized) Marks this handle as optimizedReturns an iterator over the data in a random order.protected voidupdateDataTypes(int[] transformation) Used to update data types after local recodingvoidwrite(OutputStream out) Internal method: writes some data into the output streamVon Klasse geerbte Methoden org.deidentifier.arx.DataHandle
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, swap
-
Konstruktordetails
-
DataHandleOutput
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.- Parameter:
result-registry-manager-outputGeneralized-outputMicroaggregated-node-definition-config-
-
DataHandleOutput
protected DataHandleOutput(ARXResult result, org.deidentifier.arx.DataRegistry registry, org.deidentifier.arx.framework.data.DataManager manager, InputStream stream, ARXLattice.ARXNode node, DataDefinition definition, ARXConfiguration config) throws ClassNotFoundException, IOException Instantiates a new handle.- Parameter:
result-registry-manager-stream-node-definition-config-- Löst aus:
IOExceptionClassNotFoundException
-
-
Methodendetails
-
getAttributeName
Beschreibung aus Klasse kopiert:DataHandleReturns the name of the specified column.- Angegeben von:
getAttributeNamein KlasseDataHandle- Parameter:
col- The column index- Gibt zurück:
- the attribute name
-
getDataType
Beschreibung aus Klasse kopiert:DataHandleReturns the according data type.- Setzt außer Kraft:
getDataTypein KlasseDataHandle- Parameter:
attribute- the attribute- Gibt zurück:
- the data type
-
getGeneralization
Beschreibung aus Klasse kopiert:DataHandleReturns the generalization level for the attribute.- Angegeben von:
getGeneralizationin KlasseDataHandle- Parameter:
attribute- the attribute- Gibt zurück:
- the generalization
-
getNumColumns
public int getNumColumns()Beschreibung aus Klasse kopiert:DataHandleReturns the number of columns in the dataset.- Angegeben von:
getNumColumnsin KlasseDataHandle- Gibt zurück:
- the num columns
-
getNumRows
public int getNumRows()Beschreibung aus Klasse kopiert:DataHandleReturns the number of rows in the dataset.- Angegeben von:
getNumRowsin KlasseDataHandle- Gibt zurück:
- the num rows
-
getStatistics
Beschreibung aus Klasse kopiert:DataHandleReturns an object providing access to basic descriptive statistics about the data represented by this handle.- Angegeben von:
getStatisticsin KlasseDataHandle- Gibt zurück:
- the statistics
-
getValue
Beschreibung aus Klasse kopiert:DataHandleReturns the value in the specified cell.- Angegeben von:
getValuein KlasseDataHandle- Parameter:
row- The cell's row indexcol- The cell's column index- Gibt zurück:
- the value
-
isOptimized
public boolean isOptimized()Beschreibung aus Klasse kopiert:DataHandleHas this handle been optimized with local recoding?- Setzt außer Kraft:
isOptimizedin KlasseDataHandle- Gibt zurück:
-
iterator
Beschreibung aus Klasse kopiert:DataHandleReturns an iterator over the data.- Angegeben von:
iteratorin KlasseDataHandle- Gibt zurück:
- the iterator
-
replace
Beschreibung aus Klasse kopiert:DataHandleReplaces the original value with the replacement in the given column. Only supported by handles for input data.- Setzt außer Kraft:
replacein KlasseDataHandle- Parameter:
column- the columnoriginal- the originalreplacement- the replacement- Gibt zurück:
- Whether the original value was found
-
shuffledIterator
Beschreibung aus Klasse kopiert:DataHandleReturns an iterator over the data in a random order.- Angegeben von:
shuffledIteratorin KlasseDataHandle- Gibt zurück:
- the iterator
-
write
Internal method: writes some data into the output stream- Parameter:
out-- Löst aus:
IOException
-
doRelease
protected void doRelease()Releases all resources.- Angegeben von:
doReleasein KlasseDataHandle
-
getColumnToDataType
Creates the data type array.- Angegeben von:
getColumnToDataTypein KlasseDataHandle- Gibt zurück:
-
getColumnToSuppressionStatus
protected boolean[] getColumnToSuppressionStatus(ARXConfiguration config, DataDefinition definition) Returns the suppression status for each attribute- Parameter:
config-definition-- Gibt zurück:
-
getConfiguration
Beschreibung aus Klasse kopiert:DataHandleReturns the ARXConfiguration that is currently being used, null if this is an input handle- Angegeben von:
getConfigurationin KlasseDataHandle- Gibt zurück:
-
getDistinctValues
protected String[] getDistinctValues(int col, boolean ignoreSuppression, DataHandleInternal.InterruptHandler handler) Gets the distinct values.- Angegeben von:
getDistinctValuesin KlasseDataHandle- Parameter:
col- the columnignoreSuppression-handler-- Gibt zurück:
- the distinct values
-
getInputBuffer
protected org.deidentifier.arx.framework.data.DataMatrix getInputBuffer()Returns the input buffer- Gibt zurück:
-
getOutputBufferGeneralized
protected org.deidentifier.arx.framework.data.Data getOutputBufferGeneralized()Returns the output buffer- Gibt zurück:
-
getOutputBufferMicroaggregated
protected org.deidentifier.arx.framework.data.Data getOutputBufferMicroaggregated()Returns the output buffer- Gibt zurück:
-
getValueIdentifier
Beschreibung aus Klasse kopiert:DataHandleReturns the internal value identifier- Angegeben von:
getValueIdentifierin KlasseDataHandle- Parameter:
column-value-- Gibt zurück:
-
internalCompare
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. It uses the specified data types for comparison if no generalization was applied, otherwise it uses string comparison.- Setzt außer Kraft:
internalComparein KlasseDataHandle- Parameter:
row1-row2-columns-ascending-- Gibt zurück:
- the int
-
internalGetEncodedValue
protected int internalGetEncodedValue(int row, int col, boolean ignoreSuppression) Beschreibung aus Klasse kopiert:DataHandleInternal representation of get encoded value. Returns -1 for suppressed values.- Angegeben von:
internalGetEncodedValuein KlasseDataHandle- Parameter:
row- the rowcol- the col- Gibt zurück:
- the value
-
internalGetValue
Gets the value internal.- Angegeben von:
internalGetValuein KlasseDataHandle- Parameter:
row- the rowcol- the col- Gibt zurück:
- the value internal
-
internalIsOutlier
protected boolean internalIsOutlier(int row) Returns whether the given row is an outlier.- Parameter:
row-- Gibt zurück:
-
internalIsOutlier
protected boolean internalIsOutlier(int row, int[] columns) Beschreibung aus Klasse kopiert:DataHandleReturns whether this is an outlier regarding the given columns. If no columns have been specified,truewill be returned.- Angegeben von:
internalIsOutlierin KlasseDataHandle- Parameter:
row-columns-- Gibt zurück:
-
internalReplace
Beschreibung aus Klasse kopiert:DataHandleInternal replacement method.- Angegeben von:
internalReplacein KlasseDataHandle- Parameter:
column- the columnoriginal- the originalreplacement- the replacement- Gibt zurück:
- true, if successful
-
internalSwap
protected void internalSwap(int row1, int row2) Swap internal.- Parameter:
row1- the row1row2- the row2
-
isAnonymous
protected boolean isAnonymous()Beschreibung aus Klasse kopiert:DataHandleReturns whether the data represented by this handle is anonymous- Setzt außer Kraft:
isAnonymousin KlasseDataHandle- Gibt zurück:
-
setOptimized
protected void setOptimized(boolean optimized) Marks this handle as optimized- Parameter:
optimized-
-
updateDataTypes
protected void updateDataTypes(int[] transformation) Used to update data types after local recoding- Parameter:
transformation-
-