com.xpn.xwiki.plugin.charts.source
Class TableDataSource
java.lang.Object
com.xpn.xwiki.plugin.charts.source.DefaultDataSource
com.xpn.xwiki.plugin.charts.source.TableDataSource
- All Implemented Interfaces:
- DataSource
public class TableDataSource
- extends DefaultDataSource
- implements DataSource
Method Summary |
static int |
getTableColumnCount(org.radeox.macro.table.Table t)
|
static int |
getTableRowCount(org.radeox.macro.table.Table t)
|
private void |
init(java.lang.String docName,
int tableNumber,
java.lang.String range,
boolean hasHeaderRow,
boolean hasHeaderColumn,
java.lang.String decimalSymbolSelector,
boolean ignoreAlpha,
XWikiContext context)
|
private void |
makeDataMatrix(org.radeox.macro.table.Table t)
|
private void |
makeHeaders(org.radeox.macro.table.Table t)
|
private void |
parseRange(java.lang.String range,
boolean hasHeaderRow,
boolean hasHeaderColumn,
org.radeox.macro.table.Table t)
Valid string formats:
Xm-Yn => rectangular range
X-Y => whole columns range
m-n => whole rows range
* => enire table
Where X, Y are Uppercase letters, m, n are numbers
First column is A, first row is 1 |
private void |
setDecimalSymbol(java.lang.String decimalSymbolSelector)
|
private java.lang.Number |
toNumber(java.lang.String str)
|
Methods inherited from class com.xpn.xwiki.plugin.charts.source.DefaultDataSource |
getAllCells, getCell, getColumn, getColumnCount, getHeaderColumn, getHeaderColumnValue, getHeaderRow, getHeaderRowValue, getRow, getRowCount, hasHeaderColumn, hasHeaderRow, setCell |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.xpn.xwiki.plugin.charts.source.DataSource |
getAllCells, getCell, getColumn, getColumnCount, getHeaderColumn, getHeaderColumnValue, getHeaderRow, getHeaderRowValue, getRow, getRowCount, hasHeaderColumn, hasHeaderRow |
DOC
public static final java.lang.String DOC
- See Also:
- Constant Field Values
TABLE_NUMBER
public static final java.lang.String TABLE_NUMBER
- See Also:
- Constant Field Values
RANGE
public static final java.lang.String RANGE
- See Also:
- Constant Field Values
HAS_HEADER_ROW
public static final java.lang.String HAS_HEADER_ROW
- See Also:
- Constant Field Values
HAS_HEADER_COLUMN
public static final java.lang.String HAS_HEADER_COLUMN
- See Also:
- Constant Field Values
DECIMAL_SYMBOL
public static final java.lang.String DECIMAL_SYMBOL
- See Also:
- Constant Field Values
IGNORE_ALPHA
public static final java.lang.String IGNORE_ALPHA
- See Also:
- Constant Field Values
COMMA_SELECTOR
public static final java.lang.String COMMA_SELECTOR
- See Also:
- Constant Field Values
PERIOD_SELECTOR
public static final java.lang.String PERIOD_SELECTOR
- See Also:
- Constant Field Values
DEFAULT_TABLE_NUMBER
public static final int DEFAULT_TABLE_NUMBER
- See Also:
- Constant Field Values
DEFAULT_RANGE
public static final java.lang.String DEFAULT_RANGE
- See Also:
- Constant Field Values
DEFAULT_HAS_HEADER_ROW
public static final boolean DEFAULT_HAS_HEADER_ROW
- See Also:
- Constant Field Values
DEFAULT_HAS_HEADER_COLUMN
public static final boolean DEFAULT_HAS_HEADER_COLUMN
- See Also:
- Constant Field Values
DEFAULT_DECIMAL_SYMBOL
public static final java.lang.String DEFAULT_DECIMAL_SYMBOL
- See Also:
- Constant Field Values
DEFAULT_IGNORE_ALPHA
public static final boolean DEFAULT_IGNORE_ALPHA
- See Also:
- Constant Field Values
COMMA
public static final char COMMA
- See Also:
- Constant Field Values
PERIOD
public static final char PERIOD
- See Also:
- Constant Field Values
RANGE_SEP
public static final char RANGE_SEP
- See Also:
- Constant Field Values
startColumn
private int startColumn
endColumn
private int endColumn
startRow
private int startRow
endRow
private int endRow
headerColumnIndex
private int headerColumnIndex
headerRowIndex
private int headerRowIndex
decimalSymbol
private char decimalSymbol
digitGroupingSymbol
private char digitGroupingSymbol
ignoreAlpha
private boolean ignoreAlpha
TableDataSource
public TableDataSource(BaseObject defObject,
XWikiContext context)
throws DataSourceException
- Throws:
DataSourceException
TableDataSource
public TableDataSource(java.util.Map params,
XWikiContext context)
throws DataSourceException
- Throws:
DataSourceException
init
private void init(java.lang.String docName,
int tableNumber,
java.lang.String range,
boolean hasHeaderRow,
boolean hasHeaderColumn,
java.lang.String decimalSymbolSelector,
boolean ignoreAlpha,
XWikiContext context)
throws DataSourceException
- Throws:
DataSourceException
setDecimalSymbol
private void setDecimalSymbol(java.lang.String decimalSymbolSelector)
throws DataSourceException
- Throws:
DataSourceException
makeDataMatrix
private void makeDataMatrix(org.radeox.macro.table.Table t)
makeHeaders
private void makeHeaders(org.radeox.macro.table.Table t)
toNumber
private java.lang.Number toNumber(java.lang.String str)
throws java.lang.NumberFormatException
- Throws:
java.lang.NumberFormatException
parseRange
private void parseRange(java.lang.String range,
boolean hasHeaderRow,
boolean hasHeaderColumn,
org.radeox.macro.table.Table t)
throws DataSourceException
- Valid string formats:
Xm-Yn => rectangular range
X-Y => whole columns range
m-n => whole rows range
* => enire table
Where X, Y are Uppercase letters, m, n are numbers
First column is A, first row is 1
- Throws:
DataSourceException
getTableColumnCount
public static int getTableColumnCount(org.radeox.macro.table.Table t)
throws DataSourceException
- Throws:
DataSourceException
getTableRowCount
public static int getTableRowCount(org.radeox.macro.table.Table t)
throws DataSourceException
- Throws:
DataSourceException
Copyright 2003 Ludovic Dubost