Class AHCompoundDataMerger


  • public class AHCompoundDataMerger
    extends java.lang.Object
    Compound type data-merge
    Version:
    1.0 2021/09/29
    Author:
    Copyright (c) 2020-2022 Antenna House, Inc. All rights reserved.
    • Constructor Detail

      • AHCompoundDataMerger

        public AHCompoundDataMerger()
        Constructor
    • Method Detail

      • createDetailTypeDataFromCSV

        public void createDetailTypeDataFromCSV​(java.lang.String mainDataPath,
                                                java.util.ArrayList<java.lang.String> subDataPaths,
                                                CommonOption.DataFileEncoding dataFileEncoding)
        Create the MergeData from the CSV file
        Parameters:
        mainDataPath - CSV file path for the non-breakdown data
        subDataPaths - CSV file path for the breakdown data
        dataFileEncoding - Character encoding of CSV file
      • createDetailTypeDataFromJSON

        public void createDetailTypeDataFromJSON​(java.lang.String dataPath,
                                                 java.lang.String linkingKey,
                                                 CommonOption.DataFileEncoding dataFileEncoding)
        Create the MergeData from the JSON file
        Parameters:
        dataPath - JSON file path
        linkingKey - Column name with unique value in the data
        dataFileEncoding - Character encoding of JSON file
      • executeCompoundDataMerge

        public void executeCompoundDataMerge​(InputParam inputParam,
                                             OutputParam outputParam)
                                      throws AHOOXMLDocxManagerException,
                                             java.io.IOException,
                                             java.lang.InterruptedException
        Execute the compound type data-merge to the template
        Parameters:
        inputParam - Input parameter
        outputParam - Output parameter
        Throws:
        AHOOXMLDocxManagerException
        java.io.IOException
        java.lang.InterruptedException
      • getDataMergeFields

        public java.util.ArrayList<java.lang.String> getDataMergeFields​(java.lang.String inputFile)
                                                                 throws AHOOXMLDocxManagerException,
                                                                        java.io.IOException,
                                                                        java.lang.InterruptedException
        Get the fields defined in the data-merge template
        Parameters:
        inputFile - Path of the template file for data-merge
        Returns:
        Name list of the data-merge field
        Throws:
        AHOOXMLDocxManagerException
        java.io.IOException
        java.lang.InterruptedException