Class AHNestedTableDataMerger


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

      • AHNestedTableDataMerger

        public AHNestedTableDataMerger()
        Constructor
    • Method Detail

      • createDataMainCSV

        public void createDataMainCSV​(java.lang.String mainCsvDataPath,
                                      java.lang.String subDataPath,
                                      CommonOption.DataFileEncoding dataFileEncoding)
        Create the MergeData from the CSV file
        Parameters:
        mainCsvDataPath - Normal data-merge CSV file path
        subDataPath - Path of JSON file with nested structure
        dataFileEncoding - Character encoding of CSV file
      • createDataMainJSON

        public void createDataMainJSON​(java.lang.String mainJsonDataPath,
                                       java.lang.String subDataPath,
                                       CommonOption.DataFileEncoding dataFileEncoding)
        Create the MergeData from the JSON file
        Parameters:
        mainJsonDataPath - Normal data-merge JSON file path
        subDataPath - Path of JSON file with nested structure
        dataFileEncoding - Character encoding of JSON file
      • executeNestedTableDataMerge

        public void executeNestedTableDataMerge​(InputParam inputParam,
                                                OutputParam outputParam)
                                         throws AHOOXMLDocxManagerException,
                                                java.io.IOException,
                                                java.lang.InterruptedException
        Perform nested table type data-merge
        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