Interface DataGeneratorOperation

    • Method Detail

      • generateDataLineForMappingModel

        java.util.Map<java.lang.Integer,​java.lang.String> generateDataLineForMappingModel​(java.util.Map<java.lang.Integer,​java.lang.String> inputDataLine,
                                                                                                MappingModel mappingModel,
                                                                                                GeneratorOperationState operationState)
                                                                                         throws java.lang.IllegalArgumentException
        Generates a line of data that can be then written using a CSVWriter object. The data is generated from a MappingModel object which contains the mapping between data in a source CSV file and an item's attributes discriptors.
        Parameters:
        inputDataLine - - A line of data read using a CSVWriter.
        mappingModel - - A MappingModel object (Source Data - Target Attribute Data) used to generate the data returned.
        operationState - - A GeneratorOperationState object used to hold the sate of the data generation process.
        Returns:
        A Map containing data that can be used to write to a CSVWriter. See CSVReader.parseLine(String) how the map looks like.
        Throws:
        java.lang.IllegalArgumentException - - if inputDataLine, mappingModel, operationState is not set to valid data.
      • generateDataLineForComposedEntry

        java.lang.String generateDataLineForComposedEntry​(java.util.Map<java.lang.Integer,​java.lang.String> inputDataLine,
                                                          MappingLineModel mappingLine,
                                                          boolean forMainDataFile,
                                                          GeneratorOperationState operationState)
                                                   throws java.lang.IllegalArgumentException
        Parameters:
        inputDataLine - - A line of data read using a CSVWriter.
        mappingLine - - A MappingLineModel object (Source Data - Target Attribute Data) used to generate the data returned.
        forMainDataFile - - A boolean flag which indicates if the data generated is for the Main CSV file for import or a generated file (e.g. when composed attributes are generated) that will be a part if the import medias.
        operationState - - A GeneratorOperationState object used to hold the sate of the data generation process.
        Returns:
        A String object containing a line of data that can be appended to a Map containing data that can be used to write to a CSVWriter. See CSVReader.parseLine(String) how the map looks like.
        Throws:
        java.lang.IllegalArgumentException - - if inputDataLine, mappingModel, operationState is not set to valid data.
      • generateDataLineForAtomicEntry

        java.lang.String generateDataLineForAtomicEntry​(java.util.Map<java.lang.Integer,​java.lang.String> inputDataLine,
                                                        MappingLineModel mappingLine)
        Parameters:
        inputDataLine - - A line of data read using a CSVWriter.
        mappingLine - - A MappingLineModel object (Source Data - Target Attribute Data) used to generate the data returned.
        Returns:
        A String object containing a line of data that can be appended to a Map containing data that can be used to write to a CSVWriter. See CSVReader.parseLine(String) how the map looks like.
      • generateDataLineForProductAttribEntry

        java.lang.String generateDataLineForProductAttribEntry​(java.util.Map<java.lang.Integer,​java.lang.String> inputDataLine,
                                                               MappingLineModel mappingLine)
        Parameters:
        inputDataLine - - A line of data read using a CSVWriter.
        mappingLine - - A MappingLineModel object (Source Data - Target Attribute Data) used to generate the data returned.
        Returns:
        A String object containing a line of data that can be appended to a Map containing data that can be used to write to a CSVWriter. See CSVReader.parseLine(String) how the map looks like.