|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectanonymizer.QIDAttribute
public class QIDAttribute
Data structure that holds all relevant information related to a quasi-identifier attribute. Namely, attribute index in the input, the value generalization hierarchy (read from the configuration file), string->integer domain mapping for categorical attributes.
Field Summary | |
---|---|
java.util.Hashtable<java.lang.String,java.lang.Integer> |
catDomMapping
Mapping from the categorical domain to discrete-valued numerical (integer) domain for categorical attributes |
private java.util.Hashtable<java.lang.String,java.lang.String[]> |
childLookup
Lookup to find children (specializations) of an interval |
private java.util.Hashtable<java.lang.String,java.lang.String[]> |
generalizationSeq
Maps each VGH entry to a list of ground-domain values (i.e., not generalized values) |
int |
index
Index of the attribute |
private java.util.LinkedList<Interval> |
leafIntervals
List of leaf intervals in the VGH |
private java.util.Hashtable<java.lang.String,java.lang.Integer> |
nonLeaves
Maps every non-leaf VGH node to a unique index, assigned by a breadth-first traversal of the VGH |
private java.util.Hashtable<java.lang.String,java.lang.String> |
parentLookup
Lookup to find the generalization of an interval |
private java.lang.String |
suppValue
Suppression value for the VGH |
Constructor Summary | |
---|---|
QIDAttribute(int index,
org.w3c.dom.Node att)
Class constructor |
Method Summary | |
---|---|
java.lang.String |
generalize(java.lang.String value)
Retrieves the generalization of any QID value (leaf or non-leaf) |
boolean |
generalizesTo(java.lang.String value,
java.lang.String generalization)
Checks whether a generalization matches a value |
private int |
getDepth(java.lang.String leafInterval)
Calculates the depth of a leaf interval (i.e., length of the path to the suppression value) |
java.lang.String[] |
getGeneralizationSequence(java.lang.String val)
Get the list of ground-domain values that the provided value represents (applies only to categorical attributes mapped to a discrete domain) |
int[] |
getLeafCategories(java.lang.String val)
|
java.util.Hashtable<java.lang.String,java.lang.Integer> |
getNonLeaves()
Get the non-leaf nodes of the VGH |
java.lang.String |
getSup()
Getter for supression value |
int |
getVGHDepth(boolean validateDGH)
Calculates the depth of the value generalization hierarchy |
boolean |
isDomainGeneralizationHierarchy()
Checks whether the VGH for this qid-attribute corresponds to a domain generalization hierarchy. |
private void |
parseMapping(org.w3c.dom.Node map)
Assign the mapping from the categorical domain to discrete valued numerical domain |
private void |
parseVGH(org.w3c.dom.Node vgh)
Obtain the value-generalization hierarchy for the attribute |
java.lang.String[] |
specialize(java.lang.String value)
Retrieves higher granularity values of some generalized value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.Hashtable<java.lang.String,java.lang.Integer> catDomMapping
public int index
private java.lang.String suppValue
private java.util.Hashtable<java.lang.String,java.lang.String> parentLookup
private java.util.Hashtable<java.lang.String,java.lang.String[]> childLookup
private java.util.LinkedList<Interval> leafIntervals
private java.util.Hashtable<java.lang.String,java.lang.Integer> nonLeaves
private java.util.Hashtable<java.lang.String,java.lang.String[]> generalizationSeq
Constructor Detail |
---|
public QIDAttribute(int index, org.w3c.dom.Node att) throws java.lang.Exception
att
- The node that describes a QID attribute in the configuration fileindex
- Index of the attribute
java.lang.Exception
Method Detail |
---|
private void parseMapping(org.w3c.dom.Node map) throws java.lang.Exception
map
- Root node that contains (category, integer-value) pairs
java.lang.Exception
private void parseVGH(org.w3c.dom.Node vgh) throws java.lang.Exception
vgh
- Root node that contains the suppression value and all its chilren (specializations)
java.lang.Exception
public boolean isDomainGeneralizationHierarchy()
public int getVGHDepth(boolean validateDGH) throws java.lang.Exception
validateDGH
- if true, this method first checks whether the domain generalization
hiearchy represents a value generalization hierarchy (i.e., whether all leaves are at
the same depth or not)
java.lang.Exception
- If input validation failsprivate int getDepth(java.lang.String leafInterval)
leafInterval
- String representation of a leaf interval
public java.lang.String getSup()
public java.lang.String generalize(java.lang.String value)
value
- some value from the QID's domain
public java.lang.String[] specialize(java.lang.String value) throws java.lang.Exception
value
- some non-leaf value from DGH
java.lang.Exception
public boolean generalizesTo(java.lang.String value, java.lang.String generalization) throws java.lang.Exception
value
- some highest granularity value (not generalized)generalization
- Any value from the VGH domain
java.lang.Exception
public java.util.Hashtable<java.lang.String,java.lang.Integer> getNonLeaves()
public java.lang.String[] getGeneralizationSequence(java.lang.String val)
val
- some value in the VGH
public int[] getLeafCategories(java.lang.String val)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |