Class CSVHeader
- java.lang.Object
-
- fr.paris.lutece.plugins.forms.export.csv.CSVHeader
-
public class CSVHeader extends java.lang.ObjectThis 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.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 indexjava.util.List<java.lang.String>getListColumnNameToExport(java.util.List<Question> listQuestions)Builds the list of column names to exportjava.util.Map<java.util.ArrayList<java.lang.Integer>,Question>getMapQuestionAndIterationColumn()java.util.List<Question>getQuestionColumns()voidsetMapQuestionAndIterationColumn(java.util.Map<java.util.ArrayList<java.lang.Integer>,Question> mapQuestionAndIterationColumn)Set the map of question and iteration columnstatic <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)
-
-
-
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
-
-