org.deidentifier.arx.criteria

## Class PrivacyCriterion

- java.lang.Object
- - org.deidentifier.arx.criteria.PrivacyCriterion

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  ExplicitPrivacyCriterion, ImplicitPrivacyCriterion, SampleBasedCriterion

    public abstract class PrivacyCriterion
    extends java.lang.Object
    implements java.io.Serializable

An abstract base class for privacy criteria.

Author:
  Fabian Prasser, Florian Kohlmayer
See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`PrivacyCriterion(boolean monotonicWithSuppression, boolean monotonicWithGeneralization)` Instantiates a new criterion.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`abstract PrivacyCriterion` `clone()` Clone
`PrivacyCriterion` `clone(DataSubset subset)` Clone for local recoding
`DataSubset` `getDataSubset()` If a privacy model uses a data subset, it must overwrite this method
`int` `getMinimalClassSize()` If a privacy model provides a prosecutor risk threshold, it should override this method to enable optimizations
`ARXPopulationModel` `getPopulationModel()` Returns the associated population model, `null` if there is none.
`abstract int` `getRequirements()` Returns the criterion's requirements.
`double` `getRiskThresholdJournalist()` Return journalist risk threshold, 1 if there is none
`double` `getRiskThresholdMarketer()` Return marketer risk threshold, 1 if there is none
`double` `getRiskThresholdProsecutor()` Return prosecutor risk threshold, 1 if there is none
`DataSubset` `getSubset()` Returns a research subset, `null` if no subset is available
`void` `initialize(DataManager manager, ARXConfiguration config)` Override this to initialize the criterion.
`abstract boolean` `isAnonymous(Transformation<?> node, HashGroupifyEntry entry)` Implement this, to enforce the criterion.
`boolean` `isHeuristicSearchSupported()` Returns whether the criterion supports heuristic search strategies.
`boolean` `isHeuristicSearchWithTimeLimitSupported()` Returns whether the criterion supports heuristic search strategies with time limits.
`abstract boolean` `isLocalRecodingSupported()` Returns whether the criterion supports local recoding.
`boolean` `isMinimalClassSizeAvailable()` If a privacy model provides a prosecutor risk threshold, it should override this method to enable optimizations
`boolean` `isMonotonicWithGeneralization()` Returns whether the criterion is monotonic with generalization.
`boolean` `isMonotonicWithSuppression()` Returns whether the criterion is monotonic with tuple suppression.
`boolean` `isOptimalSearchSupported()` Returns whether the criterion supports optimal search strategies.
`boolean` `isSampleBased()` Is this criterion based on the overall sample
`boolean` `isSubsetAvailable()` If a privacy model uses a data subset, it must overwrite this method
`abstract ElementData` `render()` Renders the privacy model
`abstract java.lang.String` `toString()` Returns a string representation.

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

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

### Constructor Detail

#### PrivacyCriterion

    public PrivacyCriterion(boolean monotonicWithSuppression,
                            boolean monotonicWithGeneralization)

Instantiates a new criterion.

Parameters:
  `monotonicWithSuppression` -
  `monotonicWithGeneralization` -

### Method Detail

#### clone

    public abstract PrivacyCriterion clone()

Clone

Overrides:
  `clone` in class `java.lang.Object`

#### clone

    public PrivacyCriterion clone(DataSubset subset)

Clone for local recoding

#### getDataSubset

    public DataSubset getDataSubset()

If a privacy model uses a data subset, it must overwrite this method

Returns:

#### getMinimalClassSize

    public int getMinimalClassSize()

If a privacy model provides a prosecutor risk threshold, it should override this method to enable optimizations

Returns:

#### getPopulationModel

    public ARXPopulationModel getPopulationModel()

Returns the associated population model, `null` if there is none.

Returns:
  the populationModel

#### getRequirements

    public abstract int getRequirements()

Returns the criterion's requirements.

Returns:

#### getRiskThresholdJournalist

    public double getRiskThresholdJournalist()

Return journalist risk threshold, 1 if there is none

Returns:

#### getRiskThresholdMarketer

    public double getRiskThresholdMarketer()

Return marketer risk threshold, 1 if there is none

Returns:

#### getRiskThresholdProsecutor

    public double getRiskThresholdProsecutor()

Return prosecutor risk threshold, 1 if there is none

Returns:

#### getSubset

    public DataSubset getSubset()

Returns a research subset, `null` if no subset is available

Returns:

#### initialize

    public void initialize(DataManager manager,
                           ARXConfiguration config)

Override this to initialize the criterion.

Parameters:
  `manager` -
  `config` - TODO

#### isHeuristicSearchSupported

    public boolean isHeuristicSearchSupported()

Returns whether the criterion supports heuristic search strategies.

Returns:

#### isHeuristicSearchWithTimeLimitSupported

    public boolean isHeuristicSearchWithTimeLimitSupported()

Returns whether the criterion supports heuristic search strategies with time limits.

Returns:

#### isOptimalSearchSupported

    public boolean isOptimalSearchSupported()

Returns whether the criterion supports optimal search strategies.

Returns:

#### isAnonymous

    public abstract boolean isAnonymous(Transformation<?> node,
                                        HashGroupifyEntry entry)

Implement this, to enforce the criterion.

Parameters:
  `node` - TODO
  `entry` -
Returns:

#### isLocalRecodingSupported

    public abstract boolean isLocalRecodingSupported()

Returns whether the criterion supports local recoding.

Returns:

#### isMinimalClassSizeAvailable

    public boolean isMinimalClassSizeAvailable()

If a privacy model provides a prosecutor risk threshold, it should override this method to enable optimizations

Returns:

#### isMonotonicWithGeneralization

    public boolean isMonotonicWithGeneralization()

Returns whether the criterion is monotonic with generalization.

Returns:

#### isMonotonicWithSuppression

    public boolean isMonotonicWithSuppression()

Returns whether the criterion is monotonic with tuple suppression.

Returns:

#### isSampleBased

    public boolean isSampleBased()

Is this criterion based on the overall sample

Returns:

#### isSubsetAvailable

    public boolean isSubsetAvailable()

If a privacy model uses a data subset, it must overwrite this method

Returns:

#### render

    public abstract ElementData render()

Renders the privacy model

Returns:

#### toString

    public abstract java.lang.String toString()

Returns a string representation.

Overrides:
  `toString` in class `java.lang.Object`
Returns: