KickJava   Java API By Example, From Geeks To Geeks.

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


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.ExpressionConstants;
18 import com.tonbeller.jpivot.olap.model.OlapException;
19 import com.tonbeller.jpivot.olap.model.Position;
20
21 /**
22  * Allows sorting and ranking
23  * @author av
24  */

25 public interface SortRank extends Extension, ExpressionConstants {
26   /**
27    * name of the Extension for lookup
28    */

29   public static final String JavaDoc ID = "sortRank";
30   
31
32   /**
33    * turns sorting on / off (off = natural sorting)
34    */

35   public boolean isSorting();
36   public void setSorting(boolean enabled);
37   
38   /**
39    * returns true if user may sort by the members. This will be the case when
40    * one of the members is a measure. The GUI will paint a "sort button" for
41    * one of the members
42    */

43   boolean isSortable(Position position);
44
45   /**
46    * return true if the result is sorted by the members of the position
47    */

48   boolean isCurrentSorting(Position position);
49   
50   int getSortMode();
51   void setSortMode(int mode);
52   
53   /**
54    * number of members for topcount and bottomcount
55    */

56   int getTopBottomCount();
57   void setTopBottomCount(int topBottomCount);
58   
59   /**
60    * changes current sorting. If <code>mode</code> is <code>TOPCOUNT</code>
61    * or <code>BOTTOMCOUNT</code> the current value of <code>topBottomCount</code> will be
62    * used.
63    * @param membersToSort the axis to sort. Its one of the "other" axes, that do not
64    * contain position
65    * @param position the sort criteria
66    */

67   void sort(Axis membersToSort, Position position) throws OlapException;
68   
69 }
70
Popular Tags