com.sas.mdtable
Class AbstractAxis

java.lang.Object
  |
  +--com.sas.mdtable.AbstractNode
        |
        +--com.sas.mdtable.AbstractAxis
All Implemented Interfaces:
AxisInterface, NodeInterface, NodeInterface, SimpleNodeInterface, TreeInterface

public abstract class AbstractAxis
extends AbstractNode
implements AxisInterface

Defines an abstract base class for an implementation of AxisInterface.

See Also:
AbstractDimension, AbstractHierarchy, AbstractLevel, AbstractMember

Constructor Summary
AbstractAxis()
           
 
Method Summary
 DimensionInterface[] getDimensions(int index, int count)
          Returns the dimensions associated with a given range of indices.
 SimpleNodeInterface getNodeChild(int index)
          Alias for getDimension.
 int getNodeChildCount()
          Alias for getDimensionCount.
 SimpleNodeInterface[] getNodeChildren(int index, int count)
          Alias for getDimensions.
 String getNodeType()
          Returns the axis's type.
 boolean isLeafNode()
          Returns false since axes parent dimensions.
 
Methods inherited from class com.sas.mdtable.AbstractNode
getNodeExpandedText, getNodeText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sas.mdtable.AxisInterface
getDimension, getDimensionCount, getLabels, getMagnitude
 
Methods inherited from interface com.sas.mdtable.NodeInterface
getLabel, getName
 
Methods inherited from interface com.sas.models.NodeInterface
getNodeExpandedText, getNodeText
 
Methods inherited from interface com.sas.models.SimpleNodeInterface
countNodeChildren
 
Methods inherited from interface com.sas.models.TreeInterface
getRoot
 

Constructor Detail

AbstractAxis

public AbstractAxis()
Method Detail

getDimensions

public DimensionInterface[] getDimensions(int index,
                                          int count)
                                   throws TableException
Returns the dimensions associated with a given range of indices. The default implementation simply calls getDimension count-times; subclass should override if it can do so more efficiently.
Specified by:
getDimensions in interface AxisInterface
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().

getNodeChild

public final SimpleNodeInterface getNodeChild(int index)
Alias for getDimension. If getDimension fails (throws TableException), NoSuchElementException is thrown.
Specified by:
getNodeChild in interface SimpleNodeInterface
Parameters:
index - A zero-based dimension index (0 to getDimensionCount()-1).
Returns:
The dimension associated with index.
See Also:
AxisInterface.getDimension(int)

getNodeChildCount

public final int getNodeChildCount()
Alias for getDimensionCount. If getDimensionCount fails (throws TableException), zero is returned.
Specified by:
getNodeChildCount in interface SimpleNodeInterface
Returns:
The number of dimensions.
See Also:
AxisInterface.getDimensionCount()

getNodeChildren

public final SimpleNodeInterface[] getNodeChildren(int index,
                                                   int count)
Alias for getDimensions. If getDimensions fails (throws TableException), a zero-length array is returned.
Specified by:
getNodeChildren in interface SimpleNodeInterface
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.
See Also:
AxisInterface.getDimensions(int, int)

getNodeType

public String getNodeType()
Returns the axis's type. The type serves to categorize a node, i.e. identify it as belonging to a particular group.
Specified by:
getNodeType in interface NodeInterface
Returns:
"axis".

isLeafNode

public final boolean isLeafNode()
Returns false since axes parent dimensions.
Specified by:
isLeafNode in interface SimpleNodeInterface
Returns:
False.




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