org.deidentifier.arx.framework.data

## Class DataManager

- java.lang.Object
- - org.deidentifier.arx.framework.data.DataManager

Direct Known Subclasses:
  DataManagerSubset

    public class DataManager
    extends java.lang.Object

Holds all data needed for the anonymization process.

Author:
  Fabian Prasser, Florian Kohlmayer

### Constructor Summary

Constructors
Constructor and Description
`DataManager(java.lang.String[] header, DataMatrix data, Dictionary dictionary, DataDefinition definition, java.util.Map<java.lang.String,DistributionAggregateFunction> functions, ARXConfiguration config)` Creates a new data manager from pre-encoded data.

### Method Summary

All Methods Instance Methods Concrete Methods
`DataAggregationInformation` `getAggregationInformation()` Returns data configuring microaggregation
`Data` `getDataAnalyzed()` Returns the input data that will be analyzed.
`Data` `getDataGeneralized()` Returns the input data that will be generalized.
`Data` `getDataInput()` Returns the input data.
`double[]` `getDistribution(DataMatrix dataMatrix, int index, int distinctValues)` Returns the distribution of the attribute in the data array at the given index.
`double[]` `getDistribution(java.lang.String attribute)` Returns the distribution of the given sensitive attribute in the original dataset.
`DomainShare[]` `getDomainShares()` Returns the domain shares for all generalized quasi-identifiers
`DomainShareReliable[]` `getDomainSharesReliable()` Returns the reliable domain shares for all generalized quasi-identifiers
`java.lang.String[]` `getHeader()` The original data header.
`int[]` `getHierachiesHeights()` Returns the heights of the hierarchies used for generalizing quasi-identifiers
`GeneralizationHierarchy[]` `getHierarchies()` Returns the generalization hierarchiesQI.
`int[]` `getHierarchiesMaxLevels()` Returns the maximum levels for the generalizaiton.
`int[]` `getHierarchiesMinLevels()` Returns the minimum levels for the generalizations.
`int[]` `getOrder(java.lang.String attribute)` Returns the order of the given sensitive attribute in the original dataset.
`DataManager` `getSubsetInstance(RowSet rowset)` Returns an instance of this data manager, that is projected onto the given rowset
`int[]` `getTree(DataMatrix data, int index, int[][] hierarchy)` Returns a tree for the given attribute at the index within the given data array, using the given hierarchy.
`int[]` `getTree(java.lang.String attribute)` Returns the tree for the given sensitive attribute, if a generalization hierarchy is associated.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DataManager

    public DataManager(java.lang.String[] header,
                       DataMatrix data,
                       Dictionary dictionary,
                       DataDefinition definition,
                       java.util.Map<java.lang.String,DistributionAggregateFunction> functions,
                       ARXConfiguration config)

Creates a new data manager from pre-encoded data.

Parameters:
  `header` -
  `data` -
  `dictionary` -
  `definition` -
  `functions` -
  `config` -

### Method Detail

#### getDataAnalyzed

    public Data getDataAnalyzed()

Returns the input data that will be analyzed.

Returns:
  the data

#### getDataGeneralized

    public Data getDataGeneralized()

Returns the input data that will be generalized.

Returns:
  the data

#### getDataInput

    public Data getDataInput()

Returns the input data.

Returns:
  the data

#### getDistribution

    public double[] getDistribution(DataMatrix dataMatrix,
                                    int index,
                                    int distinctValues)

Returns the distribution of the attribute in the data array at the given index.

Parameters:
  `dataMatrix` -
  `index` -
  `distinctValues` -
Returns:

#### getDistribution

    public double[] getDistribution(java.lang.String attribute)

Returns the distribution of the given sensitive attribute in the original dataset. Required for t-closeness.

Parameters:
  `attribute` -
Returns:
  distribution

#### getDomainShares

    public DomainShare[] getDomainShares()

Returns the domain shares for all generalized quasi-identifiers

Returns:

#### getDomainSharesReliable

    public DomainShareReliable[] getDomainSharesReliable()

Returns the reliable domain shares for all generalized quasi-identifiers

Returns:

#### getHeader

    public java.lang.String[] getHeader()

The original data header.

Returns:

#### getHierachiesHeights

    public int[] getHierachiesHeights()

Returns the heights of the hierarchies used for generalizing quasi-identifiers

Returns:

#### getHierarchies

    public GeneralizationHierarchy[] getHierarchies()

Returns the generalization hierarchiesQI.

Returns:
  the hierarchiesQI

#### getHierarchiesMaxLevels

    public int[] getHierarchiesMaxLevels()

Returns the maximum levels for the generalizaiton.

Returns:
  the maximum level for each QI

#### getHierarchiesMinLevels

    public int[] getHierarchiesMinLevels()

Returns the minimum levels for the generalizations.

Returns:

#### getAggregationInformation

    public DataAggregationInformation getAggregationInformation()

Returns data configuring microaggregation

Returns:

#### getOrder

    public int[] getOrder(java.lang.String attribute)

Returns the order of the given sensitive attribute in the original dataset. Required for t-closeness.

Parameters:
  `attribute` -
Returns:
  distribution

#### getSubsetInstance

    public DataManager getSubsetInstance(RowSet rowset)

Returns an instance of this data manager, that is projected onto the given rowset

Parameters:
  `rowset` -
Returns:

#### getTree

    public int[] getTree(DataMatrix data,
                         int index,
                         int[][] hierarchy)

Returns a tree for the given attribute at the index within the given data array, using the given hierarchy. The resulting tree can be used to calculate the earth mover's distance with hierarchical ground-distance.

Parameters:
  `data` -
  `index` -
  `hierarchy` -
Returns:
  tree

#### getTree

    public int[] getTree(java.lang.String attribute)

Returns the tree for the given sensitive attribute, if a generalization hierarchy is associated. The resulting tree can be used to calculate the earth mover's distance with hierarchical ground-distance.

Parameters:
  `attribute` -
Returns:
  tree