Package no.oslomet.aaas.anonymizer
Class ARXAnonymiser
- java.lang.Object
-
- no.oslomet.aaas.anonymizer.ARXAnonymiser
-
- All Implemented Interfaces:
Anonymiser
@Component public class ARXAnonymiser extends java.lang.Object implements Anonymiser
Anonymizer class using the ARX library to implement the anonymization
-
-
Field Summary
Fields Modifier and Type Field Description private ConfigurationFactoryconfigFactoryprivate DataFactorydataFactory
-
Constructor Summary
Constructors Constructor Description ARXAnonymiser(DataFactory dataFactory, ConfigurationFactory configFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnonymizeResultanonymize(AnonymizationPayload 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
-
-
Constructor Detail
-
ARXAnonymiser
@Autowired public ARXAnonymiser(DataFactory dataFactory, ConfigurationFactory configFactory)
-
-
Method Detail
-
anonymize
public AnonymizeResult anonymize(AnonymizationPayload payload)
Description copied from interface:AnonymiserMethod to run anonymization on data in the payload with the provided parameters in the payload- Specified by:
anonymizein interfaceAnonymiser- 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.
-
-