Class CSVHeader


  • public class CSVHeader
    extends java.lang.Object
    This class represents a CSV header
    • Constructor Detail

      • CSVHeader

        public CSVHeader()
        Constructor
    • Method Detail

      • addHeader

        @Deprecated
        public void addHeader​(Question question)
        Deprecated.
        Adds the header for the specified question
        Parameters:
        question - the question to add
      • getListColumnNameToExport

        public java.util.List<java.lang.String> getListColumnNameToExport​(java.util.List<Question> listQuestions)
        Builds the list of column names to export
        Parameters:
        listQuestions -
        Returns:
        the list of column names to export
      • getColumnNumberForQuestions

        public java.util.Map<java.util.ArrayList<java.lang.Integer>,​Question> getColumnNumberForQuestions​(java.util.List<Question> listQuestions)
        Returns the the question(and iterations) associated to the specified column index
        Parameters:
        listQuestions -
        Returns:
        the map of column index and question(and iterations)
      • sortByColumnNumber

        public static <K extends java.util.List<java.lang.Integer>,​V> java.util.Map<K,​V> sortByColumnNumber​(java.util.Map<K,​V> map)
        Sorts the map by the first item of the key (column number) and then by the second item of the key (iteration number)
        Parameters:
        mapQuestionAndIterationColumn -
        Returns:
        the sorted map
      • getMapQuestionAndIterationColumn

        public java.util.Map<java.util.ArrayList<java.lang.Integer>,​Question> getMapQuestionAndIterationColumn()
        Returns:
        the _mapQuestionAndIterationColumn
      • setMapQuestionAndIterationColumn

        public void setMapQuestionAndIterationColumn​(java.util.Map<java.util.ArrayList<java.lang.Integer>,​Question> mapQuestionAndIterationColumn)
        Set the map of question and iteration column
        Parameters:
        mapQuestionAndIterationColumn -
      • getQuestionColumns

        public java.util.List<Question> getQuestionColumns()
        Returns:
        the _listFinalColumnToExport