001/* 002// This software is subject to the terms of the Eclipse Public License v1.0 003// Agreement, available at the following URL: 004// http://www.eclipse.org/legal/epl-v10.html. 005// You must accept the terms of that agreement to use this software. 006// 007// Copyright (C) 1999-2005 Julian Hyde 008// Copyright (C) 2005-2011 Pentaho and others 009// All Rights Reserved. 010*/ 011package mondrian.olap; 012 013import mondrian.spi.MemberFormatter; 014 015/** 016 * A <code>Level</code> is a group of {@link Member}s in a {@link Hierarchy}, 017 * all with the same attributes and at the same depth in the hierarchy. 018 * 019 * @author jhyde, 1 March, 1999 020 */ 021public interface Level extends OlapElement, Annotated { 022 023 /** 024 * Returns the depth of this level. 025 * 026 * <p>Note #1: In an access-controlled context, the first visible level of 027 * a hierarchy (as returned by {@link SchemaReader#getHierarchyLevels}) may 028 * not have a depth of 0.</p> 029 * 030 * <p>Note #2: In a parent-child hierarchy, the depth of a member (as 031 * returned by {@link SchemaReader#getMemberDepth}) may not be the same as 032 * the depth of its level. 033 */ 034 int getDepth(); 035 Hierarchy getHierarchy(); 036 037 Level getChildLevel(); 038 Level getParentLevel(); 039 boolean isAll(); 040 boolean areMembersUnique(); 041 LevelType getLevelType(); 042 043 /** Returns properties defined against this level. */ 044 Property[] getProperties(); 045 /** Returns properties defined against this level and parent levels. */ 046 Property[] getInheritedProperties(); 047 048 /** 049 * Returns the object that is used to format members of this level. 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