|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wink.common.model.csv.MultiCsvTable
public class MultiCsvTable
Represents a multiple table CSV. Contains multiple (separate) tables that make up a single CSV. The rows of the tables may be of different lengths. An empty line is used to separate the tables when serializing or deserializing.
| Constructor Summary | |
|---|---|
MultiCsvTable()
|
|
| Method Summary | |
|---|---|
void |
addEntity(String[] row)
Add a row to the last table when deserializing a multi table csv. |
void |
addTable(CsvTable table)
Add a table to this multi-table csv. |
CsvTable |
createCsvTable(String... header)
Create a new CsvTable with the specified header, and add it to this multi-table csv |
Iterator<String[]> |
getEntities()
Return an iterator over the rows of the CSV as a String[]. |
List<CsvTable> |
getTables()
Get the live list of tables contained in this multi-table csv |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultiCsvTable()
| Method Detail |
|---|
public CsvTable createCsvTable(String... header)
header - the header of the new table (can be empty).
public void addTable(CsvTable table)
getTables().add(table)
table - the table to addpublic List<CsvTable> getTables()
public Iterator<String[]> getEntities()
CsvSerializer
getEntities in interface CsvSerializerpublic void addEntity(String[] row)
If no table exists, or the length of the row is 0, or the row has only one element and it is null or an empty string, then a new table is created instead of adding the row to the last table.
addEntity in interface CsvDeserializerrow - the row to add
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||