Package com.macrofocus.molap.dataframe
Class JsonDataFrame
- java.lang.Object
-
- com.macrofocus.molap.dataframe.AbstractDataFrame<java.lang.Integer,java.lang.String,java.lang.Object>
-
- com.macrofocus.molap.dataframe.JsonDataFrame
-
- All Implemented Interfaces:
DataFrame<java.lang.Integer,java.lang.String,java.lang.Object>
public class JsonDataFrame extends AbstractDataFrame<java.lang.Integer,java.lang.String,java.lang.Object>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.macrofocus.molap.dataframe.AbstractDataFrame
AbstractDataFrame.ColumnSeries
-
-
Constructor Summary
Constructors Constructor Description JsonDataFrame(elemental.json.JsonArray array)
JsonDataFrame(java.lang.String json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class
getColumnClass(java.lang.String column)
Returns the most specific superclass for all cell values in a columnint
getColumnCount()
Returns the number of columns contained by this data frame.UniqueIndex<java.lang.String>
getColumnIndex()
Gets the index used to access the columns.java.lang.String
getColumnName(java.lang.String column)
Returns the name of the column.Series<java.lang.String,?>
getRow(java.lang.Integer integer)
Returns a series of all the values of a given row.java.lang.Class
getRowClass(java.lang.Integer row)
Returns the most specific superclass for all cell values in a row.int
getRowCount()
Returns the number of rows contained by the this data frame.UniqueIndex<java.lang.Integer>
getRowIndex()
Gets the index used to access the rows.java.lang.Object
getValueAt(java.lang.Integer row, java.lang.String column)
Returns the value for the cell at the intersection of thecolumn
key androw
key.DataFrame
join(Series series, java.lang.String[] strings)
-
Methods inherited from class com.macrofocus.molap.dataframe.AbstractDataFrame
addDataFrameListener, addWeakDataFrameListener, aggregate, aggregate, append, appendAndReindex, benchmark, columns, filter, getCentroid, getColumn, getColumnAddress, getColumnKey, getConstant, getCount, getCountDistinct, getCountDistinctWithNull, getCube, getDataFrameAggregation, getDistributiveStatistics, getFirst, getFirstQuartile, getMax, getMean, getMedian, getMin, getRandom, getRowAddress, getRowKey, getStatistics, getStdDev, getSum, getThirdQuartile, getUnivariateStatistics, getVariance, getVarianceByPopulation, getWeightedMean, getWeightedSum, notifyDataFrameChanged, orderRows, print, print, printSchema, reindexColumns, reindexRows, reindexRows, reindexRows, reindexRows, reindexRows, remapColumns, removeColumns, removeDataFrameListener, removeDataFrameListeners, removeDuplicates, rows
-
-
-
-
Method Detail
-
getColumnName
public java.lang.String getColumnName(java.lang.String column)
Description copied from interface:DataFrame
Returns the name of the column. This is a convenience method for labeling purpose.- Specified by:
getColumnName
in interfaceDataFrame<java.lang.Integer,java.lang.String,java.lang.Object>
- Overrides:
getColumnName
in classAbstractDataFrame<java.lang.Integer,java.lang.String,java.lang.Object>
- Parameters:
column
- the key of the column- Returns:
- the name of the column
-
getColumnClass
public java.lang.Class getColumnClass(java.lang.String column)
Description copied from interface:DataFrame
Returns the most specific superclass for all cell values in a column- Parameters:
column
- the key of the column- Returns:
- the common ancestor class of the object values in the column.
-
getRowCount
public int getRowCount()
Description copied from interface:DataFrame
Returns the number of rows contained by the this data frame.- Specified by:
getRowCount
in interfaceDataFrame<java.lang.Integer,java.lang.String,java.lang.Object>
- Overrides:
getRowCount
in classAbstractDataFrame<java.lang.Integer,java.lang.String,java.lang.Object>
- Returns:
- the number of rows.
-
getColumnCount
public int getColumnCount()
Description copied from interface:DataFrame
Returns the number of columns contained by this data frame.- Specified by:
getColumnCount
in interfaceDataFrame<java.lang.Integer,java.lang.String,java.lang.Object>
- Overrides:
getColumnCount
in classAbstractDataFrame<java.lang.Integer,java.lang.String,java.lang.Object>
- Returns:
- the number of columns.
-
getRowClass
public java.lang.Class getRowClass(java.lang.Integer row)
Description copied from interface:DataFrame
Returns the most specific superclass for all cell values in a row.- Parameters:
row
- the key of the row- Returns:
- the common ancestor class of the object values in the row.
-
getValueAt
public java.lang.Object getValueAt(java.lang.Integer row, java.lang.String column)
Description copied from interface:DataFrame
Returns the value for the cell at the intersection of thecolumn
key androw
key.- Parameters:
row
- the row key whose value is to be queriedcolumn
- the column key whose value is to be queried- Returns:
- the value Object at the specified cell
-
getRow
public Series<java.lang.String,?> getRow(java.lang.Integer integer)
Description copied from interface:DataFrame
Returns a series of all the values of a given row.- Parameters:
integer
- the row key- Returns:
- a Series object
-
getRowIndex
public UniqueIndex<java.lang.Integer> getRowIndex()
Description copied from interface:DataFrame
Gets the index used to access the rows.- Returns:
- the row index
-
getColumnIndex
public UniqueIndex<java.lang.String> getColumnIndex()
Description copied from interface:DataFrame
Gets the index used to access the columns.- Returns:
- the column index
-
-