***  This class is subject to change   ***

com.sas.storage.olap.sasmdx
Class Axis

java.lang.Object
  |
  +--com.sas.storage.olap.sasmdx.Axis
All Implemented Interfaces:
AxisInterface

public class Axis
extends java.lang.Object
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
 
Constructor Summary
Axis(AxisCache cache, int axisNumber, int tupleCount, int tupleDepth, String[] dimensionNames, ResultSetMetadataInterface resultSetMetadata)
          Create an axis with the cache object.
Axis(AxisCache cache, int axisNumber, int tupleCount, int tupleDepth, String[] hierarchyNames, String[] dimensionNames, ResultSetMetadataInterface resultSetMetadata)
          Create an axis with the cache object.
Axis(AxisCache cache, int axisNumber, ResultSetMetadataInterface resultSetMetadata)
          Create an axis with the cache object.
 
Method Summary
 String[] getAxisHeaders()
          Get the axis headers or level labels for this axis.
 int getAxisNumber()
          Returns the axis number
 String[] getDimensionNames()
          Get the dimension Names (labels) that belong on this axis.
 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.
 String[] getUniqueLevelNames()
          Get the unique level names for this axis headers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
Constructor Detail

Axis

public Axis(AxisCache cache,
            int axisNumber,
            ResultSetMetadataInterface resultSetMetadata)
     throws OLAPException
Create an axis with the cache object. This is used internally by dataCache
Parameters:
cache - axis information
axisNumber - index fo the axis.
resultSetMetadata -  
Throws:
OLAPException - if the axis cannot be created

Axis

public Axis(AxisCache cache,
            int axisNumber,
            int tupleCount,
            int tupleDepth,
            String[] dimensionNames,
            ResultSetMetadataInterface resultSetMetadata)
     throws OLAPException
Create an axis with the cache object. This is used internally by dataCache
Parameters:
cache - axis information
axisNumber - index fo the axis.
tuplecount - representing number of tuples on the axis
tupleDepth - representing number of elements in a tuple on the axis
dimensionNames - dimension labels displayed on this axis
resultSetMetadata - metadata for this axis
Throws:
OLAPException - if the axis cannot be created

Axis

public Axis(AxisCache cache,
            int axisNumber,
            int tupleCount,
            int tupleDepth,
            String[] hierarchyNames,
            String[] dimensionNames,
            ResultSetMetadataInterface resultSetMetadata)
     throws OLAPException
Create an axis with the cache object. This is used internally by dataCache
Parameters:
cache - axis information
axisNumber - index fo the axis.
tuplecount - representing number of tuples on the axis
tupleDepth - representing number of elements in a tuple on the axis
dimensionNames - dimension labels displayed on this axis
hierarchyNames - hierarchy labels displayed on this axis
resultSetMetadata - metadata for this axis
Throws:
OLAPException - if the axis cannot be created
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

getHierarchyNames

public 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

getDimensionNames

public 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

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.

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

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

getAxisHeaders

public 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

getUniqueLevelNames

public String[] getUniqueLevelNames()
                             throws OLAPException
Get the unique level names for this axis headers
Specified by:
getUniqueLevelNames in interface AxisInterface
Returns:
uniqueLevelNames for this axis

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

***  This class is subject to change   ***




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