Style Intelligence v12.0

inetsoft.graph.data
Class SubDataSet

java.lang.Object
  extended by inetsoft.graph.data.AbstractDataSet
      extended by inetsoft.graph.data.AbstractDataSetFilter
          extended by inetsoft.graph.data.SubDataSet
All Implemented Interfaces:
AttributeDataSet, DataSet, DataSetFilter, Serializable, Cloneable

public class SubDataSet
extends AbstractDataSetFilter

This class extracts a subset of tuples from a dataset using simple conditions.

See Also:
Serialized Form

Constructor Summary
SubDataSet(DataSet dset, int[] mapping)
          Create a subset of the data.
SubDataSet(DataSet dset, int start, int end)
          Create a subset of tuples.
SubDataSet(DataSet dset, Map conds)
          Create a subset of tuples.
 
Method Summary
 Object clone()
          Clone the data set.
 int getBaseRow(int r)
          Get the base row index on its base data set of the specified row.
 DataSet getDataSet()
          Get the base data set.
protected  int getRowCount0()
          Return the number of rows in the chartLens.
 int getRowFromBase(int baserow)
          Get the row index corresponding to the base row.
 
Methods inherited from class inetsoft.graph.data.AbstractDataSetFilter
convertToField, getBaseCol, getCalcColumns, getCalcRows, getColCount0, getComparator0, getData0, getDrillHyperlinks, getDrillHyperlinks, getFormat, getFormat, getHeader0, getHyperlink, getHyperlink, getRootCol, getRootDataSet, getRootRow, getType0, indexOfHeader0, isMeasure0, prepareGraph, removeCalcValues
 
Methods inherited from class inetsoft.graph.data.AbstractDataSet
addCalcColumn, addCalcRow, getCalcColumns, getColCount, getComparator, getData, getData, getHeader, getRowCount, getType, indexOfHeader, isMeasure, prepareCalc, process, removeCalcColumns, removeCalcColValues, removeCalcRows, removeCalcRows, removeCalcRowValues
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface inetsoft.graph.data.DataSet
addCalcColumn, addCalcRow, getCalcColumns, getColCount, getComparator, getData, getData, getHeader, getRowCount, getType, indexOfHeader, isMeasure, prepareCalc, removeCalcColumns, removeCalcColValues, removeCalcRows, removeCalcRows, removeCalcRowValues
 

Constructor Detail

SubDataSet

public SubDataSet(DataSet dset,
                  Map conds)
Create a subset of tuples. The conditions are specified as a map from column names to the column values.


SubDataSet

public SubDataSet(DataSet dset,
                  int start,
                  int end)
Create a subset of tuples.

Parameters:
start - starting row.
end - ending row, non-inclusive;

SubDataSet

public SubDataSet(DataSet dset,
                  int[] mapping)
Create a subset of the data.

Parameters:
mapping - the row mapping to the base dataset.
Method Detail

getRowCount0

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

Overrides:
getRowCount0 in class AbstractDataSetFilter
Returns:
number of rows in table.

getBaseRow

public int getBaseRow(int r)
Get the base row index on its base data set of the specified row.

Specified by:
getBaseRow in interface DataSetFilter
Overrides:
getBaseRow in class AbstractDataSetFilter
Parameters:
r - the specified row index.
Returns:
the base row index on base data set, -1 if no base row.

getRowFromBase

public int getRowFromBase(int baserow)
Get the row index corresponding to the base row. This does a reverse lookup of the base row index in the mapping, and return a position by binarySearch().


getDataSet

public DataSet getDataSet()
Get the base data set.

Specified by:
getDataSet in interface DataSetFilter
Overrides:
getDataSet in class AbstractDataSetFilter
Returns:
the base data set.

clone

public Object clone()
Description copied from class: AbstractDataSet
Clone the data set.

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

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