com.sas.storage.olap.sasmdx
Class Axis

com.sas.storage.olap.sasmdx.Axis
All Implemented Interfaces:
AxisInterface

public class Axis
implements AxisInterface

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

See Also:
ResultSetInterface

Field Summary
 
Fields inherited from interface com.sas.storage.olap.AxisInterface
CACHE_COUNT, CHAPTERS_AXIS, COLUMNS_AXIS, PAGES_AXIS, ROWS_AXIS, SECTIONS_AXIS, SLICERS_AXIS, START_CACHE_INDEX
 
Method Summary
 java.lang.String[] getAxisHeaders()
          Get the axis headers or level labels for this axis.
 int getAxisNumber()
          Returns the axis number
 java.lang.String[] getDimensionNames()
          Get the dimension Names (labels) that belong on this axis.
 java.lang.String[] getHierarchyNames()
          Get the HierarchyNames that belong on this axis.
 int getMaximumTupleDepth()
          Get the maximum tuple depth for this axis.
 ResultSetMetadataInterface getResultSetMetadata()
          Get the metadata object associated with this axis
 TupleInterface getTuple(int index)
          Get the tuples with specified index upto count.
 int getTupleCount()
          Get the tuple count for this axis
 int getTupleDepth()
          Get the base tuple depth of this axis.
 TupleInterface[] getTuples(int index, int count)
          Get the tuples with specified index upt0 count.
 java.lang.String[] getUniqueLevelNames()
          Get the unique level names for this axis headers
 

Method Detail

getResultSetMetadata

public ResultSetMetadataInterface getResultSetMetadata()
Get the metadata object associated with this axis

Specified by:
getResultSetMetadata in interface AxisInterface
Returns:
metadata object associated with this axis

getAxisNumber

public int getAxisNumber()
                  throws OLAPException
Returns the axis number

Specified by:
getAxisNumber in interface AxisInterface
Returns:
The number of the axis (0 for COLUMN, 1 for ROW, 2 for PAGE..., -1 for SLICERAXIS)
Throws:
OLAPException - if a database error occurs

getTupleCount

public int getTupleCount()
                  throws OLAPException
Get the tuple count for this axis

Specified by:
getTupleCount in interface AxisInterface
Returns:
total number of tuples on this axis
Throws:
OLAPException - if a database error occurs

getHierarchyNames

public java.lang.String[] getHierarchyNames()
                                     throws OLAPException
Get the HierarchyNames that belong on this axis. As per S0172262, it is possible to have two different hierarchy from the same dimension on two different axis. The hierarchy names will be duplicated if context is applied to the tuples. This method will return the current hierarchy names that belong to a previous getTuples call.

Specified by:
getHierarchyNames in interface AxisInterface
Returns:
hierarchy names that belong to this axis
Throws:
OLAPException

getDimensionNames

public java.lang.String[] getDimensionNames()
                                     throws OLAPException
Get the dimension Names (labels) that belong on this axis. The dimension array will contain duplicate dimension names if the context is applied to the tuples

Specified by:
getDimensionNames in interface AxisInterface
Returns:
dimension names on this axis, will contain duplicate dimensionNames. Use getBaseDimensionNames to get dimension names without context
Throws:
OLAPException - if a database error occurs

getTuples

public TupleInterface[] getTuples(int index,
                                  int count)
                           throws OLAPException
Get the tuples with specified index upt0 count.

Specified by:
getTuples in interface AxisInterface
Parameters:
index - start index
count - number of requested tuples. -1 will imply all the tuples.
Returns:
An array of tuples associated with the axis
Throws:
OLAPException - if a database error occurs

getTuple

public TupleInterface getTuple(int index)
                        throws OLAPException
Get the tuples with specified index upto count.

Specified by:
getTuple in interface AxisInterface
Parameters:
index - start index
Returns:
A tuple associated with the axis
Throws:
OLAPException - if a database error occurs

getMaximumTupleDepth

public int getMaximumTupleDepth()
                         throws OLAPException
Get the maximum tuple depth for this axis. This depth is after the context is applied to the tuples, if there is no context, this depth will be equal to tupledepth

Specified by:
getMaximumTupleDepth in interface AxisInterface
Returns:
maximumTupleDepth for this axis
Throws:
OLAPException - if a database error occurs

getAxisHeaders

public java.lang.String[] getAxisHeaders()
                                  throws OLAPException
Get the axis headers or level labels for this axis.

Specified by:
getAxisHeaders in interface AxisInterface
Returns:
the headers for this axis
Throws:
OLAPException - if a database error occurs

getUniqueLevelNames

public java.lang.String[] getUniqueLevelNames()
                                       throws OLAPException
Get the unique level names for this axis headers

Specified by:
getUniqueLevelNames in interface AxisInterface
Returns:
uniqueLevelNames for this axis
Throws:
OLAPException

getTupleDepth

public int getTupleDepth()
                  throws OLAPException
Get the base tuple depth of this axis. To get the maximum tuple depth, which is calulated using context, use getMaximumTupleDepth

Returns:
the tuple depth for this axis without context applied to the tuples
Throws:
OLAPException



Copyright © 2009 SAS Institute Inc. All Rights Reserved.