|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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(java.lang.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(java.lang.String... header)
Create a new CsvTable with the specified header, and add it to this multi-table csv |
java.util.Iterator<java.lang.String[]> |
getEntities()
Return an iterator over the rows of the CSV as a String[]. |
java.util.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(java.lang.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 java.util.List<CsvTable> getTables()
public java.util.Iterator<java.lang.String[]> getEntities()
CsvSerializer
getEntities
in interface CsvSerializer
public void addEntity(java.lang.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 CsvDeserializer
row
- the row to add
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |