Class TabDataSet

java.lang.Object
  |
  +--DataSet
        |
        +--TabDataSet

public class TabDataSet
extends DataSet
implements Constants

TabDataSet implements a dataset for tabular data.


Fields inherited from class DataSet
programWindow
 
Constructor Summary
TabDataSet()
           
 
Method Summary
 java.lang.String getAttributeMeasurement(int attrNo)
          Method returns the measurement of the given attribute.
 java.lang.String getAttributeName(int attrNo)
          Method returns the name of the given attribute (column).
 int getAttributeType(int attrNo)
          Method returns the type of the given attribute: 0=long, 1=double, 2=class.
 int getClassValue(int rowNo, int attrNo)
          Method returns the value of the given attribute on the given row.
 TabCursor getCursor()
          Method returns TabCursor object for browsing of the data.
 boolean getData()
          Starts to fetch data from the tabular DataSource.
 double getDoubleValue(int rowNo, int attrNo)
          Method returns the value of the given attribute on the given row.
 Index getIndex(int attrNo)
          Method gives index for given attribute (column).
 long getLongValue(int rowNo, int attrNo)
          Method returns the value of the given attribute on the given row.
 double getMaxDouble(int attrNo)
          Method returns the minimum value of the given attribute.
 long getMaxLong(int attrNo)
          Method returns the maximum value of the given attribute.
 double getMinDouble(int attrNo)
          Method returns the minimum value of the given attribute.
 long getMinLong(int attrNo)
          Method returns the minimum value of the given attribute.
 int getNumberofAttributes()
          Method returns the number of attributes (columns) in the dataset.
 int getNumberofClasses(int attrNo)
          Method returns the number of class values the class typed attribute contains.
 int getNumberofRows()
          Method returns the number of rows in the dataset.
 java.lang.String getValueofClass(int attrNo, int classNo)
          Method returns the value (string) of the given class of the given attribute.
 void removeSelectedRows()
          Removes the selection from all the selected rows.
 void setSelectedRows(int Attr1No, double Attr1Min, double Attr1Max, int Attr2No, double Attr2Min, double Attr2Max)
          Sets some of the rows in the set as selected.
 void setSelectedRows(int Attr1No, double Attr1Min, double Attr1Max, int Attr2No, long Attr2Min, long Attr2Max)
          Sets some of the rows in the set as selected.
 void setSelectedRows(int Attr1No, long Attr1Min, long Attr1Max, int Attr2No, double Attr2Min, double Attr2Max)
          Sets some of the rows in the set as selected.
 void setSelectedRows(int Attr1No, long Attr1Min, long Attr1Max, int Attr2No, long Attr2Min, long Attr2Max)
          Sets some of the rows in the set as selected.
 
Methods inherited from class DataSet
getDataSource, setDataSource, setProgramWindow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabDataSet

public TabDataSet()
Method Detail

getData

public boolean getData()
                throws java.lang.Exception
Starts to fetch data from the tabular DataSource.
Returns:
Returns true if fetching was succesfull.
Throws:
Raises - exception- typed exception.
Overrides:
getData in class DataSet

getCursor

public TabCursor getCursor()
Method returns TabCursor object for browsing of the data.
Returns:
A TabCursor object for browsing of the data.

getIndex

public Index getIndex(int attrNo)
Method gives index for given attribute (column). It also creates it when needed.
Returns:
Index-object for given attribute.

getLongValue

public long getLongValue(int rowNo,
                         int attrNo)
Method returns the value of the given attribute on the given row.
Parameters:
rowNo - - The number of row and number of attribute (column).
attrNo - - The number of attribute (column).
Returns:
The value of the given attribute on the given row.

getDoubleValue

public double getDoubleValue(int rowNo,
                             int attrNo)
Method returns the value of the given attribute on the given row.
Parameters:
rowNo - - The number of row and number of attribute (column).
attrNo - - The number of attribute (column).
Returns:
The value of the given attribute on the given row.

getClassValue

public int getClassValue(int rowNo,
                         int attrNo)
Method returns the value of the given attribute on the given row.
Parameters:
rowNo - - The number of row and number of attribute (column).
attrNo - - The number of attribute (column).
Returns:
The class value of the given attribute on the given row.

setSelectedRows

public void setSelectedRows(int Attr1No,
                            long Attr1Min,
                            long Attr1Max,
                            int Attr2No,
                            long Attr2Min,
                            long Attr2Max)
Sets some of the rows in the set as selected. Not implemented.

setSelectedRows

public void setSelectedRows(int Attr1No,
                            long Attr1Min,
                            long Attr1Max,
                            int Attr2No,
                            double Attr2Min,
                            double Attr2Max)
Sets some of the rows in the set as selected. Not Implemented.

setSelectedRows

public void setSelectedRows(int Attr1No,
                            double Attr1Min,
                            double Attr1Max,
                            int Attr2No,
                            long Attr2Min,
                            long Attr2Max)
Sets some of the rows in the set as selected. Not implemented.

setSelectedRows

public void setSelectedRows(int Attr1No,
                            double Attr1Min,
                            double Attr1Max,
                            int Attr2No,
                            double Attr2Min,
                            double Attr2Max)
Sets some of the rows in the set as selected. Not implemented.

removeSelectedRows

public void removeSelectedRows()
Removes the selection from all the selected rows. Not implemented.

getNumberofRows

public int getNumberofRows()
Method returns the number of rows in the dataset.
Returns:
The number of rows in the dataset.

getNumberofAttributes

public int getNumberofAttributes()
Method returns the number of attributes (columns) in the dataset.
Returns:
The number of attributes (columns) in the dataset.

getAttributeName

public java.lang.String getAttributeName(int attrNo)
Method returns the name of the given attribute (column).
Parameters:
attrNo - - Number of the attribute (column).
Returns:
The name of the given attribute (column).

getAttributeMeasurement

public java.lang.String getAttributeMeasurement(int attrNo)
Method returns the measurement of the given attribute.
Parameters:
attrNo - - Number of the attribute (column).
Returns:
The measurement of the given attribute.

getAttributeType

public int getAttributeType(int attrNo)
Method returns the type of the given attribute: 0=long, 1=double, 2=class.
Parameters:
attrNo - - Number of the attribute (column).
Returns:
The type of the given attribute: 0=long, 1=double, 2=class.

getNumberofClasses

public int getNumberofClasses(int attrNo)
Method returns the number of class values the class typed attribute contains.
Parameters:
attrNo - - Number of the attribute (column).
Returns:
The number of class values the class typed attribute contains.

getValueofClass

public java.lang.String getValueofClass(int attrNo,
                                        int classNo)
Method returns the value (string) of the given class of the given attribute.
Parameters:
attrNo - - Number of the attribute (column).
classNo - - Number of the class.
Returns:
The value (string) of the given class of the given attribute.

getMinLong

public long getMinLong(int attrNo)
Method returns the minimum value of the given attribute.
Parameters:
attrNo - - Number of the attribute (column).
Returns:
The minimum value of the given attribute.

getMaxLong

public long getMaxLong(int attrNo)
Method returns the maximum value of the given attribute.
Parameters:
attrNo - - Number of the attribute (column).
Returns:
The maximum value of the given attribute.

getMinDouble

public double getMinDouble(int attrNo)
Method returns the minimum value of the given attribute.
Parameters:
attrNo - - Number of the attribute (column).
Returns:
The minimum value of the given attribute.

getMaxDouble

public double getMaxDouble(int attrNo)
Method returns the minimum value of the given attribute.
Parameters:
attrNo - - Number of the attribute (column).
Returns:
The minimum value of the given attribute.