public class ARXConfiguration
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
ARXConfiguration.ARXConfigurationInternal
Class for internal use that provides access to more details.
|
Modifier and Type | Field and Description |
---|---|
static int |
REQUIREMENT_COUNTER
Do the criteria require a counter per equivalence class.
|
static int |
REQUIREMENT_DISTRIBUTION
Do the criteria require distributions of sensitive values in the equivalence classes.
|
static int |
REQUIREMENT_SECONDARY_COUNTER
Do the criteria require a second counter.
|
Modifier and Type | Method and Description |
---|---|
ARXConfiguration |
addCriterion(PrivacyCriterion c)
Adds a criterion to the configuration.
|
ARXConfiguration |
clone()
Clones this config.
|
boolean |
containsCriterion(java.lang.Class<? extends PrivacyCriterion> clazz)
Returns whether the configuration contains a criterion of the given class.
|
static ARXConfiguration |
create()
Creates a new config without tuple suppression.
|
static ARXConfiguration |
create(double suppressionLimit)
Creates a new config that allows the given percentage of outliers and
thus implements tuple suppression.
|
static ARXConfiguration |
create(double suppressionLimit,
Metric<?> metric)
Creates a new config that allows the given percentage of outliers and
thus implements tuple suppression.
|
static ARXConfiguration |
create(Metric<?> metric)
Creates a new config that allows to define the metric for measuring information loss.
|
double |
getAttributeWeight(java.lang.String attribute)
Returns the weight for the given attribute.
|
java.util.Map<java.lang.String,java.lang.Double> |
getAttributeWeights()
Returns all configured attribute weights.
|
java.util.Set<PrivacyCriterion> |
getCriteria()
Returns all criteria.
|
<T extends PrivacyCriterion> |
getCriteria(java.lang.Class<T> clazz)
Returns all privacy criteria that are instances of the given class.
|
<T extends PrivacyCriterion> |
getCriterion(java.lang.Class<T> clazz)
Returns an instance of the class, if any.
|
double |
getMaxOutliers()
Returns the maximum number of allowed outliers.
|
Metric<?> |
getMetric()
Returns the metric used for measuring information loss.
|
java.lang.String |
getSuppressionString()
Sets the string with which suppressed values are to be replaced.
|
boolean |
isAttributeTypeSuppressed(AttributeType type)
Returns whether values of the given attribute type will be replaced by the suppression
string in suppressed tuples.
|
boolean |
isCriterionMonotonic()
Determines whether the anonymity criterion is montonic.
|
boolean |
isPracticalMonotonicity()
Is practical monotonicity assumed.
|
boolean |
isProtectSensitiveAssociations()
Returns, whether the anonymizer should take associations between sensitive attributes into account.
|
boolean |
isSuppressionAlwaysEnabled()
Returns whether suppression is applied to the output of anonymous as well as non-anonymous transformations.
|
boolean |
isUseHeuristicSearchForSampleBasedCriteria()
Do we guarantee optimality for sample-based criteria?
|
<T extends PrivacyCriterion> |
removeCriterion(PrivacyCriterion arg)
Removes the given criterion.
|
void |
setAttributeTypeSuppressed(AttributeType type,
boolean enabled)
Defines values of which attribute type are to be replaced by the suppression string in suppressed tuples.
|
void |
setAttributeWeight(java.lang.String attribute,
double weight)
Sets the weight for the given attribute.
|
void |
setAttributeWeight(java.lang.String attribute,
java.lang.Double weight)
Sets the weight for the given attribute.
|
void |
setMaxOutliers(double supp)
Allows for a certain percentage of outliers and thus
triggers tuple suppression.
|
void |
setMetric(Metric<?> metric)
Sets the utility metric for measuring information loss .
|
void |
setPracticalMonotonicity(boolean assumeMonotonicity)
Set, if practical monotonicity assumed.
|
void |
setProtectSensitiveAssociations(boolean protect)
Set, whether the anonymizer should take associations between sensitive attributes into account.
|
void |
setSuppressionAlwaysEnabled(boolean enabled)
Sets whether suppression is applied to the output of anonymous as well as non-anonymous transformations.
|
void |
setSuppressionString(java.lang.String suppressionString)
Sets the string with which suppressed values are to be replaced.
|
void |
setUseHeuristicSearchForSampleBasedCriteria(boolean value)
Do we guarantee optimality for sample-based criteria?
|
public static final int REQUIREMENT_COUNTER
public static final int REQUIREMENT_DISTRIBUTION
public static final int REQUIREMENT_SECONDARY_COUNTER
public static ARXConfiguration create()
public static ARXConfiguration create(double suppressionLimit)
suppressionLimit
- public static ARXConfiguration create(double suppressionLimit, Metric<?> metric)
suppressionLimit
- metric
- public static ARXConfiguration create(Metric<?> metric)
metric
- public ARXConfiguration addCriterion(PrivacyCriterion c)
c
- public ARXConfiguration clone()
clone
in class java.lang.Object
public boolean containsCriterion(java.lang.Class<? extends PrivacyCriterion> clazz)
clazz
- public double getAttributeWeight(java.lang.String attribute)
attribute
- public java.util.Map<java.lang.String,java.lang.Double> getAttributeWeights()
public java.util.Set<PrivacyCriterion> getCriteria()
public <T extends PrivacyCriterion> java.util.Set<T> getCriteria(java.lang.Class<T> clazz)
T
- clazz
- public <T extends PrivacyCriterion> T getCriterion(java.lang.Class<T> clazz)
T
- clazz
- public final double getMaxOutliers()
public Metric<?> getMetric()
public java.lang.String getSuppressionString()
*
.public boolean isAttributeTypeSuppressed(AttributeType type)
type
- public final boolean isCriterionMonotonic()
public boolean isPracticalMonotonicity()
public boolean isProtectSensitiveAssociations()
public boolean isSuppressionAlwaysEnabled()
true
, suppression will be applied to the output of non-anonymous
transformations to make them anonymous (if possible). Default is true
.public boolean isUseHeuristicSearchForSampleBasedCriteria()
public <T extends PrivacyCriterion> boolean removeCriterion(PrivacyCriterion arg)
T
- arg
- public void setAttributeTypeSuppressed(AttributeType type, boolean enabled)
type
- the attribute typeenabled
- whether suppression should be performed or notpublic void setAttributeWeight(java.lang.String attribute, double weight)
attribute
- weight
- public void setAttributeWeight(java.lang.String attribute, java.lang.Double weight)
attribute
- weight
- public void setMaxOutliers(double supp)
supp
- public void setMetric(Metric<?> metric)
metric
- public void setPracticalMonotonicity(boolean assumeMonotonicity)
assumeMonotonicity
- public void setProtectSensitiveAssociations(boolean protect)
protect
- public void setSuppressionAlwaysEnabled(boolean enabled)
true
, suppression will be applied to the output of non-anonymous
transformations to make them anonymous (if possible). Default is true
.enabled
- public void setSuppressionString(java.lang.String suppressionString)
*
.suppressionString
- public void setUseHeuristicSearchForSampleBasedCriteria(boolean value)