com.sas.table
Interface StaticTableTypeInterface

All Known Subinterfaces:
StaticTableTypeStylesInterface

public interface StaticTableTypeInterface

Defines an interface for accessing a table's relational types. This will usually be implemented in tandem with the primary interface to tables, StaticTableInterface.

A relational or named type is an implementation defined string which serves to categorize a table element, i.e. a cell, column, or row. Elements which share a common type are considered to be related. For example, the cells in a column of numeric grades, 0 to 100, might be categorized as "pass" for grades 65 or greater and "fail" for grades less than 65.

A view can use this type information to provide type-based traffic-lighting. For example, a view can allow a user to specify that cells of type "pass" should be colored blue while cells of type "fail" should be in red.

It's possible for an element to be a member of more than one category, i.e. have multiple types. This is why the methods that return the type of a particular element, e.g. getCellType(int,int), return an array of Strings instead of just a String. Again using the grade's example, grades above 90 in addition to being members of the "pass" category could also be designated as "A"s.

If a set of types (e.g. getCellTypes()) changes, the implementation should create and send an appropriate PropertyChangeEvent to all PropertyChangeListener.

See Also:
StaticTableInterface, StaticTableTypeStylesInterface

Method Summary
 java.lang.String[] getCellType(int rowIndex, int colIndex)
          Returns the type(s) of a cell.
 java.lang.String[] getCellTypes()
          Returns the complete set of cell types; includes types for data cells, column labels, and row labels.
 java.lang.String[] getColumnLabelType(int colIndex)
          Returns the type(s) of a column label.
 java.lang.String[] getColumnType(int colIndex)
          Returns the type(s) of a column.
 java.lang.String[] getColumnTypes()
          Returns the complete set of column types.
 java.lang.String[] getRowLabelType(int rowIndex)
          Returns the type(s) of a row label.
 java.lang.String[] getRowType(int rowIndex)
          Returns the type(s) of a row.
 java.lang.String[] getRowTypes()
          Returns the complete set of row types.
 

Method Detail

getCellTypes

java.lang.String[] getCellTypes()
                                throws com.sas.table.TableException
Returns the complete set of cell types; includes types for data cells, column labels, and row labels.

Use getCellType(rowIndex, colIndex) to determine the type for a particular cell.

Use getColumnLabelType(colIndex) to determine the type for a particular column label.

Use getRowLabelType(rowIndex) to determine the type for a particular row label.

Returns:
Null, or a string array of all the possible cell types.
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).
See Also:
getCellType(int, int), getColumnLabelType(int), getRowLabelType(int)

getCellType

java.lang.String[] getCellType(int rowIndex,
                               int colIndex)
                               throws com.sas.table.TableException
Returns the type(s) of a cell. For cells that have more than one type, the types should be ordered (if applicable) in the array from most important to least important.

Parameters:
rowIndex - A one-based index that identifies the cell's row.
colIndex - A one-based index that identifies the cell's column.
Returns:
A string array of the cell's types. (The implementation can assume that a null-return will be handled the same as a zero-length array.)
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).
See Also:
getColumnLabelType(int), getRowLabelType(int)

getColumnLabelType

java.lang.String[] getColumnLabelType(int colIndex)
                                      throws com.sas.table.TableException
Returns the type(s) of a column label. For labels that have more than one type, the types should be ordered (if applicable) in the array from most important to least important.

Parameters:
colIndex - A one-based index that identifies the label's column.
Returns:
A string array of the label's types. (The implementation can assume that a null-return will be handled the same as a zero-length array.)
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).
See Also:
getCellType(int, int), getRowLabelType(int)

getRowLabelType

java.lang.String[] getRowLabelType(int rowIndex)
                                   throws com.sas.table.TableException
Returns the type(s) of a row label. For labels that have more than one type, the types should be ordered (if applicable) in the array from most important to least important.

Parameters:
rowIndex - A one-based index that identifies the label's row.
Returns:
A string array of the label's types. (The implementation can assume that a null-return will be handled the same as a zero-length array.)
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).
See Also:
getCellType(int, int), getColumnLabelType(int)

getColumnTypes

java.lang.String[] getColumnTypes()
                                  throws com.sas.table.TableException
Returns the complete set of column types.

Use getColumnType(colIndex) to determine the type for a particular column.

Returns:
Null, or a string array of all the possible column types.
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).
See Also:
getColumnType(int)

getColumnType

java.lang.String[] getColumnType(int colIndex)
                                 throws com.sas.table.TableException
Returns the type(s) of a column. For columns that have more than one type, the types should be ordered (if applicable) in the array from most important to least important.

Parameters:
colIndex - A one-based index that identifies the column.
Returns:
A string array of the column's types. (The implementation can assume that a null-return will be handled the same as a zero-length array.)
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).

getRowTypes

java.lang.String[] getRowTypes()
                               throws com.sas.table.TableException
Returns the complete set of row types.

Use getRowType(rowIndex) to determine the type for a particular row.

Returns:
Null, or a string array of all the possible row types.
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).
See Also:
getRowType(int)

getRowType

java.lang.String[] getRowType(int rowIndex)
                              throws com.sas.table.TableException
Returns the type(s) of a row. For rows that have more than one type, the types should be ordered (if applicable) in the array from most important to least important.

Parameters:
rowIndex - A one-based index that identifies the row.
Returns:
A string array of the row's types. (The implementation can assume that a null-return will be handled the same as a zero-length array.)
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).



Copyright © 2009 SAS Institute Inc. All Rights Reserved.