|
||||||||||
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
|
static class |
CrossTab.MeasureInfo
|
Field Summary | |
---|---|
static java.lang.String |
CROSSTAB_CELLTYPEOFCOLUMNS
|
static java.lang.String |
CROSSTAB_CELLTYPEOFROWS
|
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_HEADER_TITLE
|
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_POSITION
|
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 fieldOptions,
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 |
int |
addSubtotalsToTheNodeFirstLevel(Node node,
boolean horizontal,
int positionToAddNode)
|
int |
addSubtotalsToTheNodeUpLevel(Node node,
boolean horizontal,
int startingPosition)
|
void |
addSubtotalsToTheTree(Node node,
boolean horizontal,
int startingPosition)
|
int |
addSubtotalsToTheTreeNoMeasure(Node node,
boolean horizontal,
int startingPosition)
|
Node |
buildSubtotalNode(int totalHeadersNumber,
boolean withMeasures)
|
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 |
java.util.List<CrossTab.MeasureInfo> |
getMeasures()
|
java.lang.String |
getMeasureScaleFactor(java.lang.String name)
|
java.util.List<java.lang.String> |
getRowHeadersTitles()
|
Node |
getRowsRoot()
|
boolean |
isMeasureOnRow()
|
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 CROSSTAB_JSON_ROWS_HEADER_TITLE
public static final java.lang.String CROSSTAB_CELLTYPEOFCOLUMNS
public static final java.lang.String CROSSTAB_CELLTYPEOFROWS
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 MEASURE_POSITION
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 fieldOptions, 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 java.lang.String getMeasureScaleFactor(java.lang.String name)
public void addSubtotals()
public int addSubtotalsToTheTreeNoMeasure(Node node, boolean horizontal, int startingPosition)
public void addSubtotalsToTheTree(Node node, boolean horizontal, int startingPosition)
public int addSubtotalsToTheNodeUpLevel(Node node, boolean horizontal, int startingPosition)
public int addSubtotalsToTheNodeFirstLevel(Node node, boolean horizontal, int positionToAddNode)
public Node buildSubtotalNode(int totalHeadersNumber, boolean withMeasures)
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()
public java.util.List<java.lang.String> getRowHeadersTitles()
public java.util.List<CrossTab.MeasureInfo> getMeasures()
public boolean isMeasureOnRow()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |