Class ARXDataFactory

  • All Implemented Interfaces:
    DataFactory

    @Component
    public class ARXDataFactory
    extends Object
    implements DataFactory
    Class responsible for converting data from the payload to a fully configured ARX Data object.
    • Constructor Detail

      • ARXDataFactory

        public ARXDataFactory()
    • Method Detail

      • create

        public org.deidentifier.arx.Data create​(Request payload)
        Description copied from interface: DataFactory
        Returns an ARX Data object created from the provided payload.
        Specified by:
        create in interface DataFactory
        Parameters:
        payload - Model object containing the data to be analysed and anonymized, and parameters to use in analysation and arxaas
        Returns:
        an ARX Data object containing a tabular dataset and attribute types assigned to each dataset field
      • validateParameters

        private void validateParameters​(List<String[]> rawData,
                                        List<Attribute> attributes)
        Validation method for checking against invalid parameters for data analyzation
        Parameters:
        rawData - an list of String[] containing tabular dataset
        attributes - a list of Attribute object containing parameters for dataset field attribute type and hierarchy
      • createData

        private org.deidentifier.arx.Data createData​(List<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 - an list of String[] containing tabular dataset
        Returns:
        the Data object created with the records/fields defined by the string of raw data
      • setAttributeTypes

        private void setAttributeTypes​(org.deidentifier.arx.Data data,
                                       List<Attribute> attributes)
        Mutates an ARX Data object that holds the data set and assign an attribute type for each table row based on the global Attribute object.
        Parameters:
        data - tabular data set to be anonymized
        attributes - a List of Attribute object containing parameters of dataset field attribute type and hierarchy
      • setHierarchies

        private void setHierarchies​(org.deidentifier.arx.Data data,
                                    List<Attribute> attributeList)
        Mutates an ARX Data object by setting the hierarchies to be used on the different fields in the data set based on the global Attribute object.
        Parameters:
        data - tabular data set to be anonymize
        attributeList - a List Attribute object containing parameters of dataset field attribute type and hierarchy