Klasse DataHandleInput

java.lang.Object
org.deidentifier.arx.DataHandle
org.deidentifier.arx.DataHandleInput

public class DataHandleInput extends DataHandle
An implementation of the DataHandle interface for input data.
  • Felddetails

    • data

      protected DataMatrix data
      The data.
    • dictionary

      protected Dictionary dictionary
      The dictionary.
  • Konstruktordetails

    • DataHandleInput

      protected DataHandleInput(Data data)
      Creates a new data handle.
      Parameter:
      data -
  • Methodendetails

    • getAttributeName

      public String getAttributeName(int column)
      Beschreibung aus Klasse kopiert: DataHandle
      Returns the name of the specified column.
      Angegeben von:
      getAttributeName in Klasse DataHandle
      Parameter:
      column - The column index
      Gibt zurück:
      the attribute name
    • getGeneralization

      public int getGeneralization(String attribute)
      Beschreibung aus Klasse kopiert: DataHandle
      Returns the generalization level for the attribute.
      Angegeben von:
      getGeneralization in Klasse DataHandle
      Parameter:
      attribute - the attribute
      Gibt zurück:
      the generalization
    • getNumColumns

      public int getNumColumns()
      Beschreibung aus Klasse kopiert: DataHandle
      Returns the number of columns in the dataset.
      Angegeben von:
      getNumColumns in Klasse DataHandle
      Gibt zurück:
      the num columns
    • getNumRows

      public int getNumRows()
      Beschreibung aus Klasse kopiert: DataHandle
      Returns the number of rows in the dataset.
      Angegeben von:
      getNumRows in Klasse DataHandle
      Gibt zurück:
      the num rows
    • getStatistics

      public StatisticsBuilder getStatistics()
      Beschreibung aus Klasse kopiert: DataHandle
      Returns an object providing access to basic descriptive statistics about the data represented by this handle.
      Angegeben von:
      getStatistics in Klasse DataHandle
      Gibt zurück:
      the statistics
    • getValue

      public String getValue(int row, int column)
      Beschreibung aus Klasse kopiert: DataHandle
      Returns the value in the specified cell.
      Angegeben von:
      getValue in Klasse DataHandle
      Parameter:
      row - The cell's row index
      column - The cell's column index
      Gibt zurück:
      the value
    • iterator

      public Iterator<String[]> iterator()
      Beschreibung aus Klasse kopiert: DataHandle
      Returns an iterator over the data.
      Angegeben von:
      iterator in Klasse DataHandle
      Gibt zurück:
      the iterator
    • shuffledIterator

      public Iterator<String[]> shuffledIterator()
      Beschreibung aus Klasse kopiert: DataHandle
      Returns an iterator over the data in a random order.
      Angegeben von:
      shuffledIterator in Klasse DataHandle
      Gibt zurück:
      the iterator
    • doRelease

      protected void doRelease()
      Releases all resources.
      Angegeben von:
      doRelease in Klasse DataHandle
    • getBaseDataType

      protected DataType<?> getBaseDataType(String attribute)
      Beschreibung aus Klasse kopiert: DataHandle
      Returns the base data type without generalization.
      Setzt außer Kraft:
      getBaseDataType in Klasse DataHandle
      Parameter:
      attribute - the attribute
      Gibt zurück:
      the base data type
    • getColumnToDataType

      protected DataType<?>[] getColumnToDataType()
      Beschreibung aus Klasse kopiert: DataHandle
      Generates an array of data types.
      Angegeben von:
      getColumnToDataType in Klasse DataHandle
      Gibt zurück:
      the data type array
    • getConfiguration

      protected ARXConfiguration getConfiguration()
      Beschreibung aus Klasse kopiert: DataHandle
      Returns the ARXConfiguration that is currently being used, null if this is an input handle
      Angegeben von:
      getConfiguration in Klasse DataHandle
      Gibt zurück:
    • getDistinctValues

      protected String[] getDistinctValues(int column, boolean ignoreSuppression, DataHandleInternal.InterruptHandler handler)
      Beschreibung aus Klasse kopiert: DataHandle
      Returns the distinct values.
      Angegeben von:
      getDistinctValues in Klasse DataHandle
      Parameter:
      column - the column
      ignoreSuppression -
      handler - the handler
      Gibt zurück:
      the distinct values
    • getInputBuffer

      protected DataMatrix getInputBuffer()
      Returns the input buffer
      Gibt zurück:
    • getValueIdentifier

      protected int getValueIdentifier(int column, String value)
      Beschreibung aus Klasse kopiert: DataHandle
      Returns the internal value identifier
      Angegeben von:
      getValueIdentifier in Klasse DataHandle
      Parameter:
      column -
      value -
      Gibt zurück:
    • internalGetEncodedValue

      protected int internalGetEncodedValue(int row, int column, boolean ignoreSuppression)
      Beschreibung aus Klasse kopiert: DataHandle
      Internal representation of get encoded value. Returns -1 for suppressed values.
      Angegeben von:
      internalGetEncodedValue in Klasse DataHandle
      Parameter:
      row - the row
      column - the col
      Gibt zurück:
      the value
    • internalGetValue

      protected String internalGetValue(int row, int column, boolean ignoreSuppression)
      Beschreibung aus Klasse kopiert: DataHandle
      Internal representation of get value.
      Angegeben von:
      internalGetValue in Klasse DataHandle
      Parameter:
      row - the row
      column - the col
      Gibt zurück:
      the string
    • 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: DataHandle
      Returns whether this is an outlier regarding the given columns. If no columns have been specified, true will be returned.
      Angegeben von:
      internalIsOutlier in Klasse DataHandle
      Parameter:
      row -
      columns -
      Gibt zurück:
    • internalReplace

      protected boolean internalReplace(int column, String original, String replacement)
      Beschreibung aus Klasse kopiert: DataHandle
      Internal replacement method.
      Angegeben von:
      internalReplace in Klasse DataHandle
      Parameter:
      column - the column
      original - the original
      replacement - the replacement
      Gibt zurück:
      true, if successful
    • internalSwap

      protected void internalSwap(int row1, int row2)
      Swaps the rows.
      Parameter:
      row1 -
      row2 -
    • isLocked

      protected boolean isLocked()
      Is this handle locked?.
      Gibt zurück:
    • setDefinition

      protected void setDefinition(DataDefinition definition)
      Overrides the handles data definition.
      Parameter:
      definition -
    • setLocked

      protected void setLocked(boolean locked)
      Lock/unlock this handle.
      Parameter:
      locked -
    • update

      protected void update(Data data)
      Update the definition.
      Parameter:
      data -
    • update

      protected void update(DataMatrix dataGeneralized, DataMatrix dataAnalyzed)
      Updates the definition with further data to swap.
      Parameter:
      dataGeneralized -
      dataAnalyzed -
      matrixIS -