3
3
// This software is subject to the terms of the Common Public License
4
4
// Agreement, available at the following URL:
5
5
// http://www.opensource.org/licenses/cpl.html.
6
- // Copyright (C) 2006-2008 Julian Hyde
6
+ // Copyright (C) 2006-2009 Julian Hyde
7
7
// All Rights Reserved.
8
8
// You must accept the terms of that agreement to use this software.
9
9
*/
27
27
public interface Axis {
28
28
29
29
/**
30
- * Returns the name of this axis, e.g. "COLUMNS", "SLICER", "AXIS(17)".
30
+ * @deprecated Will be removed before olap4j 1.0.
31
+ */
32
+ Standard UNUSED = null ;
33
+
34
+ /**
35
+ * @deprecated Will be removed before olap4j 1.0.
36
+ */
37
+ Standard NONE = null ;
38
+
39
+ /**
40
+ * Abbreviation for {@link org.olap4j.Axis.Standard#FILTER}.
41
+ */
42
+ Standard FILTER = Standard .FILTER ;
43
+
44
+ /**
45
+ * Abbreviation for {@link org.olap4j.Axis.Standard#COLUMNS}.
46
+ */
47
+ Standard COLUMNS = Standard .COLUMNS ;
48
+
49
+ /**
50
+ * Abbreviation for {@link org.olap4j.Axis.Standard#ROWS}.
51
+ */
52
+ Standard ROWS = Standard .ROWS ;
53
+
54
+ /**
55
+ * Abbreviation for {@link org.olap4j.Axis.Standard#PAGES}.
56
+ */
57
+ Standard PAGES = Standard .PAGES ;
58
+
59
+ /**
60
+ * Abbreviation for {@link org.olap4j.Axis.Standard#CHAPTERS}.
61
+ */
62
+ Standard SECTIONS = Standard .SECTIONS ;
63
+
64
+ /**
65
+ * Abbreviation for {@link org.olap4j.Axis.Standard#FILTER}.
66
+ */
67
+ Standard CHAPTERS = Standard .CHAPTERS ;
68
+
69
+ /**
70
+ * Returns the name of this axis, e.g. "COLUMNS", "FILTER", "AXIS(17)".
31
71
*
32
72
* @return Name of the axis
33
73
*/
@@ -40,31 +80,44 @@ public interface Axis {
40
80
*/
41
81
boolean isFilter ();
42
82
43
- /**
44
- * @deprecated Will be removed before olap4j 1.0.
45
- */
46
- public static final Standard UNUSED = null ;
47
83
48
84
/**
49
- * @deprecated Will be removed before olap4j 1.0.
85
+ * Returns the ordinal which is to be used for retrieving this axis from
86
+ * the {@link org.olap4j.CellSet#getAxes()}, or retrieving its
87
+ * coordinate from {@link Cell#getCoordinateList()}.
88
+ *
89
+ * <p>For example:
90
+ * <ul>
91
+ * <li>-1 {@link org.olap4j.Axis.Standard#FILTER FILTER}</li>
92
+ * <li>0 {@link org.olap4j.Axis.Standard#COLUMNS COLUMNS}</li>
93
+ * <li>1 {@link org.olap4j.Axis.Standard#ROWS ROWS}</li>
94
+ * <li>2 {@link org.olap4j.Axis.Standard#PAGES PAGES}</li>
95
+ * <li>3 {@link org.olap4j.Axis.Standard#CHAPTERS CHAPTERS}</li>
96
+ * <li>4 {@link org.olap4j.Axis.Standard#SECTIONS SECTIONS}</li>
97
+ * <li>5 {@link org.olap4j.Axis.Standard#SECTIONS SECTIONS}</li>
98
+ * <li>6 AXES(6)</li>
99
+ * <li>123 AXES(123)</li>
100
+ * </ul>
101
+ *
102
+ * @return ordinal of this axis
50
103
*/
51
- public static final Standard NONE = null ;
104
+ int axisOrdinal () ;
52
105
53
106
/**
54
- * Abbreviation for {@link org.olap4j.Axis.Standard#FILTER}.
107
+ * Returns localized name for this Axis.
108
+ *
109
+ * <p>Examples: "FILTER", "ROWS", "COLUMNS", "AXIS(10)".
110
+ *
111
+ * @param locale Locale for which to give the name
112
+ * @return localized name for this Axis
55
113
*/
56
- public static final Standard FILTER = Standard .FILTER ;
57
- public static final Standard COLUMNS = Standard .COLUMNS ;
58
- public static final Standard ROWS = Standard .ROWS ;
59
- public static final Standard PAGES = Standard .PAGES ;
60
- public static final Standard SECTIONS = Standard .SECTIONS ;
61
- public static final Standard CHAPTERS = Standard .CHAPTERS ;
114
+ String getCaption (Locale locale );
62
115
63
116
/**
64
117
* Enumeration of standard, named axes descriptors.
65
118
*/
66
119
public enum Standard implements Axis {
67
- /** Filter axis. */
120
+ /** Filter axis, also known as the slicer axis . */
68
121
FILTER ,
69
122
70
123
/** COLUMNS axis, also known as X axis and AXIS(0). */
@@ -96,11 +149,14 @@ public String getCaption(Locale locale) {
96
149
}
97
150
}
98
151
152
+ /**
153
+ * Container class for various Axis factory methods.
154
+ */
99
155
class Factory {
100
156
private static final Standard [] STANDARD_VALUES = Standard .values ();
101
157
102
158
/**
103
- * Returns the axis with a given {@code axisOrdinal} .
159
+ * Returns the axis with a given ordinal .
104
160
*
105
161
* <p>For example, {@code forOrdinal(0)} returns the COLUMNS axis;
106
162
* {@code forOrdinal(-1)} returns the SLICER axis;
@@ -141,38 +197,6 @@ public String getCaption(Locale locale) {
141
197
};
142
198
}
143
199
}
144
-
145
- /**
146
- * Returns the ordinal which is to be used for retrieving this axis from
147
- * the {@link org.olap4j.CellSet#getAxes()}, or retrieving its
148
- * coordinate from {@link Cell#getCoordinateList()}.
149
- *
150
- * <p>For example:
151
- * <ul>
152
- * <li>-1 {@link org.olap4j.Axis.Standard#FILTER FILTER}</li>
153
- * <li>0 {@link org.olap4j.Axis.Standard#COLUMNS COLUMNS}</li>
154
- * <li>1 {@link org.olap4j.Axis.Standard#ROWS ROWS}</li>
155
- * <li>2 {@link org.olap4j.Axis.Standard#PAGES PAGES}</li>
156
- * <li>3 {@link org.olap4j.Axis.Standard#CHAPTERS CHAPTERS}</li>
157
- * <li>4 {@link org.olap4j.Axis.Standard#SECTIONS SECTIONS}</li>
158
- * <li>5 {@link org.olap4j.Axis.Standard#SECTIONS SECTIONS}</li>
159
- * <li>6 AXES(6)</li>
160
- * <li>123 AXES(123)</li>
161
- * </ul>
162
- *
163
- * @return ordinal of this axis
164
- */
165
- int axisOrdinal ();
166
-
167
- /**
168
- * Returns localized name for this Axis.
169
- *
170
- * <p>Examples: "FILTER", "ROWS", "COLUMNS", "AXIS(10)".
171
- *
172
- * @param locale Locale for which to give the name
173
- * @return localized name for this Axis
174
- */
175
- String getCaption (Locale locale );
176
200
}
177
201
178
202
// End Axis.java
0 commit comments