public class TableView
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TableView.ColPrefs
Static class represents the column preferences
|
static class |
TableView.ValueCountCompAsc
Static class to compare the valueCount object in ascending order
|
static class |
TableView.ValueCountCompDesc
Static class to compare the valueCount object in descending order
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
otherLabel |
Constructor and Description |
---|
TableView(TabularReport report)
Constructor to create the table view from the tabular report
|
Modifier and Type | Method and Description |
---|---|
int |
columnCount()
Number of columns in this tabular report
|
void |
columnHide(java.lang.String columnLabel,
boolean hide)
Makes the given column as hidden or un-hidden
|
void |
columnRename(java.lang.String columnLabel,
java.lang.String newLabel)
This method renames the given column label to the newly given one
|
TableView |
filterRowsByColumn(java.lang.String columnLabel,
java.lang.String match,
boolean isRegexp)
Filter the rows by the column label and the given matching string
|
java.lang.String |
getColumnDescr(int idx)
Returns the column description
|
int |
getColumnIndex(java.lang.String columnLabel)
The index value of the given column label
|
java.lang.String |
getColumnLabel(int idx)
Returns the column label for the given index
|
java.lang.String |
getColumnLabelLocalized(int idx)
Retrieve localized label
|
java.lang.String |
getColumnValue(int rowIndex,
java.lang.String columnLabel)
Returns the columnValue for the given column label and the row index
|
java.lang.String[] |
getColumnValues(java.lang.String columnLabel)
Retrieve column values based on untranslated column labels
|
TabularReport |
getReport()
The under lying report for this TableView
|
static java.util.List<ValueCount> |
getTopN(java.util.List<ValueCount> counts,
int topN,
boolean hasOther)
Returns the list of value count object for the number of counts
|
int |
rowCount()
Number of rows in this Tabular Report
|
int |
rowCountByColumn(int colidx,
java.lang.String match,
boolean isRegexp)
Returns the number of rows matching a given string in a specific column
|
int |
rowCountByColumn(java.lang.String columnLabel,
java.lang.String match,
boolean isRegexp)
Returns the number of rows matching a given string in a specific column
|
int |
rowCountByValue(java.lang.String columnLabel,
java.lang.String match)
Returns the number of rows matching the column label for given string
|
ValueSet |
rowCountsByValue(java.lang.String columnLabel,
boolean isAsc)
Returns the valueSet object for the columnLabel ordered in ascending or descending order
|
ValueSet |
rowCountsByValue(java.lang.String columnLabel,
boolean isAsc,
int topN,
boolean hasOther)
This method returns the ValueSet object in an ascending or descending order.
|
boolean |
showColumn(int idx)
Checks if the column is to be shown or not
|
double |
sumByColumn(int colidx)
The sum of the values of the given column label
|
double |
sumByColumn(java.lang.String columnLabel)
The sum of the values of the given column label
|
public TableView(TabularReport report)
report
- - the tabular reportpublic TabularReport getReport()
public TableView filterRowsByColumn(java.lang.String columnLabel, java.lang.String match, boolean isRegexp)
columnLabel
- - the column labelmatch
- - the matching stringisRegexp
- - is regular expressionpublic static java.util.List<ValueCount> getTopN(java.util.List<ValueCount> counts, int topN, boolean hasOther)
counts
- - the valueCount objecttopN
- - the integer value to fetch the top countshasOther
- - boolean valuepublic int rowCountByValue(java.lang.String columnLabel, java.lang.String match)
columnLabel
- - the columnLabelmatch
- -the matching stringpublic ValueSet rowCountsByValue(java.lang.String columnLabel, boolean isAsc)
columnLabel
- - the column labelisAsc
- - isAscpublic ValueSet rowCountsByValue(java.lang.String columnLabel, boolean isAsc, int topN, boolean hasOther)
columnLabel
- - the column label to be orderedisAsc
- - the isAsctopN
- - the number of rows to be fetchedhasOther
- - the hasOtherpublic java.lang.String getColumnValue(int rowIndex, java.lang.String columnLabel)
rowIndex
- - the rowIndexcolumnLabel
- - the column labelpublic java.lang.String getColumnLabel(int idx)
idx
- - the index of the column labelpublic java.lang.String getColumnLabelLocalized(int idx)
idx
- - the index of the columnpublic java.lang.String getColumnDescr(int idx)
idx
- - the index of the columnpublic boolean showColumn(int idx)
idx
- - the index of the columnpublic void columnHide(java.lang.String columnLabel, boolean hide)
columnLabel
- - the column labelhide
- - to hide or to un-hidepublic void columnRename(java.lang.String columnLabel, java.lang.String newLabel)
columnLabel
- - the column labelnewLabel
- - the new labelpublic int rowCount()
public int columnCount()
public java.lang.String[] getColumnValues(java.lang.String columnLabel)
columnLabel
- - the columna labelpublic int getColumnIndex(java.lang.String columnLabel)
columnLabel
- - the column labelpublic int rowCountByColumn(java.lang.String columnLabel, java.lang.String match, boolean isRegexp)
columnLabel
- - the column labelmatch
- - the matching stringisRegexp
- - isRegular expressionpublic int rowCountByColumn(int colidx, java.lang.String match, boolean isRegexp)
colidx
- - the column indexmatch
- - the matching stringisRegexp
- - is regular expressionpublic double sumByColumn(java.lang.String columnLabel)
columnLabel
- - the column labelpublic double sumByColumn(int colidx)
columnLabel
- - the column label