001    /*
002    // $Id: //open/mondrian-release/3.2/src/main/mondrian/olap/Level.java#1 $
003    // This software is subject to the terms of the Eclipse Public License v1.0
004    // Agreement, available at the following URL:
005    // http://www.eclipse.org/legal/epl-v10.html.
006    // Copyright (C) 1999-2002 Kana Software, Inc.
007    // Copyright (C) 2001-2006 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    import java.util.Map;
017    
018    /**
019     * A <code>Level</code> is a group of {@link Member}s in a {@link Hierarchy},
020     * all with the same attributes and at the same depth in the hierarchy.
021     */
022    public interface Level extends OlapElement, Annotated {
023    
024        /**
025         * Returns the depth of this level.
026         *
027         * <p>Note #1: In an access-controlled context, the first visible level of
028         * a hierarchy (as returned by {@link SchemaReader#getHierarchyLevels}) may
029         * not have a depth of 0.</p>
030         *
031         * <p>Note #2: In a parent-child hierarchy, the depth of a member (as
032         * returned by {@link SchemaReader#getMemberDepth}) may not be the same as
033         * the depth of its level.
034         */
035        int getDepth();
036        Hierarchy getHierarchy();
037    
038        Level getChildLevel();
039        Level getParentLevel();
040        boolean isAll();
041        boolean areMembersUnique();
042        LevelType getLevelType();
043    
044        /** Returns properties defined against this level. */
045        Property[] getProperties();
046        /** Returns properties defined against this level and parent levels. */
047        Property[] getInheritedProperties();
048    
049        /** @return the MemberFormatter
050          */
051        MemberFormatter getMemberFormatter();
052    
053        /**
054         * Returns the approximate number of members in this level, or
055         * {@link Integer#MIN_VALUE} if no approximation is known.
056         */
057        int getApproxRowCount();
058    }
059    
060    // End Level.java