incognito
Class LatticeEntry

java.lang.Object
  extended by incognito.LatticeEntry

public class LatticeEntry
extends java.lang.Object

This class represent a node of the generalization lattice. These nodes are represented by the amount of generalization from the original table. Original table corresponds to the root entry that has no parent, and has the root value of all 0s. All other entries will be assigned a parent, from which, based on the increment index (index of the quasi-identifier that is being generalized), the node will derive the number of generalization for each attribute. For example, the entry built by the parent 0_1_0, incremented on index 1 is 0_2_0. Similarly, 0_2_0 incremented on 2 returns the entry 0_2_1.


Field Summary
 AnonRecordTable anonTable
          Anonoymized records table that corresponds to this entry (filled in if successful)
 EquivalenceTable eqTable
          Equivalence table that corresponds to this entry (filled in if successful)
 int incIndex
          Index of the qi-attribute that is to be generalized
private  int[] root
          Number of generalizations for each qi-attribute (size = number of qi-attributes
 
Constructor Summary
LatticeEntry(int[] root)
          Class constructor for the superroot (i.e., entry of the original table).
LatticeEntry(LatticeEntry parent, int incIndex)
          Class constructor for intermediate nodes of the generalization lattice
 
Method Summary
 boolean generalizesTo(LatticeEntry that)
          Checks if this lattice entry generalizes to that lattice entry.
 int heightAt(int index)
          Get the number of generalizations on the quasi-identifier at index
 java.lang.String parentsName()
          Get the string representation of this entry's parent
 void setTables(AnonRecordTable anonTable, EquivalenceTable eqTable)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

incIndex

public int incIndex
Index of the qi-attribute that is to be generalized


root

private int[] root
Number of generalizations for each qi-attribute (size = number of qi-attributes


anonTable

public AnonRecordTable anonTable
Anonoymized records table that corresponds to this entry (filled in if successful)


eqTable

public EquivalenceTable eqTable
Equivalence table that corresponds to this entry (filled in if successful)

Constructor Detail

LatticeEntry

public LatticeEntry(int[] root)
Class constructor for the superroot (i.e., entry of the original table).

Parameters:
root - Integer array of all 0s (size = number of qi-attributes)

LatticeEntry

public LatticeEntry(LatticeEntry parent,
                    int incIndex)
Class constructor for intermediate nodes of the generalization lattice

Parameters:
parent - The entry from which this entry is to be derived
incIndex - Index of the qi-attribute that is to be generalized
Method Detail

generalizesTo

public boolean generalizesTo(LatticeEntry that)
Checks if this lattice entry generalizes to that lattice entry. The basic requirement is that that entry should be a parent of this entry (i.e., on any qi-attribute, the number of generalizations of this should be LEQ of that)

Parameters:
that - Another lattice entry
Returns:
true if this generalizes to that, false otherwise

heightAt

public int heightAt(int index)
Get the number of generalizations on the quasi-identifier at index

Parameters:
index - The index of a quasi-identifier (larger than 0, less than the number of quasi-identifiers)
Returns:
Number of generalization on the attribute

parentsName

public java.lang.String parentsName()
Get the string representation of this entry's parent

Returns:
Parent's name

setTables

public void setTables(AnonRecordTable anonTable,
                      EquivalenceTable eqTable)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object