Class ARXWrapper


  • @Component
    public class ARXWrapper
    extends java.lang.Object
    Delivers an interface for reaching the underlying arx functionality of
    • Constructor Summary

      Constructors 
      Constructor Description
      ARXWrapper()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.deidentifier.arx.ARXResult anonymize​(org.deidentifier.arx.ARXAnonymizer anonymizer, org.deidentifier.arx.ARXConfiguration config, AnonymizationPayload payload)
      Returns an ARX ARXResult object that holds the anonymized data set.
      java.lang.String getAnonymizeData​(org.deidentifier.arx.ARXResult result)
      Returns a String that contains the anonymized data.
      org.deidentifier.arx.criteria.PrivacyCriterion getPrivacyModel​(PrivacyModel model, java.util.Map<java.lang.String,​java.lang.String> params)
      Returns an Arx PrivacyCriterion object for the desired privacy object selected by the user.
      org.deidentifier.arx.ARXAnonymizer setAnonymizer​(org.deidentifier.arx.ARXAnonymizer anonymizer)
      Returns an ARX ARXAnonymizer objects that sets the settings for anonymizing the data set.
      org.deidentifier.arx.Data setData​(java.lang.String rawdata)
      Returns an ARX Data object created from the provided String.
      org.deidentifier.arx.Data setHierarchies​(org.deidentifier.arx.Data data, AnonymizationPayload payload)
      Returns an ARX Data object that sets the hierarchies to be used on the different fields in the data set.
      org.deidentifier.arx.ARXConfiguration setPrivacyModels​(org.deidentifier.arx.ARXConfiguration config, AnonymizationPayload payload)
      Returns an ARX ARXConfiguration object that sets the privacy models defined by the payload.
      org.deidentifier.arx.Data setSensitivityModels​(org.deidentifier.arx.Data data, AnalysationPayload analysationPayload)
      Returns an ARX Data object that holds the data set along with an assigned attribute type for each table row.
      org.deidentifier.arx.Data setSensitivityModels​(org.deidentifier.arx.Data data, AnonymizationPayload payload)
      Returns an ARX Data object that holds the data set along with an assigned attribute type for each table row.
      org.deidentifier.arx.ARXConfiguration setSuppressionLimit​(org.deidentifier.arx.ARXConfiguration config)
      Sets the suppression limit configuration for anonymization in the ARX ARXConfiguration object, then returns it.
      • Methods inherited from class java.lang.Object

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

      • ARXWrapper

        public ARXWrapper()
    • Method Detail

      • setData

        public org.deidentifier.arx.Data setData​(java.lang.String rawdata)
        Returns an ARX Data object created from the provided String. The object is a table of records/fields made from the provided string.
        Parameters:
        rawdata - String containing tabular data set
        Returns:
        the Data object created with the records/fields defined by the string of raw data
      • setSuppressionLimit

        public org.deidentifier.arx.ARXConfiguration setSuppressionLimit​(org.deidentifier.arx.ARXConfiguration config)
        Sets the suppression limit configuration for anonymization in the ARX ARXConfiguration object, then returns it.
        Parameters:
        config - an ARX ARXConfiguration object that holds the anonymization/data set settings
        Returns:
        an ARX ARXConfiguration object with the suppression setting
      • setSensitivityModels

        public org.deidentifier.arx.Data setSensitivityModels​(org.deidentifier.arx.Data data,
                                                              AnonymizationPayload payload)
        Returns an ARX Data object that holds the data set along with an assigned attribute type for each table row.
        Parameters:
        data - tabular data set to be anonymized
        payload - map containing parameters that defines the attribute types used on which data set field
        Returns:
        an ARX Data that contains the data set with assigned field attribute types
      • setSensitivityModels

        public org.deidentifier.arx.Data setSensitivityModels​(org.deidentifier.arx.Data data,
                                                              AnalysationPayload analysationPayload)
        Returns an ARX Data object that holds the data set along with an assigned attribute type for each table row.
        Parameters:
        data - tabular data set to be analysied for re-identification risk
        analysationPayload - map containing parameters that defines the attribute types used on which data set field
        Returns:
        an ARX Data that contains the data set with assigned field attribute types
      • setPrivacyModels

        public org.deidentifier.arx.ARXConfiguration setPrivacyModels​(org.deidentifier.arx.ARXConfiguration config,
                                                                      AnonymizationPayload payload)
        Returns an ARX ARXConfiguration object that sets the privacy models defined by the payload.
        Parameters:
        config - an ARX ARXConfiguration object that holds the anonymize/data set settings
        payload - map containing parameters that defines the privacy models to be used
        Returns:
        an ARX ARXConfiguration object with the assigned privacy models settings
      • setHierarchies

        public org.deidentifier.arx.Data setHierarchies​(org.deidentifier.arx.Data data,
                                                        AnonymizationPayload payload)
        Returns an ARX Data object that sets the hierarchies to be used on the different fields in the data set.
        Parameters:
        data - tabular data set to be anonymized
        payload - map containing parameters that defines the hierarchies to be used on which data set fields
        Returns:
        an ARX Data object with the hierarchies assigned to the data set fields
      • getPrivacyModel

        public org.deidentifier.arx.criteria.PrivacyCriterion getPrivacyModel​(PrivacyModel model,
                                                                              java.util.Map<java.lang.String,​java.lang.String> params)
        Returns an Arx PrivacyCriterion object for the desired privacy object selected by the user.
        Parameters:
        model - enum representing the privacy model type we want created
        params - map containing parameters that defines which settings to be used to created the privacy model
        Returns:
        the PrivacyCriterion object created with the specified parameters
      • setAnonymizer

        public org.deidentifier.arx.ARXAnonymizer setAnonymizer​(org.deidentifier.arx.ARXAnonymizer anonymizer)
        Returns an ARX ARXAnonymizer objects that sets the settings for anonymizing the data set.
        Parameters:
        anonymizer - an ARX ARXAnonymizer object that will hold the anonymization settings
        Returns:
        an ARX ARXAnonymizer object that holds the anonymization settings
      • anonymize

        public org.deidentifier.arx.ARXResult anonymize​(org.deidentifier.arx.ARXAnonymizer anonymizer,
                                                        org.deidentifier.arx.ARXConfiguration config,
                                                        AnonymizationPayload payload)
                                                 throws java.io.IOException
        Returns an ARX ARXResult object that holds the anonymized data set. This method uses the payload parameter to create the ARX Data object, and sets the attribute types for each field in the data set. The method will then use that ARX Data object along with the defined settings, taken from the ARX ARXAnonymizer and ARXConfiguration objects to create the anonymized data set.
        Parameters:
        anonymizer - an ARX ARXAnonymizer object that will hold the anonymization settings
        config - an ARX ARXConfiguration object that will hold the anonymize/data set settings
        payload - map containing parameters that sets the records/fields for the data set and the parameters used to anonymize and analyse the data set
        Returns:
        an ARX ARXResult object that holds the anonymized data set
        Throws:
        java.io.IOException - that shows the error message when anonymizing the data set fails
      • getAnonymizeData

        public java.lang.String getAnonymizeData​(org.deidentifier.arx.ARXResult result)
                                          throws java.io.IOException
        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.
        Throws:
        java.io.IOException - shows the error message when saving the data set to a ByteArrayInputStream object fails