|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.storage.olap.embedded.Axis
public class Axis
This implementation is designed for the simple definition of axes in a multidimensional ResultSet. The axes are stored in memory within the model. The axis is the root of metadata information for the multidimensional result set. Each result set contains n axes that define the metadata in more detail. The two main components of an axis are the dimensions and the tuples. The dimensions contained on the axis are said to be projected onto the axis. A tuple is the element that combines members from each dimension that is projected onto the axis. In this case where a connection to the metadata does not exist the information about the dimension and the member is not available or minimal.
AxisInterface
,
TupleInterface
,
ResultSetMetadata
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(int axisIndex)
Create an axis based on the index. |
|
Axis(int axisIndex,
java.lang.String[] axisHeaders,
TupleInterface[] tuples)
Create a new Axis |
Method Summary | |
---|---|
void |
addTuple(int index,
TupleInterface tuple)
Add a tuple at the specified index. |
void |
addTuple(TupleInterface tuple)
Append a tuple. |
TupleInterface[] |
asTupleArray(java.util.List list)
|
java.lang.String[] |
getAxisHeaders()
Return the axis headers for this axis |
int |
getAxisNumber()
Returns the axis number |
java.lang.String[] |
getDimensionNames()
Return the an array of names of all the dimensions projected on the axis. |
java.lang.String[] |
getHierarchyNames()
Return the Hierarchy names set on this axis |
int |
getMaximumTupleDepth()
Return the number of labels associated with each tuple. |
ResultSetMetadataInterface |
getResultSetMetadata()
Return ResultSetMetaData for this axis |
TupleInterface |
getTuple(int index)
Returns the tuple at given index associated with the axis |
int |
getTupleCount()
Returns the number of tuples associated with the axis |
TupleInterface[] |
getTuples(int index,
int count)
Returns the tuples associated with the axis |
java.lang.String[] |
getUniqueLevelNames()
Get the uniqueLevel names |
TupleInterface |
removeTuple(int index)
Remove a tuple at the specified index. |
void |
setAxisHeaders(java.lang.String[] labels)
Replace the axis header labels for this axis |
void |
setDimensionNames(java.lang.String[] dimensionNames)
Replace all the dimension names with the dimension names passed in |
void |
setHierarchyNames(java.lang.String[] hierarchyNames)
Set the hierarchy names for this axis |
void |
setResultSetMetadata(ResultSetMetadataInterface rsm)
Set the resultset metadata for this axis. |
void |
setTuple(int index,
TupleInterface tuple)
Replace the tuple at the given index |
void |
setTuples(int startIndex,
int endIndex,
TupleInterface[] tuples)
Replace the tuples associated with the axis |
void |
setUniqueLevelNames(java.lang.String[] levelNames)
Set the unique level names on the axis |
Constructor Detail |
---|
public Axis(int axisIndex) throws OLAPException
AxisInterface.COLUMNS_AXIS
axis, followed by AxisInterface.ROWS_AXIS
,
then PAGESAXISAxisInterface.PAGES_AXIS
, etc. and the last axis is
AxisInterface.SLICERS_AXIS
axisIndex
- axis index of the axis
OLAPException
- if the axis cannot be createdpublic Axis(int axisIndex, java.lang.String[] axisHeaders, TupleInterface[] tuples) throws OLAPException
axisIndex
- axis number for this axisaxisHeaders
- headers for the axis that identifies the row/column members on this axistuples
- that identify the row/column. A null tuple will not be added.
OLAPException
- if the axis cannot be createdMethod Detail |
---|
public void setDimensionNames(java.lang.String[] dimensionNames) throws OLAPException
dimensionNames
- dimension names on the axis
OLAPException
public void setResultSetMetadata(ResultSetMetadataInterface rsm) throws OLAPException
rsm
- resltsetmetadatafor this axis
OLAPException
- if the resultsetmetadata cannot be setpublic java.lang.String[] getDimensionNames() throws OLAPException
getDimensionNames
in interface AxisInterface
OLAPException
public TupleInterface[] getTuples(int index, int count) throws OLAPException
getTuples
in interface AxisInterface
index
- start index. index should be less than the number of tuples.count
- number of tuples
OLAPException
public TupleInterface getTuple(int index) throws OLAPException
getTuple
in interface AxisInterface
index
- start index. index should be less than the number of tuples.
OLAPException
public void addTuple(TupleInterface tuple) throws OLAPException
tuple
- to add
OLAPException
- if the tuple cannot be addedpublic void addTuple(int index, TupleInterface tuple) throws OLAPException
index
- insert the tuple at the specified zero based index.tuple
- add a non null tuple
OLAPException
- if the tuple cannot be addedpublic void setTuple(int index, TupleInterface tuple) throws OLAPException
index
- replace the tuple at this index. Index should be greater than or equal to
zero and less than the current tuple count.tuple
- associated with the axis that is to be replaced
OLAPException
public void setTuples(int startIndex, int endIndex, TupleInterface[] tuples) throws OLAPException
startIndex
- set the tuples beginning at this index. startIndex should be in the range of
zero and current tuple countendIndex
- set the tuples upto endIndex, exclusive. endIndex should be greater than
startIndex and less than or equal to current tuple counttuples
- An array of tuples associated with the axis
OLAPException
public TupleInterface removeTuple(int index) throws OLAPException
index
- remove the tuple at this index. Index should be between 0 and the length
of tuple.
OLAPException
- if the tuple cannot be removedpublic int getTupleCount()
getTupleCount
in interface AxisInterface
public int getMaximumTupleDepth() throws OLAPException
getMaximumTupleDepth
in interface AxisInterface
OLAPException
- if a database error occurspublic java.lang.String[] getAxisHeaders() throws OLAPException
getAxisHeaders
in interface AxisInterface
OLAPException
- if a database error occurspublic void setAxisHeaders(java.lang.String[] labels) throws OLAPException
labels
- Axis header labels for the axis
OLAPException
public java.lang.String[] getHierarchyNames() throws OLAPException
getHierarchyNames
in interface AxisInterface
OLAPException
AxisInterface.getHierarchyNames()
public void setHierarchyNames(java.lang.String[] hierarchyNames) throws OLAPException
hierarchyNames
- and array of hierarchy names for the axis
OLAPException
public java.lang.String[] getUniqueLevelNames() throws OLAPException
getUniqueLevelNames
in interface AxisInterface
OLAPException
AxisInterface.getUniqueLevelNames()
public void setUniqueLevelNames(java.lang.String[] levelNames) throws OLAPException
levelNames
- an array of level names
OLAPException
public ResultSetMetadataInterface getResultSetMetadata() throws OLAPException
getResultSetMetadata
in interface AxisInterface
OLAPException
public int getAxisNumber() throws OLAPException
getAxisNumber
in interface AxisInterface
OLAPException
public TupleInterface[] asTupleArray(java.util.List list)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |