Interface FineGrainedPrivacy
-
- All Known Implementing Classes:
FineGrainedPrivacyList
,FineGrainedPrivacyMap
public interface FineGrainedPrivacy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,long[][][]>
getAllConstraints()
Get all fine-grained constraints as a map from privacy level to an array of data ranges represented as two-dimensional long arrays.ArrayList<Map.Entry<DataRange,PrivacyConstraint.PrivacyLevel>>
getAllConstraintsList()
Return all fine-grained privacy constraints as an arraylist.PrivacyConstraint.PrivacyLevel[]
getColPrivacy(int numRows, int numCols)
DataRange[]
getDataRangesOfPrivacyLevel(PrivacyConstraint.PrivacyLevel privacyLevel)
Get all data ranges for the given privacy level.Map<DataRange,PrivacyConstraint.PrivacyLevel>
getPrivacyLevel(DataRange searchRange)
Get the data ranges and related privacy levels within given data search range.Map<DataRange,PrivacyConstraint.PrivacyLevel>
getPrivacyLevelOfElement(long[] searchIndex)
Get the data ranges and related privacy levels of the element with the given index.PrivacyConstraint.PrivacyLevel[]
getRowPrivacy(int numRows, int numCols)
boolean
hasConstraints()
True if any fine-grained constraints has been set.void
put(DataRange dataRange, PrivacyConstraint.PrivacyLevel privacyLevel)
Set privacy level of the given data range.void
putCol(int colIndex, int colLength, PrivacyConstraint.PrivacyLevel privacyLevel)
void
putElement(int rowIndex, int colIndex, PrivacyConstraint.PrivacyLevel privacyLevel)
void
putRow(int rowIndex, int rowLength, PrivacyConstraint.PrivacyLevel privacyLevel)
void
removeAllConstraints()
Remove all fine-grained privacy constraints.
-
-
-
Method Detail
-
put
void put(DataRange dataRange, PrivacyConstraint.PrivacyLevel privacyLevel)
Set privacy level of the given data range.- Parameters:
dataRange
- representing the range for which the privacy is setprivacyLevel
- the level of privacy for the given data range
-
putRow
void putRow(int rowIndex, int rowLength, PrivacyConstraint.PrivacyLevel privacyLevel)
-
putCol
void putCol(int colIndex, int colLength, PrivacyConstraint.PrivacyLevel privacyLevel)
-
putElement
void putElement(int rowIndex, int colIndex, PrivacyConstraint.PrivacyLevel privacyLevel)
-
getPrivacyLevel
Map<DataRange,PrivacyConstraint.PrivacyLevel> getPrivacyLevel(DataRange searchRange)
Get the data ranges and related privacy levels within given data search range.- Parameters:
searchRange
- the range from which all privacy levels are retrieved- Returns:
- all mappings from range to privacy level within the given search range
-
getPrivacyLevelOfElement
Map<DataRange,PrivacyConstraint.PrivacyLevel> getPrivacyLevelOfElement(long[] searchIndex)
Get the data ranges and related privacy levels of the element with the given index.- Parameters:
searchIndex
- index of element- Returns:
- all mappings from range to privacy level for the given search element
-
getDataRangesOfPrivacyLevel
DataRange[] getDataRangesOfPrivacyLevel(PrivacyConstraint.PrivacyLevel privacyLevel)
Get all data ranges for the given privacy level.- Parameters:
privacyLevel
- for which data ranges are found- Returns:
- all data ranges with the given privacy level
-
removeAllConstraints
void removeAllConstraints()
Remove all fine-grained privacy constraints.
-
hasConstraints
boolean hasConstraints()
True if any fine-grained constraints has been set.- Returns:
- true if any fine-grained constraint is set
-
getAllConstraints
Map<String,long[][][]> getAllConstraints()
Get all fine-grained constraints as a map from privacy level to an array of data ranges represented as two-dimensional long arrays.- Returns:
- map from privacy level to array of data ranges
-
getAllConstraintsList
ArrayList<Map.Entry<DataRange,PrivacyConstraint.PrivacyLevel>> getAllConstraintsList()
Return all fine-grained privacy constraints as an arraylist.- Returns:
- all constraints
-
getRowPrivacy
PrivacyConstraint.PrivacyLevel[] getRowPrivacy(int numRows, int numCols)
-
getColPrivacy
PrivacyConstraint.PrivacyLevel[] getColPrivacy(int numRows, int numCols)
-
-