com.sas.mdtable
Interface AxisInterface

All Superinterfaces:
NodeInterface, NodeInterface, SimpleNodeInterface, TreeInterface
All Known Implementing Classes:
AbstractAxis, Axis, AbstractAxis

public interface AxisInterface
extends NodeInterface, TreeInterface

Represents an axis in a multidimensional table. An axis is both a node in a multidimensional organizational tree, i.e. Axis-Dimension-Hierarchy-Level-Member, hence its extension of NodeInterface, and it is itself a tree, of labels (AxisLabelInterface), hence its extension of TreeInterface. Thus, the NodeInterface returned by TreeInterface.getRoot() should be a node that parents all of the axis's labels.

See Also:
DimensionInterface, HierarchyInterface, LevelInterface, MemberInterface, AxisLabelInterface

Method Summary
 DimensionInterface getDimension(int index)
          Returns the dimension associated with a given index.
 int getDimensionCount()
          Returns the number of dimensions associated with the axis.
 DimensionInterface[] getDimensions(int index, int count)
          Returns the dimensions associated with a given range of indices.
 AxisLabelInterface[] getLabels(int axisCoordinate)
          Returns the set of labels associated with the given axis coordinate.
 int getMagnitude()
          Returns the magnitude of the axis.
 
Methods inherited from interface com.sas.mdtable.NodeInterface
getLabel, getName
 
Methods inherited from interface com.sas.models.NodeInterface
getNodeExpandedText, getNodeText, getNodeType
 
Methods inherited from interface com.sas.models.SimpleNodeInterface
countNodeChildren, getNodeChild, getNodeChildCount, getNodeChildren, isLeafNode
 
Methods inherited from interface com.sas.models.TreeInterface
getRoot
 

Method Detail

getDimensionCount

public int getDimensionCount()
                      throws TableException
Returns the number of dimensions associated with the axis.
Returns:
The number of dimensions.
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).

getDimension

public DimensionInterface getDimension(int index)
                                throws TableException
Returns the dimension associated with a given index.
Parameters:
index - A zero-based dimension index (0 to getDimensionCount()-1).
Returns:
The dimension associated with index.
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).
IndexOutOfBoundsException - Thrown if index is negative, or greater than or equal to getDimensionCount().

getDimensions

public DimensionInterface[] getDimensions(int index,
                                          int count)
                                   throws TableException
Returns the dimensions associated with a given range of indices.
Parameters:
index - A zero-based dimension index (0 to getDimensionCount()-1).
count - The number of dimensions to return.
Returns:
An array whose first element is the dimension associated with index, whose second element is the dimension associated with index+1, and so on such that array[array.length-1] is the dimension associated with index+count-1.
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).
IndexOutOfBoundsException - Thrown if index is negative, or greater than or equal to getDimensionCount().

getMagnitude

public int getMagnitude()
                 throws TableException
Returns the magnitude of the axis. If you think of an axis as a one-dimensional vector, then magnitude equates to the vector's length. For example consider a table with three axes, x, y, and z, then the magnitude of the z axis would be the number of planes or pages, the magnitude of the x axis would be the number of columns per page, and the magnitude of the y axis would be the number of rows per page.
Returns:
The magnitude of the axis.
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).

getLabels

public AxisLabelInterface[] getLabels(int axisCoordinate)
                               throws TableException
Returns the set of labels associated with the given axis coordinate.
Parameters:
axisCoordinate - A zero-based integer that identifies a point along the axis.
Returns:
An array of labels ordered from least to most specific. For example, [North America, USA, North Carolina, Cary].
Throws:
TableException - Thrown if the query can not be satisfied (e.g. i/o-failure).
IndexOutOfBoundsException - Thrown if axisCoordinate is negative, or greater than or equal to getMagnitude().




Copyright © 2005 SAS Institute Inc. All Rights Reserved.
javadoc generated Thu, 16 Feb 2006 02:03:19