|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectanonymizer.AnonRecordTable
public class AnonRecordTable
The class that manages anonymized records. Typical schema of the table contains:
Field Summary | |
---|---|
private java.lang.Integer[] |
qidIndices
Indices of quasi-identifier attributes |
private java.lang.Integer[] |
sensIndices
Indices of sensitive attributes |
private SQLWrapper |
sqlwrapper
SQL connection/querying object |
private java.lang.String |
tableName
Name of the table |
Constructor Summary | |
---|---|
AnonRecordTable(java.lang.Integer[] qidIndices,
java.lang.Integer[] sensIndices,
java.lang.String tableName)
Class constructor |
Method Summary | |
---|---|
boolean |
checkKAnonymityRequirement(int k)
Checks the k-anonymity privacy definition |
boolean |
checkKAnonymityRequirement(int k,
int suppThreshold)
Checks the k-anonymity privacy definition while considering the suppression threshold (i.e., k-anonymity holds only if the total size of all equivalences with size less than k is below the suppression threshold) |
boolean |
checkLDiversityRequirement(double l,
double c,
int sensIndex)
Checks the recursive (c,l)-diversity privacy definition |
boolean |
checkLDiversityRequirement(double l,
int sensIndex)
Checks the entropy l-diversity privacy definition |
boolean |
checkTClosenessRequirement_Cat(double t,
int sensIndex,
int sensDomSize)
Checks the t-closeness privacy definition |
boolean |
checkTClosenessRequirement_Num(double t,
int sensIndex)
Checks the t-closeness privacy definition |
void |
copyFrom(AnonRecordTable that,
java.lang.Long oldEID,
java.lang.Long newEID)
From table that, copy the records with EID = oldEID into this table, overwriting oldEID as newEID |
private void |
createTable()
Creates the table that will store AnonRecord objects |
void |
cutFrom(AnonRecordTable that,
java.lang.Long oldEID,
java.lang.Long newEID)
(1) From table that, copy the records with EID = oldEID into this table, overwriting oldEID as newEID and (2) From table that, delete the records with EID = oldEID |
void |
cutRecord(AnonRecordTable that,
java.lang.Long RID,
java.lang.Long newEID)
(1) From table that, copy the record with the specified RID into this table, overwriting oldEID as newEID and (2) From table that, delete the records wth the speicified RID |
void |
drop()
Drops this table from the database |
int |
getEquivalenceSize(long eid)
Get the number of AnonRecords generalized to the Equivalence with ID eid |
java.lang.String |
getName()
Getter for tableName |
void |
insert(long eid,
double[] qiVals,
double[] sensVals)
Inserts new AnonRecord to the table (Record ID (RID) assigned automatically) |
void |
moveRecords(java.lang.Long fromEID,
java.lang.Long toEID)
Moves records of one equivalence to the other, effectively deleting the fromEID |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.Integer[] qidIndices
private java.lang.Integer[] sensIndices
private java.lang.String tableName
private SQLWrapper sqlwrapper
Constructor Detail |
---|
public AnonRecordTable(java.lang.Integer[] qidIndices, java.lang.Integer[] sensIndices, java.lang.String tableName)
qidIndices
- Indices of quasi-identifier attributessensIndices
- Indices of sensitive attributestableName
- Name of the tableMethod Detail |
---|
private void createTable()
public java.lang.String getName()
public int getEquivalenceSize(long eid) throws java.sql.SQLException
eid
- Equivalence ID
java.sql.SQLException
public void insert(long eid, double[] qiVals, double[] sensVals) throws java.sql.SQLException
eid
- Equivalence IDqiVals
- Quasi-identifier attribute valuessensVals
- Sensitive attribute values (if not necessary, pass "new double[0]" as argument
java.sql.SQLException
public boolean checkKAnonymityRequirement(int k) throws java.sql.SQLException
k
- Privacy parameter
java.sql.SQLException
public boolean checkKAnonymityRequirement(int k, int suppThreshold) throws java.sql.SQLException
k
- Privacy parametersuppThreshold
- Suppression threshold
java.sql.SQLException
public boolean checkLDiversityRequirement(double l, int sensIndex) throws java.sql.SQLException
l
- Privacy parametersensIndex
- index of the sensitive attribute
java.sql.SQLException
public boolean checkLDiversityRequirement(double l, double c, int sensIndex) throws java.sql.SQLException
l
- Privacy parameterc
- Privacy parametersensIndex
- index of the sensitive attribute
java.sql.SQLException
public boolean checkTClosenessRequirement_Cat(double t, int sensIndex, int sensDomSize) throws java.sql.SQLException
t
- Privacy parametersensIndex
- index of a categorical sensitive attributesensDomSize
- domain size of the sensitive attribute
java.sql.SQLException
public boolean checkTClosenessRequirement_Num(double t, int sensIndex) throws java.sql.SQLException
t
- Privacy parametersensIndex
- index of a categorical sensitive attribute
java.sql.SQLException
public void moveRecords(java.lang.Long fromEID, java.lang.Long toEID)
fromEID
- Source of the records to be movedtoEID
- Destination of the records to be movedpublic void copyFrom(AnonRecordTable that, java.lang.Long oldEID, java.lang.Long newEID)
that
- Another AnonRecordTableoldEID
- EID of the records to be copiednewEID
- New EID to be assigned to the copied recordspublic void cutFrom(AnonRecordTable that, java.lang.Long oldEID, java.lang.Long newEID)
that
- Another AnonRecordTableoldEID
- EID of the records to be copiednewEID
- New EID to be assigned to the copied recordspublic void cutRecord(AnonRecordTable that, java.lang.Long RID, java.lang.Long newEID)
that
- Another AnonRecordTableRID
- record ID of the tuple to be movednewEID
- new EID to be assigned to the copied recordpublic void drop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |