com.sas.storage.olap.sasmdx
Class Tuple

com.sas.storage.olap.sasmdx.Tuple
All Implemented Interfaces:
TupleInterface

public class Tuple
implements TupleInterface

Contains the client side implementation for com.sas.storage.olap.TupleInterface. This implementation uses the IOM/OLAP interfaces provided by the SAS OLAP server.


Method Summary
 AxisInterface getAxis()
          Return the axis which contains this tuple.
 TupleElementInterface getElement(int index)
          Get the element at the given index from this tuple.
 TupleElementInterface[] getElements(int index, int count)
          Returns TupleLabels for this tuple
 int getTupleDepth()
          Get the number of elements belonging to this tuple.
 int getTupleIndex()
          Get the index of the tuple on the axis
 

Method Detail

getAxis

public AxisInterface getAxis()
                      throws OLAPException
Description copied from interface: TupleInterface
Return the axis which contains this tuple.

Specified by:
getAxis in interface TupleInterface
Returns:
The axis which contains this tuple.
Throws:
OLAPException - if a database error occurs

getTupleIndex

public int getTupleIndex()
                  throws OLAPException
Get the index of the tuple on the axis

Specified by:
getTupleIndex in interface TupleInterface
Returns:
index of tuple
Throws:
OLAPException - if a database error occurs

getTupleDepth

public int getTupleDepth()
                  throws OLAPException
Get the number of elements belonging to this tuple.

Specified by:
getTupleDepth in interface TupleInterface
Returns:
depth of the tuple
Throws:
OLAPException - if a database error occurs

getElements

public TupleElementInterface[] getElements(int index,
                                           int count)
                                    throws OLAPException
Returns TupleLabels for this tuple

Specified by:
getElements in interface TupleInterface
Parameters:
index - A zero-based tuple element index (0 to getTupleDepth()-1).
count - The number of tuples to return where -1 mean all remaining tuple elements..
Returns:
An array of tuple labels for this tuple. The length of this array should be equal to the tuple depth for the axis associated with this tuple. The labels are ordered from least to most specific. For example, [North America, USA, North Carolina, Cary].
Throws:
OLAPException - if a database error occurs

getElement

public TupleElementInterface getElement(int index)
                                 throws OLAPException
Description copied from interface: TupleInterface
Get the element at the given index from this tuple.

Specified by:
getElement in interface TupleInterface
Parameters:
index - a zero based tuple element index
Returns:
TupleElementInterface an element at the given index
Throws:
OLAPException



Copyright © 2009 SAS Institute Inc. All Rights Reserved.