KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > olap > navi > PlaceHierarchiesOnAxes


1 /*
2  * ====================================================================
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) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package com.tonbeller.jpivot.olap.navi;
14
15 import com.tonbeller.jpivot.core.Extension;
16 import com.tonbeller.jpivot.olap.model.Axis;
17 import com.tonbeller.jpivot.olap.model.Hierarchy;
18
19 /**
20  * Allows to place hierarchies on the visible query axes.
21  * <p>
22  * Use Case.
23  * <ul>
24  * <li>The GUI will examine the result of the olap query to find out
25  * which hierarchies are currently displayed on what axes. It will use
26  * Axis.getHierarchies() for this
27  *
28  * <li>Then it will find out what Hierarchies exist by calling
29  * OlapModel.getDimensions() and Dimension.getHierarchies().
30  *
31  * <li>The Information will be presented to the user and he will be allowed to
32  * change the mapping between axes and hierarchies.
33  *
34  * <li>For every Hierarchy that the user selected for display on an axis,
35  * the GUI will call createMemberExpression().
36  *
37  * <li>For each axis the system will build the the array of
38  * memberExpressions and call setAxis once.
39  *
40  * </ul>
41  * @author av
42  */

43
44 public interface PlaceHierarchiesOnAxes extends Extension {
45  
46   /**
47    * name of the Extension for lookup
48    */

49   public static final String JavaDoc ID = "hierarchiesOnAxes";
50   
51   /**
52    * finds the expression that generates members for <code>hier</code>.
53    * If <code>hier</code> is used in the query, the expression from the
54    * query should be returned, so the navigation position remains unchanged.
55    * If the hierarchy is not used in the query, a new expression is created
56    * that selects the root members of the hierarchy.
57    *
58    * @return a member expression
59    */

60   Object JavaDoc createMemberExpression(Hierarchy hier);
61
62   /**
63    * sets the MemberExpressions for an Axis. The axis definition is
64    * replaced by the memberExpressions.
65    */

66   void setQueryAxis(Axis target, Object JavaDoc[] memberExpressions);
67   
68   /**
69    * set the "expand All member" flag
70    * if this flag is set and an "All" memper is put onto an axis,
71    * the children of the All member will be added as well.
72    */

73   void setExpandAllMember(boolean expandAllMember);
74   
75   /**
76    * return the "expand All member" flag
77    */

78   boolean getExpandAllMember();
79   
80 }
81
Popular Tags