Package mondrian.olap

Class CubeBase

    • Constructor Detail

      • CubeBase

        protected CubeBase​(String name,
                           String caption,
                           boolean visible,
                           String description,
                           Dimension[] dimensions)
        Creates a CubeBase.
        Parameters:
        name - Name
        caption - Caption
        description - Description
        dimensions - List of dimensions
    • Method Detail

      • 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
      • 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.NameSegment 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
      • lookupDimension

        public Dimension lookupDimension​(Id.Segment s)
        Looks up a dimension in this cube based on a component of its name.
        Parameters:
        s - Name segment
        Returns:
        Dimension, or null if not found
      • 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.