# ModelConfiguration (ARX GUI Documentation)

org.deidentifier.arx.gui.model

## Class ModelConfiguration

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

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

      public class ModelConfiguration
      extends java.lang.Object
      implements java.io.Serializable, java.lang.Cloneable

  This class represents an input or output configuration.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ModelConfiguration()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ARXConfiguration` | `addCriterion(PrivacyCriterion c)` Delegates to an instance of ARXConfiguration.
    `ModelConfiguration` | `clone()`
    `boolean` | `containsCriterion(java.lang.Class<? extends PrivacyCriterion> clazz)` Delegates to an instance of ARXConfiguration.
    `double` | `getAdversaryCost()`
    `double` | `getAdversaryGain()`
    `double` | `getAllowedOutliers()` Delegates to an instance of ARXConfiguration.
    `double` | `getAttributeWeight(java.lang.String attribute)` Returns the associated attribute weight.
    `java.util.Map<java.lang.String,java.lang.Double>` | `getAttributeWeights()` Returns all weights.
    `ARXConfiguration` | `getConfig()` Returns the current config.
    `java.util.Set<PrivacyCriterion>` | `getCriteria()` Delegates to an instance of ARXConfiguration.
    `<T extends PrivacyCriterion> java.util.Set<T>` | `getCriteria(java.lang.Class<T> clazz)` Delegates to an instance of ARXConfiguration.
    `<T extends PrivacyCriterion> T` | `getCriterion(java.lang.Class<T> clazz)` Delegates to an instance of ARXConfiguration.
    `int` | `getHeuristicSearchThreshold()`
    `int` | `getHeuristicSearchTimeLimit()`
    `java.util.Map<java.lang.String,AttributeType.Hierarchy>` | `getHierarchies()` Returns the set of all assigned hierarchies.
    `AttributeType.Hierarchy` | `getHierarchy(java.lang.String attribute)` Returns the assigned hierarchy, if any.
    `HierarchyBuilder<?>` | `getHierarchyBuilder(java.lang.String attr)` Returns the according builder.
    `Data` | `getInput()`
    `java.lang.Integer` | `getMaximumGeneralization(java.lang.String attribute)` Maximum generalization.
    `Metric<?>` | `getMetric()` Delegates to an instance of ARXConfiguration.
    `AttributeType.MicroAggregationFunctionDescription` | `getMicroAggregationFunction(java.lang.String attribute)` Returns the microaggregation function.
    `java.lang.Boolean` | `getMicroAggregationIgnoreMissingData(java.lang.String attribute)` Returns the associated handling of missing data
    `java.lang.Integer` | `getMinimumGeneralization(java.lang.String attribute)` Minimum generalization.
    `double` | `getPublisherBenefit()`
    `double` | `getPublisherLoss()`
    `RowSet` | `getResearchSubset()` Returns the current research subset.
    `double` | `getSuppressionWeight()` Returns the suppression/generalization weight, that will be respected by the NDS metric.
    `ModelTransformationMode` | `getTransformationMode(java.lang.String attribute)` Returns the transformation mode for the given attribute.
    `boolean` | `isAttributeTypeSuppressed(AttributeType type)`
    `boolean` | `isHeuristicForSampleBasedCriteria()`
    `boolean` | `isHeuristicSearchEnabled()`
    `boolean` | `isModified()` Has the config been modified.
    `boolean` | `isPracticalMonotonicity()` Delegates to an instance of ARXConfiguration.
    `boolean` | `isSuppressionAlwaysEnabled()`
    `boolean` | `isUtilityBasedMicroaggregation()` Returns whether microaggregation will be considered by utility measures
    `boolean` | `isUtilityBasedMicroaggregationUseMeanSquaredError()` Returns whether microaggregation will be considered using the mean squared error
    `void` | `removeAllCriteria()` Removes all criteria.
    `<T extends PrivacyCriterion> boolean` | `removeCriterion(PrivacyCriterion c)` Delegates to an instance of ARXConfiguration.
    `void` | `removeHierarchy(java.lang.String attribute)` Removes a hierarchy.
    `void` | `removeHierarchyBuilder(java.lang.String attr)` Removes the builder for the given attribute.
    `void` | `setAdversaryCost(double adversaryCost)`
    `void` | `setAdversaryGain(double adversaryGain)`
    `void` | `setAllowedOutliers(double supp)` Delegates to an instance of ARXConfiguration.
    `void` | `setAttributeTypeSuppressed(AttributeType type, boolean enabled)`
    `void` | `setAttributeWeight(java.lang.String attribute, java.lang.Double weight)` Sets the according attribute weight.
    `void` | `setHeuristicForSampleBasedCriteria(boolean value)`
    `void` | `setHeuristicSearchEnabled(boolean heuristicSearchEnabled)`
    `void` | `setHeuristicSearchThreshold(int numberOfTransformations)`
    `void` | `setHeuristicSearchTimeLimit(int timeInMillis)`
    `void` | `setHierarchy(java.lang.String attribute, AttributeType.Hierarchy hierarchy)` Assigns a hierarchy.
    `void` | `setHierarchyBuilder(java.lang.String attr, HierarchyBuilder<?> builder)` Sets the given hierarchy builder.
    `void` | `setInput(Data data)`
    `void` | `setMaximumGeneralization(java.lang.String attribute, java.lang.Integer max)` Maximum generalization.
    `void` | `setMetric(Metric<?> metric)` Delegates to an instance of ARXConfiguration.
    `void` | `setMicroAggregationFunction(java.lang.String attribute, AttributeType.MicroAggregationFunctionDescription microaggregation)` Assigns a microaggregation function.
    `void` | `setMicroAggregationIgnoreMissingData(java.lang.String attribute, boolean ignoreMissingData)` Determines whether or not to ignore missing data
    `void` | `setMinimumGeneralization(java.lang.String attribute, java.lang.Integer min)` Minimum generalization.
    `void` | `setPracticalMonotonicity(boolean assumeMonotonicity)` Delegates to an instance of ARXConfiguration.
    `void` | `setPublisherBenefit(double publisherBenefit)`
    `void` | `setPublisherLoss(double publisherLoss)`
    `void` | `setResearchSubset(RowSet subset)` Sets the current research subset.
    `void` | `setSuppressionAlwaysEnabled(boolean enabled)`
    `void` | `setSuppressionWeight(double suppressionWeight)` Sets the suppression/generalization weight, that will be respected by the NDS metric.
    `void` | `setTransformationMode(java.lang.String attribute, ModelTransformationMode mode)` Sets the transformation mode
    `void` | `setUnmodified()` Sets the config unmodified.
    `void` | `setUseUtilityBasedMicroaggregation(boolean value)` Sets whether microaggregation will be considered by utility measures
    `void` | `setUseUtilityBasedMicroaggregationMeanSquaredError(boolean value)` Sets whether microaggregation will be considered using the mean squared error

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

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

- - ### Constructor Detail

    - #### ModelConfiguration

          public ModelConfiguration()

  - ### Method Detail

    - #### addCriterion

          public ARXConfiguration addCriterion(PrivacyCriterion c)

      Delegates to an instance of ARXConfiguration.
      Parameters:
        `c` -
      Returns:

    - #### clone

          public ModelConfiguration clone()

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

    - #### containsCriterion

          public boolean containsCriterion(java.lang.Class<? extends PrivacyCriterion> clazz)

      Delegates to an instance of ARXConfiguration.
      Parameters:
        `clazz` -
      Returns:

    - #### getAdversaryCost

          public double getAdversaryCost()

      Returns:
        the adversaryCost

    - #### getAdversaryGain

          public double getAdversaryGain()

      Returns:
        the adversaryGain

    - #### getAllowedOutliers

          public double getAllowedOutliers()

      Delegates to an instance of ARXConfiguration.
      Returns:

    - #### getAttributeWeight

          public double getAttributeWeight(java.lang.String attribute)

      Returns the associated attribute weight.
      Parameters:
        `attribute` -
      Returns:

    - #### getAttributeWeights

          public java.util.Map<java.lang.String,java.lang.Double> getAttributeWeights()

      Returns all weights.
      Returns:

    - #### getConfig

          public ARXConfiguration getConfig()

      Returns the current config.
      Returns:

    - #### getCriteria

          public java.util.Set<PrivacyCriterion> getCriteria()

      Delegates to an instance of ARXConfiguration.
      Returns:

    - #### getCriteria

          public <T extends PrivacyCriterion> java.util.Set<T> getCriteria(java.lang.Class<T> clazz)

      Delegates to an instance of ARXConfiguration.
      Type Parameters:
        `T` -
      Parameters:
        `clazz` -
      Returns:

    - #### getCriterion

          public <T extends PrivacyCriterion> T getCriterion(java.lang.Class<T> clazz)

      Delegates to an instance of ARXConfiguration.
      Type Parameters:
        `T` -
      Parameters:
        `clazz` -
      Returns:

    - #### getHeuristicSearchThreshold

          public int getHeuristicSearchThreshold()

      Returns:
      See Also:
        `ARXConfiguration.getHeuristicSearchThreshold()`

    - #### getHeuristicSearchTimeLimit

          public int getHeuristicSearchTimeLimit()

      Returns:
      See Also:
        `ARXConfiguration.getHeuristicSearchTimeLimit()`

    - #### getHierarchies

          public java.util.Map<java.lang.String,AttributeType.Hierarchy> getHierarchies()

      Returns the set of all assigned hierarchies.
      Returns:

    - #### getHierarchy

          public AttributeType.Hierarchy getHierarchy(java.lang.String attribute)

      Returns the assigned hierarchy, if any. Else null.
      Parameters:
        `attribute` -
      Returns:

    - #### getHierarchyBuilder

          public HierarchyBuilder<?> getHierarchyBuilder(java.lang.String attr)

      Returns the according builder.
      Parameters:
        `attr` -
      Returns:

    - #### getInput

          public Data getInput()

      Returns:
        the input

    - #### getMaximumGeneralization

          public java.lang.Integer getMaximumGeneralization(java.lang.String attribute)

      Maximum generalization.
      Parameters:
        `attribute` -
      Returns:

    - #### getMetric

          public Metric<?> getMetric()

      Delegates to an instance of ARXConfiguration.
      Returns:

    - #### getMicroAggregationFunction

          public AttributeType.MicroAggregationFunctionDescription getMicroAggregationFunction(java.lang.String attribute)

      Returns the microaggregation function.
      Parameters:
        `attribute` -
      Returns:

    - #### getMicroAggregationIgnoreMissingData

          public java.lang.Boolean getMicroAggregationIgnoreMissingData(java.lang.String attribute)

      Returns the associated handling of missing data
      Parameters:
        `attribute` -
      Returns:

    - #### getMinimumGeneralization

          public java.lang.Integer getMinimumGeneralization(java.lang.String attribute)

      Minimum generalization.
      Parameters:
        `attribute` -
      Returns:

    - #### getPublisherBenefit

          public double getPublisherBenefit()

      Returns:
        the publisherBenefit

    - #### getPublisherLoss

          public double getPublisherLoss()

      Returns:
        the publisherLoss

    - #### getResearchSubset

          public RowSet getResearchSubset()

      Returns the current research subset.
      Returns:

    - #### getSuppressionWeight

          public double getSuppressionWeight()

      Returns the suppression/generalization weight, that will be respected by the NDS metric.
      Returns:

    - #### getTransformationMode

          public ModelTransformationMode getTransformationMode(java.lang.String attribute)

      Returns the transformation mode for the given attribute. Returns ModelTransformationMode.GENERALIZATION if no entry was found, for backwards compatibility
      Parameters:
        `attribute` -
      Returns:

    - #### isAttributeTypeSuppressed

          public boolean isAttributeTypeSuppressed(AttributeType type)

      Parameters:
        `type` -
      Returns:
      See Also:
        `ARXConfiguration.isAttributeTypeSuppressed(org.deidentifier.arx.AttributeType)`

    - #### isHeuristicForSampleBasedCriteria

          public boolean isHeuristicForSampleBasedCriteria()

      Returns:
      See Also:
        `ARXConfiguration.isUseHeuristicSearchForSampleBasedCriteria()`

    - #### isHeuristicSearchEnabled

          public boolean isHeuristicSearchEnabled()

      Returns:
      See Also:
        `ARXConfiguration.isHeuristicSearchEnabled()`

    - #### isModified

          public boolean isModified()

      Has the config been modified.
      Returns:

    - #### isPracticalMonotonicity

          public boolean isPracticalMonotonicity()

      Delegates to an instance of ARXConfiguration.
      Returns:

    - #### isSuppressionAlwaysEnabled

          public boolean isSuppressionAlwaysEnabled()

      Returns:
      See Also:
        `ARXConfiguration.isSuppressionAlwaysEnabled()`

    - #### isUtilityBasedMicroaggregation

          public boolean isUtilityBasedMicroaggregation()

      Returns whether microaggregation will be considered by utility measures
      Returns:

    - #### isUtilityBasedMicroaggregationUseMeanSquaredError

          public boolean isUtilityBasedMicroaggregationUseMeanSquaredError()

      Returns whether microaggregation will be considered using the mean squared error
      Returns:

    - #### removeAllCriteria

          public void removeAllCriteria()

      Removes all criteria.

    - #### removeCriterion

          public <T extends PrivacyCriterion> boolean removeCriterion(PrivacyCriterion c)

      Delegates to an instance of ARXConfiguration.
      Type Parameters:
        `T` -
      Parameters:
        `c` -
      Returns:

    - #### removeHierarchy

          public void removeHierarchy(java.lang.String attribute)

      Removes a hierarchy.
      Parameters:
        `attribute` -

    - #### removeHierarchyBuilder

          public void removeHierarchyBuilder(java.lang.String attr)

      Removes the builder for the given attribute.
      Parameters:
        `attr` -

    - #### setAdversaryCost

          public void setAdversaryCost(double adversaryCost)

      Parameters:
        `adversaryCost` - the adversaryCost to set

    - #### setAdversaryGain

          public void setAdversaryGain(double adversaryGain)

      Parameters:
        `adversaryGain` - the adversaryGain to set

    - #### setAllowedOutliers

          public void setAllowedOutliers(double supp)

      Delegates to an instance of ARXConfiguration.
      Parameters:
        `supp` -

    - #### setAttributeTypeSuppressed

          public void setAttributeTypeSuppressed(AttributeType type,
                                        boolean enabled)

      Parameters:
        `type` -
        `enabled` -
      See Also:
        `ARXConfiguration.setAttributeTypeSuppressed(org.deidentifier.arx.AttributeType, boolean)`

    - #### setAttributeWeight

          public void setAttributeWeight(java.lang.String attribute,
                                java.lang.Double weight)

      Sets the according attribute weight.
      Parameters:
        `attribute` -
        `weight` -

    - #### setHeuristicForSampleBasedCriteria

          public void setHeuristicForSampleBasedCriteria(boolean value)

      Parameters:
        `value` -
      See Also:
        `ARXConfiguration.setUseHeuristicSearchForSampleBasedCriteria(boolean)`

    - #### setHeuristicSearchEnabled

          public void setHeuristicSearchEnabled(boolean heuristicSearchEnabled)

      Parameters:
        `heuristicSearchEnabled` -
      See Also:
        `ARXConfiguration.setHeuristicSearchEnabled(boolean)`

    - #### setHeuristicSearchThreshold

          public void setHeuristicSearchThreshold(int numberOfTransformations)

      Parameters:
        `numberOfTransformations` -
      See Also:
        `ARXConfiguration.setHeuristicSearchThreshold(int)`

    - #### setHeuristicSearchTimeLimit

          public void setHeuristicSearchTimeLimit(int timeInMillis)

      Parameters:
        `timeInMillis` -
      See Also:
        `ARXConfiguration.setHeuristicSearchTimeLimit(int)`

    - #### setHierarchy

          public void setHierarchy(java.lang.String attribute,
                          AttributeType.Hierarchy hierarchy)

      Assigns a hierarchy.
      Parameters:
        `attribute` -
        `hierarchy` -

    - #### setHierarchyBuilder

          public void setHierarchyBuilder(java.lang.String attr,
                                 HierarchyBuilder<?> builder)

      Sets the given hierarchy builder.
      Parameters:
        `attr` -
        `builder` -

    - #### setInput

          public void setInput(Data data)

      Parameters:
        `data` - the input to set

    - #### setMaximumGeneralization

          public void setMaximumGeneralization(java.lang.String attribute,
                                      java.lang.Integer max)

      Maximum generalization.
      Parameters:
        `attribute` -
        `max` -

    - #### setMetric

          public void setMetric(Metric<?> metric)

      Delegates to an instance of ARXConfiguration.
      Parameters:
        `metric` -

    - #### setMicroAggregationFunction

          public void setMicroAggregationFunction(java.lang.String attribute,
                                         AttributeType.MicroAggregationFunctionDescription microaggregation)

      Assigns a microaggregation function.
      Parameters:
        `attribute` -
        `microaggregation` -

    - #### setMicroAggregationIgnoreMissingData

          public void setMicroAggregationIgnoreMissingData(java.lang.String attribute,
                                                  boolean ignoreMissingData)

      Determines whether or not to ignore missing data
      Parameters:
        `attribute` -
        `ignoreNullValues` -

    - #### setMinimumGeneralization

          public void setMinimumGeneralization(java.lang.String attribute,
                                      java.lang.Integer min)

      Minimum generalization.
      Parameters:
        `attribute` -
        `min` -

    - #### setPracticalMonotonicity

          public void setPracticalMonotonicity(boolean assumeMonotonicity)

      Delegates to an instance of ARXConfiguration.
      Parameters:
        `assumeMonotonicity` -

    - #### setPublisherBenefit

          public void setPublisherBenefit(double publisherBenefit)

      Parameters:
        `publisherBenefit` - the publisherBenefit to set

    - #### setPublisherLoss

          public void setPublisherLoss(double publisherLoss)

      Parameters:
        `publisherLoss` - the publisherLoss to set

    - #### setResearchSubset

          public void setResearchSubset(RowSet subset)

      Sets the current research subset.
      Parameters:
        `subset` -

    - #### setSuppressionAlwaysEnabled

          public void setSuppressionAlwaysEnabled(boolean enabled)

      Parameters:
        `enabled` -
      See Also:
        `ARXConfiguration.setSuppressionAlwaysEnabled(boolean)`

    - #### setSuppressionWeight

          public void setSuppressionWeight(double suppressionWeight)

      Sets the suppression/generalization weight, that will be respected by the NDS metric.
      Parameters:
        `suppressionWeight` -

    - #### setTransformationMode

          public void setTransformationMode(java.lang.String attribute,
                                   ModelTransformationMode mode)

      Sets the transformation mode
      Parameters:
        `attribute` -
        `mode` -

    - #### setUnmodified

          public void setUnmodified()

      Sets the config unmodified.

    - #### setUseUtilityBasedMicroaggregation

          public void setUseUtilityBasedMicroaggregation(boolean value)

      Sets whether microaggregation will be considered by utility measures

    - #### setUseUtilityBasedMicroaggregationMeanSquaredError

          public void setUseUtilityBasedMicroaggregationMeanSquaredError(boolean value)

      Sets whether microaggregation will be considered using the mean squared error