Class FormResponseCsvExport


  • public class FormResponseCsvExport
    extends Object
    Class which contains all the data needed to build the CSV export
    • Constructor Detail

      • FormResponseCsvExport

        public FormResponseCsvExport()
    • Method Detail

      • buildCsvColumnToExport

        public String buildCsvColumnToExport​(List<Question> listQuestions)
        Build the CSV string for column line
      • buildMapQuestionDataToExport

        public Map<Integer,​List<String>> buildMapQuestionDataToExport​(FormResponse formResponse,
                                                                            CSVDataLine csvDataLine)
        Build mapQuestionData (a map with the question id as key and a list of responses as value) for all data lines
        Parameters:
        formResponse -
        csvDataLine -
        Returns:
        mapQuestionData
      • appendResponseToCsvDataLine

        public void appendResponseToCsvDataLine​(Map<Integer,​List<String>> mapQuestionData,
                                                ArrayList<Integer> questionIterationKey,
                                                Map<ArrayList<Integer>,​Question> mapQuestionAndIterationColumn,
                                                StringBuilder sbResponse)
        Append the response to the CSV data line (StringBuilder sbResponse)
        Parameters:
        mapQuestionData -
        questionIterationKey -
        mapQuestionAndIterationColumn -
        sbResponse -
      • buildCsvDataToExport

        public String buildCsvDataToExport​(FormResponse formResponse,
                                           String state)
        Build the CSV string for all data lines