KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mondrian > olap > Cube


1 /*
2 // $Id: //open/mondrian/src/main/mondrian/olap/Cube.java#12 $
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-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, 2 March, 1999
12 */

13
14 package mondrian.olap;
15
16 import java.util.List JavaDoc;
17
18 public interface Cube extends OlapElement {
19
20     String JavaDoc getName();
21
22     Schema getSchema();
23
24     /**
25      * Returns the dimensions of this cube.
26      */

27     Dimension[] getDimensions();
28
29     /**
30      * Finds a hierarchy whose name (or unique name, if <code>unique</code> is
31      * true) equals <code>s</code>.
32      */

33     Hierarchy lookupHierarchy(String JavaDoc s, boolean unique);
34
35     /**
36      * Returns Member[]. It builds Member[] by analyzing cellset, which
37      * gets created by running mdx sQuery. <code>query</code> has to be in the
38      * format of something like "[with calculated members] select *members* on
39      * columns from <code>this</code>".
40      */

41     Member[] getMembersForQuery(String JavaDoc query, List JavaDoc<Member> calcMembers);
42
43     /**
44      * Returns the time dimension for this cube, or <code>null</code>
45      * if there is no time dimension.
46      */

47     Dimension getTimeDimension();
48
49     /**
50      * Helper method that returns the Year Level or returns null if the Time
51      * Dimension does not exist or if Year is not defined in the Time Dimension.
52      *
53      * @return Level or null.
54      */

55     Level getYearLevel();
56
57     /**
58      * Return Quarter Level or null.
59      *
60      * @return Quarter Level or null.
61      */

62     Level getQuarterLevel();
63
64     /**
65      * Return Month Level or null.
66      *
67      * @return Month Level or null.
68      */

69     Level getMonthLevel();
70
71     /**
72      * Return Week Level or null.
73      *
74      * @return Week Level or null.
75      */

76     Level getWeekLevel();
77
78     /**
79      * Returns a {@link SchemaReader} for which this cube is the context for
80      * lookup up members.
81      * If <code>role</code> is null, the returned schema reader also obeys the
82      * access-control profile of role.
83      */

84     SchemaReader getSchemaReader(Role role);
85
86     /**
87      * Creates a calculated member in this cube.
88      *
89      * <p>The XML string must be a <code>&lt;CalculatedMember/&gt;</code>
90      * element, as defined in <code>Mondrian.xml</code>.
91      *
92      * @param xml XML string
93      */

94     Member createCalculatedMember(String JavaDoc xml);
95 }
96
97 // End Cube.java
98
Popular Tags