Klasse DataHandleOutput

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

public class DataHandleOutput extends DataHandle
An implementation of the class DataHandle for output data.
  • Konstruktordetails

  • Methodendetails

    • getAttributeName

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

      public DataType<?> getDataType(String attribute)
      Beschreibung aus Klasse kopiert: DataHandle
      Returns the according data type.
      Setzt außer Kraft:
      getDataType in Klasse DataHandle
      Parameter:
      attribute - the attribute
      Gibt zurück:
      the data type
    • 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 col)
      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
      col - The cell's column index
      Gibt zurück:
      the value
    • isOptimized

      public boolean isOptimized()
      Beschreibung aus Klasse kopiert: DataHandle
      Has this handle been optimized with local recoding?
      Setzt außer Kraft:
      isOptimized in Klasse DataHandle
      Gibt zurück:
    • 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
    • replace

      public boolean replace(int column, String original, String replacement)
      Beschreibung aus Klasse kopiert: DataHandle
      Replaces the original value with the replacement in the given column. Only supported by handles for input data.
      Setzt außer Kraft:
      replace in Klasse DataHandle
      Parameter:
      column - the column
      original - the original
      replacement - the replacement
      Gibt zurück:
      Whether the original value was found
    • 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
    • write

      public void write(OutputStream out) throws IOException
      Internal method: writes some data into the output stream
      Parameter:
      out -
      Löst aus:
      IOException
    • doRelease

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

      protected DataType<?>[] getColumnToDataType()
      Creates the data type array.
      Angegeben von:
      getColumnToDataType in Klasse DataHandle
      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

      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 col, boolean ignoreSuppression, DataHandleInternal.InterruptHandler handler)
      Gets the distinct values.
      Angegeben von:
      getDistinctValues in Klasse DataHandle
      Parameter:
      col - the column
      ignoreSuppression -
      handler -
      Gibt zurück:
      the distinct values
    • getInputBuffer

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

      protected Data getOutputBufferGeneralized()
      Returns the output buffer
      Gibt zurück:
    • getOutputBufferMicroaggregated

      protected Data getOutputBufferMicroaggregated()
      Returns the output 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:
    • 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:
      internalCompare in Klasse DataHandle
      Parameter:
      row1 -
      row2 -
      columns -
      ascending -
      Gibt zurück:
      the int
    • internalGetEncodedValue

      protected int internalGetEncodedValue(int row, int col, 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
      col - the col
      Gibt zurück:
      the value
    • internalGetValue

      protected String internalGetValue(int row, int col, boolean ignoreSuppression)
      Gets the value internal.
      Angegeben von:
      internalGetValue in Klasse DataHandle
      Parameter:
      row - the row
      col - 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: 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)
      Swap internal.
      Parameter:
      row1 - the row1
      row2 - the row2
    • isAnonymous

      protected boolean isAnonymous()
      Beschreibung aus Klasse kopiert: DataHandle
      Returns whether the data represented by this handle is anonymous
      Setzt außer Kraft:
      isAnonymous in Klasse DataHandle
      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 -