Class CSVHeader
- java.lang.Object
-
- fr.paris.lutece.plugins.forms.export.csv.CSVHeader
-
public class CSVHeader extends Object
This class represents a CSV header
-
-
Constructor Summary
Constructors Constructor Description CSVHeader()Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddHeader(Question question)Deprecated.Map<ArrayList<Integer>,Question>getColumnNumberForQuestions(List<Question> listQuestions)Returns the the question(and iterations) associated to the specified column indexList<String>getListColumnNameToExport(List<Question> listQuestions)Builds the list of column names to exportMap<ArrayList<Integer>,Question>getMapQuestionAndIterationColumn()List<Question>getQuestionColumns()voidsetMapQuestionAndIterationColumn(Map<ArrayList<Integer>,Question> mapQuestionAndIterationColumn)Set the map of question and iteration columnstatic <K extends List<Integer>,V>
Map<K,V>sortByColumnNumber(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)
-
-
-
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 List<String> getListColumnNameToExport(List<Question> listQuestions)
Builds the list of column names to export- Parameters:
listQuestions-- Returns:
- the list of column names to export
-
getColumnNumberForQuestions
public Map<ArrayList<Integer>,Question> getColumnNumberForQuestions(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 List<Integer>,V> Map<K,V> sortByColumnNumber(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 Map<ArrayList<Integer>,Question> getMapQuestionAndIterationColumn()
- Returns:
- the _mapQuestionAndIterationColumn
-
setMapQuestionAndIterationColumn
public void setMapQuestionAndIterationColumn(Map<ArrayList<Integer>,Question> mapQuestionAndIterationColumn)
Set the map of question and iteration column- Parameters:
mapQuestionAndIterationColumn-
-
-