mondrian.olap
Class CubeBase

java.lang.Object
  extended by mondrian.olap.OlapElementBase
      extended by mondrian.olap.CubeBase
All Implemented Interfaces:
Cube, OlapElement
Direct Known Subclasses:
RolapCube

public abstract class CubeBase
extends OlapElementBase
implements Cube

CubeBase is an abstract implementation of Cube.

Since:
6 August, 2001
Version:
$Id: //open/mondrian-release/3.0/src/main/mondrian/olap/CubeBase.java#2 $
Author:
jhyde

Field Summary
static int CATALOG_NAME
          constraints indexes for adSchemaMembers http://msdn.microsoft.com/library/psdk/dasdk/mdx8h4k.htm check "Restrictions in the MEMBER Rowset" under MEMBER Rowset section
static int CUBE_NAME
           
static int DIMENSION_UNIQUE_NAME
           
protected  Dimension[] dimensions
           
static int HIERARCHY_UNIQUE_NAME
           
static int LEVEL_NUMBER
           
static int LEVEL_UNIQUE_NAME
           
static int maxNofConstraintsForAdSchemaMember
           
static int MDPROP_USERDEFINED0
           
static int MDTREEOP_CHILDREN
           
static int MDTREEOP_SELF
           
static int MEMBER_CAPTION
           
static int MEMBER_NAME
           
static int MEMBER_TYPE
           
static int MEMBER_UNIQUE_NAME
           
protected  String name
           
static int SCHEMA_NAME
           
static int Tree_Operator
           
 
Fields inherited from class mondrian.olap.OlapElementBase
caption
 
Constructor Summary
protected CubeBase(String name, Dimension[] dimensions)
           
 
Method Summary
 String getDescription()
           
 Dimension getDimension()
          Returns the dimension of a this expression, or null if no dimension is defined.
 Dimension[] getDimensions()
          Returns the dimensions of this cube.
 Hierarchy getHierarchy()
           
 Level getMonthLevel()
          Return Month Level or null.
 String getName()
           
 String getQualifiedName()
          Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".
 Level getQuarterLevel()
          Return Quarter Level or null.
 Dimension getTimeDimension()
          Returns the time dimension for this cube, or null if there is no time dimension.
 String getUniqueName()
           
 Level getWeekLevel()
          Return Week Level or null.
 Level getYearLevel()
          Helper method that returns the Year Level or returns null if the Time Dimension does not exist or if Year is not defined in the Time Dimension.
 OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s)
          Looks up a child element, returning null if it does not exist.
 OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
           
 OlapElement lookupDimension(Id.Segment s)
           
 Hierarchy lookupHierarchy(Id.Segment s, boolean unique)
          Finds a hierarchy whose name (or unique name, if unique is true) equals s.
 
Methods inherited from class mondrian.olap.OlapElementBase
clone, computeHashCode, equals, equals, getCaption, getLogger, hashCode, setCaption, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface mondrian.olap.Cube
createCalculatedMember, getMembersForQuery, getNamedSets, getSchema, getSchemaReader, nonJoiningDimensions, nonJoiningDimensions
 
Methods inherited from interface mondrian.olap.OlapElement
getCaption
 

Field Detail

CATALOG_NAME

public static final int CATALOG_NAME
constraints indexes for adSchemaMembers http://msdn.microsoft.com/library/psdk/dasdk/mdx8h4k.htm check "Restrictions in the MEMBER Rowset" under MEMBER Rowset section

See Also:
Constant Field Values

SCHEMA_NAME

public static final int SCHEMA_NAME
See Also:
Constant Field Values

CUBE_NAME

public static final int CUBE_NAME
See Also:
Constant Field Values

DIMENSION_UNIQUE_NAME

public static final int DIMENSION_UNIQUE_NAME
See Also:
Constant Field Values

HIERARCHY_UNIQUE_NAME

public static final int HIERARCHY_UNIQUE_NAME
See Also:
Constant Field Values

LEVEL_UNIQUE_NAME

public static final int LEVEL_UNIQUE_NAME
See Also:
Constant Field Values

LEVEL_NUMBER

public static final int LEVEL_NUMBER
See Also:
Constant Field Values

MEMBER_NAME

public static final int MEMBER_NAME
See Also:
Constant Field Values

MEMBER_UNIQUE_NAME

public static final int MEMBER_UNIQUE_NAME
See Also:
Constant Field Values

MEMBER_CAPTION

public static final int MEMBER_CAPTION
See Also:
Constant Field Values

MEMBER_TYPE

public static final int MEMBER_TYPE
See Also:
Constant Field Values

Tree_Operator

public static final int Tree_Operator
See Also:
Constant Field Values

maxNofConstraintsForAdSchemaMember

public static final int maxNofConstraintsForAdSchemaMember
See Also:
Constant Field Values

MDTREEOP_SELF

public static final int MDTREEOP_SELF
See Also:
Constant Field Values

MDTREEOP_CHILDREN

public static final int MDTREEOP_CHILDREN
See Also:
Constant Field Values

MDPROP_USERDEFINED0

public static final int MDPROP_USERDEFINED0
See Also:
Constant Field Values

name

protected final String name

dimensions

protected Dimension[] dimensions
Constructor Detail

CubeBase

protected CubeBase(String name,
                   Dimension[] dimensions)
Method Detail

getName

public String getName()
Specified by:
getName in interface Cube
Specified by:
getName in interface OlapElement

getUniqueName

public String getUniqueName()
Specified by:
getUniqueName in interface OlapElement

getQualifiedName

public String getQualifiedName()
Description copied from interface: OlapElement
Returns the name of this element qualified by its class, for example "hierarchy 'Customers'".

Specified by:
getQualifiedName in interface OlapElement

getDimension

public Dimension getDimension()
Description copied from interface: OlapElement
Returns the dimension of a this expression, or null if no dimension is defined. Applicable only to set expressions.

Example 1:

 [Sales].children
 
has dimension [Sales].

Example 2:

 order(except([Promotion Media].[Media Type].members,
              {[Promotion Media].[Media Type].[No Media]}),
       [Measures].[Unit Sales], DESC)
 
has dimension [Promotion Media].

Example 3:

 CrossJoin([Product].[Product Department].members,
           [Gender].members)
 
has no dimension (well, actually it is [Product] x [Gender], but we can't represent that, so we return null);

Specified by:
getDimension in interface OlapElement

getHierarchy

public Hierarchy getHierarchy()
Specified by:
getHierarchy in interface OlapElement

getDescription

public String getDescription()
Specified by:
getDescription in interface OlapElement

getDimensions

public Dimension[] getDimensions()
Description copied from interface: Cube
Returns the dimensions of this cube.

Specified by:
getDimensions in interface Cube

lookupHierarchy

public Hierarchy lookupHierarchy(Id.Segment s,
                                 boolean unique)
Description copied from interface: Cube
Finds a hierarchy whose name (or unique name, if unique is true) equals s.

Specified by:
lookupHierarchy in interface Cube

lookupChild

public OlapElement lookupChild(SchemaReader schemaReader,
                               Id.Segment s)
Description copied from interface: OlapElement
Looks up a child element, returning null if it does not exist.

Specified by:
lookupChild in interface OlapElement

lookupChild

public OlapElement lookupChild(SchemaReader schemaReader,
                               Id.Segment s,
                               MatchType matchType)
Specified by:
lookupChild in interface OlapElement

getTimeDimension

public Dimension getTimeDimension()
Description copied from interface: Cube
Returns the time dimension for this cube, or null if there is no time dimension.

Specified by:
getTimeDimension in interface Cube

lookupDimension

public OlapElement lookupDimension(Id.Segment s)

getYearLevel

public Level getYearLevel()
Description copied from interface: Cube
Helper method that returns the Year Level or returns null if the Time Dimension does not exist or if Year is not defined in the Time Dimension.

Specified by:
getYearLevel in interface Cube
Returns:
Level or null.

getQuarterLevel

public Level getQuarterLevel()
Description copied from interface: Cube
Return Quarter Level or null.

Specified by:
getQuarterLevel in interface Cube
Returns:
Quarter Level or null.

getMonthLevel

public Level getMonthLevel()
Description copied from interface: Cube
Return Month Level or null.

Specified by:
getMonthLevel in interface Cube
Returns:
Month Level or null.

getWeekLevel

public Level getWeekLevel()
Description copied from interface: Cube
Return Week Level or null.

Specified by:
getWeekLevel in interface Cube
Returns:
Week Level or null.

SourceForge.net_Logo