anonymizer
Class Configuration

java.lang.Object
  extended by anonymizer.Configuration

public class Configuration
extends java.lang.Object

The class that parses the configuration input, which includes QID attribute set, sensitive attributes and anonymization parameters (e.g., k and l).


Field Summary
 int anonMethod
          Anonymization method
 double c
          c of recursive (c,l)-diversity (not needed for entropy l-diversity
 java.lang.String configFilename
          configuration filename
 java.util.LinkedList<java.lang.Integer> idAttributeIndices
          indices of identifier attributes
 java.lang.String inputFilename
          input filename
 int k
          k of k-anonymity
 double l
          l of l-diversity
static int METHOD_ANATOMY
          Anatomy anonymization method
static int METHOD_DATAFLY
          Datafly anonymization method
static int METHOD_INCOGNITO_K
          Incognito anonymization method with k-anonymity as privacy definition
static int METHOD_INCOGNITO_L
          Incognito anonymization method with l-diversity as privacy definition
static int METHOD_INCOGNITO_T
          Incognito anonymization method with t-closeness as privacy definition
static int METHOD_MONDRIAN
          Mondrian anonymization method
static int OUTPUT_FORMAT_ANATOMY
          Outputs anonymized records in anatomized form (i.e., output two tables where the first one QIT contains quasi-identifier values and the second table ST contains sensitive values and all other attributes.
static int OUTPUT_FORMAT_GENVALS
          Outputs anonymized records in the same format as the input records, replacing quasi-identifier attribute values with their generalizations
static int OUTPUT_FORMAT_GENVALSDIST
          Outputs anonymized records in the same format as the input records, replacing quasi-identifier attribute values with their generalization and additional information describing the distribution of values within each equivalence class.
 java.lang.String outputFilename
          output filename
 int outputFormat
          output format
 QIDAttribute[] qidAtts
          quasi-identifier attributes
 SensitiveAttribute[] sensitiveAtts
          attribute indices corresponding to sensitive attributes
 java.lang.String separator
          attribute value separator for the input
 int suppressionThreshold
          Maximum number of tuples to be suppressed
 double t
          t of t-closeness
 
Constructor Summary
Configuration(java.lang.String configFile)
          Class constructor
Configuration(java.lang.String[] args)
          Class constructor
 
Method Summary
 void checkValidity()
          Checks validity of the configuration file
private  int getOptionPos(java.lang.String option, java.lang.String[] args)
          If set, gets the index of the option
private  void parseConfigFile(java.lang.String configFilename)
          Parses the XML file
private  void parseIDAtts(org.w3c.dom.Node id)
          Parses the info on a identifier attributes
private  void parseQIDAtts(org.w3c.dom.Node qid)
          Parses the info on a quasi-identifier attribute
private  void parseSensitiveAtts(org.w3c.dom.Node sens)
          Parses the info on a sensitive attribute
 void setInputFilename(java.lang.String filename)
          Sets the input filename
 void setMethod(java.lang.String method)
          Sets the anonymization method
 void setOptions(java.lang.String[] args)
          Sets all possible options specified in the arguments
 void setOutputFilename(java.lang.String filename)
          Sets the input filename
 void setOutputFormat(java.lang.String format)
          Sets the output format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUTPUT_FORMAT_GENVALS

public static final int OUTPUT_FORMAT_GENVALS
Outputs anonymized records in the same format as the input records, replacing quasi-identifier attribute values with their generalizations

See Also:
Constant Field Values

OUTPUT_FORMAT_GENVALSDIST

public static final int OUTPUT_FORMAT_GENVALSDIST
Outputs anonymized records in the same format as the input records, replacing quasi-identifier attribute values with their generalization and additional information describing the distribution of values within each equivalence class.

Specifics of this output method and examples can be found in the following paper:

 @inproceedings{anonClassification,
 author    = {Ali Inan and Murat Kantarcioglu and Elisa Bertino},
 title     = {Using Anonymized Data for Classification},
 booktitle = {ICDE},
 year      = {2009},
 pages     = {429-440}
 }
 

See Also:
Constant Field Values

OUTPUT_FORMAT_ANATOMY

public static final int OUTPUT_FORMAT_ANATOMY
Outputs anonymized records in anatomized form (i.e., output two tables where the first one QIT contains quasi-identifier values and the second table ST contains sensitive values and all other attributes. The two tables can be joined over the field EID (added as the first column to both) representing the equivalence ID. Among these tables, QIT is written to a file named outputFilename + "QIT" and ST is written to a file named outputFilename + "ST".

Specifics of this output method and examples can be found in the following paper:

 @inproceedings{anatomy,
 author = {Xiao, Xiaokui and Tao, Yufei},
 title = {Anatomy: simple and effective privacy preservation},
 booktitle = {VLDB '06: Proceedings of the 32nd international conference on Very large data bases},
 year = {2006},
 pages = {139--150},
 location = {Seoul, Korea},
 publisher = {VLDB Endowment}
 }
 

See Also:
Constant Field Values

METHOD_DATAFLY

public static final int METHOD_DATAFLY
Datafly anonymization method

See Also:
Constant Field Values

METHOD_MONDRIAN

public static final int METHOD_MONDRIAN
Mondrian anonymization method

See Also:
Constant Field Values

METHOD_INCOGNITO_K

public static final int METHOD_INCOGNITO_K
Incognito anonymization method with k-anonymity as privacy definition

See Also:
Constant Field Values

METHOD_INCOGNITO_L

public static final int METHOD_INCOGNITO_L
Incognito anonymization method with l-diversity as privacy definition

See Also:
Constant Field Values

METHOD_INCOGNITO_T

public static final int METHOD_INCOGNITO_T
Incognito anonymization method with t-closeness as privacy definition

See Also:
Constant Field Values

METHOD_ANATOMY

public static final int METHOD_ANATOMY
Anatomy anonymization method

See Also:
Constant Field Values

anonMethod

public int anonMethod
Anonymization method


suppressionThreshold

public int suppressionThreshold
Maximum number of tuples to be suppressed


k

public int k
k of k-anonymity


l

public double l
l of l-diversity


c

public double c
c of recursive (c,l)-diversity (not needed for entropy l-diversity


t

public double t
t of t-closeness


inputFilename

public java.lang.String inputFilename
input filename


separator

public java.lang.String separator
attribute value separator for the input


outputFilename

public java.lang.String outputFilename
output filename


outputFormat

public int outputFormat
output format


idAttributeIndices

public java.util.LinkedList<java.lang.Integer> idAttributeIndices
indices of identifier attributes


sensitiveAtts

public SensitiveAttribute[] sensitiveAtts
attribute indices corresponding to sensitive attributes


qidAtts

public QIDAttribute[] qidAtts
quasi-identifier attributes


configFilename

public java.lang.String configFilename
configuration filename

Constructor Detail

Configuration

public Configuration(java.lang.String configFile)
              throws java.lang.Exception
Class constructor

Parameters:
configFile - path to the configuration file
Throws:
java.lang.Exception

Configuration

public Configuration(java.lang.String[] args)
              throws org.xml.sax.SAXException,
                     java.io.IOException,
                     javax.xml.parsers.ParserConfigurationException,
                     java.lang.Exception
Class constructor

Parameters:
args - Vector of program arguments (to set various options, including configuration filename)
Throws:
java.lang.Exception
org.xml.sax.SAXException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
Method Detail

parseConfigFile

private void parseConfigFile(java.lang.String configFilename)
                      throws java.lang.Exception
Parses the XML file

Throws:
java.lang.Exception

parseIDAtts

private void parseIDAtts(org.w3c.dom.Node id)
                  throws java.lang.Exception
Parses the info on a identifier attributes

Parameters:
id - The root node of id attributes
Throws:
java.lang.Exception

parseQIDAtts

private void parseQIDAtts(org.w3c.dom.Node qid)
                   throws java.lang.Exception
Parses the info on a quasi-identifier attribute

Parameters:
qid - The root node of a qid attribute
Throws:
java.lang.Exception

parseSensitiveAtts

private void parseSensitiveAtts(org.w3c.dom.Node sens)
                         throws java.lang.Exception
Parses the info on a sensitive attribute

Parameters:
sens - The root node of a sensitive attribute
Throws:
java.lang.Exception

setInputFilename

public void setInputFilename(java.lang.String filename)
                      throws java.lang.Exception
Sets the input filename

Parameters:
filename - path to the input file
Throws:
java.lang.Exception

setOutputFilename

public void setOutputFilename(java.lang.String filename)
Sets the input filename

Parameters:
filename - path to the input file
Throws:
java.lang.Exception

setMethod

public void setMethod(java.lang.String method)
Sets the anonymization method

Parameters:
method - an anonymization method identifier

setOutputFormat

public void setOutputFormat(java.lang.String format)
Sets the output format

Parameters:
format - an output format identifier

setOptions

public void setOptions(java.lang.String[] args)
Sets all possible options specified in the arguments

Parameters:
args - list of arguments

getOptionPos

private int getOptionPos(java.lang.String option,
                         java.lang.String[] args)
If set, gets the index of the option

Parameters:
option - Option to be searched
args - List of all arguments
Returns:
Index of the option if set, -1 otherwise

checkValidity

public void checkValidity()
                   throws java.lang.Exception
Checks validity of the configuration file

Throws:
java.lang.Exception - If not valid