Style Intelligence v12.0

inetsoft.graph.data
Class DefaultDataSet

java.lang.Object
  extended by inetsoft.graph.data.AbstractDataSet
      extended by inetsoft.graph.data.DefaultDataSet
All Implemented Interfaces:
DataSet, Serializable, Cloneable

public class DefaultDataSet
extends AbstractDataSet

This class implements dataset interface and provide a in-memory implementation of datasets.

See Also:
Serialized Form

Constructor Summary
DefaultDataSet(Object[][] data0)
          Create a dataset.
 
Method Summary
 Object clone()
          Clone the defualt data set.
protected  int getColCount0()
          Return the number of columns in the chart lens.
protected  Comparator getComparator0(String col)
          Get the comparer to sort data at the specified column.
protected  Object getData0(int col, int row)
          Return the data at the specified cell.
protected  String getHeader0(int col)
          Return the column header at the specified column.
protected  int getRowCount0()
          Return the number of rows in the chart lens.
protected  Class getType0(String col)
          Get the data type of the column.
protected  int indexOfHeader0(String col)
          Get the index of the specified header.
protected  boolean isMeasure0(String col)
          Check if the column is measure.
 void setComparator(String col, Comparator comp)
          Set the comparer to sort data at the specified column.
 void setOrder(String col, Object[] list)
          Set the order of values in the column.
 
Methods inherited from class inetsoft.graph.data.AbstractDataSet
addCalcColumn, addCalcRow, getCalcColumns, getCalcColumns, getCalcRows, getColCount, getComparator, getData, getData, getHeader, getRowCount, getType, indexOfHeader, isMeasure, prepareCalc, prepareGraph, process, removeCalcColumns, removeCalcColValues, removeCalcRows, removeCalcRows, removeCalcRowValues, removeCalcValues
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDataSet

public DefaultDataSet(Object[][] data0)
Create a dataset.

Parameters:
data0 - data in rows and columns. The first row is the column headers.
Method Detail

getData0

protected Object getData0(int col,
                          int row)
Return the data at the specified cell.

Specified by:
getData0 in class AbstractDataSet
Parameters:
col - the specified column index.
row - the specified row index.

getHeader0

protected String getHeader0(int col)
Return the column header at the specified column.

Specified by:
getHeader0 in class AbstractDataSet
Parameters:
col - the specified column index.
Returns:
the column header at the specified column.

getType0

protected Class getType0(String col)
Get the data type of the column.

Specified by:
getType0 in class AbstractDataSet

indexOfHeader0

protected int indexOfHeader0(String col)
Get the index of the specified header.

Specified by:
indexOfHeader0 in class AbstractDataSet
Parameters:
col - the specified column header.

getComparator0

protected Comparator getComparator0(String col)
Get the comparer to sort data at the specified column.

Specified by:
getComparator0 in class AbstractDataSet
Parameters:
col - the specified column.
Returns:
the comparer to sort data at the specified column.

setOrder

public void setOrder(String col,
                     Object[] list)
Set the order of values in the column. This can be used in javascript to set the explicit ordering of values.


setComparator

public void setComparator(String col,
                          Comparator comp)
Set the comparer to sort data at the specified column.

Parameters:
col - the specified column.
comp - the comparer to sort data at the specified column.

isMeasure0

protected boolean isMeasure0(String col)
Check if the column is measure.

Specified by:
isMeasure0 in class AbstractDataSet
Parameters:
col - the specified column name.
Returns:
true if is measure, false otherwise.

getRowCount0

protected int getRowCount0()
Return the number of rows in the chart lens.

Specified by:
getRowCount0 in class AbstractDataSet
Returns:
number of rows in the chart lens.

getColCount0

protected int getColCount0()
Return the number of columns in the chart lens.

Specified by:
getColCount0 in class AbstractDataSet
Returns:
number of columns in the chart lens.

clone

public Object clone()
Clone the defualt data set.

Specified by:
clone in interface DataSet
Overrides:
clone in class AbstractDataSet
Returns:
a copy of this object

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.