|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.eng.spagobi.engines.qbe.crosstable.CrossTab
public class CrossTab
Nested Class Summary | |
---|---|
static class |
CrossTab.CellType
|
class |
CrossTab.MeasureInfo
|
Field Summary | |
---|---|
static java.lang.String |
CROSSTAB_JSON_COLUMNS_HEADERS
|
static java.lang.String |
CROSSTAB_JSON_CONFIG
|
static java.lang.String |
CROSSTAB_JSON_DATA
|
static java.lang.String |
CROSSTAB_JSON_MEASURES_METADATA
|
static java.lang.String |
CROSSTAB_JSON_ROWS_HEADERS
|
static java.lang.String |
CROSSTAB_JSON_ROWS_HEADERS_DESCRIPTION
|
static java.lang.String |
CROSSTAB_NODE_JSON_CHILDS
|
static java.lang.String |
CROSSTAB_NODE_JSON_KEY
|
static java.lang.String |
MEASURE_FORMAT
|
static java.lang.String |
MEASURE_NAME
|
static java.lang.String |
MEASURE_TYPE
|
static java.lang.String |
SUBTOTAL
|
static java.lang.String |
TOTAL
|
Constructor Summary | |
---|---|
CrossTab()
|
|
CrossTab(it.eng.spagobi.tools.dataset.common.datastore.IDataStore dataStore,
CrosstabDefinition crosstabDefinition)
Builds the crossTab (headers structure and data) |
|
CrossTab(it.eng.spagobi.tools.dataset.common.datastore.IDataStore dataStore,
CrosstabDefinition crosstabDefinition,
org.json.JSONArray calculateFields)
Builds the crossTab (headers structure and data) |
Method Summary | |
---|---|
void |
addCrosstabDataColumns(int startposition,
java.util.List<java.lang.String[]> colums,
CrossTab.CellType type)
Inserts columns in the crosstab data matrix |
void |
addCrosstabDataLine(int startposition,
java.util.List<java.lang.String[]> line,
boolean horizontal,
CrossTab.CellType type)
Inserts lines in the crosstab data matrix |
void |
addCrosstabDataRow(int startposition,
java.util.List<java.lang.String[]> rows,
CrossTab.CellType type)
Inserts rows in the crosstab data matrix |
void |
addSubtotals()
SUBTOTALS |
void |
addSubtotalsToTheNode(Node n,
boolean horizontal,
int level,
boolean measuresOnRow)
Prepare and execute a CF for the subtotals |
CrossTab.CellType |
getCellType(int row,
int column)
Get the CellType of the cell |
Node |
getColumnsRoot()
|
java.lang.String[][] |
getDataMatrix()
|
org.json.JSONObject |
getJSONCrossTab()
Get the JSON representation of the cross tab |
org.json.JSONArray |
getJSONDataMatrix()
Serialize the matrix in a JSON format |
Node |
getRowsRoot()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CROSSTAB_NODE_JSON_KEY
public static final java.lang.String CROSSTAB_NODE_JSON_CHILDS
public static final java.lang.String CROSSTAB_JSON_ROWS_HEADERS
public static final java.lang.String CROSSTAB_JSON_ROWS_HEADERS_DESCRIPTION
public static final java.lang.String CROSSTAB_JSON_COLUMNS_HEADERS
public static final java.lang.String CROSSTAB_JSON_DATA
public static final java.lang.String CROSSTAB_JSON_CONFIG
public static final java.lang.String CROSSTAB_JSON_MEASURES_METADATA
public static final java.lang.String MEASURE_NAME
public static final java.lang.String MEASURE_TYPE
public static final java.lang.String MEASURE_FORMAT
public static final java.lang.String TOTAL
public static final java.lang.String SUBTOTAL
Constructor Detail |
---|
public CrossTab()
public CrossTab(it.eng.spagobi.tools.dataset.common.datastore.IDataStore dataStore, CrosstabDefinition crosstabDefinition, org.json.JSONArray calculateFields) throws org.json.JSONException
dataStore:
- the source of the datacrosstabDefinition:
- the definition of the crossTabcalculateFields:
- array of JSONObjects the CF
org.json.JSONException
public CrossTab(it.eng.spagobi.tools.dataset.common.datastore.IDataStore dataStore, CrosstabDefinition crosstabDefinition) throws org.json.JSONException
dataStore:
- the source of the datacrosstabDefinition:
- the definition of the crossTab
org.json.JSONException
Method Detail |
---|
public org.json.JSONObject getJSONCrossTab() throws org.json.JSONException
org.json.JSONException
public org.json.JSONArray getJSONDataMatrix()
public void addSubtotals()
public void addSubtotalsToTheNode(Node n, boolean horizontal, int level, boolean measuresOnRow)
n
- horizontal
- level
- measuresOnRow
- public void addCrosstabDataLine(int startposition, java.util.List<java.lang.String[]> line, boolean horizontal, CrossTab.CellType type)
startposition
- the position where insert the rows/columns into the matrixline
- the lines to inserthorizontal
- true to insert columns/false to insert rowstype
- the type of the datapublic void addCrosstabDataColumns(int startposition, java.util.List<java.lang.String[]> colums, CrossTab.CellType type)
startposition
- the position where insert the columns into the matrixcolums
- the lines to inserttype
- the type of the datapublic void addCrosstabDataRow(int startposition, java.util.List<java.lang.String[]> rows, CrossTab.CellType type)
startposition
- the position where insert the rows into the matrixcolums
- the lines to inserttype
- the type of the datapublic CrossTab.CellType getCellType(int row, int column)
row
- the rowcolumn
- the column
public Node getColumnsRoot()
public Node getRowsRoot()
public java.lang.String[][] getDataMatrix()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |