# Model (ARX GUI Documentation)

org.deidentifier.arx.gui.model

## Class Model

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

- All Implemented Interfaces:
    java.io.Serializable

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

  This class implements a large portion of the model used by the GUI.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Model.Perspective` The currently selected perspective

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Model(java.lang.String name, java.lang.String description, java.util.Locale locale)` Creates a new instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAuditTrailEntry(ModelAuditTrailEntry entry)` Adds an entry to the audit trail
    `ARXAnonymizer` | `createAnonymizer()` Creates an anonymizer for the current config.
    `void` | `createClonedConfig()` Replaces the output config with a clone of the input config.
    `void` | `createConfig()` Creates an ARXConfiguration.
    `ARXConfiguration` | `createSubsetConfig()` Creates an ARXConfiguration for the subset.
    `ARXAnonymizer` | `getAnonymizer()` Returns the current anonymizer.
    `java.lang.String[]` | `getAttributePair()` Returns the last two selected attributes.
    `java.util.List<ModelAuditTrailEntry>` | `getAuditTrail()` Returns the audit trail
    `java.util.Map<java.lang.String,ModelBLikenessCriterion>` | `getBLikenessModel()` Returns the b-Likeness privacy model.
    `ModelClassification` | `getClassificationModel()` Returns the classification model
    `ModelClipboard` | `getClipboard()` Returns the clipboard.
    `CSVSyntax` | `getCSVSyntax()` Gets the csv config model.
    `java.util.Map<java.lang.String,ModelDDisclosurePrivacyCriterion>` | `getDDisclosurePrivacyModel()` Returns the d-disclosure privacy model.
    `java.lang.String` | `getDescription()` Returns the project description.
    `ModelDifferentialPrivacyCriterion` | `getDifferentialPrivacyModel()` Returns the (e,d)-DP model.
    `ModelDPresenceCriterion` | `getDPresenceModel()` Returns the d-presence model.
    `int[]` | `getGroups()` Returns a list of indices of all equivalence classes.
    `int` | `getHistorySize()` Returns the according parameter.
    `int` | `getInitialNodesInViewer()` Returns an upper bound on the number of nodes that will initially be displayed in the lattice viewer.
    `long` | `getInputBytes()` Returns the size in bytes of the input file.
    `ModelConfiguration` | `getInputConfig()` Returns the input configuration.
    `DataDefinition` | `getInputDefinition()` Returns the input definition.
    `ARXPopulationModel` | `getInputPopulationModel()` Returns the input population model
    `ModelKAnonymityCriterion` | `getKAnonymityModel()` Returns the k-anonymity model.
    `ModelKMapCriterion` | `getKMapModel()` Returns the k-map model.
    `java.util.Map<java.lang.String,ModelLDiversityCriterion>` | `getLDiversityModel()` Returns the l-diversity model.
    `java.util.Locale` | `getLocale()` Returns the project locale.
    `ModelLocalRecoding` | `getLocalRecodingModel()` Returns the model for local recoding
    `int` | `getMaximalSizeForComplexOperations()` When a dataset has more records than this threshold, visualization of statistics will be disabled.
    `int` | `getMaxNodesInViewer()` Returns the maximal size of a sub-lattice that will be displayed by the viewer.
    `MetricConfiguration` | `getMetricConfiguration()` Returns the configuration of the metric.
    `MetricDescription` | `getMetricDescription()` Returns a description of the metric.
    `java.lang.String` | `getName()` Returns the name of this project.
    `ModelNodeFilter` | `getNodeFilter()` Returns the current filter.
    `java.lang.String` | `getOptimalNodeAsString()` Returns a string representation of the current optimum.
    `DataHandle` | `getOutput()`
    `ModelConfiguration` | `getOutputConfig()` Returns the output config.
    `DataDefinition` | `getOutputDefinition()` Returns the output definition.
    `ARXLattice.ARXNode` | `getOutputNode()` Returns the currently applied transformation.
    `java.lang.String` | `getOutputNodeAsString()` Returns a string representation of the currently applied transformation.
    `ARXPopulationModel` | `getOutputPopulationModel()` Returns the output population model, if any.
    `java.lang.String` | `getPath()` Returns the path of the project.
    `Model.Perspective` | `getPerspective()`
    `java.lang.String` | `getQuery()` Returns the current query.
    `ARXResult` | `getResult()` Returns the current result.
    `java.util.Set<ModelRiskBasedCriterion>` | `getRiskBasedModel()` Returns the risk-based model.
    `ModelRisk` | `getRiskModel()` Returns the risk model
    `java.lang.String` | `getSelectedAttribute()` Returns the currently selected attribute.
    `java.util.Set<java.lang.String>` | `getSelectedClasses()` Returns the selected features
    `java.util.Set<java.lang.String>` | `getSelectedFeatures()` Returns the selected features
    `ARXLattice.ARXNode` | `getSelectedNode()` Returns the selected transformation.
    `java.util.Set<java.lang.String>` | `getSelectedQuasiIdentifiers()` Returns a set of quasi identifiers selected for risk analysis
    `char` | `getSeparator()` Returns the separator.
    `double` | `getSnapshotSizeDataset()` Returns the according parameter.
    `double` | `getSnapshotSizeSnapshot()` Returns the according parameter.
    `ModelProfitabilityCriterion` | `getStackelbergModel()` Returns the configuration object for the stackelberg privacy model
    `java.lang.String` | `getSubsetOrigin()` Returns the origin of the subset.
    `java.util.Map<java.lang.String,ModelTClosenessCriterion>` | `getTClosenessModel()` Returns the t-closeness model.
    `long` | `getTime()` Returns the execution time of the last anonymization process.
    `java.lang.Boolean` | `getUseFunctionalHierarchies()` Returns whether functional hierarchies should be used
    `java.lang.Boolean` | `getUseListwiseDeletion()` Returns whether list-wise deletion is used for summary statistics
    `ModelViewConfig` | `getViewConfig()` Returns the view configuration.
    `boolean` | `isDebugEnabled()` Returns whether debugging is enabled.
    `boolean` | `isModified()` Returns whether this project is modified.
    `boolean` | `isQuasiIdentifierSelected()` Returns whether a quasi-identifier is selected.
    `boolean` | `isSensitiveAttributeSelected()` Returns whether a sensitive attribute is selected.
    `boolean` | `isVisualizationEnabled()` Returns whether visualization is enabled.
    `void` | `reset()` Resets the model.
    `void` | `resetAttributePair()` Returns the last two selected attributes.
    `void` | `resetCriteria()` Resets the configuration of the privacy criteria.
    `void` | `setAnonymizer(ARXAnonymizer anonymizer)` Sets the anonymizer.
    `void` | `setDebugEnabled(boolean value)` Enables debugging.
    `void` | `setDescription(java.lang.String description)` Sets the project description.
    `void` | `setGroups(int[] groups)` Sets the indices of equivalence classes.
    `void` | `setHistorySize(int historySize)` Sets the according parameter.
    `void` | `setInitialNodesInViewer(int val)` Sets the according parameter.
    `void` | `setInputBytes(long inputBytes)` Sets the size of the input in bytes.
    `void` | `setInputConfig(ModelConfiguration config)` Sets the input config.
    `void` | `setLocale(java.util.Locale locale)` Sets the project locale.
    `void` | `setMaximalSizeForComplexOperations(int numberOfRows)` Sets the according parameter.
    `void` | `setMaxNodesInViewer(int maxNodesInViewer)` Sets the according parameter.
    `void` | `setMetricDescription(MetricDescription description)` Sets the description of the metric.
    `void` | `setModified()` Marks this project as modified.
    `void` | `setName(java.lang.String name)` Sets the project name.
    `void` | `setNodeFilter(ModelNodeFilter filter)` Sets a filter.
    `void` | `setOutput(DataHandle output, ARXLattice.ARXNode node)` Sets the current output.
    `void` | `setOutputConfig(ModelConfiguration config)` Sets the output config.
    `void` | `setPath(java.lang.String path)` Sets the project path.
    `void` | `setPerspective(Model.Perspective perspective)`
    `void` | `setQuery(java.lang.String query)` Sets the query.
    `void` | `setResult(ARXResult result)` Sets the result.
    `void` | `setSaved()` Marks this project as saved.
    `void` | `setSelectedAttribute(java.lang.String attribute)` Sets the selected attribute.
    `void` | `setSelectedClasses(java.util.Set<java.lang.String> set)` Sets a set of selected attributes
    `void` | `setSelectedFeatures(java.util.Set<java.lang.String> set)` Sets a set of selected attributes
    `void` | `setSelectedNode(ARXLattice.ARXNode node)` Sets the selected node.
    `void` | `setSelectedQuasiIdentifiers(java.util.Set<java.lang.String> set)` Sets a set of quasi identifiers selected for risk analysis
    `void` | `setSnapshotSizeDataset(double snapshotSize)`
    `void` | `setSnapshotSizeSnapshot(double snapshotSize)` Sets the according parameter.
    `void` | `setSubsetManual()` Sets how the subset was defined.
    `void` | `setSubsetOrigin(java.lang.String origin)` Sets how the subset was defined.
    `void` | `setTime(long time)` Sets the execution time of the last anonymization process.
    `void` | `setUnmodified()` Marks this model as unmodified.
    `void` | `setUseFunctionalHierarchies(boolean useFunctionalHierarchies)` Sets whether funtional hierarchies should be used during anonymization to esimtate utility
    `void` | `setUseListwiseDeletion(boolean useListwiseDeletion)` Sets whether list-wise deletion should be used for summary statistics
    `void` | `setViewConfig(ModelViewConfig viewConfig)` Sets the view configuration.
    `void` | `setVisualizationEnabled(boolean value)` Sets visualization as enabled/disabled.

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

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

- - ### Constructor Detail

    - #### Model

          public Model(java.lang.String name,
               java.lang.String description,
               java.util.Locale locale)

      Creates a new instance.
      Parameters:
        `name` -
        `description` -
        `locale` -

  - ### Method Detail

    - #### addAuditTrailEntry

          public void addAuditTrailEntry(ModelAuditTrailEntry entry)

      Adds an entry to the audit trail
      Parameters:
        `entry` -

    - #### createAnonymizer

          public ARXAnonymizer createAnonymizer()

      Creates an anonymizer for the current config.
      Returns:

    - #### createClonedConfig

          public void createClonedConfig()

      Replaces the output config with a clone of the input config.

    - #### createConfig

          public void createConfig()

      Creates an ARXConfiguration.

    - #### createSubsetConfig

          public ARXConfiguration createSubsetConfig()

      Creates an ARXConfiguration for the subset.
      Returns:

    - #### getAnonymizer

          public ARXAnonymizer getAnonymizer()

      Returns the current anonymizer.
      Returns:

    - #### getAttributePair

          public java.lang.String[] getAttributePair()

      Returns the last two selected attributes.
      Returns:

    - #### getAuditTrail

          public java.util.List<ModelAuditTrailEntry> getAuditTrail()

      Returns the audit trail
      Returns:

    - #### getClassificationModel

          public ModelClassification getClassificationModel()

      Returns the classification model
      Returns:

    - #### getClipboard

          public ModelClipboard getClipboard()

      Returns the clipboard.
      Returns:

    - #### getCSVSyntax

          public CSVSyntax getCSVSyntax()

      Gets the csv config model.
      Returns:

    - #### getDDisclosurePrivacyModel

          public java.util.Map<java.lang.String,ModelDDisclosurePrivacyCriterion> getDDisclosurePrivacyModel()

      Returns the d-disclosure privacy model.
      Returns:

    - #### getBLikenessModel

          public java.util.Map<java.lang.String,ModelBLikenessCriterion> getBLikenessModel()

      Returns the b-Likeness privacy model.
      Returns:

    - #### getDescription

          public java.lang.String getDescription()

      Returns the project description.
      Returns:

    - #### getDifferentialPrivacyModel

          public ModelDifferentialPrivacyCriterion getDifferentialPrivacyModel()

      Returns the (e,d)-DP model.
      Returns:

    - #### getDPresenceModel

          public ModelDPresenceCriterion getDPresenceModel()

      Returns the d-presence model.
      Returns:

    - #### getGroups

          public int[] getGroups()

      Returns a list of indices of all equivalence classes.
      Returns:

    - #### getHistorySize

          public int getHistorySize()

      Returns the according parameter.
      Returns:

    - #### getInitialNodesInViewer

          public int getInitialNodesInViewer()

      Returns an upper bound on the number of nodes that will initially be displayed in the lattice viewer.
      Returns:

    - #### getInputBytes

          public long getInputBytes()

      Returns the size in bytes of the input file.
      Returns:

    - #### getInputConfig

          public ModelConfiguration getInputConfig()

      Returns the input configuration.
      Returns:

    - #### getInputDefinition

          public DataDefinition getInputDefinition()

      Returns the input definition.
      Returns:

    - #### getInputPopulationModel

          public ARXPopulationModel getInputPopulationModel()

      Returns the input population model
      Returns:

    - #### getKAnonymityModel

          public ModelKAnonymityCriterion getKAnonymityModel()

      Returns the k-anonymity model.
      Returns:

    - #### getKMapModel

          public ModelKMapCriterion getKMapModel()

      Returns the k-map model.
      Returns:

    - #### getLDiversityModel

          public java.util.Map<java.lang.String,ModelLDiversityCriterion> getLDiversityModel()

      Returns the l-diversity model.
      Returns:

    - #### getLocale

          public java.util.Locale getLocale()

      Returns the project locale.
      Returns:

    - #### getLocalRecodingModel

          public ModelLocalRecoding getLocalRecodingModel()

      Returns the model for local recoding
      Returns:

    - #### getMaximalSizeForComplexOperations

          public int getMaximalSizeForComplexOperations()

      When a dataset has more records than this threshold, visualization of statistics will be disabled.
      Returns:

    - #### getMaxNodesInViewer

          public int getMaxNodesInViewer()

      Returns the maximal size of a sub-lattice that will be displayed by the viewer.
      Returns:

    - #### getMetricConfiguration

          public MetricConfiguration getMetricConfiguration()

      Returns the configuration of the metric.
      Returns:

    - #### getMetricDescription

          public MetricDescription getMetricDescription()

      Returns a description of the metric.
      Returns:

    - #### getName

          public java.lang.String getName()

      Returns the name of this project.
      Returns:

    - #### getNodeFilter

          public ModelNodeFilter getNodeFilter()

      Returns the current filter.
      Returns:

    - #### getOptimalNodeAsString

          public java.lang.String getOptimalNodeAsString()

      Returns a string representation of the current optimum.
      Returns:

    - #### getOutput

          public DataHandle getOutput()

      Returns:
        the output

    - #### getOutputConfig

          public ModelConfiguration getOutputConfig()

      Returns the output config.
      Returns:

    - #### getOutputDefinition

          public DataDefinition getOutputDefinition()

      Returns the output definition.
      Returns:

    - #### getOutputNode

          public ARXLattice.ARXNode getOutputNode()

      Returns the currently applied transformation.
      Returns:

    - #### getOutputNodeAsString

          public java.lang.String getOutputNodeAsString()

      Returns a string representation of the currently applied transformation.
      Returns:

    - #### getOutputPopulationModel

          public ARXPopulationModel getOutputPopulationModel()

      Returns the output population model, if any. Null otherwise.
      Returns:

    - #### getPath

          public java.lang.String getPath()

      Returns the path of the project.
      Returns:

    - #### getPerspective

          public Model.Perspective getPerspective()

      Returns:
        the perspective

    - #### getQuery

          public java.lang.String getQuery()

      Returns the current query.
      Returns:

    - #### getResult

          public ARXResult getResult()

      Returns the current result.
      Returns:
        the result

    - #### getRiskBasedModel

          public java.util.Set<ModelRiskBasedCriterion> getRiskBasedModel()

      Returns the risk-based model.
      Returns:

    - #### getRiskModel

          public ModelRisk getRiskModel()

      Returns the risk model
      Returns:
        the risk model

    - #### getSelectedAttribute

          public java.lang.String getSelectedAttribute()

      Returns the currently selected attribute.
      Returns:

    - #### getSelectedClasses

          public java.util.Set<java.lang.String> getSelectedClasses()

      Returns the selected features
      Returns:

    - #### getSelectedFeatures

          public java.util.Set<java.lang.String> getSelectedFeatures()

      Returns the selected features
      Returns:

    - #### getSelectedNode

          public ARXLattice.ARXNode getSelectedNode()

      Returns the selected transformation.
      Returns:

    - #### getSelectedQuasiIdentifiers

          public java.util.Set<java.lang.String> getSelectedQuasiIdentifiers()

      Returns a set of quasi identifiers selected for risk analysis
      Returns:

    - #### getSeparator

          public char getSeparator()

      Returns the separator.
      Returns:

    - #### getSnapshotSizeDataset

          public double getSnapshotSizeDataset()

      Returns the according parameter.
      Returns:

    - #### getSnapshotSizeSnapshot

          public double getSnapshotSizeSnapshot()

      Returns the according parameter.
      Returns:

    - #### getStackelbergModel

          public ModelProfitabilityCriterion getStackelbergModel()

      Returns the configuration object for the stackelberg privacy model
      Returns:

    - #### getSubsetOrigin

          public java.lang.String getSubsetOrigin()

      Returns the origin of the subset.
      Returns:

    - #### getTClosenessModel

          public java.util.Map<java.lang.String,ModelTClosenessCriterion> getTClosenessModel()

      Returns the t-closeness model.
      Returns:

    - #### getTime

          public long getTime()

      Returns the execution time of the last anonymization process.
      Returns:

    - #### getUseFunctionalHierarchies

          public java.lang.Boolean getUseFunctionalHierarchies()

      Returns whether functional hierarchies should be used
      Returns:

    - #### getUseListwiseDeletion

          public java.lang.Boolean getUseListwiseDeletion()

      Returns whether list-wise deletion is used for summary statistics
      Returns:

    - #### getViewConfig

          public ModelViewConfig getViewConfig()

      Returns the view configuration.
      Returns:

    - #### isDebugEnabled

          public boolean isDebugEnabled()

      Returns whether debugging is enabled.
      Returns:

    - #### isModified

          public boolean isModified()

      Returns whether this project is modified.
      Returns:

    - #### isQuasiIdentifierSelected

          public boolean isQuasiIdentifierSelected()

      Returns whether a quasi-identifier is selected.
      Returns:

    - #### isSensitiveAttributeSelected

          public boolean isSensitiveAttributeSelected()

      Returns whether a sensitive attribute is selected.
      Returns:

    - #### isVisualizationEnabled

          public boolean isVisualizationEnabled()

      Returns whether visualization is enabled.
      Returns:

    - #### reset

          public void reset()

      Resets the model.

    - #### resetAttributePair

          public void resetAttributePair()

      Returns the last two selected attributes.

    - #### resetCriteria

          public void resetCriteria()

      Resets the configuration of the privacy criteria.

    - #### setAnonymizer

          public void setAnonymizer(ARXAnonymizer anonymizer)

      Sets the anonymizer.
      Parameters:
        `anonymizer` -

    - #### setDebugEnabled

          public void setDebugEnabled(boolean value)

      Enables debugging.
      Parameters:
        `value` -

    - #### setDescription

          public void setDescription(java.lang.String description)

      Sets the project description.
      Parameters:
        `description` -

    - #### setGroups

          public void setGroups(int[] groups)

      Sets the indices of equivalence classes.
      Parameters:
        `groups` -

    - #### setHistorySize

          public void setHistorySize(int historySize)

      Sets the according parameter.
      Parameters:
        `historySize` -

    - #### setInitialNodesInViewer

          public void setInitialNodesInViewer(int val)

      Sets the according parameter.
      Parameters:
        `val` -

    - #### setInputBytes

          public void setInputBytes(long inputBytes)

      Sets the size of the input in bytes.
      Parameters:
        `inputBytes` -

    - #### setInputConfig

          public void setInputConfig(ModelConfiguration config)

      Sets the input config.
      Parameters:
        `config` -

    - #### setLocale

          public void setLocale(java.util.Locale locale)

      Sets the project locale.
      Parameters:
        `locale` - Null for default locale

    - #### setMaximalSizeForComplexOperations

          public void setMaximalSizeForComplexOperations(int numberOfRows)

      Sets the according parameter.
      Parameters:
        `numberOfRows` -

    - #### setMaxNodesInViewer

          public void setMaxNodesInViewer(int maxNodesInViewer)

      Sets the according parameter.
      Parameters:
        `maxNodesInViewer` -

    - #### setMetricDescription

          public void setMetricDescription(MetricDescription description)

      Sets the description of the metric.
      Parameters:
        `description` -

    - #### setModified

          public void setModified()

      Marks this project as modified.

    - #### setName

          public void setName(java.lang.String name)

      Sets the project name.
      Parameters:
        `name` -

    - #### setNodeFilter

          public void setNodeFilter(ModelNodeFilter filter)

      Sets a filter.
      Parameters:
        `filter` -

    - #### setOutput

          public void setOutput(DataHandle output,
                       ARXLattice.ARXNode node)

      Sets the current output.
      Parameters:
        `output` -
        `node` -

    - #### setOutputConfig

          public void setOutputConfig(ModelConfiguration config)

      Sets the output config.
      Parameters:
        `config` -

    - #### setPath

          public void setPath(java.lang.String path)

      Sets the project path.
      Parameters:
        `path` -

    - #### setPerspective

          public void setPerspective(Model.Perspective perspective)

      Parameters:
        `perspective` - the perspective to set

    - #### setQuery

          public void setQuery(java.lang.String query)

      Sets the query.
      Parameters:
        `query` -

    - #### setResult

          public void setResult(ARXResult result)

      Sets the result.
      Parameters:
        `result` -

    - #### setSaved

          public void setSaved()

      Marks this project as saved.

    - #### setSelectedAttribute

          public void setSelectedAttribute(java.lang.String attribute)

      Sets the selected attribute.
      Parameters:
        `attribute` -

    - #### setSelectedClasses

          public void setSelectedClasses(java.util.Set<java.lang.String> set)

      Sets a set of selected attributes
      Parameters:
        `set` -

    - #### setSelectedFeatures

          public void setSelectedFeatures(java.util.Set<java.lang.String> set)

      Sets a set of selected attributes
      Parameters:
        `set` -

    - #### setSelectedNode

          public void setSelectedNode(ARXLattice.ARXNode node)

      Sets the selected node.
      Parameters:
        `node` -

    - #### setSelectedQuasiIdentifiers

          public void setSelectedQuasiIdentifiers(java.util.Set<java.lang.String> set)

      Sets a set of quasi identifiers selected for risk analysis
      Parameters:
        `set` -

    - #### setSnapshotSizeDataset

          public void setSnapshotSizeDataset(double snapshotSize)

      Parameters:
        `snapshotSize` -

    - #### setSnapshotSizeSnapshot

          public void setSnapshotSizeSnapshot(double snapshotSize)

      Sets the according parameter.
      Parameters:
        `snapshotSize` -

    - #### setSubsetManual

          public void setSubsetManual()

      Sets how the subset was defined.

    - #### setSubsetOrigin

          public void setSubsetOrigin(java.lang.String origin)

      Sets how the subset was defined.
      Parameters:
        `origin` -

    - #### setTime

          public void setTime(long time)

      Sets the execution time of the last anonymization process.
      Parameters:
        `time` -

    - #### setUnmodified

          public void setUnmodified()

      Marks this model as unmodified.

    - #### setUseFunctionalHierarchies

          public void setUseFunctionalHierarchies(boolean useFunctionalHierarchies)

      Sets whether funtional hierarchies should be used during anonymization to esimtate utility
      Parameters:
        `useFunctionalHierarchies` -

    - #### setUseListwiseDeletion

          public void setUseListwiseDeletion(boolean useListwiseDeletion)

      Sets whether list-wise deletion should be used for summary statistics
      Parameters:
        `useListwiseDeletion` -

    - #### setViewConfig

          public void setViewConfig(ModelViewConfig viewConfig)

      Sets the view configuration.
      Parameters:
        `viewConfig` -

    - #### setVisualizationEnabled

          public void setVisualizationEnabled(boolean value)

      Sets visualization as enabled/disabled.
      Parameters:
        `value` -