|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectanonymizer.EquivalenceTable
public class EquivalenceTable
The class that manages equivalence classes. Typical schema of the table contains:
Field Summary | |
---|---|
private QIDAttribute[] |
qid
Quasi-identifier attributes |
private SQLWrapper |
sqlwrapper
SQL connection/querying object |
private java.lang.String |
tableName
Name of the table |
Constructor Summary | |
---|---|
EquivalenceTable(QIDAttribute[] qid,
java.lang.String tableName)
Class constructor |
Method Summary | |
---|---|
private void |
createTable()
Creates the table that will store Equivalence objects |
void |
deleteEquivalence(java.lang.Long eid)
Deletes the equivalence |
void |
drop()
Drops this table from the database |
java.lang.Long |
getEID(java.lang.String[] genVals)
Get the equivalence ID for the provided set of generalized values |
java.lang.String[] |
getGeneralization(double eid)
Get the generalization for an equivalence |
java.lang.String |
getName()
Getter for tableName |
java.lang.Long |
insertEquivalence(java.lang.String[] genVals)
Inserts a new equivalence |
java.lang.Long |
insertTuple(java.lang.String[] vals)
Inserts a nwe tuple |
void |
setGeneralization(double eid,
java.lang.String[] newVals)
Overwrites the generalized values of this equivalence with the specified set of values |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private QIDAttribute[] qid
private java.lang.String tableName
private SQLWrapper sqlwrapper
Constructor Detail |
---|
public EquivalenceTable(QIDAttribute[] qid, java.lang.String tableName)
qid
- Quasi-identifier attribtuestableName
- Name of the tableMethod Detail |
---|
private void createTable()
public java.lang.String getName()
public java.lang.Long getEID(java.lang.String[] genVals) throws java.sql.SQLException
genVals
- String representations of Interval objects (one per QI-attribute)
java.sql.SQLException
public java.lang.String[] getGeneralization(double eid) throws java.sql.SQLException
eid
- Equivalence ID of the equivalence
java.sql.SQLException
public void setGeneralization(double eid, java.lang.String[] newVals) throws java.sql.SQLException
eid
- Equivalence id of the equivalencenewVals
- new generalization values
java.sql.SQLException
public java.lang.Long insertTuple(java.lang.String[] vals) throws java.lang.Exception
vals
- Values of the tuple, as read from the data source
(i.e., before any generalization)
java.lang.Exception
public java.lang.Long insertEquivalence(java.lang.String[] genVals) throws java.sql.SQLException
genVals
- String representation of generalized values (i.e., generated
with Interval.toString)
SQLExpcetion
java.sql.SQLException
public void deleteEquivalence(java.lang.Long eid)
eid
- Equivalence ID of the equivalence to be deletedpublic void drop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |