Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      AnonymizeResult anonymize​(Request payload)
      Method to run anonymization on data in the payload with the provided parameters in the payload
      private java.util.List<java.lang.String[]> createRawDataList​(org.deidentifier.arx.ARXResult result)
      Returns a String that contains the anonymized data.
      private org.deidentifier.arx.ARXConfiguration getARXConfiguration​(Request payload)
      Retruns an ARXConfiguration object containing the anonymization settings defined by the request payload.
      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 anonymization settgings provided which dataset to anonymize.
      private AnonymizeResult packageResult​(org.deidentifier.arx.ARXResult result, Request payload)
      Returns an AnonymizeResult object containing a packaged results from the anonymized dataset
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • anonymize

        public AnonymizeResult anonymize​(Request payload)
        Method to run anonymization 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 anonymization
        Returns:
        an AnonymizeResult object containing the best case anonymization 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 anonymization 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 anonymization 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 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 ARX ARXResult object that holds the anonymized data set.
        Returns:
        a String containing the anonymized data set.