Package com.day.cq.wcm.foundation
Class Table
- java.lang.Object
-
- com.day.cq.wcm.foundation.Table
-
public class Table extends java.lang.ObjectImplements a very basic table parser.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTable.Attributesstatic classTable.Cellstatic classTable.ColTagclassTable.ColumnclassTable.Rowstatic classTable.Tag
-
Constructor Summary
Constructors Constructor Description Table()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()static TablefromCSV(java.lang.String s)static TablefromCSV(java.lang.String s, char delim)static TablefromXML(java.io.Reader r)static TablefromXML(java.lang.String s)Table.AttributesgetAttributes()Table.TaggetCaption()Table.CellgetCell(int row, int col, boolean create)java.util.List<Table.ColTag>getColTags()Table.ColumngetColumn(int nr)java.util.List<Table.Column>getColumns()double[][]getDoubleData()double[][]getDoubleData(int rowStart, int numRows, int colStart, int numCols)int[][]getIntData()int[][]getIntData(int rowStart, int numRows, int colStart, int numCols)intgetNumCols()intgetNumRows()Table.RowgetRow(int nr)java.util.List<Table.Row>getRows()TablesetAttribute(java.lang.String name, java.lang.String value)Table.TagsetCaption(java.lang.String text)voidsetSize(int numRows, int numCols)voidtoHtml(java.io.Writer out)
-
-
-
Method Detail
-
getColTags
public java.util.List<Table.ColTag> getColTags()
-
getAttributes
public Table.Attributes getAttributes()
-
setAttribute
public Table setAttribute(java.lang.String name, java.lang.String value)
-
getCaption
public Table.Tag getCaption()
-
setCaption
public Table.Tag setCaption(java.lang.String text)
-
getCell
public Table.Cell getCell(int row, int col, boolean create)
-
getIntData
public int[][] getIntData(int rowStart, int numRows, int colStart, int numCols)
-
getIntData
public int[][] getIntData()
-
getDoubleData
public double[][] getDoubleData(int rowStart, int numRows, int colStart, int numCols)
-
getDoubleData
public double[][] getDoubleData()
-
setSize
public void setSize(int numRows, int numCols)
-
getRows
public java.util.List<Table.Row> getRows()
-
getColumns
public java.util.List<Table.Column> getColumns()
-
getRow
public Table.Row getRow(int nr)
-
getColumn
public Table.Column getColumn(int nr)
-
getNumCols
public int getNumCols()
-
getNumRows
public int getNumRows()
-
clear
public void clear()
-
fromXML
public static Table fromXML(java.lang.String s)
-
fromXML
public static Table fromXML(java.io.Reader r) throws java.io.IOException
- Throws:
java.io.IOException
-
fromCSV
public static Table fromCSV(java.lang.String s)
-
fromCSV
public static Table fromCSV(java.lang.String s, char delim)
-
toHtml
public void toHtml(java.io.Writer out) throws java.io.IOException- Throws:
java.io.IOException
-
-