public class DataHandleSubset extends DataHandle
dataTypes, definition, header, node, registry, statistics
Constructor and Description |
---|
DataHandleSubset(DataHandle source,
DataSubset subset)
Creates a new handle that represents the research subset.
|
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 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()
Generates an array of data types.
|
protected java.lang.String[] |
getDistinctValues(int column,
boolean ignoreSuppression,
DataHandleInternal.InterruptHandler handler)
Returns the distinct values.
|
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.
|
protected DataHandle |
getSource()
Returns the underlying source data handle.
|
int[] |
getSubset()
Returns the research subset.
|
java.lang.String |
getValue(int row,
int col)
Returns the value in the specified cell.
|
DataHandle |
getView()
Returns a new data handle that represents a context specific view on the dataset.
|
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)
Internal representation of get value.
|
protected void |
internalRebuild()
Rebuild array representation of subset.
|
protected boolean |
internalReplace(int column,
java.lang.String original,
java.lang.String replacement)
Internal replacement method.
|
protected void |
internalSwap(int row1,
int row2)
Swaps the bits in the set representation.
|
protected int |
internalTranslate(int row)
Translates the row number.
|
protected boolean |
isAnonymous()
Returns whether the data represented by this handle is anonymous
|
boolean |
isOptimized()
Has this handle been optimized with local recoding?
|
boolean |
isOutlier(int row)
Determines whether a given row is an outlier in the currently associated
data transformation.
|
java.util.Iterator<java.lang.String[]> |
iterator()
Returns an iterator over the data.
|
boolean |
replace(int column,
java.lang.String original,
java.lang.String replacement)
Replaces the original value with the replacement in the given column.
|
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, isOrphaned, release, save, save, save, save, save, save, save, save, save, setRegistry, setView, sort, sort, sort, sort, swap
public DataHandleSubset(DataHandle source, DataSubset subset)
source
- subset
- public java.lang.String getAttributeName(int col)
DataHandle
getAttributeName
in class DataHandle
col
- The column indexpublic 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()
DataHandle
getNumColumns
in class DataHandle
public int getNumRows()
DataHandle
getNumRows
in class DataHandle
public int[] getSubset()
public java.lang.String getValue(int row, int col)
DataHandle
getValue
in class DataHandle
row
- The cell's row indexcol
- The cell's column indexpublic DataHandle getView()
DataHandle
getView
in class DataHandle
public boolean isOptimized()
DataHandle
isOptimized
in class DataHandle
public boolean isOutlier(int row)
DataHandle
isOutlier
in class DataHandle
row
- the rowpublic java.util.Iterator<java.lang.String[]> iterator()
DataHandle
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 replacementprotected void doRelease()
DataHandle
doRelease
in class DataHandle
protected ARXConfiguration getConfiguration()
DataHandle
getConfiguration
in class DataHandle
protected DataType<?>[][] getDataTypeArray()
DataHandle
getDataTypeArray
in class DataHandle
protected java.lang.String[] getDistinctValues(int column, boolean ignoreSuppression, DataHandleInternal.InterruptHandler handler)
DataHandle
getDistinctValues
in class DataHandle
column
- the columnhandler
- the handlerprotected DataHandle getSource()
protected int internalCompare(int row1, int row2, int[] columns, boolean ascending)
DataHandle
internalCompare
in class DataHandle
row1
- the row1row2
- the row2columns
- the columnsascending
- the ascendingprotected java.lang.String internalGetValue(int row, int col, boolean ignoreSuppression)
DataHandle
internalGetValue
in class DataHandle
row
- the rowcol
- the colprotected void internalRebuild()
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
- row2
- protected int internalTranslate(int row)
row
- protected boolean isAnonymous()
DataHandle
isAnonymous
in class DataHandle