Class ARXAnonymizer

  • All Implemented Interfaces:
    Anonymizer

    @Component
    public class ARXAnonymizer
    extends Object
    implements Anonymizer
    Anonymizer class using the ARX library to implement the arxaas
    • Method Detail

      • anonymize

        public AnonymizeResult anonymize​(Request payload)
        Method to run arxaas on data in the payload with the provided parameters in the payload
        Specified by:
        anonymize in interface Anonymizer
        Parameters:
        payload - Request object containing the data to be anonymized and params to use in arxaas
        Returns:
        an AnonymizeResult object containing the best case arxaas and statistics
      • getARXResult

        private org.deidentifier.arx.ARXResult getARXResult​(org.deidentifier.arx.Data data,
                                                            org.deidentifier.arx.ARXConfiguration config)
        Returns an ARXResult object containing the anonymized dataset based on the arxaas settgings provided which dataset to anonymize.
        Parameters:
        data - a Data object to be anonymized
        config - an ARXConfiguration object containing the settings on how to anonymize the data
        Returns:
        an ARXResult object containing the anonymized dataset.
      • getARXConfiguration

        private org.deidentifier.arx.ARXConfiguration getARXConfiguration​(Request payload)
        Retruns an ARXConfiguration object containing the arxaas settings defined by the request payload.
        Parameters:
        payload - a Request object containing the settings to be applied when anonymizing the dataset
        Returns:
        an ARXConfiguration object containing the settings on how to anonymized the dataset
      • packageResult

        private AnonymizeResult packageResult​(org.deidentifier.arx.ARXResult result,
                                              Request payload)
        Returns an AnonymizeResult object containing a packaged results from the anonymized dataset
        Parameters:
        result - an ARX ARXResult object containing the anonymized data and meta data
        payload - a Request object containing the dataset to be anonymized and the meta data to determine the settings and attributes on how to anonymized and analyze the data set
        Returns:
        an AnonymizeResult object containing a packaged results from the anonymized dataset
      • createRawDataList

        private List<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 ARX ARXResult object that holds the anonymized data set.
        Returns:
        a String containing the anonymized data set.