org.deidentifier.arx.gui.model

## Class ModelNodeFilter

- java.lang.Object
- - org.deidentifier.arx.gui.model.ModelNodeFilter

All Implemented Interfaces:
  java.io.Serializable

    public class ModelNodeFilter
    extends java.lang.Object
    implements java.io.Serializable

This class implements a filter for a generalization lattice.

Author:
  Fabian Prasser
See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`ModelNodeFilter(int[] maxLevels, int maxNumNodesInitial)` Creates a new instance.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `allowAllInformationLoss()` Allows transformations with any score to pass the filter.
`void` `allowAnonymous()` Allows anonymous transformations to pass the filter.
`void` `allowGeneralization(int dimension, int level)` Allows transformations with certain generalization level to pass the filter.
`void` `allowInformationLoss(double min, double max)` Allows transformations with certain score to pass the filter.
`void` `allowNonAnonymous()` Allows non-anonymous transformations to pass the filter.
`void` `allowUnknown()` Allows unknown transformations to pass the filter.
`ModelNodeFilter` `clone()` Clones the ModelNodeFilter instance.
`void` `disallowAll()` Allows no transformaions to pass the filter.
`void` `disallowAnonymous()` Filters out anonymous transformations.
`void` `disallowGeneralization(int dimension, int level)` Filters out transformations with certain generalization level.
`void` `disallowNonAnonymous()` Filters out non-anonymous transformations.
`void` `disallowUnknown()` Filters out unknown transformations.
`java.util.Set<ARXLattice.Anonymity>` `getAllowedAnonymity()`
`java.util.Set<java.lang.Integer>` `getAllowedGeneralizations(int dimension)`
`double` `getAllowedMaxInformationLoss()`
`double` `getAllowedMinInformationLoss()`
`void` `initialize(ARXResult result, boolean localTransformation)` Creates a node filter for the given result.
`boolean` `isAllowed(ARXLattice lattice, ARXLattice.ARXNode node)` Returns whether the given node is allowed to pass this filter.
`boolean` `isAllowedAnonymous()` Returns setting.
`boolean` `isAllowedNonAnonymous()` Returns setting.
`boolean` `isAllowedUnknown()` Returns setting.
`void` `reset(DataHandle handle, DataDefinition definition)` Resets the filter to display everything

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

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

### Constructor Detail

#### ModelNodeFilter

    public ModelNodeFilter(int[] maxLevels,
                           int maxNumNodesInitial)

Creates a new instance.

Parameters:
  `maxLevels` -
  `maxNumNodesInitial` -

### Method Detail

#### allowAllInformationLoss

    public void allowAllInformationLoss()

Allows transformations with any score to pass the filter.

#### allowAnonymous

    public void allowAnonymous()

Allows anonymous transformations to pass the filter.

#### allowGeneralization

    public void allowGeneralization(int dimension,
                                    int level)

Allows transformations with certain generalization level to pass the filter.

Parameters:
  `dimension` -
  `level` -

#### allowInformationLoss

    public void allowInformationLoss(double min,
                                     double max)

Allows transformations with certain score to pass the filter.

Parameters:
  `min` -
  `max` -

#### allowNonAnonymous

    public void allowNonAnonymous()

Allows non-anonymous transformations to pass the filter.

#### allowUnknown

    public void allowUnknown()

Allows unknown transformations to pass the filter.

#### clone

    public ModelNodeFilter clone()

Clones the ModelNodeFilter instance.

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

#### disallowAll

    public void disallowAll()

Allows no transformaions to pass the filter.

#### disallowAnonymous

    public void disallowAnonymous()

Filters out anonymous transformations.

#### disallowGeneralization

    public void disallowGeneralization(int dimension,
                                       int level)

Filters out transformations with certain generalization level.

Parameters:
  `dimension` -
  `level` -

#### disallowNonAnonymous

    public void disallowNonAnonymous()

Filters out non-anonymous transformations.

#### disallowUnknown

    public void disallowUnknown()

Filters out unknown transformations.

#### getAllowedAnonymity

    public java.util.Set<ARXLattice.Anonymity> getAllowedAnonymity()

Returns:
  the anonymity

#### getAllowedGeneralizations

    public java.util.Set<java.lang.Integer> getAllowedGeneralizations(int dimension)

Parameters:
  `dimension` -
Returns:
  the generalizations

#### getAllowedMaxInformationLoss

    public double getAllowedMaxInformationLoss()

Returns:
  the maxInformationLoss

#### getAllowedMinInformationLoss

    public double getAllowedMinInformationLoss()

Returns:
  the minInformationLoss

#### initialize

    public void initialize(ARXResult result,
                           boolean localTransformation)

Creates a node filter for the given result.

Parameters:
  `result` -
  `localTransformation` -

#### isAllowed

    public boolean isAllowed(ARXLattice lattice,
                             ARXLattice.ARXNode node)

Returns whether the given node is allowed to pass this filter.

Parameters:
  `lattice` -
  `node` -
Returns:

#### isAllowedAnonymous

    public boolean isAllowedAnonymous()

Returns setting.

Returns:

#### isAllowedNonAnonymous

    public boolean isAllowedNonAnonymous()

Returns setting.

Returns:

#### isAllowedUnknown

    public boolean isAllowedUnknown()

Returns setting.

Returns:

#### reset

    public void reset(DataHandle handle,
                      DataDefinition definition)

Resets the filter to display everything

Parameters:
  `handle` -
  `definition` -