com.tonbeller.jpivot.test.olap
Class TestOlapModel

java.lang.Object
  extended by com.tonbeller.jpivot.core.ModelSupport
      extended by com.tonbeller.jpivot.test.olap.TestOlapModel
All Implemented Interfaces:
Model, OlapModel, com.tonbeller.wcf.bookmarks.Bookmarkable

public class TestOlapModel
extends ModelSupport
implements OlapModel

Created on 02.12.2002

Author:
av

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.tonbeller.jpivot.olap.model.OlapModel
OlapModel.EmptyCubeException, OlapModel.ResultTooLargeException
 
Field Summary
 
Fields inherited from interface com.tonbeller.wcf.bookmarks.Bookmarkable
EXTENSIONAL, INTENSIONAL
 
Constructor Summary
TestOlapModel()
           
 
Method Summary
static void addProperties(CellImpl c, int i)
           
 void collapse0()
          collapses top member on rows (for unit tests)
 void collapseRow(int positionIndex)
           
 void destroy()
          does nothing
 void expand0()
          expands top member on rows - gives more interesting result for junit tests.
 void expandRow(int positionIndex)
           
 java.util.List findPositions(Member m)
          which positions in the result contain member
 TestAxis[] getAxes()
           
 TestAxis getAxis(int index)
           
 Dimension getDimension(java.lang.String name)
          searches for the named dimension
 Dimension[] getDimensions()
           
 java.lang.String getID()
           
 Member[] getMeasures()
           
 TestDimension getMeasuresDim()
           
 Result getResult()
          runs the query and returns the result
 java.lang.Object getRootDecoree()
           
 TestAxis getSlicer()
          Returns the slicer.
 int indexOf(Axis axis)
           
 void initialize()
          does nothing
 void setAxes(TestAxis[] axes)
           
 void setAxis(int index, TestAxis axis)
           
 void setID(java.lang.String ID)
          sets an ID string for this model
 void setServletContext(javax.servlet.ServletContext servletContext)
          store a servlet context to the model
 void setSlicer(TestAxis slicer)
          Sets the slicer.
 void setSlicer(TestMember m)
           
 
Methods inherited from class com.tonbeller.jpivot.core.ModelSupport
addExtension, addModelChangeListener, fireModelChanged, fireModelChanged, fireStructureChanged, fireStructureChanged, getBookmarkState, getExtension, getExtensions, getLocale, getRootModel, getTopDecorator, removeModelChangeListener, setBookmarkState, setLocale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tonbeller.jpivot.core.Model
addExtension, addModelChangeListener, getExtension, getExtensions, getRootModel, getTopDecorator, removeModelChangeListener, setLocale
 
Methods inherited from interface com.tonbeller.wcf.bookmarks.Bookmarkable
getBookmarkState, setBookmarkState
 

Constructor Detail

TestOlapModel

public TestOlapModel()
Method Detail

getID

public java.lang.String getID()
Specified by:
getID in interface OlapModel
Returns:
an ID string for this model

setID

public void setID(java.lang.String ID)
Description copied from interface: OlapModel
sets an ID string for this model

Specified by:
setID in interface OlapModel

setAxis

public void setAxis(int index,
                    TestAxis axis)

getAxis

public TestAxis getAxis(int index)

getAxes

public TestAxis[] getAxes()

setAxes

public void setAxes(TestAxis[] axes)

indexOf

public int indexOf(Axis axis)

setSlicer

public void setSlicer(TestMember m)

getResult

public Result getResult()
                 throws OlapException
Description copied from interface: OlapModel
runs the query and returns the result

Specified by:
getResult in interface OlapModel
Throws:
OlapException

getDimensions

public Dimension[] getDimensions()
Specified by:
getDimensions in interface OlapModel
Returns:
all dimensions of the cube for navigation
See Also:
OlapModel.getDimensions()

getMeasures

public Member[] getMeasures()
Specified by:
getMeasures in interface OlapModel
Returns:
all measures of the cube for navigation
See Also:
OlapModel.getMeasures()

getDimension

public Dimension getDimension(java.lang.String name)
searches for the named dimension


findPositions

public java.util.List findPositions(Member m)
which positions in the result contain member


addProperties

public static void addProperties(CellImpl c,
                                 int i)

expand0

public void expand0()
expands top member on rows - gives more interesting result for junit tests.


expandRow

public void expandRow(int positionIndex)

collapse0

public void collapse0()
collapses top member on rows (for unit tests)


collapseRow

public void collapseRow(int positionIndex)

getSlicer

public TestAxis getSlicer()
Returns the slicer.

Returns:
TestAxis

setSlicer

public void setSlicer(TestAxis slicer)
Sets the slicer.

Parameters:
slicer - The slicer to set

getRootDecoree

public java.lang.Object getRootDecoree()

initialize

public void initialize()
does nothing

Specified by:
initialize in interface OlapModel

destroy

public void destroy()
does nothing

Specified by:
destroy in interface OlapModel
Overrides:
destroy in class ModelSupport

getMeasuresDim

public TestDimension getMeasuresDim()

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
Description copied from interface: OlapModel
store a servlet context to the model

Specified by:
setServletContext in interface OlapModel