com.tonbeller.jpivot.mondrian
Class MondrianDimension

java.lang.Object
  extended by com.tonbeller.jpivot.mondrian.MondrianDimension
All Implemented Interfaces:
Decorator, Dimension, Displayable, Expression, Visitable, MDXElement

public class MondrianDimension
extends java.lang.Object
implements Dimension, MDXElement

MondrianDimension is an adapter class for the Mondrian Dimension.


Field Summary
 
Fields inherited from interface com.tonbeller.jpivot.olap.model.Dimension
MEASURES_FIRST_COMPARATOR
 
Fields inherited from interface com.tonbeller.jpivot.olap.model.Displayable
LABEL_COMPARATOR
 
Constructor Summary
protected MondrianDimension(mondrian.olap.Dimension monDimension, MondrianModel model)
           
 
Method Summary
 void accept(Visitor visitor)
           
protected  void addHierarchy(MondrianHierarchy hierarchy)
          add Hierarchy
 Hierarchy[] getHierarchies()
          return the hierarchies of this dimension
 java.lang.String getLabel()
          name of this item
 mondrian.olap.Dimension getMonDimension()
           
 java.lang.Object getRootDecoree()
          returns the object that has been created by the olap server.
 java.lang.String getUniqueName()
          return the unique name of an MDX Olap element
 boolean isMeasure()
          true if this is the measures dimension
 boolean isTime()
          return true if this is a time dimension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MondrianDimension

protected MondrianDimension(mondrian.olap.Dimension monDimension,
                            MondrianModel model)
Method Detail

addHierarchy

protected void addHierarchy(MondrianHierarchy hierarchy)
add Hierarchy

Parameters:
hierarchy - MondrianHierarchy to be stored

getHierarchies

public Hierarchy[] getHierarchies()
Description copied from interface: Dimension
return the hierarchies of this dimension

Specified by:
getHierarchies in interface Dimension
See Also:
Dimension.getHierarchies()

isTime

public boolean isTime()
Description copied from interface: Dimension
return true if this is a time dimension. Its common to have multiple time dimensions, e.g. one for receipt of order and one for shipping.

Specified by:
isTime in interface Dimension
See Also:
Dimension.isTime()

isMeasure

public boolean isMeasure()
Description copied from interface: Dimension
true if this is the measures dimension

Specified by:
isMeasure in interface Dimension
See Also:
Dimension.isMeasure()

getLabel

public java.lang.String getLabel()
Description copied from interface: Displayable
name of this item

Specified by:
getLabel in interface Displayable

accept

public void accept(Visitor visitor)
Specified by:
accept in interface Visitable
See Also:
Visitable.accept(Visitor)

getRootDecoree

public java.lang.Object getRootDecoree()
Description copied from interface: Decorator
returns the object that has been created by the olap server. If this is part of a decorator chain, unwinds the chain and returns the root of all decorators.

Specified by:
getRootDecoree in interface Decorator

getUniqueName

public java.lang.String getUniqueName()
Description copied from interface: MDXElement
return the unique name of an MDX Olap element

Specified by:
getUniqueName in interface MDXElement
Returns:
the unique name
See Also:
com.tonbeller.jpivot.olap.model.Dimension#getUniqueName()

getMonDimension

public mondrian.olap.Dimension getMonDimension()
Returns:
the corresponding Mondrian dimension