001 /*
002 // $Id: //open/mondrian-release/3.2/src/main/mondrian/olap/OlapElement.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) 1998-2002 Kana Software, Inc.
007 // Copyright (C) 2001-2009 Julian Hyde and others
008 // All Rights Reserved.
009 // You must accept the terms of that agreement to use this software.
010 //
011 // jhyde, 21 January, 1999
012 */
013
014 package mondrian.olap;
015
016 /**
017 * An <code>OlapElement</code> is a catalog object (dimension, hierarchy,
018 * level, member).
019 */
020 public interface OlapElement {
021 String getUniqueName();
022 String getName();
023
024 String getDescription();
025
026 /**
027 * Looks up a child element, returning null if it does not exist.
028 */
029 OlapElement lookupChild(
030 SchemaReader schemaReader,
031 Id.Segment s,
032 MatchType matchType);
033
034 /**
035 * Returns the name of this element qualified by its class, for example
036 * "hierarchy 'Customers'".
037 */
038 String getQualifiedName();
039
040 String getCaption();
041 Hierarchy getHierarchy();
042
043 /**
044 * Returns the dimension of a this expression, or null if no dimension is
045 * defined. Applicable only to set expressions.
046 *
047 * <p>Example 1:
048 * <blockquote><pre>
049 * [Sales].children
050 * </pre></blockquote>
051 * has dimension <code>[Sales]</code>.</p>
052 *
053 * <p>Example 2:
054 * <blockquote><pre>
055 * order(except([Promotion Media].[Media Type].members,
056 * {[Promotion Media].[Media Type].[No Media]}),
057 * [Measures].[Unit Sales], DESC)
058 * </pre></blockquote>
059 * has dimension [Promotion Media].</p>
060 *
061 * <p>Example 3:
062 * <blockquote><pre>
063 * CrossJoin([Product].[Product Department].members,
064 * [Gender].members)
065 * </pre></blockquote>
066 * has no dimension (well, actually it is [Product] x [Gender], but we
067 * can't represent that, so we return null);</p>
068 */
069 Dimension getDimension();
070 }
071
072 // End OlapElement.java