1 /* 2 // $Id: //open/mondrian/src/main/mondrian/olap/Hierarchy.java#8 $ 3 // This software is subject to the terms of the Common Public License 4 // Agreement, available at the following URL: 5 // http://www.opensource.org/licenses/cpl.html. 6 // Copyright (C) 1999-2002 Kana Software, Inc. 7 // Copyright (C) 2001-2005 Julian Hyde and others 8 // All Rights Reserved. 9 // You must accept the terms of that agreement to use this software. 10 // 11 // jhyde, 2 March, 1999 12 */ 13 14 package mondrian.olap; 15 16 /** 17 * A <code>Hierarchy</code> is a set of members, organized into levels. 18 */ 19 public interface Hierarchy extends OlapElement { 20 /** 21 * Returns the dimension this hierarchy belongs to. 22 */ 23 Dimension getDimension(); 24 /** 25 * Returns the levels in this hierarchy. 26 * 27 * <p>If a hierarchy is subject to access-control, some of the levels may 28 * not be visible; use {@link SchemaReader#getHierarchyLevels} instead. 29 * 30 * @post return != null 31 */ 32 Level[] getLevels(); 33 /** 34 * Returns the default member of this hierarchy. 35 * 36 * <p>If a hierarchy is subject to access-control, the default member may 37 * not be visible, so use {@link SchemaReader#getHierarchyDefaultMember}. 38 * 39 * @post return != null 40 */ 41 Member getDefaultMember(); 42 /** 43 * Returns a special member representing the "null" value. This never 44 * occurs on an axis, but may occur if functions such as <code>Lead</code>, 45 * <code>NextMember</code> and <code>ParentMember</code> walk off the end 46 * of the hierarchy. 47 * 48 * @post return != null 49 */ 50 Member getNullMember(); 51 52 boolean hasAll(); 53 /** 54 * Creates a member of this hierarchy. If this is the measures hierarchy, a 55 * calculated member is created, and <code>formula</code> must not be null. 56 */ 57 Member createMember(Member parent, Level level, String name, Formula formula); 58 } 59 60 // End Hierarchy.java 61 62