001    /*
002    // $Id: //open/mondrian/src/main/mondrian/olap/Dimension.java#7 $
003    // This software is subject to the terms of the Common Public License
004    // Agreement, available at the following URL:
005    // http://www.opensource.org/licenses/cpl.html.
006    // Copyright (C) 1999-2002 Kana Software, Inc.
007    // Copyright (C) 2001-2008 Julian Hyde and others
008    // All Rights Reserved.
009    // You must accept the terms of that agreement to use this software.
010    //
011    // jhyde, 1 March, 1999
012    */
013    
014    package mondrian.olap;
015    
016    /**
017     * A <code>Dimension</code> represents a dimension of a cube.
018     */
019    public interface Dimension extends OlapElement {
020        final String MEASURES_UNIQUE_NAME = "[Measures]";
021        final String MEASURES_NAME = "Measures";
022    
023        /**
024         * Returns an array of the hierarchies which belong to this dimension.
025         */
026        Hierarchy[] getHierarchies();
027    
028        /**
029         * Returns whether this is the <code>[Measures]</code> dimension.
030         */
031        boolean isMeasures();
032    
033        /**
034         * Returns the type of this dimension
035         * ({@link DimensionType#StandardDimension} or
036         * {@link DimensionType#TimeDimension}
037         */
038        DimensionType getDimensionType();
039    
040        /**
041         * Returns dimension's ordinal within a given cube.
042         * The <code>[Measures]</code> always has ordinal 0.
043         */
044        int getOrdinal(Cube cube);
045    
046        /**
047         * Returns the schema this dimension belongs to.
048         */
049        Schema getSchema();
050    
051        /**
052         * Returns whether the dimension should be considered as a "high
053         * cardinality" or "low cardinality" according to cube definition.
054         *
055         * Mondrian tends to evaluate high cardinality dimensions using
056         * iterators rather than lists, avoiding instantiating the dimension in
057         * memory.
058         *
059         * @return whether this dimension is high-cardinality
060         */
061        boolean isHighCardinality();
062    }
063    
064    // End Dimension.java