KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mondrian > xmla > PropertyDefinition


1 /*
2 // $Id: //open/mondrian/src/main/mondrian/xmla/PropertyDefinition.java#17 $
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-2007 Julian Hyde
7 // All Rights Reserved.
8 // You must accept the terms of that agreement to use this software.
9 //
10 // jhyde, May 2, 2003
11 */

12 package mondrian.xmla;
13
14 import mondrian.olap.Util;
15 import mondrian.olap.MondrianServer;
16
17 import java.util.Set JavaDoc;
18
19 /**
20  * Defines an XML for Analysis Property.
21  *
22  * @author jhyde
23  * @since May 2, 2003
24  * @version $Id: //open/mondrian/src/main/mondrian/xmla/PropertyDefinition.java#17 $
25  */

26 enum PropertyDefinition {
27     AxisFormat(
28         RowsetDefinition.Type.Enumeration,
29         Util.enumSetAllOf(Enumeration.AxisFormat.class),
30         Enumeration.Access.Write,
31         "",
32         Enumeration.Methods.execute,
33         "Determines the format used within an MDDataSet result set to describe the axes of the multidimensional dataset. This property can have the values listed in the following table: TupleFormat (default), ClusterFormat, CustomFormat."),
34
35     BeginRange(
36         RowsetDefinition.Type.Integer,
37         null,
38         Enumeration.Access.Write,
39         "-1",
40         Enumeration.Methods.execute,
41         "Contains a zero-based integer value corresponding to a CellOrdinal attribute value. (The CellOrdinal attribute is part of the Cell element in the CellData section of MDDataSet.)\n" +
42             "Used together with the EndRange property, the client application can use this property to restrict an OLAP dataset returned by a command to a specific range of cells. If -1 is specified, all cells up to the cell specified in the EndRange property are returned.\n" +
43             "The default value for this property is -1."),
44
45     Catalog(
46         RowsetDefinition.Type.String,
47         null,
48         Enumeration.Access.ReadWrite,
49         "",
50         Enumeration.Methods.discoverAndExecute,
51         "When establishing a session with an Analysis Services instance to send an XMLA command, this property is equivalent to the OLE DB property, DBPROP_INIT_CATALOG.\n" +
52             "When you set this property during a session to change the current database for the session, this property is equivalent to the OLE DB property, DBPROP_CURRENTCATALOG.\n" +
53             "The default value for this property is an empty string."),
54
55     Content(
56         RowsetDefinition.Type.EnumString,
57         Util.enumSetAllOf(Enumeration.Content.class),
58         Enumeration.Access.Write,
59         XmlaConstants.CONTENT_DEFAULT.name(),
60         Enumeration.Methods.discoverAndExecute,
61         "An enumerator that specifies what type of data is returned in the result set.\n" +
62             "None: Allows the structure of the command to be verified, but not executed. Analogous to using Prepare to check syntax, and so on.\n" +
63             "Schema: Contains the XML schema (which indicates column information, and so on) that relates to the requested query.\n" +
64             "Data: Contains only the data that was requested.\n" +
65             "SchemaData: Returns both the schema information as well as the data."),
66
67     Cube(
68         RowsetDefinition.Type.String,
69         null,
70         Enumeration.Access.ReadWrite,
71         "",
72         Enumeration.Methods.execute,
73         "The cube context for the Command parameter. If the command contains a cube name (such as an MDX FROM clause) the setting of this property is ignored."),
74
75     DataSourceInfo(
76         RowsetDefinition.Type.String,
77         null,
78         Enumeration.Access.ReadWrite,
79         "",
80         Enumeration.Methods.discoverAndExecute,
81         "A string containing provider specific information, required to access the data source."),
82
83     EndRange(
84         RowsetDefinition.Type.Integer,
85         null,
86         Enumeration.Access.Write,
87         "-1",
88         Enumeration.Methods.execute,
89         "An integer value corresponding to a CellOrdinal used to restrict an MDDataSet returned by a command to a specific range of cells. Used in conjunction with the BeginRange property. If unspecified, all cells are returned in the rowset. The value -1 means unspecified."),
90
91     Format(
92         RowsetDefinition.Type.EnumString,
93         Util.enumSetAllOf(Enumeration.Format.class),
94         Enumeration.Access.Write,
95         "Native",
96         Enumeration.Methods.discoverAndExecute,
97         "Enumerator that determines the format of the returned result set. Values include:\n" +
98             "Tabular: a flat or hierarchical rowset. Similar to the XML RAW format in SQL. The Format property should be set to Tabular for OLE DB for Data Mining commands.\n" +
99             "Multidimensional: Indicates that the result set will use the MDDataSet format (Execute method only).\n" +
100             "Native: The client does not request a specific format, so the provider may return the format appropriate to the query. (The actual result type is identified by namespace of the result.)"),
101
102     LocaleIdentifier(
103         RowsetDefinition.Type.UnsignedInteger,
104         null,
105         Enumeration.Access.ReadWrite,
106         "None",
107         Enumeration.Methods.discoverAndExecute,
108         "Use this to read or set the numeric locale identifier for this request. The default is provider-specific.\n" +
109             "For the complete hexadecimal list of language identifiers, search on \"Language Identifiers\" in the MSDN Library at http://www.msdn.microsoft.com."),
110
111     MDXSupport(
112         RowsetDefinition.Type.EnumString,
113         Util.enumSetAllOf(Enumeration.MDXSupport.class),
114         Enumeration.Access.Read,
115         "Core",
116         Enumeration.Methods.discover,
117         "Enumeration that describes the degree of MDX support. At initial release Core is the only value in the enumeration. In future releases, other values will be defined for this enumeration."),
118
119     Password(
120         RowsetDefinition.Type.String,
121         null,
122         Enumeration.Access.Read,
123         "",
124         Enumeration.Methods.discoverAndExecute,
125         "This property is deprecated in XMLA 1.1. To support legacy applications, the provider accepts but ignores the Password property setting when it is used with the Discover and Execute method"),
126
127     ProviderName(
128         RowsetDefinition.Type.String,
129         null,
130         Enumeration.Access.Read,
131         "Mondrian XML for Analysis Provider",
132         Enumeration.Methods.discover,
133         "The XML for Analysis Provider name."),
134
135     ProviderVersion(
136         RowsetDefinition.Type.String,
137         null,
138         Enumeration.Access.Read,
139         MondrianServer.forConnection(null).getVersion().getVersionString(),
140         Enumeration.Methods.discover,
141         "The version of the Mondrian XMLA Provider"),
142
143     StateSupport(
144         RowsetDefinition.Type.EnumString,
145         Util.enumSetAllOf(Enumeration.StateSupport.class),
146         Enumeration.Access.Read,
147         "None",
148         Enumeration.Methods.discover,
149         "Property that specifies the degree of support in the provider for state. For information about state in XML for Analysis, see \"Support for Statefulness in XML for Analysis.\" Minimum enumeration values are as follows:\n" +
150             "None - No support for sessions or stateful operations.\n" +
151             "Sessions - Provider supports sessions."),
152
153     Timeout(
154         RowsetDefinition.Type.UnsignedInteger,
155         null, Enumeration.Access.ReadWrite,
156         "Undefined",
157         Enumeration.Methods.discoverAndExecute,
158         "A numeric time-out specifying in seconds the amount of time to wait for a request to be successful."),
159
160     UserName(
161         RowsetDefinition.Type.String,
162         null, Enumeration.Access.Read,
163         "",
164         Enumeration.Methods.discoverAndExecute,
165         "Returns the UserName the server associates with the command.\n" +
166             "This property is deprecated as writeable in XMLA 1.1. To support legacy applications, servers accept but ignore the password setting when it is used with the Execute method."),
167
168     VisualMode(
169         RowsetDefinition.Type.Enumeration,
170         Util.enumSetAllOf(Enumeration.VisualMode.class),
171         Enumeration.Access.Write,
172         Integer.toString(Enumeration.VisualMode.Visual.ordinal()),
173         Enumeration.Methods.discoverAndExecute,
174         "This property is equivalent to the OLE DB property, MDPROP_VISUALMODE.\n" +
175             "The default value for this property is zero (0), equivalent to DBPROPVAL_VISUAL_MODE_DEFAULT."),
176
177     // mondrian-specific property for advanced drill-through
178
TableFields(
179         RowsetDefinition.Type.String,
180         null,
181         Enumeration.Access.Read,
182         "",
183         Enumeration.Methods.discoverAndExecute,
184         "List of fields to return for drill-through.\n" +
185             "The default value of this property is the empty string," +
186             "in which case, all fields are returned."),
187
188     // mondrian-specific property for advanced drill-through
189
AdvancedFlag(
190         RowsetDefinition.Type.Boolean,
191         null,
192         Enumeration.Access.Read,
193         "false",
194         Enumeration.Methods.discoverAndExecute,
195         "");
196
197     final RowsetDefinition.Type type;
198     final Set JavaDoc<? extends Enum JavaDoc> enumSet;
199     final Enumeration.Access access;
200     final Enumeration.Methods usage;
201     final String JavaDoc value;
202     final String JavaDoc description;
203
204     PropertyDefinition(
205         RowsetDefinition.Type type,
206         Set JavaDoc<? extends Enum JavaDoc> enumSet, Enumeration.Access access,
207         String JavaDoc value, Enumeration.Methods usage, String JavaDoc description)
208     {
209         // Line endings must be UNIX style (LF) not Windows style (LF+CR).
210
// Thus the client will receive the same XML, regardless
211
// of the server O/S.
212
assert description.indexOf('\r') == -1;
213         assert value.indexOf('\r') == -1;
214         assert (enumSet != null) == type.isEnum();
215         this.type = type;
216         this.enumSet = enumSet;
217         this.access = access;
218         this.usage = usage;
219         this.value = value;
220         this.description = description;
221     }
222
223     /**
224      * Returns the description of this PropertyDefinition.
225      *
226      * @return description
227      */

228     public String JavaDoc getDescription() {
229         return description;
230     }
231 }
232
233 // End PropertyDefinition.java
234
Popular Tags