Package no.oslomet.aaas.anonymizer
Class ARXAnonymizer
- java.lang.Object
-
- no.oslomet.aaas.anonymizer.ARXAnonymizer
-
- All Implemented Interfaces:
Anonymizer
@Component public class ARXAnonymizer extends java.lang.Object implements Anonymizer
Anonymizer class using the ARX library to implement the anonymization
-
-
Field Summary
Fields Modifier and Type Field Description private ConfigurationFactoryconfigFactoryprivate DataFactorydataFactoryprivate org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description ARXAnonymizer(DataFactory dataFactory, ConfigurationFactory configFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnonymizeResultanonymize(Request payload)Method to run anonymization on data in the payload with the provided parameters in the payloadprivate voidconfigureAnonymizer(org.deidentifier.arx.ARXAnonymizer anonymizer)Returns an ARXARXAnonymizerobjects that sets the settings for anonymizing the data set.private java.util.List<java.lang.String[]>createRawDataList(org.deidentifier.arx.ARXResult result)Returns a String that contains the anonymized data.
-
-
-
Field Detail
-
dataFactory
private final DataFactory dataFactory
-
configFactory
private final ConfigurationFactory configFactory
-
logger
private final org.slf4j.Logger logger
-
-
Constructor Detail
-
ARXAnonymizer
@Autowired public ARXAnonymizer(DataFactory dataFactory, ConfigurationFactory configFactory)
-
-
Method Detail
-
anonymize
public AnonymizeResult anonymize(Request payload)
Description copied from interface:AnonymizerMethod to run anonymization on data in the payload with the provided parameters in the payload- Specified by:
anonymizein interfaceAnonymizer- Parameters:
payload- Model object containing the data to be anonymized and params to use in anonymization- Returns:
- AnonymizeResult result object containing the best case anonymization and statistics
-
configureAnonymizer
private void configureAnonymizer(org.deidentifier.arx.ARXAnonymizer anonymizer)
Returns an ARXARXAnonymizerobjects that sets the settings for anonymizing the data set.- Parameters:
anonymizer- an ARXARXAnonymizerobject that will hold the anonymization settings
-
createRawDataList
private java.util.List<java.lang.String[]> createRawDataList(org.deidentifier.arx.ARXResult result)
Returns a String that contains the anonymized data. This method is used to prepare the data set to be easily read and imported in the response payload.- Parameters:
result- an ARXARXResultobject that holds the anonymized data set.- Returns:
- a String containing the anonymized data set.
-
-