org.deidentifier.arx

## Class ARXAnonymizer

- java.lang.Object
- - org.deidentifier.arx.ARXAnonymizer

    public class ARXAnonymizer
    extends java.lang.Object

This class offers several methods to define parameters and execute the ARX algorithm.

Author:
  Fabian Prasser, Florian Kohlmayer

### Field Summary

Fields
`static boolean` `PRODUCTION_RELEASE` Is this a production release?
`static java.lang.String` `VERSION` The global version string of this release

### Constructor Summary

Constructors
Constructor and Description
`ARXAnonymizer()` Creates a new anonymizer with the default configuration.
`ARXAnonymizer(int historySize, double snapshotSizeDataset, double snapshotSizeSnapshot)` Creates a new anonymizer with the given configuration.

### Method Summary

All Methods Instance Methods Concrete Methods
`ARXResult` `anonymize(Data data, ARXConfiguration config)` Performs data anonymization.
`int` `getHistorySize()` Returns the maximum number of snapshots allowed to store in the history.
`double` `getMaximumSnapshotSizeDataset()` Gets the snapshot size.
`double` `getMaximumSnapshotSizeSnapshot()` Gets the snapshot size.
`int` `getMaxQuasiIdentifiers()` Returns the maximal number of quasi-identifiers.
`void` `setHistorySize(int historySize)` Sets the maximum number of snapshots allowed to store in the history.
`void` `setListener(ARXListener listener)` Sets a listener.
`void` `setMaximumSnapshotSizeDataset(double snapshotSize)` Sets the maximum size of a snapshot relative to the dataset size.
`void` `setMaximumSnapshotSizeSnapshot(double snapshotSizeSnapshot)` Sets the maximum size of a snapshot relative to the previous snapshot.
`void` `setMaxQuasiIdentifiers(int maxQuasiIdentifiers)` Sets the maximal number of quasi-identifiers.

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

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

### Field Detail

#### PRODUCTION_RELEASE

    public static final boolean PRODUCTION_RELEASE

Is this a production release?

See Also:
  Constant Field Values

#### VERSION

    public static final java.lang.String VERSION

The global version string of this release

See Also:
  Constant Field Values

### Constructor Detail

#### ARXAnonymizer

    public ARXAnonymizer()

Creates a new anonymizer with the default configuration.

#### ARXAnonymizer

    public ARXAnonymizer(int historySize,
                         double snapshotSizeDataset,
                         double snapshotSizeSnapshot)

Creates a new anonymizer with the given configuration.

Parameters:
  `historySize` - The maximum number of snapshots stored in the buffer [default=200]
  `snapshotSizeDataset` - The maximum relative size of a snapshot compared to the dataset [default=0.2]
  `snapshotSizeSnapshot` - The maximum relative size of a snapshot compared to its predecessor [default=0.8]

### Method Detail

#### anonymize

    public ARXResult anonymize(Data data,
                               ARXConfiguration config)
                        throws java.io.IOException

Performs data anonymization.

Parameters:
  `data` - The data
  `config` - The privacy config
Returns:
  ARXResult
Throws:
  `java.io.IOException`

#### getHistorySize

    public int getHistorySize()

Returns the maximum number of snapshots allowed to store in the history.

Returns:
  The size

#### getMaximumSnapshotSizeDataset

    public double getMaximumSnapshotSizeDataset()

Gets the snapshot size.

Returns:
  The maximum size of a snapshot relative to the dataset size

#### getMaximumSnapshotSizeSnapshot

    public double getMaximumSnapshotSizeSnapshot()

Gets the snapshot size.

Returns:
  The maximum size of a snapshot relative to the previous snapshot size

#### getMaxQuasiIdentifiers

    public int getMaxQuasiIdentifiers()

Returns the maximal number of quasi-identifiers.

Returns:

#### setHistorySize

    public void setHistorySize(int historySize)

Sets the maximum number of snapshots allowed to store in the history.

Parameters:
  `historySize` - The size

#### setListener

    public void setListener(ARXListener listener)

Sets a listener.

Parameters:
  `listener` - the new listener, if any

#### setMaximumSnapshotSizeDataset

    public void setMaximumSnapshotSizeDataset(double snapshotSize)

Sets the maximum size of a snapshot relative to the dataset size.

Parameters:
  `snapshotSize` -

#### setMaximumSnapshotSizeSnapshot

    public void setMaximumSnapshotSizeSnapshot(double snapshotSizeSnapshot)

Sets the maximum size of a snapshot relative to the previous snapshot.

Parameters:
  `snapshotSizeSnapshot` - The size

#### setMaxQuasiIdentifiers

    public void setMaxQuasiIdentifiers(int maxQuasiIdentifiers)

Sets the maximal number of quasi-identifiers. Set to Integer.MAX_VALUE to disable the restriction. By default, the restriction is disabled.

Parameters:
  `maxQuasiIdentifiers` -