af.controller.anonymization package¶
Submodules¶
af.controller.anonymization.PreProcessingStage module¶
-
class
af.controller.anonymization.PreProcessingStage.PreProcessingStage(data_config)[source]¶ Bases:
objectClass used by the BaseAlgorithm to prepare the complete scenario before anonymizing.
-
clean_previous_work()[source]¶ If an anonymized db from a previous session exists, then delete it. db_location contains the path where the new db will be created
-
create_additional_information_table()[source]¶ Each algorithm that transforms the data, can leave related information about the process. This information is to be saved on a new table on the same db file.
-
create_db_copy()[source]¶ Takes the original DB and creates a new copy ready to be manipulated and modified. It preserves the state of the db with the raw data.
initial_db_location: contains the original path to the raw db. controller: given the original db extension, it creates an instance of a db controller capable of querying the db.
-
remove_identifiable_attributes()[source]¶ Given a list of identifiable attributes, it suppreses them, as they are forbidden to appear in any form once the data is anonymized.
identifiable_list: contains all those attributes from the data config that were selected as Identifiable. supression_value: default string based on the supression node (‘******‘) query: simple update query, to set values to supression_value for all identifiable attributes.
-