com.sas.sasserver.mdtable
Class Axis

java.lang.Object
  |
  +--com.sas.sasserver.mdtable.ParentNode
        |
        +--com.sas.sasserver.mdtable.Axis
All Implemented Interfaces:
AxisInterface, ExtendedNodeInterface, ModelInterface, NodeInterface, NodeInterface, SimpleNodeInterface, TreeInterface

public class Axis
extends ParentNode
implements AxisInterface

The Axis class maintains the information and provides the functionality required by an axis (eg Column, Row ) of the MultidimensionalTable model, including but not limited to providing the labels for the axis.
Events:
ContentsChanged, AxisChanged and AxisLabelChanged events are sent in response to changes on the axis.
Notes:


See Also:
Dimension, Hierarchy, Level, Member, AxisLabelInterface, Serialized Form

Field Summary
protected static String RB_KEY
           
 
Fields inherited from class com.sas.sasserver.mdtable.ParentNode
_childrenCache, _commandsMask, _secondaryCache, BUFFER_SIZE, delegate, Imddb, isV2Interface, label, name, numChildren, ordinal, parent, properties, READ_AHEAD
 
Constructor Summary
Axis(int index, MultidimensionalTableInterface mdDelegate)
          Construct an Axis instance that has an association with a MultidimensionalTableInterface instance.
 
Method Summary
protected  StaticCacheInterface createCache()
          Returns the secondary cache in which the axis dependents (Dimensions) will be maintained.
 int getAxisCoordinate(Member[] labels)
          Returns the coordinate (point ordinal) associated with the given set of Members.
protected  int getAxisCoordinate(OrderedCollection labels)
          Returns the coordinate (point ordinal) associated with the given set of Members.
 int getAxisCoordinate(String[] labels)
          Returns the coordinate (point ordinal) associated with the given set of Labels.
protected  HListInterface getDependentIndexes(int startIndex, int count)
          Returns a hierarchical representation of the ordinals of the members that are represented by the axis.
 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 tupleOrdinal)
          Returns the set of member labels for the specified axis coordinate.
 LevelInterface[] getLevels()
          Returns the active levels.
 int getMagnitude()
          Returns the number of points on the axis.
 String[][] getPointLabels(int startCoord, int endCoord)
           
 NodeInterface getRoot()
          Returns the root of the label hierarchy.
 AxisLabelInterface getSortIdentifier()
           
 void reset()
           
 void reset(boolean clearAll)
          Reinitialize the Axis.
 
Methods inherited from class com.sas.sasserver.mdtable.ParentNode
addComputedValuesCommand, addExceptionHighlightingCommand, addExportToExcelCommand, addNodeChild, addShowDetailDataCommand, addSubsetsCommand, addTotalsCommand, attachView, clearCache, countNodeChildren, detachView, equals, getDelegate, getImddb, getLabel, getName, getNodeChild, getNodeChildCount, getNodeChildren, getNodeChildren, getNodeExpandedText, getNodeText, getNodeType, getOrdinal, getParent, getProperties, getProperty, getRootParent, initCache, isLeafNode, removeNodeChild, setDelegate, setLabel, setName, setOrdinal, setParent, setProperties, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 

Field Detail

RB_KEY

protected static final String RB_KEY
Constructor Detail

Axis

public Axis(int index,
            MultidimensionalTableInterface mdDelegate)
     throws TableException
Construct an Axis instance that has an association with a MultidimensionalTableInterface instance.
Throws:
TableException - if an error is encountered
Method Detail

reset

public void reset(boolean clearAll)
Reinitialize the Axis.

reset

public void reset()

getSortIdentifier

public AxisLabelInterface getSortIdentifier()
See Also:
SortInterface

getPointLabels

public String[][] getPointLabels(int startCoord,
                                 int endCoord)
                          throws TableException

getDependentIndexes

protected HListInterface getDependentIndexes(int startIndex,
                                             int count)
Returns a hierarchical representation of the ordinals of the members that are represented by the axis.
Returns:
hierarchical list of member ordinals

getLevels

public LevelInterface[] getLevels()
                           throws TableException
Returns the active levels. These levels are the ones that are currently active in the axis Hierarchies. The members of these levels make up the axis labels.
Returns:
an array of Levels
Throws:
TableException - if an unknown level is encountered

getDimensionCount

public int getDimensionCount()
                      throws TableException
Returns the number of dimensions associated with the axis.
Specified by:
getDimensionCount in interface AxisInterface
Throws:
TableException - if an error is encountered

getDimension

public DimensionInterface getDimension(int index)
                                throws TableException
Returns the dimension associated with a given index.
Specified by:
getDimension in interface AxisInterface
Throws:
TableException - if an error is encountered

getDimensions

public DimensionInterface[] getDimensions(int index,
                                          int count)
                                   throws TableException
Returns the dimensions associated with a given range of indices.
Specified by:
getDimensions in interface AxisInterface
Throws:
TableException - if an error is encountered

getMagnitude

public int getMagnitude()
                 throws TableException
Returns the number of points on the axis.
Specified by:
getMagnitude in interface AxisInterface
Throws:
TableException - if an error is encountered

getLabels

public AxisLabelInterface[] getLabels(int tupleOrdinal)
                               throws TableException
Returns the set of member labels for the specified axis coordinate.
Specified by:
getLabels in interface AxisInterface
Throws:
TableException - if an error is encountered

getAxisCoordinate

protected int getAxisCoordinate(OrderedCollection labels)
                         throws TableException
Returns the coordinate (point ordinal) associated with the given set of Members. All objects must be Member objects.
Parameters:
a - set of Members that represent a point along the axis.
Returns:
the coordinate ordinal
Throws:
TableException - if an error is encountered

getAxisCoordinate

public int getAxisCoordinate(Member[] labels)
                      throws TableException
Returns the coordinate (point ordinal) associated with the given set of Members.
Parameters:
a - set of Members that represent a point along the axis.
Returns:
the coordinate ordinal
Throws:
TableException - if an error is encountered

getAxisCoordinate

public int getAxisCoordinate(String[] labels)
                      throws TableException
Returns the coordinate (point ordinal) associated with the given set of Labels.
Parameters:
a - set of Labels that represent a point along the axis.
Returns:
the coordinate ordinal
Throws:
TableException - if an error is encountered

getRoot

public NodeInterface getRoot()
Returns the root of the label hierarchy.
Specified by:
getRoot in interface TreeInterface
Overrides:
getRoot in class ParentNode
Following copied from interface: com.sas.models.TreeInterface
Returns:
the root node as type NodeInterface

createCache

protected StaticCacheInterface createCache()
Returns the secondary cache in which the axis dependents (Dimensions) will be maintained.
Overrides:
createCache in class ParentNode
Following copied from class: com.sas.sasserver.mdtable.ParentNode
Returns:
StaticCacheInterface or null




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