KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mondrian > olap > OlapElement


1 /*
2 // $Id: //open/mondrian/src/main/mondrian/olap/OlapElement.java#15 $
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) 1998-2002 Kana Software, Inc.
7 // Copyright (C) 2001-2006 Julian Hyde and others
8 // All Rights Reserved.
9 // You must accept the terms of that agreement to use this software.
10 //
11 // jhyde, 21 January, 1999
12 */

13
14 package mondrian.olap;
15
16 /**
17  * An <code>OlapElement</code> is a catalog object (dimension, hierarchy,
18  * level, member).
19  */

20 public interface OlapElement {
21     String JavaDoc getUniqueName();
22     String JavaDoc getName();
23     String JavaDoc getDescription();
24
25     /**
26      * Looks up a child element, returning null if it does not exist.
27      */

28     OlapElement lookupChild(SchemaReader schemaReader, String JavaDoc s);
29     OlapElement lookupChild(
30         SchemaReader schemaReader, String JavaDoc s, MatchType matchType);
31
32     /**
33      * Returns the name of this element qualified by its class, for example
34      * "hierarchy 'Customers'".
35      */

36     String JavaDoc getQualifiedName();
37
38     String JavaDoc getCaption();
39     Hierarchy getHierarchy();
40
41     /**
42      * Returns the dimension of a this expression, or null if no dimension is
43      * defined. Applicable only to set expressions.
44      *
45      * <p>Example 1:
46      * <blockquote><pre>
47      * [Sales].children
48      * </pre></blockquote>
49      * has dimension <code>[Sales]</code>.</p>
50      *
51      * <p>Example 2:
52      * <blockquote><pre>
53      * order(except([Promotion Media].[Media Type].members,
54      * {[Promotion Media].[Media Type].[No Media]}),
55      * [Measures].[Unit Sales], DESC)
56      * </pre></blockquote>
57      * has dimension [Promotion Media].</p>
58      *
59      * <p>Example 3:
60      * <blockquote><pre>
61      * CrossJoin([Product].[Product Department].members,
62      * [Gender].members)
63      * </pre></blockquote>
64      * has no dimension (well, actually it is [Product] x [Gender], but we
65      * can't represent that, so we return null);</p>
66      */

67     Dimension getDimension();
68 }
69
70 // End OlapElement.java
71
Popular Tags