Package mondrian.olap

Class DimensionBase

    • Field Detail

      • name

        protected final String name
      • uniqueName

        protected final String uniqueName
      • description

        protected final String description
      • highCardinality

        protected final boolean highCardinality
      • hierarchies

        protected Hierarchy[] hierarchies
    • Constructor Detail

      • DimensionBase

        protected DimensionBase​(String name,
                                String caption,
                                boolean visible,
                                String description,
                                DimensionType dimensionType,
                                boolean highCardinality)
        Creates a DimensionBase.
        Parameters:
        name - Name
        dimensionType - Type
        highCardinality - Whether high-cardinality
    • Method Detail

      • getHierarchies

        public Hierarchy[] getHierarchies()
        Description copied from interface: Dimension
        Returns an array of the hierarchies which belong to this dimension.
        Specified by:
        getHierarchies in interface Dimension
      • 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
      • 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
      • isMeasures

        public boolean isMeasures()
        Description copied from interface: Dimension
        Returns whether this is the [Measures] dimension.
        Specified by:
        isMeasures in interface Dimension
      • isHighCardinality

        public boolean isHighCardinality()
        Description copied from interface: Dimension
        Returns whether the dimension should be considered as a "high cardinality" or "low cardinality" according to cube definition. Mondrian tends to evaluate high cardinality dimensions using iterators rather than lists, avoiding instantiating the dimension in memory.
        Specified by:
        isHighCardinality in interface Dimension
        Returns:
        whether this dimension is high-cardinality