001    /*
002    // This java file was automatically generated
003    // from XOM model 'mondrian'
004    // on Sat May 17 09:06:54 GMT-08:00 2008
005    // Do not edit this file by hand.
006    */
007    
008    package mondrian.olap;
009    import mondrian.rolap.sql.SqlQuery;
010    /**
011     * This is the XML model for Mondrian schemas.
012     * Revision is $Id: //open/mondrian/src/main/mondrian/olap/Mondrian.xml#72 $
013     * <p>This class was generated from XOM model 'mondrian' on Sat May 17 09:06:54 GMT-08:00 2008
014     */
015    public class MondrianDef {
016    
017            public static java.lang.Class getXMLDefClass()
018            {
019                    return MondrianDef.class;
020            }
021    
022            public static String[] _elements = {
023                    "Schema",
024                    "CubeDimension",
025                    "Cube",
026                    "VirtualCube",
027                    "CubeUsages",
028                    "CubeUsage",
029                    "VirtualCubeDimension",
030                    "VirtualCubeMeasure",
031                    "DimensionUsage",
032                    "Dimension",
033                    "Hierarchy",
034                    "Level",
035                    "Closure",
036                    "Property",
037                    "Measure",
038                    "CalculatedMember",
039                    "CalculatedMemberProperty",
040                    "NamedSet",
041                    "Formula",
042                    "MemberReaderParameter",
043                    "RelationOrJoin",
044                    "Relation",
045                    "View",
046                    "SQL",
047                    "Join",
048                    "Table",
049                    "InlineTable",
050                    "ColumnDefs",
051                    "ColumnDef",
052                    "Rows",
053                    "Row",
054                    "Value",
055                    "AggTable",
056                    "AggName",
057                    "AggPattern",
058                    "AggExclude",
059                    "AggColumnName",
060                    "AggFactCount",
061                    "AggIgnoreColumn",
062                    "AggForeignKey",
063                    "AggLevel",
064                    "AggMeasure",
065                    "Expression",
066                    "Column",
067                    "ExpressionView",
068                    "KeyExpression",
069                    "ParentExpression",
070                    "OrdinalExpression",
071                    "NameExpression",
072                    "CaptionExpression",
073                    "MeasureExpression",
074                    "Role",
075                    "Grant",
076                    "SchemaGrant",
077                    "CubeGrant",
078                    "DimensionGrant",
079                    "HierarchyGrant",
080                    "MemberGrant",
081                    "Union",
082                    "RoleUsage",
083                    "UserDefinedFunction",
084                    "Parameter"
085            };
086    
087            /**
088             * A schema is a collection of cubes and virtual cubes.
089             * It can also contain shared dimensions (for use by those
090             * cubes), named sets, roles, and declarations of
091             * user-defined functions.
092             */
093            public static class Schema extends org.eigenbase.xom.ElementDef
094            {
095                    public Schema()
096                    {
097                    }
098    
099                    public Schema(org.eigenbase.xom.DOMWrapper _def)
100                            throws org.eigenbase.xom.XOMException
101                    {
102                            try {
103                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
104                                    _parser = _parser;
105                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
106                                    _tempArray = _tempArray;
107                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
108                                    measuresCaption = (String)_parser.getAttribute("measuresCaption", "String", null, null, false);
109                                    defaultRole = (String)_parser.getAttribute("defaultRole", "String", null, null, false);
110                                    _tempArray = _parser.getArray(Parameter.class, 0, 0);
111                                    parameters = new Parameter[_tempArray.length];
112                                    for(int _i=0; _i<parameters.length; _i++)
113                                            parameters[_i] = (Parameter)_tempArray[_i];
114                                    _tempArray = _parser.getArray(Dimension.class, 0, 0);
115                                    dimensions = new Dimension[_tempArray.length];
116                                    for(int _i=0; _i<dimensions.length; _i++)
117                                            dimensions[_i] = (Dimension)_tempArray[_i];
118                                    _tempArray = _parser.getArray(Cube.class, 0, 0);
119                                    cubes = new Cube[_tempArray.length];
120                                    for(int _i=0; _i<cubes.length; _i++)
121                                            cubes[_i] = (Cube)_tempArray[_i];
122                                    _tempArray = _parser.getArray(VirtualCube.class, 0, 0);
123                                    virtualCubes = new VirtualCube[_tempArray.length];
124                                    for(int _i=0; _i<virtualCubes.length; _i++)
125                                            virtualCubes[_i] = (VirtualCube)_tempArray[_i];
126                                    _tempArray = _parser.getArray(NamedSet.class, 0, 0);
127                                    namedSets = new NamedSet[_tempArray.length];
128                                    for(int _i=0; _i<namedSets.length; _i++)
129                                            namedSets[_i] = (NamedSet)_tempArray[_i];
130                                    _tempArray = _parser.getArray(Role.class, 0, 0);
131                                    roles = new Role[_tempArray.length];
132                                    for(int _i=0; _i<roles.length; _i++)
133                                            roles[_i] = (Role)_tempArray[_i];
134                                    _tempArray = _parser.getArray(UserDefinedFunction.class, 0, 0);
135                                    userDefinedFunctions = new UserDefinedFunction[_tempArray.length];
136                                    for(int _i=0; _i<userDefinedFunctions.length; _i++)
137                                            userDefinedFunctions[_i] = (UserDefinedFunction)_tempArray[_i];
138                            } catch(org.eigenbase.xom.XOMException _ex) {
139                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
140                            }
141                    }
142    
143                    public String name;  // required attribute
144                    public String measuresCaption;  // optional attribute
145                    public String defaultRole;  // optional attribute
146    
147                    /**
148                     * This schema's parameter definitions.
149                     */
150                    public Parameter[] parameters;  //optional array
151                    /**
152                     * Shared dimensions in this schema.
153                     */
154                    public Dimension[] dimensions;  //optional array
155                    /**
156                     * Cubes in this schema.
157                     */
158                    public Cube[] cubes;  //optional array
159                    /**
160                     * Virtual cubes in this schema.
161                     */
162                    public VirtualCube[] virtualCubes;  //optional array
163                    /**
164                     * Named sets in this schema.
165                     */
166                    public NamedSet[] namedSets;  //optional array
167                    /**
168                     * Roles in this schema.
169                     */
170                    public Role[] roles;  //optional array
171                    /**
172                     * Declarations of user-defined functions in this schema.
173                     */
174                    public UserDefinedFunction[] userDefinedFunctions;  //optional array
175    
176                    public String getName()
177                    {
178                            return "Schema";
179                    }
180    
181                    public void display(java.io.PrintWriter _out, int _indent)
182                    {
183                            _out.println(getName());
184                            displayAttribute(_out, "name", name, _indent+1);
185                            displayAttribute(_out, "measuresCaption", measuresCaption, _indent+1);
186                            displayAttribute(_out, "defaultRole", defaultRole, _indent+1);
187                            displayElementArray(_out, "parameters", parameters, _indent+1);
188                            displayElementArray(_out, "dimensions", dimensions, _indent+1);
189                            displayElementArray(_out, "cubes", cubes, _indent+1);
190                            displayElementArray(_out, "virtualCubes", virtualCubes, _indent+1);
191                            displayElementArray(_out, "namedSets", namedSets, _indent+1);
192                            displayElementArray(_out, "roles", roles, _indent+1);
193                            displayElementArray(_out, "userDefinedFunctions", userDefinedFunctions, _indent+1);
194                    }
195                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
196                    {
197                            _out.beginTag("Schema", new org.eigenbase.xom.XMLAttrVector()
198                                    .add("name", name)
199                                    .add("measuresCaption", measuresCaption)
200                                    .add("defaultRole", defaultRole)
201                                    );
202                            displayXMLElementArray(_out, parameters);
203                            displayXMLElementArray(_out, dimensions);
204                            displayXMLElementArray(_out, cubes);
205                            displayXMLElementArray(_out, virtualCubes);
206                            displayXMLElementArray(_out, namedSets);
207                            displayXMLElementArray(_out, roles);
208                            displayXMLElementArray(_out, userDefinedFunctions);
209                            _out.endTag("Schema");
210                    }
211                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
212                    {
213                            boolean _diff = true;
214                            Schema _cother = (Schema)_other;
215                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
216                            _diff = _diff && displayAttributeDiff("measuresCaption", measuresCaption, _cother.measuresCaption, _out, _indent+1);
217                            _diff = _diff && displayAttributeDiff("defaultRole", defaultRole, _cother.defaultRole, _out, _indent+1);
218                            _diff = _diff && displayElementArrayDiff("parameters", parameters, _cother.parameters, _out, _indent+1);
219                            _diff = _diff && displayElementArrayDiff("dimensions", dimensions, _cother.dimensions, _out, _indent+1);
220                            _diff = _diff && displayElementArrayDiff("cubes", cubes, _cother.cubes, _out, _indent+1);
221                            _diff = _diff && displayElementArrayDiff("virtualCubes", virtualCubes, _cother.virtualCubes, _out, _indent+1);
222                            _diff = _diff && displayElementArrayDiff("namedSets", namedSets, _cother.namedSets, _out, _indent+1);
223                            _diff = _diff && displayElementArrayDiff("roles", roles, _cother.roles, _out, _indent+1);
224                            _diff = _diff && displayElementArrayDiff("userDefinedFunctions", userDefinedFunctions, _cother.userDefinedFunctions, _out, _indent+1);
225                            return _diff;
226                    }
227                    // BEGIN pass-through code block ---
228    Cube getCube(String cubeName) {
229                    for (int i = 0; i < cubes.length; i++) {
230                        if (cubes[i].name.equals(cubeName)) {
231                            return cubes[i];
232                        }
233                    }
234                    throw Util.newInternal("Cannot find cube '" + cubeName + "'");
235                }
236                Dimension getPublicDimension(String dimensionName) {
237                    for (int i = 0; i < dimensions.length; i++) {
238                        if (dimensions[i].name.equals(dimensionName)) {
239                            return dimensions[i];
240                        }
241                    }
242                    throw Util.newInternal(
243                        "Cannot find public dimension '" + dimensionName + "'");
244                }
245                    // END pass-through code block ---
246            }
247    
248            /**
249             * A CubeDimension is either a usage of a Dimension ('shared
250             * dimension', in MSOLAP parlance), or a 'private dimension'.
251             */
252            public static abstract class CubeDimension extends org.eigenbase.xom.ElementDef
253            {
254                    public CubeDimension()
255                    {
256                    }
257    
258                    public CubeDimension(org.eigenbase.xom.DOMWrapper _def)
259                            throws org.eigenbase.xom.XOMException
260                    {
261                            try {
262                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
263                                    _parser = _parser;
264                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
265                                    caption = (String)_parser.getAttribute("caption", "String", null, null, false);
266                                    foreignKey = (String)_parser.getAttribute("foreignKey", "String", null, null, false);
267                                    highCardinality = (Boolean)_parser.getAttribute("highCardinality", "Boolean", "false", null, false);
268                            } catch(org.eigenbase.xom.XOMException _ex) {
269                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
270                            }
271                    }
272    
273                    public String name;  // required attribute
274                    public String caption;  // optional attribute
275                    public String foreignKey;  // optional attribute
276                    public Boolean highCardinality;  // attribute default: false
277    
278    
279                    public String getName()
280                    {
281                            return "CubeDimension";
282                    }
283    
284                    public void display(java.io.PrintWriter _out, int _indent)
285                    {
286                            _out.println(getName());
287                            displayAttribute(_out, "name", name, _indent+1);
288                            displayAttribute(_out, "caption", caption, _indent+1);
289                            displayAttribute(_out, "foreignKey", foreignKey, _indent+1);
290                            displayAttribute(_out, "highCardinality", highCardinality, _indent+1);
291                    }
292                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
293                    {
294                            _out.beginTag("(%CubeDimension;)", new org.eigenbase.xom.XMLAttrVector()
295                                    .add("name", name)
296                                    .add("caption", caption)
297                                    .add("foreignKey", foreignKey)
298                                    .add("highCardinality", highCardinality)
299                                    );
300                            _out.endTag("(%CubeDimension;)");
301                    }
302                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
303                    {
304                            boolean _diff = true;
305                            CubeDimension _cother = (CubeDimension)_other;
306                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
307                            _diff = _diff && displayAttributeDiff("caption", caption, _cother.caption, _out, _indent+1);
308                            _diff = _diff && displayAttributeDiff("foreignKey", foreignKey, _cother.foreignKey, _out, _indent+1);
309                            _diff = _diff && displayAttributeDiff("highCardinality", highCardinality, _cother.highCardinality, _out, _indent+1);
310                            return _diff;
311                    }
312                    // BEGIN pass-through code block ---
313    /**
314                 * Looks up the base dimension of this dimension. If this is a
315                 * usage of a shared dimension, returns the referenced dimension;
316                 * otherwise returns the dimension itself.
317                 *
318                 * <p>Never returns null; if the dimension cannot be
319                 * found, throws an error.
320                 *
321                 * @param schema Schema, never null
322                 * @pre schema != null
323                 * @post return != null
324                 */
325                public abstract Dimension getDimension(Schema schema);
326                    // END pass-through code block ---
327            }
328    
329            /**
330             * Definition of a cube.
331             */
332            public static class Cube extends org.eigenbase.xom.ElementDef
333            {
334                    public Cube()
335                    {
336                    }
337    
338                    public Cube(org.eigenbase.xom.DOMWrapper _def)
339                            throws org.eigenbase.xom.XOMException
340                    {
341                            try {
342                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
343                                    _parser = _parser;
344                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
345                                    _tempArray = _tempArray;
346                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
347                                    caption = (String)_parser.getAttribute("caption", "String", null, null, false);
348                                    defaultMeasure = (String)_parser.getAttribute("defaultMeasure", "String", null, null, false);
349                                    cache = (Boolean)_parser.getAttribute("cache", "Boolean", "true", null, false);
350                                    enabled = (Boolean)_parser.getAttribute("enabled", "Boolean", "true", null, false);
351                                    fact = (Relation)_parser.getElement(Relation.class, true);
352                                    _tempArray = _parser.getArray(CubeDimension.class, 0, 0);
353                                    dimensions = new CubeDimension[_tempArray.length];
354                                    for(int _i=0; _i<dimensions.length; _i++)
355                                            dimensions[_i] = (CubeDimension)_tempArray[_i];
356                                    _tempArray = _parser.getArray(Measure.class, 0, 0);
357                                    measures = new Measure[_tempArray.length];
358                                    for(int _i=0; _i<measures.length; _i++)
359                                            measures[_i] = (Measure)_tempArray[_i];
360                                    _tempArray = _parser.getArray(CalculatedMember.class, 0, 0);
361                                    calculatedMembers = new CalculatedMember[_tempArray.length];
362                                    for(int _i=0; _i<calculatedMembers.length; _i++)
363                                            calculatedMembers[_i] = (CalculatedMember)_tempArray[_i];
364                                    _tempArray = _parser.getArray(NamedSet.class, 0, 0);
365                                    namedSets = new NamedSet[_tempArray.length];
366                                    for(int _i=0; _i<namedSets.length; _i++)
367                                            namedSets[_i] = (NamedSet)_tempArray[_i];
368                            } catch(org.eigenbase.xom.XOMException _ex) {
369                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
370                            }
371                    }
372    
373                    public String name;  // required attribute
374                    public String caption;  // optional attribute
375                    public String defaultMeasure;  // optional attribute
376                    public Boolean cache;  // attribute default: true
377                    public Boolean enabled;  // attribute default: true
378    
379                    /**
380                     * The fact table is the source of all measures in this cube. If
381                     * this is a Table and the schema name is not
382                     * present, table name is left unqualified.
383                     */
384                    public Relation fact;  //required element
385                    /**
386                     */
387                    public CubeDimension[] dimensions;  //optional array
388                    /**
389                     */
390                    public Measure[] measures;  //optional array
391                    /**
392                     * Calculated members in this cube.
393                     */
394                    public CalculatedMember[] calculatedMembers;  //optional array
395                    /**
396                     * Named sets in this cube.
397                     */
398                    public NamedSet[] namedSets;  //optional array
399    
400                    public String getName()
401                    {
402                            return "Cube";
403                    }
404    
405                    public void display(java.io.PrintWriter _out, int _indent)
406                    {
407                            _out.println(getName());
408                            displayAttribute(_out, "name", name, _indent+1);
409                            displayAttribute(_out, "caption", caption, _indent+1);
410                            displayAttribute(_out, "defaultMeasure", defaultMeasure, _indent+1);
411                            displayAttribute(_out, "cache", cache, _indent+1);
412                            displayAttribute(_out, "enabled", enabled, _indent+1);
413                            displayElement(_out, "fact", fact, _indent+1);
414                            displayElementArray(_out, "dimensions", dimensions, _indent+1);
415                            displayElementArray(_out, "measures", measures, _indent+1);
416                            displayElementArray(_out, "calculatedMembers", calculatedMembers, _indent+1);
417                            displayElementArray(_out, "namedSets", namedSets, _indent+1);
418                    }
419                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
420                    {
421                            _out.beginTag("Cube", new org.eigenbase.xom.XMLAttrVector()
422                                    .add("name", name)
423                                    .add("caption", caption)
424                                    .add("defaultMeasure", defaultMeasure)
425                                    .add("cache", cache)
426                                    .add("enabled", enabled)
427                                    );
428                            displayXMLElement(_out, fact);
429                            displayXMLElementArray(_out, dimensions);
430                            displayXMLElementArray(_out, measures);
431                            displayXMLElementArray(_out, calculatedMembers);
432                            displayXMLElementArray(_out, namedSets);
433                            _out.endTag("Cube");
434                    }
435                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
436                    {
437                            boolean _diff = true;
438                            Cube _cother = (Cube)_other;
439                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
440                            _diff = _diff && displayAttributeDiff("caption", caption, _cother.caption, _out, _indent+1);
441                            _diff = _diff && displayAttributeDiff("defaultMeasure", defaultMeasure, _cother.defaultMeasure, _out, _indent+1);
442                            _diff = _diff && displayAttributeDiff("cache", cache, _cother.cache, _out, _indent+1);
443                            _diff = _diff && displayAttributeDiff("enabled", enabled, _cother.enabled, _out, _indent+1);
444                            _diff = _diff && displayElementDiff("fact", fact, _cother.fact, _out, _indent+1);
445                            _diff = _diff && displayElementArrayDiff("dimensions", dimensions, _cother.dimensions, _out, _indent+1);
446                            _diff = _diff && displayElementArrayDiff("measures", measures, _cother.measures, _out, _indent+1);
447                            _diff = _diff && displayElementArrayDiff("calculatedMembers", calculatedMembers, _cother.calculatedMembers, _out, _indent+1);
448                            _diff = _diff && displayElementArrayDiff("namedSets", namedSets, _cother.namedSets, _out, _indent+1);
449                            return _diff;
450                    }
451                    // BEGIN pass-through code block ---
452    public boolean isEnabled() {
453                    return enabled.booleanValue();
454                }
455                Dimension getDimension(Schema xmlSchema, String dimensionName) {
456                    for (int i = 0; i < dimensions.length; i++) {
457                        if (dimensions[i].name.equals(dimensionName)) {
458                            return dimensions[i].getDimension(xmlSchema);
459                        }
460                    }
461                    throw Util.newInternal(
462                        "Cannot find dimension '" + dimensionName + "' in cube '" +
463                        name + "'");
464                }
465                    // END pass-through code block ---
466            }
467    
468            /**
469             * A VirtualCube is a set of dimensions and
470             * measures gleaned from other cubes.
471             */
472            public static class VirtualCube extends org.eigenbase.xom.ElementDef
473            {
474                    public VirtualCube()
475                    {
476                    }
477    
478                    public VirtualCube(org.eigenbase.xom.DOMWrapper _def)
479                            throws org.eigenbase.xom.XOMException
480                    {
481                            try {
482                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
483                                    _parser = _parser;
484                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
485                                    _tempArray = _tempArray;
486                                    enabled = (Boolean)_parser.getAttribute("enabled", "Boolean", "true", null, false);
487                                    name = (String)_parser.getAttribute("name", "String", null, null, false);
488                                    defaultMeasure = (String)_parser.getAttribute("defaultMeasure", "String", null, null, false);
489                                    caption = (String)_parser.getAttribute("caption", "String", null, null, false);
490                                    cubeUsage = (CubeUsages)_parser.getElement(CubeUsages.class, false);
491                                    _tempArray = _parser.getArray(VirtualCubeDimension.class, 0, 0);
492                                    dimensions = new VirtualCubeDimension[_tempArray.length];
493                                    for(int _i=0; _i<dimensions.length; _i++)
494                                            dimensions[_i] = (VirtualCubeDimension)_tempArray[_i];
495                                    _tempArray = _parser.getArray(VirtualCubeMeasure.class, 0, 0);
496                                    measures = new VirtualCubeMeasure[_tempArray.length];
497                                    for(int _i=0; _i<measures.length; _i++)
498                                            measures[_i] = (VirtualCubeMeasure)_tempArray[_i];
499                                    _tempArray = _parser.getArray(CalculatedMember.class, 0, 0);
500                                    calculatedMembers = new CalculatedMember[_tempArray.length];
501                                    for(int _i=0; _i<calculatedMembers.length; _i++)
502                                            calculatedMembers[_i] = (CalculatedMember)_tempArray[_i];
503                                    _tempArray = _parser.getArray(NamedSet.class, 0, 0);
504                                    namedSets = new NamedSet[_tempArray.length];
505                                    for(int _i=0; _i<namedSets.length; _i++)
506                                            namedSets[_i] = (NamedSet)_tempArray[_i];
507                            } catch(org.eigenbase.xom.XOMException _ex) {
508                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
509                            }
510                    }
511    
512                    public Boolean enabled;  // attribute default: true
513                    public String name;  // optional attribute
514                    public String defaultMeasure;  // optional attribute
515                    public String caption;  // optional attribute
516    
517                    /**
518                     */
519                    public CubeUsages cubeUsage;  //optional element
520                    /**
521                     */
522                    public VirtualCubeDimension[] dimensions;  //optional array
523                    /**
524                     */
525                    public VirtualCubeMeasure[] measures;  //optional array
526                    /**
527                     * Calculated members that belong to this virtual cube.
528                     * (Calculated members inherited from other cubes should not be
529                     * in this list.)
530                     */
531                    public CalculatedMember[] calculatedMembers;  //optional array
532                    /**
533                     * Named sets in this cube.
534                     */
535                    public NamedSet[] namedSets;  //optional array
536    
537                    public String getName()
538                    {
539                            return "VirtualCube";
540                    }
541    
542                    public void display(java.io.PrintWriter _out, int _indent)
543                    {
544                            _out.println(getName());
545                            displayAttribute(_out, "enabled", enabled, _indent+1);
546                            displayAttribute(_out, "name", name, _indent+1);
547                            displayAttribute(_out, "defaultMeasure", defaultMeasure, _indent+1);
548                            displayAttribute(_out, "caption", caption, _indent+1);
549                            displayElement(_out, "cubeUsage", cubeUsage, _indent+1);
550                            displayElementArray(_out, "dimensions", dimensions, _indent+1);
551                            displayElementArray(_out, "measures", measures, _indent+1);
552                            displayElementArray(_out, "calculatedMembers", calculatedMembers, _indent+1);
553                            displayElementArray(_out, "namedSets", namedSets, _indent+1);
554                    }
555                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
556                    {
557                            _out.beginTag("VirtualCube", new org.eigenbase.xom.XMLAttrVector()
558                                    .add("enabled", enabled)
559                                    .add("name", name)
560                                    .add("defaultMeasure", defaultMeasure)
561                                    .add("caption", caption)
562                                    );
563                            displayXMLElement(_out, cubeUsage);
564                            displayXMLElementArray(_out, dimensions);
565                            displayXMLElementArray(_out, measures);
566                            displayXMLElementArray(_out, calculatedMembers);
567                            displayXMLElementArray(_out, namedSets);
568                            _out.endTag("VirtualCube");
569                    }
570                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
571                    {
572                            boolean _diff = true;
573                            VirtualCube _cother = (VirtualCube)_other;
574                            _diff = _diff && displayAttributeDiff("enabled", enabled, _cother.enabled, _out, _indent+1);
575                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
576                            _diff = _diff && displayAttributeDiff("defaultMeasure", defaultMeasure, _cother.defaultMeasure, _out, _indent+1);
577                            _diff = _diff && displayAttributeDiff("caption", caption, _cother.caption, _out, _indent+1);
578                            _diff = _diff && displayElementDiff("cubeUsage", cubeUsage, _cother.cubeUsage, _out, _indent+1);
579                            _diff = _diff && displayElementArrayDiff("dimensions", dimensions, _cother.dimensions, _out, _indent+1);
580                            _diff = _diff && displayElementArrayDiff("measures", measures, _cother.measures, _out, _indent+1);
581                            _diff = _diff && displayElementArrayDiff("calculatedMembers", calculatedMembers, _cother.calculatedMembers, _out, _indent+1);
582                            _diff = _diff && displayElementArrayDiff("namedSets", namedSets, _cother.namedSets, _out, _indent+1);
583                            return _diff;
584                    }
585                    // BEGIN pass-through code block ---
586    public boolean isEnabled() {
587                    return enabled.booleanValue();
588                }
589                    // END pass-through code block ---
590            }
591    
592            /**
593             * List of base cubes used by the virtual cube.
594             */
595            public static class CubeUsages extends org.eigenbase.xom.ElementDef
596            {
597                    public CubeUsages()
598                    {
599                    }
600    
601                    public CubeUsages(org.eigenbase.xom.DOMWrapper _def)
602                            throws org.eigenbase.xom.XOMException
603                    {
604                            try {
605                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
606                                    _parser = _parser;
607                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
608                                    _tempArray = _tempArray;
609                                    _tempArray = _parser.getArray(CubeUsage.class, 1, 0);
610                                    cubeUsages = new CubeUsage[_tempArray.length];
611                                    for(int _i=0; _i<cubeUsages.length; _i++)
612                                            cubeUsages[_i] = (CubeUsage)_tempArray[_i];
613                            } catch(org.eigenbase.xom.XOMException _ex) {
614                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
615                            }
616                    }
617    
618    
619                    /**
620                     */
621                    public CubeUsage[] cubeUsages;  //min 1
622    
623                    public String getName()
624                    {
625                            return "CubeUsages";
626                    }
627    
628                    public void display(java.io.PrintWriter _out, int _indent)
629                    {
630                            _out.println(getName());
631                            displayElementArray(_out, "cubeUsages", cubeUsages, _indent+1);
632                    }
633                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
634                    {
635                            _out.beginTag("CubeUsages", new org.eigenbase.xom.XMLAttrVector()
636                                    );
637                            displayXMLElementArray(_out, cubeUsages);
638                            _out.endTag("CubeUsages");
639                    }
640                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
641                    {
642                            boolean _diff = true;
643                            CubeUsages _cother = (CubeUsages)_other;
644                            _diff = _diff && displayElementArrayDiff("cubeUsages", cubeUsages, _cother.cubeUsages, _out, _indent+1);
645                            return _diff;
646                    }
647            }
648    
649            public static class CubeUsage extends org.eigenbase.xom.ElementDef
650            {
651                    public CubeUsage()
652                    {
653                    }
654    
655                    public CubeUsage(org.eigenbase.xom.DOMWrapper _def)
656                            throws org.eigenbase.xom.XOMException
657                    {
658                            try {
659                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
660                                    _parser = _parser;
661                                    cubeName = (String)_parser.getAttribute("cubeName", "String", null, null, true);
662                                    ignoreUnrelatedDimensions = (Boolean)_parser.getAttribute("ignoreUnrelatedDimensions", "Boolean", "false", null, false);
663                            } catch(org.eigenbase.xom.XOMException _ex) {
664                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
665                            }
666                    }
667    
668                    public String cubeName;  // required attribute
669                    public Boolean ignoreUnrelatedDimensions;  // attribute default: false
670    
671    
672                    public String getName()
673                    {
674                            return "CubeUsage";
675                    }
676    
677                    public void display(java.io.PrintWriter _out, int _indent)
678                    {
679                            _out.println(getName());
680                            displayAttribute(_out, "cubeName", cubeName, _indent+1);
681                            displayAttribute(_out, "ignoreUnrelatedDimensions", ignoreUnrelatedDimensions, _indent+1);
682                    }
683                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
684                    {
685                            _out.beginTag("CubeUsage", new org.eigenbase.xom.XMLAttrVector()
686                                    .add("cubeName", cubeName)
687                                    .add("ignoreUnrelatedDimensions", ignoreUnrelatedDimensions)
688                                    );
689                            _out.endTag("CubeUsage");
690                    }
691                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
692                    {
693                            boolean _diff = true;
694                            CubeUsage _cother = (CubeUsage)_other;
695                            _diff = _diff && displayAttributeDiff("cubeName", cubeName, _cother.cubeName, _out, _indent+1);
696                            _diff = _diff && displayAttributeDiff("ignoreUnrelatedDimensions", ignoreUnrelatedDimensions, _cother.ignoreUnrelatedDimensions, _out, _indent+1);
697                            return _diff;
698                    }
699            }
700    
701            /**
702             * A VirtualCubeDimension is a usage of a Dimension in a VirtualCube.
703             */
704            public static class VirtualCubeDimension extends CubeDimension
705            {
706                    public VirtualCubeDimension()
707                    {
708                    }
709    
710                    public VirtualCubeDimension(org.eigenbase.xom.DOMWrapper _def)
711                            throws org.eigenbase.xom.XOMException
712                    {
713                            try {
714                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
715                                    _parser = _parser;
716                                    cubeName = (String)_parser.getAttribute("cubeName", "String", null, null, false);
717                                    caption = (String)_parser.getAttribute("caption", "String", null, null, false);
718                                    foreignKey = (String)_parser.getAttribute("foreignKey", "String", null, null, false);
719                                    highCardinality = (Boolean)_parser.getAttribute("highCardinality", "Boolean", "false", null, false);
720                                    name = (String)_parser.getAttribute("name", "String", null, null, false);
721                            } catch(org.eigenbase.xom.XOMException _ex) {
722                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
723                            }
724                    }
725    
726                    public String cubeName;  // optional attribute
727    
728    
729                    public String getName()
730                    {
731                            return "VirtualCubeDimension";
732                    }
733    
734                    public void display(java.io.PrintWriter _out, int _indent)
735                    {
736                            _out.println(getName());
737                            displayAttribute(_out, "cubeName", cubeName, _indent+1);
738                            displayAttribute(_out, "caption", caption, _indent+1);
739                            displayAttribute(_out, "foreignKey", foreignKey, _indent+1);
740                            displayAttribute(_out, "highCardinality", highCardinality, _indent+1);
741                            displayAttribute(_out, "name", name, _indent+1);
742                    }
743                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
744                    {
745                            _out.beginTag("VirtualCubeDimension", new org.eigenbase.xom.XMLAttrVector()
746                                    .add("cubeName", cubeName)
747                                    .add("caption", caption)
748                                    .add("foreignKey", foreignKey)
749                                    .add("highCardinality", highCardinality)
750                                    .add("name", name)
751                                    );
752                            _out.endTag("VirtualCubeDimension");
753                    }
754                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
755                    {
756                            boolean _diff = true;
757                            VirtualCubeDimension _cother = (VirtualCubeDimension)_other;
758                            _diff = _diff && displayAttributeDiff("cubeName", cubeName, _cother.cubeName, _out, _indent+1);
759                            return _diff;
760                    }
761                    // BEGIN pass-through code block ---
762    // implement CubeDimension
763                public Dimension getDimension(Schema schema) {
764                    Util.assertPrecondition(schema != null, "schema != null");
765                    if (cubeName == null) {
766                        return schema.getPublicDimension(name);
767                    } else {
768                        Cube cube = schema.getCube(cubeName);
769                        return cube.getDimension(schema, name);
770                    }
771                }
772                    // END pass-through code block ---
773            }
774    
775            /**
776             * A VirtualCubeMeasure is a usage of a Measure in a VirtualCube.
777             */
778            public static class VirtualCubeMeasure extends org.eigenbase.xom.ElementDef
779            {
780                    public VirtualCubeMeasure()
781                    {
782                    }
783    
784                    public VirtualCubeMeasure(org.eigenbase.xom.DOMWrapper _def)
785                            throws org.eigenbase.xom.XOMException
786                    {
787                            try {
788                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
789                                    _parser = _parser;
790                                    cubeName = (String)_parser.getAttribute("cubeName", "String", null, null, false);
791                                    name = (String)_parser.getAttribute("name", "String", null, null, false);
792                                    visible = (Boolean)_parser.getAttribute("visible", "Boolean", null, null, false);
793                            } catch(org.eigenbase.xom.XOMException _ex) {
794                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
795                            }
796                    }
797    
798                    public String cubeName;  // optional attribute
799                    public String name;  // optional attribute
800                    public Boolean visible;  // optional attribute
801    
802    
803                    public String getName()
804                    {
805                            return "VirtualCubeMeasure";
806                    }
807    
808                    public void display(java.io.PrintWriter _out, int _indent)
809                    {
810                            _out.println(getName());
811                            displayAttribute(_out, "cubeName", cubeName, _indent+1);
812                            displayAttribute(_out, "name", name, _indent+1);
813                            displayAttribute(_out, "visible", visible, _indent+1);
814                    }
815                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
816                    {
817                            _out.beginTag("VirtualCubeMeasure", new org.eigenbase.xom.XMLAttrVector()
818                                    .add("cubeName", cubeName)
819                                    .add("name", name)
820                                    .add("visible", visible)
821                                    );
822                            _out.endTag("VirtualCubeMeasure");
823                    }
824                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
825                    {
826                            boolean _diff = true;
827                            VirtualCubeMeasure _cother = (VirtualCubeMeasure)_other;
828                            _diff = _diff && displayAttributeDiff("cubeName", cubeName, _cother.cubeName, _out, _indent+1);
829                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
830                            _diff = _diff && displayAttributeDiff("visible", visible, _cother.visible, _out, _indent+1);
831                            return _diff;
832                    }
833            }
834    
835            /**
836             * A DimensionUsage is usage of a shared
837             * Dimension within the context of a cube.
838             */
839            public static class DimensionUsage extends CubeDimension
840            {
841                    public DimensionUsage()
842                    {
843                    }
844    
845                    public DimensionUsage(org.eigenbase.xom.DOMWrapper _def)
846                            throws org.eigenbase.xom.XOMException
847                    {
848                            try {
849                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
850                                    _parser = _parser;
851                                    source = (String)_parser.getAttribute("source", "String", null, null, true);
852                                    level = (String)_parser.getAttribute("level", "String", null, null, false);
853                                    usagePrefix = (String)_parser.getAttribute("usagePrefix", "String", null, null, false);
854                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
855                                    caption = (String)_parser.getAttribute("caption", "String", null, null, false);
856                                    foreignKey = (String)_parser.getAttribute("foreignKey", "String", null, null, false);
857                                    highCardinality = (Boolean)_parser.getAttribute("highCardinality", "Boolean", "false", null, false);
858                            } catch(org.eigenbase.xom.XOMException _ex) {
859                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
860                            }
861                    }
862    
863                    public String source;  // required attribute
864                    public String level;  // optional attribute
865                    public String usagePrefix;  // optional attribute
866    
867    
868                    public String getName()
869                    {
870                            return "DimensionUsage";
871                    }
872    
873                    public void display(java.io.PrintWriter _out, int _indent)
874                    {
875                            _out.println(getName());
876                            displayAttribute(_out, "source", source, _indent+1);
877                            displayAttribute(_out, "level", level, _indent+1);
878                            displayAttribute(_out, "usagePrefix", usagePrefix, _indent+1);
879                            displayAttribute(_out, "name", name, _indent+1);
880                            displayAttribute(_out, "caption", caption, _indent+1);
881                            displayAttribute(_out, "foreignKey", foreignKey, _indent+1);
882                            displayAttribute(_out, "highCardinality", highCardinality, _indent+1);
883                    }
884                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
885                    {
886                            _out.beginTag("DimensionUsage", new org.eigenbase.xom.XMLAttrVector()
887                                    .add("source", source)
888                                    .add("level", level)
889                                    .add("usagePrefix", usagePrefix)
890                                    .add("name", name)
891                                    .add("caption", caption)
892                                    .add("foreignKey", foreignKey)
893                                    .add("highCardinality", highCardinality)
894                                    );
895                            _out.endTag("DimensionUsage");
896                    }
897                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
898                    {
899                            boolean _diff = true;
900                            DimensionUsage _cother = (DimensionUsage)_other;
901                            _diff = _diff && displayAttributeDiff("source", source, _cother.source, _out, _indent+1);
902                            _diff = _diff && displayAttributeDiff("level", level, _cother.level, _out, _indent+1);
903                            _diff = _diff && displayAttributeDiff("usagePrefix", usagePrefix, _cother.usagePrefix, _out, _indent+1);
904                            return _diff;
905                    }
906                    // BEGIN pass-through code block ---
907    // implement CubeDimension
908                public Dimension getDimension(Schema schema) {
909                    Util.assertPrecondition(schema != null, "schema != null");
910                    for (int i = 0; i < schema.dimensions.length; i++) {
911                        if (schema.dimensions[i].name.equals(source)) {
912                            return schema.dimensions[i];
913                        }
914                    }
915                    throw Util.newInternal(
916                        "Cannot find shared dimension '" + source + "'");
917                }
918                    // END pass-through code block ---
919            }
920    
921            /**
922             * A Dimension is a collection of hierarchies. There are
923             * two kinds: a public dimension belongs to a
924             * Schema, and be used by several cubes; a
925             * private dimension belongs to a
926             * Cube. The foreignKey field is only
927             * applicable to private dimensions.
928             */
929            public static class Dimension extends CubeDimension
930            {
931                    public Dimension()
932                    {
933                    }
934    
935                    public Dimension(org.eigenbase.xom.DOMWrapper _def)
936                            throws org.eigenbase.xom.XOMException
937                    {
938                            try {
939                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
940                                    _parser = _parser;
941                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
942                                    _tempArray = _tempArray;
943                                    type = (String)_parser.getAttribute("type", "String", null, _type_values, false);
944                                    usagePrefix = (String)_parser.getAttribute("usagePrefix", "String", null, null, false);
945                                    foreignKey = (String)_parser.getAttribute("foreignKey", "String", null, null, false);
946                                    highCardinality = (Boolean)_parser.getAttribute("highCardinality", "Boolean", "false", null, false);
947                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
948                                    caption = (String)_parser.getAttribute("caption", "String", null, null, false);
949                                    _tempArray = _parser.getArray(Hierarchy.class, 0, 0);
950                                    hierarchies = new Hierarchy[_tempArray.length];
951                                    for(int _i=0; _i<hierarchies.length; _i++)
952                                            hierarchies[_i] = (Hierarchy)_tempArray[_i];
953                            } catch(org.eigenbase.xom.XOMException _ex) {
954                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
955                            }
956                    }
957    
958                    /** Allowable values for {@link #type}. */
959                    public static final String[] _type_values = {"StandardDimension", "TimeDimension"};
960                    public String type;  // optional attribute
961                    public String usagePrefix;  // optional attribute
962    
963                    /**
964                     */
965                    public Hierarchy[] hierarchies;  //optional array
966    
967                    public String getName()
968                    {
969                            return "Dimension";
970                    }
971    
972                    public void display(java.io.PrintWriter _out, int _indent)
973                    {
974                            _out.println(getName());
975                            displayAttribute(_out, "type", type, _indent+1);
976                            displayAttribute(_out, "usagePrefix", usagePrefix, _indent+1);
977                            displayAttribute(_out, "foreignKey", foreignKey, _indent+1);
978                            displayAttribute(_out, "highCardinality", highCardinality, _indent+1);
979                            displayAttribute(_out, "name", name, _indent+1);
980                            displayAttribute(_out, "caption", caption, _indent+1);
981                            displayElementArray(_out, "hierarchies", hierarchies, _indent+1);
982                    }
983                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
984                    {
985                            _out.beginTag("Dimension", new org.eigenbase.xom.XMLAttrVector()
986                                    .add("type", type)
987                                    .add("usagePrefix", usagePrefix)
988                                    .add("foreignKey", foreignKey)
989                                    .add("highCardinality", highCardinality)
990                                    .add("name", name)
991                                    .add("caption", caption)
992                                    );
993                            displayXMLElementArray(_out, hierarchies);
994                            _out.endTag("Dimension");
995                    }
996                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
997                    {
998                            boolean _diff = true;
999                            Dimension _cother = (Dimension)_other;
1000                            _diff = _diff && displayAttributeDiff("type", type, _cother.type, _out, _indent+1);
1001                            _diff = _diff && displayAttributeDiff("usagePrefix", usagePrefix, _cother.usagePrefix, _out, _indent+1);
1002                            _diff = _diff && displayElementArrayDiff("hierarchies", hierarchies, _cother.hierarchies, _out, _indent+1);
1003                            return _diff;
1004                    }
1005                    // BEGIN pass-through code block ---
1006    // implement CubeDimension
1007                public Dimension getDimension(Schema schema) {
1008                    Util.assertPrecondition(schema != null, "schema != null");
1009                    return this;
1010                }
1011    
1012                // Return the dimension's enumerated type.
1013                public DimensionType getDimensionType() {
1014                    if (type == null) {
1015                        return null; //DimensionType.StandardDimension;
1016                    } else {
1017                        return DimensionType.valueOf(type);
1018                    }
1019                }
1020                    // END pass-through code block ---
1021            }
1022    
1023            /**
1024             * Defines a hierarchy.
1025             * You must specify at most one <Relation>
1026             * or memberReaderClass. If you specify none, the
1027             * hierarchy is assumed to come from the same fact table of the
1028             * current cube.
1029             */
1030            public static class Hierarchy extends org.eigenbase.xom.ElementDef
1031            {
1032                    public Hierarchy()
1033                    {
1034                    }
1035    
1036                    public Hierarchy(org.eigenbase.xom.DOMWrapper _def)
1037                            throws org.eigenbase.xom.XOMException
1038                    {
1039                            try {
1040                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
1041                                    _parser = _parser;
1042                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
1043                                    _tempArray = _tempArray;
1044                                    name = (String)_parser.getAttribute("name", "String", null, null, false);
1045                                    hasAll = (Boolean)_parser.getAttribute("hasAll", "Boolean", null, null, true);
1046                                    allMemberName = (String)_parser.getAttribute("allMemberName", "String", null, null, false);
1047                                    allMemberCaption = (String)_parser.getAttribute("allMemberCaption", "String", null, null, false);
1048                                    allLevelName = (String)_parser.getAttribute("allLevelName", "String", null, null, false);
1049                                    primaryKey = (String)_parser.getAttribute("primaryKey", "String", null, null, false);
1050                                    primaryKeyTable = (String)_parser.getAttribute("primaryKeyTable", "String", null, null, false);
1051                                    defaultMember = (String)_parser.getAttribute("defaultMember", "String", null, null, false);
1052                                    memberReaderClass = (String)_parser.getAttribute("memberReaderClass", "String", null, null, false);
1053                                    caption = (String)_parser.getAttribute("caption", "String", null, null, false);
1054                                    relation = (RelationOrJoin)_parser.getElement(RelationOrJoin.class, false);
1055                                    _tempArray = _parser.getArray(Level.class, 0, 0);
1056                                    levels = new Level[_tempArray.length];
1057                                    for(int _i=0; _i<levels.length; _i++)
1058                                            levels[_i] = (Level)_tempArray[_i];
1059                                    _tempArray = _parser.getArray(MemberReaderParameter.class, 0, 0);
1060                                    memberReaderParameters = new MemberReaderParameter[_tempArray.length];
1061                                    for(int _i=0; _i<memberReaderParameters.length; _i++)
1062                                            memberReaderParameters[_i] = (MemberReaderParameter)_tempArray[_i];
1063                            } catch(org.eigenbase.xom.XOMException _ex) {
1064                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
1065                            }
1066                    }
1067    
1068                    public String name;  // optional attribute
1069                    public Boolean hasAll;  // required attribute
1070                    public String allMemberName;  // optional attribute
1071                    public String allMemberCaption;  // optional attribute
1072                    public String allLevelName;  // optional attribute
1073                    public String primaryKey;  // optional attribute
1074                    public String primaryKeyTable;  // optional attribute
1075                    public String defaultMember;  // optional attribute
1076                    public String memberReaderClass;  // optional attribute
1077                    public String caption;  // optional attribute
1078    
1079                    /**
1080                     * The {@link MondrianDef.Table table},
1081                     * {@link MondrianDef.Join set of tables},
1082                     * {@link MondrianDef.View SQL statement}, or
1083                     * {@link MondrianDef.InlineTable inline table}
1084                     * which populates this hierarchy.
1085                     */
1086                    public RelationOrJoin relation;  //optional element
1087                    /**
1088                     */
1089                    public Level[] levels;  //optional array
1090                    public MemberReaderParameter[] memberReaderParameters;  //optional array
1091    
1092                    public String getName()
1093                    {
1094                            return "Hierarchy";
1095                    }
1096    
1097                    public void display(java.io.PrintWriter _out, int _indent)
1098                    {
1099                            _out.println(getName());
1100                            displayAttribute(_out, "name", name, _indent+1);
1101                            displayAttribute(_out, "hasAll", hasAll, _indent+1);
1102                            displayAttribute(_out, "allMemberName", allMemberName, _indent+1);
1103                            displayAttribute(_out, "allMemberCaption", allMemberCaption, _indent+1);
1104                            displayAttribute(_out, "allLevelName", allLevelName, _indent+1);
1105                            displayAttribute(_out, "primaryKey", primaryKey, _indent+1);
1106                            displayAttribute(_out, "primaryKeyTable", primaryKeyTable, _indent+1);
1107                            displayAttribute(_out, "defaultMember", defaultMember, _indent+1);
1108                            displayAttribute(_out, "memberReaderClass", memberReaderClass, _indent+1);
1109                            displayAttribute(_out, "caption", caption, _indent+1);
1110                            displayElement(_out, "relation", relation, _indent+1);
1111                            displayElementArray(_out, "levels", levels, _indent+1);
1112                            displayElementArray(_out, "memberReaderParameters", memberReaderParameters, _indent+1);
1113                    }
1114                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
1115                    {
1116                            _out.beginTag("Hierarchy", new org.eigenbase.xom.XMLAttrVector()
1117                                    .add("name", name)
1118                                    .add("hasAll", hasAll)
1119                                    .add("allMemberName", allMemberName)
1120                                    .add("allMemberCaption", allMemberCaption)
1121                                    .add("allLevelName", allLevelName)
1122                                    .add("primaryKey", primaryKey)
1123                                    .add("primaryKeyTable", primaryKeyTable)
1124                                    .add("defaultMember", defaultMember)
1125                                    .add("memberReaderClass", memberReaderClass)
1126                                    .add("caption", caption)
1127                                    );
1128                            displayXMLElement(_out, relation);
1129                            displayXMLElementArray(_out, levels);
1130                            displayXMLElementArray(_out, memberReaderParameters);
1131                            _out.endTag("Hierarchy");
1132                    }
1133                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
1134                    {
1135                            boolean _diff = true;
1136                            Hierarchy _cother = (Hierarchy)_other;
1137                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
1138                            _diff = _diff && displayAttributeDiff("hasAll", hasAll, _cother.hasAll, _out, _indent+1);
1139                            _diff = _diff && displayAttributeDiff("allMemberName", allMemberName, _cother.allMemberName, _out, _indent+1);
1140                            _diff = _diff && displayAttributeDiff("allMemberCaption", allMemberCaption, _cother.allMemberCaption, _out, _indent+1);
1141                            _diff = _diff && displayAttributeDiff("allLevelName", allLevelName, _cother.allLevelName, _out, _indent+1);
1142                            _diff = _diff && displayAttributeDiff("primaryKey", primaryKey, _cother.primaryKey, _out, _indent+1);
1143                            _diff = _diff && displayAttributeDiff("primaryKeyTable", primaryKeyTable, _cother.primaryKeyTable, _out, _indent+1);
1144                            _diff = _diff && displayAttributeDiff("defaultMember", defaultMember, _cother.defaultMember, _out, _indent+1);
1145                            _diff = _diff && displayAttributeDiff("memberReaderClass", memberReaderClass, _cother.memberReaderClass, _out, _indent+1);
1146                            _diff = _diff && displayAttributeDiff("caption", caption, _cother.caption, _out, _indent+1);
1147                            _diff = _diff && displayElementDiff("relation", relation, _cother.relation, _out, _indent+1);
1148                            _diff = _diff && displayElementArrayDiff("levels", levels, _cother.levels, _out, _indent+1);
1149                            _diff = _diff && displayElementArrayDiff("memberReaderParameters", memberReaderParameters, _cother.memberReaderParameters, _out, _indent+1);
1150                            return _diff;
1151                    }
1152            }
1153    
1154            public static class Level extends org.eigenbase.xom.ElementDef
1155            {
1156                    public Level()
1157                    {
1158                    }
1159    
1160                    public Level(org.eigenbase.xom.DOMWrapper _def)
1161                            throws org.eigenbase.xom.XOMException
1162                    {
1163                            try {
1164                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
1165                                    _parser = _parser;
1166                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
1167                                    _tempArray = _tempArray;
1168                                    approxRowCount = (String)_parser.getAttribute("approxRowCount", "String", null, null, false);
1169                                    name = (String)_parser.getAttribute("name", "String", null, null, false);
1170                                    table = (String)_parser.getAttribute("table", "String", null, null, false);
1171                                    column = (String)_parser.getAttribute("column", "String", null, null, false);
1172                                    nameColumn = (String)_parser.getAttribute("nameColumn", "String", null, null, false);
1173                                    ordinalColumn = (String)_parser.getAttribute("ordinalColumn", "String", null, null, false);
1174                                    parentColumn = (String)_parser.getAttribute("parentColumn", "String", null, null, false);
1175                                    nullParentValue = (String)_parser.getAttribute("nullParentValue", "String", null, null, false);
1176                                    type = (String)_parser.getAttribute("type", "String", "String", _type_values, false);
1177                                    uniqueMembers = (Boolean)_parser.getAttribute("uniqueMembers", "Boolean", "false", null, false);
1178                                    levelType = (String)_parser.getAttribute("levelType", "String", "Regular", _levelType_values, false);
1179                                    hideMemberIf = (String)_parser.getAttribute("hideMemberIf", "String", "Never", _hideMemberIf_values, false);
1180                                    formatter = (String)_parser.getAttribute("formatter", "String", null, null, false);
1181                                    caption = (String)_parser.getAttribute("caption", "String", null, null, false);
1182                                    captionColumn = (String)_parser.getAttribute("captionColumn", "String", null, null, false);
1183                                    keyExp = (KeyExpression)_parser.getElement(KeyExpression.class, false);
1184                                    nameExp = (NameExpression)_parser.getElement(NameExpression.class, false);
1185                                    ordinalExp = (OrdinalExpression)_parser.getElement(OrdinalExpression.class, false);
1186                                    parentExp = (ParentExpression)_parser.getElement(ParentExpression.class, false);
1187                                    closure = (Closure)_parser.getElement(Closure.class, false);
1188                                    _tempArray = _parser.getArray(Property.class, 0, 0);
1189                                    properties = new Property[_tempArray.length];
1190                                    for(int _i=0; _i<properties.length; _i++)
1191                                            properties[_i] = (Property)_tempArray[_i];
1192                            } catch(org.eigenbase.xom.XOMException _ex) {
1193                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
1194                            }
1195                    }
1196    
1197                    public String approxRowCount;  // optional attribute
1198                    public String name;  // optional attribute
1199                    public String table;  // optional attribute
1200                    public String column;  // optional attribute
1201                    public String nameColumn;  // optional attribute
1202                    public String ordinalColumn;  // optional attribute
1203                    public String parentColumn;  // optional attribute
1204                    public String nullParentValue;  // optional attribute
1205                    /** Allowable values for {@link #type}. */
1206                    public static final String[] _type_values = {"String", "Numeric", "Integer", "Boolean", "Date", "Time", "Timestamp"};
1207                    public String type;  // attribute default: String
1208                    public Boolean uniqueMembers;  // attribute default: false
1209                    /** Allowable values for {@link #levelType}. */
1210                    public static final String[] _levelType_values = {"Regular", "TimeYears", "TimeQuarters", "TimeMonths", "TimeWeeks", "TimeDays"};
1211                    public String levelType;  // attribute default: Regular
1212                    /** Allowable values for {@link #hideMemberIf}. */
1213                    public static final String[] _hideMemberIf_values = {"Never", "IfBlankName", "IfParentsName"};
1214                    public String hideMemberIf;  // attribute default: Never
1215                    public String formatter;  // optional attribute
1216                    public String caption;  // optional attribute
1217                    public String captionColumn;  // optional attribute
1218    
1219                    /**
1220                     * The SQL expression used to populate this level's key.
1221                     */
1222                    public KeyExpression keyExp;  //optional element
1223                    /**
1224                     * The SQL expression used to populate this level's name. If not
1225                     * specified, the level's key is used.
1226                     */
1227                    public NameExpression nameExp;  //optional element
1228                    /**
1229                     * The SQL expression used to populate this level's ordinal.
1230                     */
1231                    public OrdinalExpression ordinalExp;  //optional element
1232                    /**
1233                     * The SQL expression used to join to the parent member in a
1234                     * parent-child hierarchy.
1235                     */
1236                    public ParentExpression parentExp;  //optional element
1237                    public Closure closure;  //optional element
1238                    public Property[] properties;  //optional array
1239    
1240                    public String getName()
1241                    {
1242                            return "Level";
1243                    }
1244    
1245                    public void display(java.io.PrintWriter _out, int _indent)
1246                    {
1247                            _out.println(getName());
1248                            displayAttribute(_out, "approxRowCount", approxRowCount, _indent+1);
1249                            displayAttribute(_out, "name", name, _indent+1);
1250                            displayAttribute(_out, "table", table, _indent+1);
1251                            displayAttribute(_out, "column", column, _indent+1);
1252                            displayAttribute(_out, "nameColumn", nameColumn, _indent+1);
1253                            displayAttribute(_out, "ordinalColumn", ordinalColumn, _indent+1);
1254                            displayAttribute(_out, "parentColumn", parentColumn, _indent+1);
1255                            displayAttribute(_out, "nullParentValue", nullParentValue, _indent+1);
1256                            displayAttribute(_out, "type", type, _indent+1);
1257                            displayAttribute(_out, "uniqueMembers", uniqueMembers, _indent+1);
1258                            displayAttribute(_out, "levelType", levelType, _indent+1);
1259                            displayAttribute(_out, "hideMemberIf", hideMemberIf, _indent+1);
1260                            displayAttribute(_out, "formatter", formatter, _indent+1);
1261                            displayAttribute(_out, "caption", caption, _indent+1);
1262                            displayAttribute(_out, "captionColumn", captionColumn, _indent+1);
1263                            displayElement(_out, "keyExp", keyExp, _indent+1);
1264                            displayElement(_out, "nameExp", nameExp, _indent+1);
1265                            displayElement(_out, "ordinalExp", ordinalExp, _indent+1);
1266                            displayElement(_out, "parentExp", parentExp, _indent+1);
1267                            displayElement(_out, "closure", closure, _indent+1);
1268                            displayElementArray(_out, "properties", properties, _indent+1);
1269                    }
1270                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
1271                    {
1272                            _out.beginTag("Level", new org.eigenbase.xom.XMLAttrVector()
1273                                    .add("approxRowCount", approxRowCount)
1274                                    .add("name", name)
1275                                    .add("table", table)
1276                                    .add("column", column)
1277                                    .add("nameColumn", nameColumn)
1278                                    .add("ordinalColumn", ordinalColumn)
1279                                    .add("parentColumn", parentColumn)
1280                                    .add("nullParentValue", nullParentValue)
1281                                    .add("type", type)
1282                                    .add("uniqueMembers", uniqueMembers)
1283                                    .add("levelType", levelType)
1284                                    .add("hideMemberIf", hideMemberIf)
1285                                    .add("formatter", formatter)
1286                                    .add("caption", caption)
1287                                    .add("captionColumn", captionColumn)
1288                                    );
1289                            displayXMLElement(_out, keyExp);
1290                            displayXMLElement(_out, nameExp);
1291                            displayXMLElement(_out, ordinalExp);
1292                            displayXMLElement(_out, parentExp);
1293                            displayXMLElement(_out, closure);
1294                            displayXMLElementArray(_out, properties);
1295                            _out.endTag("Level");
1296                    }
1297                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
1298                    {
1299                            boolean _diff = true;
1300                            Level _cother = (Level)_other;
1301                            _diff = _diff && displayAttributeDiff("approxRowCount", approxRowCount, _cother.approxRowCount, _out, _indent+1);
1302                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
1303                            _diff = _diff && displayAttributeDiff("table", table, _cother.table, _out, _indent+1);
1304                            _diff = _diff && displayAttributeDiff("column", column, _cother.column, _out, _indent+1);
1305                            _diff = _diff && displayAttributeDiff("nameColumn", nameColumn, _cother.nameColumn, _out, _indent+1);
1306                            _diff = _diff && displayAttributeDiff("ordinalColumn", ordinalColumn, _cother.ordinalColumn, _out, _indent+1);
1307                            _diff = _diff && displayAttributeDiff("parentColumn", parentColumn, _cother.parentColumn, _out, _indent+1);
1308                            _diff = _diff && displayAttributeDiff("nullParentValue", nullParentValue, _cother.nullParentValue, _out, _indent+1);
1309                            _diff = _diff && displayAttributeDiff("type", type, _cother.type, _out, _indent+1);
1310                            _diff = _diff && displayAttributeDiff("uniqueMembers", uniqueMembers, _cother.uniqueMembers, _out, _indent+1);
1311                            _diff = _diff && displayAttributeDiff("levelType", levelType, _cother.levelType, _out, _indent+1);
1312                            _diff = _diff && displayAttributeDiff("hideMemberIf", hideMemberIf, _cother.hideMemberIf, _out, _indent+1);
1313                            _diff = _diff && displayAttributeDiff("formatter", formatter, _cother.formatter, _out, _indent+1);
1314                            _diff = _diff && displayAttributeDiff("caption", caption, _cother.caption, _out, _indent+1);
1315                            _diff = _diff && displayAttributeDiff("captionColumn", captionColumn, _cother.captionColumn, _out, _indent+1);
1316                            _diff = _diff && displayElementDiff("keyExp", keyExp, _cother.keyExp, _out, _indent+1);
1317                            _diff = _diff && displayElementDiff("nameExp", nameExp, _cother.nameExp, _out, _indent+1);
1318                            _diff = _diff && displayElementDiff("ordinalExp", ordinalExp, _cother.ordinalExp, _out, _indent+1);
1319                            _diff = _diff && displayElementDiff("parentExp", parentExp, _cother.parentExp, _out, _indent+1);
1320                            _diff = _diff && displayElementDiff("closure", closure, _cother.closure, _out, _indent+1);
1321                            _diff = _diff && displayElementArrayDiff("properties", properties, _cother.properties, _out, _indent+1);
1322                            return _diff;
1323                    }
1324                    // BEGIN pass-through code block ---
1325    public Expression getKeyExp() {
1326                    if (keyExp != null) {
1327                        return keyExp;
1328                    } else if (column != null) {
1329                        return new Column(table, column);
1330                    } else {
1331                        return null;
1332                    }
1333                }
1334    
1335                public Expression getNameExp() {
1336                    if (nameExp != null) {
1337                        return nameExp;
1338                    } else if (nameColumn != null) {
1339                        return new Column(table, nameColumn);
1340                    } else {
1341                        return null;
1342                    }
1343                }
1344    
1345                public Expression getCaptionExp() {
1346                    if (captionColumn != null) {
1347                        return new Column(table, captionColumn);
1348                    } else {
1349                        return null;
1350                    }
1351                }
1352    
1353                public Expression getOrdinalExp() {
1354                    if (ordinalExp != null) {
1355                        return ordinalExp;
1356                    } else if (ordinalColumn != null) {
1357                        return new Column(table, ordinalColumn);
1358                    } else {
1359                        return null;
1360                    }
1361                }
1362    
1363                public Expression getParentExp() {
1364                    if (parentExp != null) {
1365                        return parentExp;
1366                    } else if (parentColumn != null) {
1367                        return new Column(table, parentColumn);
1368                    } else {
1369                        return null;
1370                    }
1371                }
1372    
1373                public Expression getPropertyExp(int i) {
1374                    return new Column(table, properties[i].column);
1375                }
1376    
1377                public SqlQuery.Datatype getDatatype() {
1378                    return SqlQuery.Datatype.valueOf(type);
1379                }
1380                    // END pass-through code block ---
1381            }
1382    
1383            /**
1384             * Specifies the transitive closure of a parent-child hierarchy.
1385             * Optional, but recommended for better performance.
1386             * The closure is provided as a set of (parent/child) pairs:
1387             * since it is the transitive closure these are actually (ancestor/descendant) pairs.
1388             */
1389            public static class Closure extends org.eigenbase.xom.ElementDef
1390            {
1391                    public Closure()
1392                    {
1393                    }
1394    
1395                    public Closure(org.eigenbase.xom.DOMWrapper _def)
1396                            throws org.eigenbase.xom.XOMException
1397                    {
1398                            try {
1399                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
1400                                    _parser = _parser;
1401                                    parentColumn = (String)_parser.getAttribute("parentColumn", "String", null, null, true);
1402                                    childColumn = (String)_parser.getAttribute("childColumn", "String", null, null, true);
1403                                    table = (Table)_parser.getElement(Table.class, true);
1404                            } catch(org.eigenbase.xom.XOMException _ex) {
1405                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
1406                            }
1407                    }
1408    
1409                    public String parentColumn;  // required attribute
1410                    public String childColumn;  // required attribute
1411    
1412                    public Table table;  //required element
1413    
1414                    public String getName()
1415                    {
1416                            return "Closure";
1417                    }
1418    
1419                    public void display(java.io.PrintWriter _out, int _indent)
1420                    {
1421                            _out.println(getName());
1422                            displayAttribute(_out, "parentColumn", parentColumn, _indent+1);
1423                            displayAttribute(_out, "childColumn", childColumn, _indent+1);
1424                            displayElement(_out, "table", table, _indent+1);
1425                    }
1426                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
1427                    {
1428                            _out.beginTag("Closure", new org.eigenbase.xom.XMLAttrVector()
1429                                    .add("parentColumn", parentColumn)
1430                                    .add("childColumn", childColumn)
1431                                    );
1432                            displayXMLElement(_out, table);
1433                            _out.endTag("Closure");
1434                    }
1435                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
1436                    {
1437                            boolean _diff = true;
1438                            Closure _cother = (Closure)_other;
1439                            _diff = _diff && displayAttributeDiff("parentColumn", parentColumn, _cother.parentColumn, _out, _indent+1);
1440                            _diff = _diff && displayAttributeDiff("childColumn", childColumn, _cother.childColumn, _out, _indent+1);
1441                            _diff = _diff && displayElementDiff("table", table, _cother.table, _out, _indent+1);
1442                            return _diff;
1443                    }
1444            }
1445    
1446            /**
1447             * Member property.
1448             */
1449            public static class Property extends org.eigenbase.xom.ElementDef
1450            {
1451                    public Property()
1452                    {
1453                    }
1454    
1455                    public Property(org.eigenbase.xom.DOMWrapper _def)
1456                            throws org.eigenbase.xom.XOMException
1457                    {
1458                            try {
1459                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
1460                                    _parser = _parser;
1461                                    name = (String)_parser.getAttribute("name", "String", null, null, false);
1462                                    column = (String)_parser.getAttribute("column", "String", null, null, false);
1463                                    type = (String)_parser.getAttribute("type", "String", "String", _type_values, false);
1464                                    formatter = (String)_parser.getAttribute("formatter", "String", null, null, false);
1465                                    caption = (String)_parser.getAttribute("caption", "String", null, null, false);
1466                            } catch(org.eigenbase.xom.XOMException _ex) {
1467                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
1468                            }
1469                    }
1470    
1471                    public String name;  // optional attribute
1472                    public String column;  // optional attribute
1473                    /** Allowable values for {@link #type}. */
1474                    public static final String[] _type_values = {"String", "Numeric", "Integer", "Boolean", "Date", "Time", "Timestamp"};
1475                    public String type;  // attribute default: String
1476                    public String formatter;  // optional attribute
1477                    public String caption;  // optional attribute
1478    
1479    
1480                    public String getName()
1481                    {
1482                            return "Property";
1483                    }
1484    
1485                    public void display(java.io.PrintWriter _out, int _indent)
1486                    {
1487                            _out.println(getName());
1488                            displayAttribute(_out, "name", name, _indent+1);
1489                            displayAttribute(_out, "column", column, _indent+1);
1490                            displayAttribute(_out, "type", type, _indent+1);
1491                            displayAttribute(_out, "formatter", formatter, _indent+1);
1492                            displayAttribute(_out, "caption", caption, _indent+1);
1493                    }
1494                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
1495                    {
1496                            _out.beginTag("Property", new org.eigenbase.xom.XMLAttrVector()
1497                                    .add("name", name)
1498                                    .add("column", column)
1499                                    .add("type", type)
1500                                    .add("formatter", formatter)
1501                                    .add("caption", caption)
1502                                    );
1503                            _out.endTag("Property");
1504                    }
1505                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
1506                    {
1507                            boolean _diff = true;
1508                            Property _cother = (Property)_other;
1509                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
1510                            _diff = _diff && displayAttributeDiff("column", column, _cother.column, _out, _indent+1);
1511                            _diff = _diff && displayAttributeDiff("type", type, _cother.type, _out, _indent+1);
1512                            _diff = _diff && displayAttributeDiff("formatter", formatter, _cother.formatter, _out, _indent+1);
1513                            _diff = _diff && displayAttributeDiff("caption", caption, _cother.caption, _out, _indent+1);
1514                            return _diff;
1515                    }
1516            }
1517    
1518            public static class Measure extends org.eigenbase.xom.ElementDef
1519            {
1520                    public Measure()
1521                    {
1522                    }
1523    
1524                    public Measure(org.eigenbase.xom.DOMWrapper _def)
1525                            throws org.eigenbase.xom.XOMException
1526                    {
1527                            try {
1528                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
1529                                    _parser = _parser;
1530                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
1531                                    _tempArray = _tempArray;
1532                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
1533                                    column = (String)_parser.getAttribute("column", "String", null, null, false);
1534                                    datatype = (String)_parser.getAttribute("datatype", "String", null, _datatype_values, false);
1535                                    formatString = (String)_parser.getAttribute("formatString", "String", null, null, false);
1536                                    aggregator = (String)_parser.getAttribute("aggregator", "String", null, null, true);
1537                                    formatter = (String)_parser.getAttribute("formatter", "String", null, null, false);
1538                                    caption = (String)_parser.getAttribute("caption", "String", null, null, false);
1539                                    visible = (Boolean)_parser.getAttribute("visible", "Boolean", null, null, false);
1540                                    measureExp = (MeasureExpression)_parser.getElement(MeasureExpression.class, false);
1541                                    _tempArray = _parser.getArray(CalculatedMemberProperty.class, 0, 0);
1542                                    memberProperties = new CalculatedMemberProperty[_tempArray.length];
1543                                    for(int _i=0; _i<memberProperties.length; _i++)
1544                                            memberProperties[_i] = (CalculatedMemberProperty)_tempArray[_i];
1545                            } catch(org.eigenbase.xom.XOMException _ex) {
1546                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
1547                            }
1548                    }
1549    
1550                    public String name;  // required attribute
1551                    public String column;  // optional attribute
1552                    /** Allowable values for {@link #datatype}. */
1553                    public static final String[] _datatype_values = {"String", "Numeric", "Integer", "Boolean", "Date", "Time", "Timestamp"};
1554                    public String datatype;  // optional attribute
1555                    public String formatString;  // optional attribute
1556                    public String aggregator;  // required attribute
1557                    public String formatter;  // optional attribute
1558                    public String caption;  // optional attribute
1559                    public Boolean visible;  // optional attribute
1560    
1561                    /**
1562                     * The SQL expression used to calculate a measure.
1563                     * Must be specified if a source column is not specified.
1564                     */
1565                    public MeasureExpression measureExp;  //optional element
1566                    public CalculatedMemberProperty[] memberProperties;  //optional array
1567    
1568                    public String getName()
1569                    {
1570                            return "Measure";
1571                    }
1572    
1573                    public void display(java.io.PrintWriter _out, int _indent)
1574                    {
1575                            _out.println(getName());
1576                            displayAttribute(_out, "name", name, _indent+1);
1577                            displayAttribute(_out, "column", column, _indent+1);
1578                            displayAttribute(_out, "datatype", datatype, _indent+1);
1579                            displayAttribute(_out, "formatString", formatString, _indent+1);
1580                            displayAttribute(_out, "aggregator", aggregator, _indent+1);
1581                            displayAttribute(_out, "formatter", formatter, _indent+1);
1582                            displayAttribute(_out, "caption", caption, _indent+1);
1583                            displayAttribute(_out, "visible", visible, _indent+1);
1584                            displayElement(_out, "measureExp", measureExp, _indent+1);
1585                            displayElementArray(_out, "memberProperties", memberProperties, _indent+1);
1586                    }
1587                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
1588                    {
1589                            _out.beginTag("Measure", new org.eigenbase.xom.XMLAttrVector()
1590                                    .add("name", name)
1591                                    .add("column", column)
1592                                    .add("datatype", datatype)
1593                                    .add("formatString", formatString)
1594                                    .add("aggregator", aggregator)
1595                                    .add("formatter", formatter)
1596                                    .add("caption", caption)
1597                                    .add("visible", visible)
1598                                    );
1599                            displayXMLElement(_out, measureExp);
1600                            displayXMLElementArray(_out, memberProperties);
1601                            _out.endTag("Measure");
1602                    }
1603                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
1604                    {
1605                            boolean _diff = true;
1606                            Measure _cother = (Measure)_other;
1607                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
1608                            _diff = _diff && displayAttributeDiff("column", column, _cother.column, _out, _indent+1);
1609                            _diff = _diff && displayAttributeDiff("datatype", datatype, _cother.datatype, _out, _indent+1);
1610                            _diff = _diff && displayAttributeDiff("formatString", formatString, _cother.formatString, _out, _indent+1);
1611                            _diff = _diff && displayAttributeDiff("aggregator", aggregator, _cother.aggregator, _out, _indent+1);
1612                            _diff = _diff && displayAttributeDiff("formatter", formatter, _cother.formatter, _out, _indent+1);
1613                            _diff = _diff && displayAttributeDiff("caption", caption, _cother.caption, _out, _indent+1);
1614                            _diff = _diff && displayAttributeDiff("visible", visible, _cother.visible, _out, _indent+1);
1615                            _diff = _diff && displayElementDiff("measureExp", measureExp, _cother.measureExp, _out, _indent+1);
1616                            _diff = _diff && displayElementArrayDiff("memberProperties", memberProperties, _cother.memberProperties, _out, _indent+1);
1617                            return _diff;
1618                    }
1619            }
1620    
1621            public static class CalculatedMember extends org.eigenbase.xom.ElementDef
1622            {
1623                    public CalculatedMember()
1624                    {
1625                    }
1626    
1627                    public CalculatedMember(org.eigenbase.xom.DOMWrapper _def)
1628                            throws org.eigenbase.xom.XOMException
1629                    {
1630                            try {
1631                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
1632                                    _parser = _parser;
1633                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
1634                                    _tempArray = _tempArray;
1635                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
1636                                    formatString = (String)_parser.getAttribute("formatString", "String", null, null, false);
1637                                    caption = (String)_parser.getAttribute("caption", "String", null, null, false);
1638                                    formula = (String)_parser.getAttribute("formula", "String", null, null, false);
1639                                    dimension = (String)_parser.getAttribute("dimension", "String", null, null, true);
1640                                    visible = (Boolean)_parser.getAttribute("visible", "Boolean", null, null, false);
1641                                    formulaElement = (Formula)_parser.getElement(Formula.class, false);
1642                                    _tempArray = _parser.getArray(CalculatedMemberProperty.class, 0, 0);
1643                                    memberProperties = new CalculatedMemberProperty[_tempArray.length];
1644                                    for(int _i=0; _i<memberProperties.length; _i++)
1645                                            memberProperties[_i] = (CalculatedMemberProperty)_tempArray[_i];
1646                            } catch(org.eigenbase.xom.XOMException _ex) {
1647                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
1648                            }
1649                    }
1650    
1651                    public String name;  // required attribute
1652                    public String formatString;  // optional attribute
1653                    public String caption;  // optional attribute
1654                    public String formula;  // optional attribute
1655                    public String dimension;  // required attribute
1656                    public Boolean visible;  // optional attribute
1657    
1658                    /**
1659                     * MDX expression which gives the value of this member.
1660                     */
1661                    public Formula formulaElement;  //optional element
1662                    public CalculatedMemberProperty[] memberProperties;  //optional array
1663    
1664                    public String getName()
1665                    {
1666                            return "CalculatedMember";
1667                    }
1668    
1669                    public void display(java.io.PrintWriter _out, int _indent)
1670                    {
1671                            _out.println(getName());
1672                            displayAttribute(_out, "name", name, _indent+1);
1673                            displayAttribute(_out, "formatString", formatString, _indent+1);
1674                            displayAttribute(_out, "caption", caption, _indent+1);
1675                            displayAttribute(_out, "formula", formula, _indent+1);
1676                            displayAttribute(_out, "dimension", dimension, _indent+1);
1677                            displayAttribute(_out, "visible", visible, _indent+1);
1678                            displayElement(_out, "formulaElement", formulaElement, _indent+1);
1679                            displayElementArray(_out, "memberProperties", memberProperties, _indent+1);
1680                    }
1681                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
1682                    {
1683                            _out.beginTag("CalculatedMember", new org.eigenbase.xom.XMLAttrVector()
1684                                    .add("name", name)
1685                                    .add("formatString", formatString)
1686                                    .add("caption", caption)
1687                                    .add("formula", formula)
1688                                    .add("dimension", dimension)
1689                                    .add("visible", visible)
1690                                    );
1691                            displayXMLElement(_out, formulaElement);
1692                            displayXMLElementArray(_out, memberProperties);
1693                            _out.endTag("CalculatedMember");
1694                    }
1695                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
1696                    {
1697                            boolean _diff = true;
1698                            CalculatedMember _cother = (CalculatedMember)_other;
1699                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
1700                            _diff = _diff && displayAttributeDiff("formatString", formatString, _cother.formatString, _out, _indent+1);
1701                            _diff = _diff && displayAttributeDiff("caption", caption, _cother.caption, _out, _indent+1);
1702                            _diff = _diff && displayAttributeDiff("formula", formula, _cother.formula, _out, _indent+1);
1703                            _diff = _diff && displayAttributeDiff("dimension", dimension, _cother.dimension, _out, _indent+1);
1704                            _diff = _diff && displayAttributeDiff("visible", visible, _cother.visible, _out, _indent+1);
1705                            _diff = _diff && displayElementDiff("formulaElement", formulaElement, _cother.formulaElement, _out, _indent+1);
1706                            _diff = _diff && displayElementArrayDiff("memberProperties", memberProperties, _cother.memberProperties, _out, _indent+1);
1707                            return _diff;
1708                    }
1709                    // BEGIN pass-through code block ---
1710    /**
1711                  * Returns the formula, looking for a sub-element called
1712                  * "Formula" first, then looking for an attribute called
1713                  * "formula".
1714                  */
1715                public String getFormula() {
1716                    if (formulaElement != null) {
1717                        return formulaElement.cdata;
1718                    } else {
1719                        return formula;
1720                    }
1721                }
1722                    // END pass-through code block ---
1723            }
1724    
1725            /**
1726             * Property of a calculated member defined against a cube.
1727             * It must have either an expression or a value.
1728             */
1729            public static class CalculatedMemberProperty extends org.eigenbase.xom.ElementDef
1730            {
1731                    public CalculatedMemberProperty()
1732                    {
1733                    }
1734    
1735                    public CalculatedMemberProperty(org.eigenbase.xom.DOMWrapper _def)
1736                            throws org.eigenbase.xom.XOMException
1737                    {
1738                            try {
1739                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
1740                                    _parser = _parser;
1741                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
1742                                    caption = (String)_parser.getAttribute("caption", "String", null, null, false);
1743                                    expression = (String)_parser.getAttribute("expression", "String", null, null, false);
1744                                    value = (String)_parser.getAttribute("value", "String", null, null, false);
1745                            } catch(org.eigenbase.xom.XOMException _ex) {
1746                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
1747                            }
1748                    }
1749    
1750                    public String name;  // required attribute
1751                    public String caption;  // optional attribute
1752                    public String expression;  // optional attribute
1753                    public String value;  // optional attribute
1754    
1755    
1756                    public String getName()
1757                    {
1758                            return "CalculatedMemberProperty";
1759                    }
1760    
1761                    public void display(java.io.PrintWriter _out, int _indent)
1762                    {
1763                            _out.println(getName());
1764                            displayAttribute(_out, "name", name, _indent+1);
1765                            displayAttribute(_out, "caption", caption, _indent+1);
1766                            displayAttribute(_out, "expression", expression, _indent+1);
1767                            displayAttribute(_out, "value", value, _indent+1);
1768                    }
1769                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
1770                    {
1771                            _out.beginTag("CalculatedMemberProperty", new org.eigenbase.xom.XMLAttrVector()
1772                                    .add("name", name)
1773                                    .add("caption", caption)
1774                                    .add("expression", expression)
1775                                    .add("value", value)
1776                                    );
1777                            _out.endTag("CalculatedMemberProperty");
1778                    }
1779                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
1780                    {
1781                            boolean _diff = true;
1782                            CalculatedMemberProperty _cother = (CalculatedMemberProperty)_other;
1783                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
1784                            _diff = _diff && displayAttributeDiff("caption", caption, _cother.caption, _out, _indent+1);
1785                            _diff = _diff && displayAttributeDiff("expression", expression, _cother.expression, _out, _indent+1);
1786                            _diff = _diff && displayAttributeDiff("value", value, _cother.value, _out, _indent+1);
1787                            return _diff;
1788                    }
1789            }
1790    
1791            /**
1792             * <p>Defines a named set which can be used in queries in the
1793             * same way as a set defined using a WITH SET clause.</p>
1794             * <p>A named set can be defined against a particular cube,
1795             * or can be global to a schema. If it is defined against a
1796             * cube, it is only available to queries which use that cube.</p>
1797             * <p>A named set defined against a cube is not inherited by
1798             * a virtual cubes defined against that cube. (But you can
1799             * define a named set against a virtual cube.)</p>
1800             * <p>A named set defined against a schema is available in
1801             * all cubes and virtual cubes in that schema. However, it is
1802             * only valid if the cube contains dimensions with the names
1803             * required to make the formula valid.</p>
1804             */
1805            public static class NamedSet extends org.eigenbase.xom.ElementDef
1806            {
1807                    public NamedSet()
1808                    {
1809                    }
1810    
1811                    public NamedSet(org.eigenbase.xom.DOMWrapper _def)
1812                            throws org.eigenbase.xom.XOMException
1813                    {
1814                            try {
1815                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
1816                                    _parser = _parser;
1817                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
1818                                    formula = (String)_parser.getAttribute("formula", "String", null, null, false);
1819                                    formulaElement = (Formula)_parser.getElement(Formula.class, false);
1820                            } catch(org.eigenbase.xom.XOMException _ex) {
1821                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
1822                            }
1823                    }
1824    
1825                    public String name;  // required attribute
1826                    public String formula;  // optional attribute
1827    
1828                    /**
1829                     * MDX expression which gives the value of this set.
1830                     */
1831                    public Formula formulaElement;  //optional element
1832    
1833                    public String getName()
1834                    {
1835                            return "NamedSet";
1836                    }
1837    
1838                    public void display(java.io.PrintWriter _out, int _indent)
1839                    {
1840                            _out.println(getName());
1841                            displayAttribute(_out, "name", name, _indent+1);
1842                            displayAttribute(_out, "formula", formula, _indent+1);
1843                            displayElement(_out, "formulaElement", formulaElement, _indent+1);
1844                    }
1845                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
1846                    {
1847                            _out.beginTag("NamedSet", new org.eigenbase.xom.XMLAttrVector()
1848                                    .add("name", name)
1849                                    .add("formula", formula)
1850                                    );
1851                            displayXMLElement(_out, formulaElement);
1852                            _out.endTag("NamedSet");
1853                    }
1854                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
1855                    {
1856                            boolean _diff = true;
1857                            NamedSet _cother = (NamedSet)_other;
1858                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
1859                            _diff = _diff && displayAttributeDiff("formula", formula, _cother.formula, _out, _indent+1);
1860                            _diff = _diff && displayElementDiff("formulaElement", formulaElement, _cother.formulaElement, _out, _indent+1);
1861                            return _diff;
1862                    }
1863                    // BEGIN pass-through code block ---
1864    /**
1865                  * Returns the formula, looking for a sub-element called
1866                  * "Formula" first, then looking for an attribute called
1867                  * "formula".
1868                  */
1869                public String getFormula() {
1870                    if (formulaElement != null) {
1871                        return formulaElement.cdata;
1872                    } else {
1873                        return formula;
1874                    }
1875                }
1876                    // END pass-through code block ---
1877            }
1878    
1879            public static class Formula extends org.eigenbase.xom.ElementDef
1880            {
1881                    public Formula()
1882                    {
1883                    }
1884    
1885                    public Formula(org.eigenbase.xom.DOMWrapper _def)
1886                            throws org.eigenbase.xom.XOMException
1887                    {
1888                            try {
1889                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
1890                                    _parser = _parser;
1891                                    cdata = _parser.getText();
1892                            } catch(org.eigenbase.xom.XOMException _ex) {
1893                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
1894                            }
1895                    }
1896    
1897    
1898                    public String cdata;  // All text goes here
1899                    public String getName()
1900                    {
1901                            return "Formula";
1902                    }
1903    
1904                    public void display(java.io.PrintWriter _out, int _indent)
1905                    {
1906                            _out.println(getName());
1907                            displayString(_out, "cdata", cdata, _indent+1);
1908                    }
1909                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
1910                    {
1911                            _out.beginTag("Formula", new org.eigenbase.xom.XMLAttrVector()
1912                                    );
1913                            _out.cdata(cdata);
1914                            _out.endTag("Formula");
1915                    }
1916                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
1917                    {
1918                            boolean _diff = true;
1919                            Formula _cother = (Formula)_other;
1920                            _diff = _diff && displayStringDiff("cdata", cdata, _cother.cdata, _out, _indent+1);
1921                            return _diff;
1922                    }
1923            }
1924    
1925            /**
1926             * Not used
1927             */
1928            public static class MemberReaderParameter extends org.eigenbase.xom.ElementDef
1929            {
1930                    public MemberReaderParameter()
1931                    {
1932                    }
1933    
1934                    public MemberReaderParameter(org.eigenbase.xom.DOMWrapper _def)
1935                            throws org.eigenbase.xom.XOMException
1936                    {
1937                            try {
1938                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
1939                                    _parser = _parser;
1940                                    name = (String)_parser.getAttribute("name", "String", null, null, false);
1941                                    value = (String)_parser.getAttribute("value", "String", null, null, false);
1942                            } catch(org.eigenbase.xom.XOMException _ex) {
1943                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
1944                            }
1945                    }
1946    
1947                    public String name;  // optional attribute
1948                    public String value;  // optional attribute
1949    
1950    
1951                    public String getName()
1952                    {
1953                            return "MemberReaderParameter";
1954                    }
1955    
1956                    public void display(java.io.PrintWriter _out, int _indent)
1957                    {
1958                            _out.println(getName());
1959                            displayAttribute(_out, "name", name, _indent+1);
1960                            displayAttribute(_out, "value", value, _indent+1);
1961                    }
1962                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
1963                    {
1964                            _out.beginTag("MemberReaderParameter", new org.eigenbase.xom.XMLAttrVector()
1965                                    .add("name", name)
1966                                    .add("value", value)
1967                                    );
1968                            _out.endTag("MemberReaderParameter");
1969                    }
1970                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
1971                    {
1972                            boolean _diff = true;
1973                            MemberReaderParameter _cother = (MemberReaderParameter)_other;
1974                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
1975                            _diff = _diff && displayAttributeDiff("value", value, _cother.value, _out, _indent+1);
1976                            return _diff;
1977                    }
1978            }
1979    
1980            /**
1981             * A table or a join
1982             */
1983            public static abstract class RelationOrJoin extends org.eigenbase.xom.ElementDef
1984            {
1985                    public RelationOrJoin()
1986                    {
1987                    }
1988    
1989                    public RelationOrJoin(org.eigenbase.xom.DOMWrapper _def)
1990                            throws org.eigenbase.xom.XOMException
1991                    {
1992                    }
1993    
1994    
1995    
1996                    public String getName()
1997                    {
1998                            return "RelationOrJoin";
1999                    }
2000    
2001                    public void display(java.io.PrintWriter _out, int _indent)
2002                    {
2003                    }
2004                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
2005                    {
2006                            _out.beginTag("(%RelationOrJoin;)", new org.eigenbase.xom.XMLAttrVector()
2007                                    );
2008                            _out.endTag("(%RelationOrJoin;)");
2009                    }
2010                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
2011                    {
2012                            boolean _diff = true;
2013                            return _diff;
2014                    }
2015                    // BEGIN pass-through code block ---
2016    public abstract Relation find(String seekAlias);
2017                public boolean equals(Object o) {
2018                    return this == o;
2019                }
2020                public int hashCode() {
2021                    return System.identityHashCode(this);
2022                }
2023                    // END pass-through code block ---
2024            }
2025    
2026            /**
2027             * A table, inline table or view
2028             */
2029            public static abstract class Relation extends RelationOrJoin
2030            {
2031                    public Relation()
2032                    {
2033                    }
2034    
2035                    public Relation(org.eigenbase.xom.DOMWrapper _def)
2036                            throws org.eigenbase.xom.XOMException
2037                    {
2038                    }
2039    
2040    
2041    
2042                    public String getName()
2043                    {
2044                            return "Relation";
2045                    }
2046    
2047                    public void display(java.io.PrintWriter _out, int _indent)
2048                    {
2049                    }
2050                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
2051                    {
2052                            _out.beginTag("(%Relation;)", new org.eigenbase.xom.XMLAttrVector()
2053                                    );
2054                            _out.endTag("(%Relation;)");
2055                    }
2056                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
2057                    {
2058                            boolean _diff = true;
2059                            return _diff;
2060                    }
2061                    // BEGIN pass-through code block ---
2062    public abstract String getAlias();
2063                    // END pass-through code block ---
2064            }
2065    
2066            /**
2067             * A collection of SQL statements, one per dialect.
2068             */
2069            public static class View extends Relation
2070            {
2071                    public View()
2072                    {
2073                    }
2074    
2075                    public View(org.eigenbase.xom.DOMWrapper _def)
2076                            throws org.eigenbase.xom.XOMException
2077                    {
2078                            try {
2079                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
2080                                    _parser = _parser;
2081                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
2082                                    _tempArray = _tempArray;
2083                                    alias = (String)_parser.getAttribute("alias", "String", null, null, true);
2084                                    _tempArray = _parser.getArray(SQL.class, 1, 0);
2085                                    selects = new SQL[_tempArray.length];
2086                                    for(int _i=0; _i<selects.length; _i++)
2087                                            selects[_i] = (SQL)_tempArray[_i];
2088                            } catch(org.eigenbase.xom.XOMException _ex) {
2089                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
2090                            }
2091                    }
2092    
2093                    public String alias;  // required attribute
2094    
2095                    public SQL[] selects;  //min 1
2096    
2097                    public String getName()
2098                    {
2099                            return "View";
2100                    }
2101    
2102                    public void display(java.io.PrintWriter _out, int _indent)
2103                    {
2104                            _out.println(getName());
2105                            displayAttribute(_out, "alias", alias, _indent+1);
2106                            displayElementArray(_out, "selects", selects, _indent+1);
2107                    }
2108                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
2109                    {
2110                            _out.beginTag("View", new org.eigenbase.xom.XMLAttrVector()
2111                                    .add("alias", alias)
2112                                    );
2113                            displayXMLElementArray(_out, selects);
2114                            _out.endTag("View");
2115                    }
2116                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
2117                    {
2118                            boolean _diff = true;
2119                            View _cother = (View)_other;
2120                            _diff = _diff && displayAttributeDiff("alias", alias, _cother.alias, _out, _indent+1);
2121                            _diff = _diff && displayElementArrayDiff("selects", selects, _cother.selects, _out, _indent+1);
2122                            return _diff;
2123                    }
2124                    // BEGIN pass-through code block ---
2125    /**
2126                 * Copy constructor.
2127                 */
2128                public View(View view) {
2129                    this.alias = view.alias;
2130                    this.selects = view.selects.clone();
2131                }
2132                public String toString() {
2133                    return selects[0].cdata;
2134                }
2135    
2136                public View find(String seekAlias) {
2137                    if (seekAlias.equals(alias)) {
2138                        return this;
2139                    } else {
2140                        return null;
2141                    }
2142                }
2143    
2144                public String getAlias() {
2145                    return alias;
2146                }
2147    
2148                public SqlQuery.CodeSet getCodeSet() {
2149                    return SQL.toCodeSet(selects);
2150                }
2151    
2152                public void addCode(String dialect, String code) {
2153                    if (selects == null) {
2154                        selects = new SQL[1];
2155                    } else {
2156                        SQL[] olds = selects;
2157                        selects = new SQL[olds.length + 1];
2158                        System.arraycopy(olds, 0, selects, 0, olds.length);
2159                    }
2160                    SQL sql = new SQL();
2161                    sql.dialect = dialect;
2162                    sql.cdata = code;
2163                    selects[selects.length - 1] = sql;
2164                }
2165                    // END pass-through code block ---
2166            }
2167    
2168            public static class SQL extends org.eigenbase.xom.ElementDef
2169            {
2170                    public SQL()
2171                    {
2172                    }
2173    
2174                    public SQL(org.eigenbase.xom.DOMWrapper _def)
2175                            throws org.eigenbase.xom.XOMException
2176                    {
2177                            try {
2178                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
2179                                    _parser = _parser;
2180                                    dialect = (String)_parser.getAttribute("dialect", "String", "generic", _dialect_values, false);
2181                                    cdata = _parser.getText();
2182                            } catch(org.eigenbase.xom.XOMException _ex) {
2183                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
2184                            }
2185                    }
2186    
2187                    /** Allowable values for {@link #dialect}. */
2188                    public static final String[] _dialect_values = {"generic", "access", "db2", "derby", "firebird", "hsqldb", "mssql", "mysql", "oracle", "postgres", "sybase", "teradata", "ingres", "luciddb"};
2189                    public String dialect;  // attribute default: generic
2190    
2191                    public String cdata;  // All text goes here
2192                    public String getName()
2193                    {
2194                            return "SQL";
2195                    }
2196    
2197                    public void display(java.io.PrintWriter _out, int _indent)
2198                    {
2199                            _out.println(getName());
2200                            displayAttribute(_out, "dialect", dialect, _indent+1);
2201                            displayString(_out, "cdata", cdata, _indent+1);
2202                    }
2203                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
2204                    {
2205                            _out.beginTag("SQL", new org.eigenbase.xom.XMLAttrVector()
2206                                    .add("dialect", dialect)
2207                                    );
2208                            _out.cdata(cdata);
2209                            _out.endTag("SQL");
2210                    }
2211                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
2212                    {
2213                            boolean _diff = true;
2214                            SQL _cother = (SQL)_other;
2215                            _diff = _diff && displayAttributeDiff("dialect", dialect, _cother.dialect, _out, _indent+1);
2216                            _diff = _diff && displayStringDiff("cdata", cdata, _cother.cdata, _out, _indent+1);
2217                            return _diff;
2218                    }
2219                    // BEGIN pass-through code block ---
2220    public int hashCode() {
2221                    return dialect.hashCode();
2222                }
2223    
2224                public boolean equals(Object obj) {
2225                    if (!(obj instanceof SQL)) {
2226                        return false;
2227                    }
2228                    SQL that = (SQL) obj;
2229                    return this.dialect.equals(that.dialect) &&
2230                            Util.equals(this.cdata, that.cdata);
2231                }
2232    
2233                /**
2234                 * Converts an array of SQL to a
2235                 * {@link mondrian.rolap.sql.SqlQuery.CodeSet} object.
2236                 */
2237                public static SqlQuery.CodeSet toCodeSet(SQL[] sqls) {
2238                    SqlQuery.CodeSet codeSet = new SqlQuery.CodeSet();
2239                    for (SQL sql : sqls) {
2240                        codeSet.put(sql.dialect, sql.cdata);
2241                    }
2242                    return codeSet;
2243                }
2244                    // END pass-through code block ---
2245            }
2246    
2247            public static class Join extends RelationOrJoin
2248            {
2249                    public Join()
2250                    {
2251                    }
2252    
2253                    public Join(org.eigenbase.xom.DOMWrapper _def)
2254                            throws org.eigenbase.xom.XOMException
2255                    {
2256                            try {
2257                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
2258                                    _parser = _parser;
2259                                    leftAlias = (String)_parser.getAttribute("leftAlias", "String", null, null, false);
2260                                    leftKey = (String)_parser.getAttribute("leftKey", "String", null, null, true);
2261                                    rightAlias = (String)_parser.getAttribute("rightAlias", "String", null, null, false);
2262                                    rightKey = (String)_parser.getAttribute("rightKey", "String", null, null, true);
2263                                    left = (RelationOrJoin)_parser.getElement(RelationOrJoin.class, true);
2264                                    right = (RelationOrJoin)_parser.getElement(RelationOrJoin.class, true);
2265                            } catch(org.eigenbase.xom.XOMException _ex) {
2266                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
2267                            }
2268                    }
2269    
2270                    public String leftAlias;  // optional attribute
2271                    public String leftKey;  // required attribute
2272                    public String rightAlias;  // optional attribute
2273                    public String rightKey;  // required attribute
2274    
2275                    public RelationOrJoin left;  //required element
2276                    public RelationOrJoin right;  //required element
2277    
2278                    public String getName()
2279                    {
2280                            return "Join";
2281                    }
2282    
2283                    public void display(java.io.PrintWriter _out, int _indent)
2284                    {
2285                            _out.println(getName());
2286                            displayAttribute(_out, "leftAlias", leftAlias, _indent+1);
2287                            displayAttribute(_out, "leftKey", leftKey, _indent+1);
2288                            displayAttribute(_out, "rightAlias", rightAlias, _indent+1);
2289                            displayAttribute(_out, "rightKey", rightKey, _indent+1);
2290                            displayElement(_out, "left", left, _indent+1);
2291                            displayElement(_out, "right", right, _indent+1);
2292                    }
2293                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
2294                    {
2295                            _out.beginTag("Join", new org.eigenbase.xom.XMLAttrVector()
2296                                    .add("leftAlias", leftAlias)
2297                                    .add("leftKey", leftKey)
2298                                    .add("rightAlias", rightAlias)
2299                                    .add("rightKey", rightKey)
2300                                    );
2301                            displayXMLElement(_out, left);
2302                            displayXMLElement(_out, right);
2303                            _out.endTag("Join");
2304                    }
2305                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
2306                    {
2307                            boolean _diff = true;
2308                            Join _cother = (Join)_other;
2309                            _diff = _diff && displayAttributeDiff("leftAlias", leftAlias, _cother.leftAlias, _out, _indent+1);
2310                            _diff = _diff && displayAttributeDiff("leftKey", leftKey, _cother.leftKey, _out, _indent+1);
2311                            _diff = _diff && displayAttributeDiff("rightAlias", rightAlias, _cother.rightAlias, _out, _indent+1);
2312                            _diff = _diff && displayAttributeDiff("rightKey", rightKey, _cother.rightKey, _out, _indent+1);
2313                            _diff = _diff && displayElementDiff("left", left, _cother.left, _out, _indent+1);
2314                            _diff = _diff && displayElementDiff("right", right, _cother.right, _out, _indent+1);
2315                            return _diff;
2316                    }
2317                    // BEGIN pass-through code block ---
2318    /** Convenience constructor. */
2319                public Join(
2320                    String leftAlias,
2321                    String leftKey,
2322                    RelationOrJoin left,
2323                    String rightAlias, 
2324                    String rightKey,
2325                    RelationOrJoin right)
2326                {
2327                    this.leftAlias = leftAlias;
2328                    this.leftKey = leftKey;
2329                    this.left = left;
2330                    this.rightAlias = rightAlias;
2331                    this.rightKey = rightKey;
2332                    this.right = right;
2333                }
2334                /**
2335                  * Returns the alias of the left join key, defaulting to left's
2336                  * alias if left is a table.
2337                  */
2338                public String getLeftAlias() {
2339                    if (leftAlias != null) {
2340                        return leftAlias;
2341                    }
2342                    if (left instanceof Relation) {
2343                        return ((Relation) left).getAlias();
2344                    }
2345                    throw Util.newInternal(
2346                        "alias is required because " + left + " is not a table");
2347                }
2348                /**
2349                  * Returns the alias of the right join key, defaulting to right's
2350                  * alias if right is a table.
2351                  */
2352                public String getRightAlias() {
2353                    if (rightAlias != null) {
2354                        return rightAlias;
2355                    }
2356                    if (right instanceof Relation) {
2357                        return ((Relation) right).getAlias();
2358                    }
2359                    if (right instanceof Join) {
2360                        return ((Join) right).getLeftAlias();
2361                    }
2362                    throw Util.newInternal(
2363                        "alias is required because " + right + " is not a table");
2364                }
2365                public String toString() {
2366                    return "(" + left + ") join (" + right + ") on " +
2367                        leftAlias + "." + leftKey + " = " +
2368                        rightAlias + "." + rightKey;
2369                }
2370                public Relation find(String seekAlias) {
2371                    Relation relation = left.find(seekAlias);
2372                    if (relation == null) {
2373                        relation = right.find(seekAlias);
2374                    }
2375                    return relation;
2376                }
2377                    // END pass-through code block ---
2378            }
2379    
2380            public static class Table extends Relation
2381            {
2382                    public Table()
2383                    {
2384                    }
2385    
2386                    public Table(org.eigenbase.xom.DOMWrapper _def)
2387                            throws org.eigenbase.xom.XOMException
2388                    {
2389                            try {
2390                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
2391                                    _parser = _parser;
2392                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
2393                                    _tempArray = _tempArray;
2394                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
2395                                    schema = (String)_parser.getAttribute("schema", "String", null, null, false);
2396                                    alias = (String)_parser.getAttribute("alias", "String", null, null, false);
2397                                    filter = (SQL)_parser.getElement(SQL.class, false);
2398                                    _tempArray = _parser.getArray(AggExclude.class, 0, 0);
2399                                    aggExcludes = new AggExclude[_tempArray.length];
2400                                    for(int _i=0; _i<aggExcludes.length; _i++)
2401                                            aggExcludes[_i] = (AggExclude)_tempArray[_i];
2402                                    _tempArray = _parser.getArray(AggTable.class, 0, 0);
2403                                    aggTables = new AggTable[_tempArray.length];
2404                                    for(int _i=0; _i<aggTables.length; _i++)
2405                                            aggTables[_i] = (AggTable)_tempArray[_i];
2406                            } catch(org.eigenbase.xom.XOMException _ex) {
2407                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
2408                            }
2409                    }
2410    
2411                    public String name;  // required attribute
2412                    public String schema;  // optional attribute
2413                    public String alias;  // optional attribute
2414    
2415                    /**
2416                     * The SQL WHERE clause expression to be appended to any select statement
2417                     */
2418                    public SQL filter;  //optional element
2419                    public AggExclude[] aggExcludes;  //optional array
2420                    public AggTable[] aggTables;  //optional array
2421    
2422                    public String getName()
2423                    {
2424                            return "Table";
2425                    }
2426    
2427                    public void display(java.io.PrintWriter _out, int _indent)
2428                    {
2429                            _out.println(getName());
2430                            displayAttribute(_out, "name", name, _indent+1);
2431                            displayAttribute(_out, "schema", schema, _indent+1);
2432                            displayAttribute(_out, "alias", alias, _indent+1);
2433                            displayElement(_out, "filter", filter, _indent+1);
2434                            displayElementArray(_out, "aggExcludes", aggExcludes, _indent+1);
2435                            displayElementArray(_out, "aggTables", aggTables, _indent+1);
2436                    }
2437                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
2438                    {
2439                            _out.beginTag("Table", new org.eigenbase.xom.XMLAttrVector()
2440                                    .add("name", name)
2441                                    .add("schema", schema)
2442                                    .add("alias", alias)
2443                                    );
2444                            displayXMLElement(_out, filter);
2445                            displayXMLElementArray(_out, aggExcludes);
2446                            displayXMLElementArray(_out, aggTables);
2447                            _out.endTag("Table");
2448                    }
2449                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
2450                    {
2451                            boolean _diff = true;
2452                            Table _cother = (Table)_other;
2453                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
2454                            _diff = _diff && displayAttributeDiff("schema", schema, _cother.schema, _out, _indent+1);
2455                            _diff = _diff && displayAttributeDiff("alias", alias, _cother.alias, _out, _indent+1);
2456                            _diff = _diff && displayElementDiff("filter", filter, _cother.filter, _out, _indent+1);
2457                            _diff = _diff && displayElementArrayDiff("aggExcludes", aggExcludes, _cother.aggExcludes, _out, _indent+1);
2458                            _diff = _diff && displayElementArrayDiff("aggTables", aggTables, _cother.aggTables, _out, _indent+1);
2459                            return _diff;
2460                    }
2461                    // BEGIN pass-through code block ---
2462    /** Convenience constructor. */
2463                public Table(Table table) {
2464                    this(table.schema, table.name, table.alias);
2465                }
2466                public Table(String schema, String name, String alias) {
2467                    this();
2468                    this.schema = schema;
2469                    this.name = name;
2470                    this.alias = alias;
2471                }
2472                /** Returns the alias or, if it is null, the table name. */
2473                public String getAlias() {
2474                    return (alias != null) ? alias : name;
2475                }
2476                public String toString() {
2477                    return (schema == null) ?
2478                        name :
2479                        schema + "." + name;
2480                }
2481                public Table find(String seekAlias) {
2482                    return seekAlias.equals(name) ? this :
2483                        (alias != null) && seekAlias.equals(alias) ? this :
2484                        null;
2485                }
2486                public boolean equals(Object o) {
2487                    if (o instanceof Table) {
2488                        Table that = (Table) o;
2489                        return this.name.equals(that.name) &&
2490                            Util.equals(this.alias, that.alias) &&
2491                            Util.equals(this.schema, that.schema);
2492                    } else {
2493                        return false;
2494                    }
2495                }
2496                public int hashCode() {
2497                    return toString().hashCode();
2498                }
2499                public String getFilter() {
2500                    return (filter == null) ? null : filter.cdata;
2501                }
2502                public AggExclude[] getAggExcludes() {
2503                    return aggExcludes;
2504                }
2505                public AggTable[] getAggTables() {
2506                    return aggTables;
2507                }
2508                    // END pass-through code block ---
2509            }
2510    
2511            public static class InlineTable extends Relation
2512            {
2513                    public InlineTable()
2514                    {
2515                    }
2516    
2517                    public InlineTable(org.eigenbase.xom.DOMWrapper _def)
2518                            throws org.eigenbase.xom.XOMException
2519                    {
2520                            try {
2521                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
2522                                    _parser = _parser;
2523                                    alias = (String)_parser.getAttribute("alias", "String", null, null, false);
2524                                    columnDefs = (ColumnDefs)_parser.getElement(ColumnDefs.class, true);
2525                                    rows = (Rows)_parser.getElement(Rows.class, true);
2526                            } catch(org.eigenbase.xom.XOMException _ex) {
2527                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
2528                            }
2529                    }
2530    
2531                    public String alias;  // optional attribute
2532    
2533                    public ColumnDefs columnDefs;  //required element
2534                    public Rows rows;  //required element
2535    
2536                    public String getName()
2537                    {
2538                            return "InlineTable";
2539                    }
2540    
2541                    public void display(java.io.PrintWriter _out, int _indent)
2542                    {
2543                            _out.println(getName());
2544                            displayAttribute(_out, "alias", alias, _indent+1);
2545                            displayElement(_out, "columnDefs", columnDefs, _indent+1);
2546                            displayElement(_out, "rows", rows, _indent+1);
2547                    }
2548                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
2549                    {
2550                            _out.beginTag("InlineTable", new org.eigenbase.xom.XMLAttrVector()
2551                                    .add("alias", alias)
2552                                    );
2553                            displayXMLElement(_out, columnDefs);
2554                            displayXMLElement(_out, rows);
2555                            _out.endTag("InlineTable");
2556                    }
2557                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
2558                    {
2559                            boolean _diff = true;
2560                            InlineTable _cother = (InlineTable)_other;
2561                            _diff = _diff && displayAttributeDiff("alias", alias, _cother.alias, _out, _indent+1);
2562                            _diff = _diff && displayElementDiff("columnDefs", columnDefs, _cother.columnDefs, _out, _indent+1);
2563                            _diff = _diff && displayElementDiff("rows", rows, _cother.rows, _out, _indent+1);
2564                            return _diff;
2565                    }
2566                    // BEGIN pass-through code block ---
2567    /** Convenience constructor. */
2568                public InlineTable(InlineTable inlineTable) {
2569                    this.alias = inlineTable.alias;
2570                    this.columnDefs = new ColumnDefs();
2571                    this.columnDefs.array = inlineTable.columnDefs.array.clone();
2572                    this.rows = new Rows();
2573                    this.rows.array = inlineTable.rows.array.clone();
2574                }
2575                public String getAlias() {
2576                    return alias;
2577                }
2578                public String toString() {
2579                    return "<inline data>";
2580                }
2581                public InlineTable find(String seekAlias) {
2582                    return seekAlias.equals(this.alias) ? this : null;
2583                }
2584                public boolean equals(Object o) {
2585                    if (o instanceof InlineTable) {
2586                        InlineTable that = (InlineTable) o;
2587                        return this.alias.equals(that.alias);
2588                    } else {
2589                        return false;
2590                    }
2591                }
2592                public int hashCode() {
2593                    return toString().hashCode();
2594                }
2595                    // END pass-through code block ---
2596            }
2597    
2598            /**
2599             * Holder for an array of ColumnDef elements
2600             */
2601            public static class ColumnDefs extends org.eigenbase.xom.ElementDef
2602            {
2603                    public ColumnDefs()
2604                    {
2605                    }
2606    
2607                    public ColumnDefs(org.eigenbase.xom.DOMWrapper _def)
2608                            throws org.eigenbase.xom.XOMException
2609                    {
2610                            try {
2611                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
2612                                    _parser = _parser;
2613                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
2614                                    _tempArray = _tempArray;
2615                                    _tempArray = _parser.getArray(ColumnDef.class, 0, 0);
2616                                    array = new ColumnDef[_tempArray.length];
2617                                    for(int _i=0; _i<array.length; _i++)
2618                                            array[_i] = (ColumnDef)_tempArray[_i];
2619                            } catch(org.eigenbase.xom.XOMException _ex) {
2620                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
2621                            }
2622                    }
2623    
2624    
2625                    public ColumnDef[] array;  //optional array
2626    
2627                    public String getName()
2628                    {
2629                            return "ColumnDefs";
2630                    }
2631    
2632                    public void display(java.io.PrintWriter _out, int _indent)
2633                    {
2634                            _out.println(getName());
2635                            displayElementArray(_out, "array", array, _indent+1);
2636                    }
2637                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
2638                    {
2639                            _out.beginTag("ColumnDefs", new org.eigenbase.xom.XMLAttrVector()
2640                                    );
2641                            displayXMLElementArray(_out, array);
2642                            _out.endTag("ColumnDefs");
2643                    }
2644                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
2645                    {
2646                            boolean _diff = true;
2647                            ColumnDefs _cother = (ColumnDefs)_other;
2648                            _diff = _diff && displayElementArrayDiff("array", array, _cother.array, _out, _indent+1);
2649                            return _diff;
2650                    }
2651            }
2652    
2653            /**
2654             * Column definition for an inline table.
2655             */
2656            public static class ColumnDef extends org.eigenbase.xom.ElementDef
2657            {
2658                    public ColumnDef()
2659                    {
2660                    }
2661    
2662                    public ColumnDef(org.eigenbase.xom.DOMWrapper _def)
2663                            throws org.eigenbase.xom.XOMException
2664                    {
2665                            try {
2666                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
2667                                    _parser = _parser;
2668                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
2669                                    type = (String)_parser.getAttribute("type", "String", null, _type_values, true);
2670                            } catch(org.eigenbase.xom.XOMException _ex) {
2671                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
2672                            }
2673                    }
2674    
2675                    public String name;  // required attribute
2676                    /** Allowable values for {@link #type}. */
2677                    public static final String[] _type_values = {"String", "Numeric", "Integer", "Boolean", "Date", "Time", "Timestamp"};
2678                    public String type;  // required attribute
2679    
2680    
2681                    public String getName()
2682                    {
2683                            return "ColumnDef";
2684                    }
2685    
2686                    public void display(java.io.PrintWriter _out, int _indent)
2687                    {
2688                            _out.println(getName());
2689                            displayAttribute(_out, "name", name, _indent+1);
2690                            displayAttribute(_out, "type", type, _indent+1);
2691                    }
2692                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
2693                    {
2694                            _out.beginTag("ColumnDef", new org.eigenbase.xom.XMLAttrVector()
2695                                    .add("name", name)
2696                                    .add("type", type)
2697                                    );
2698                            _out.endTag("ColumnDef");
2699                    }
2700                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
2701                    {
2702                            boolean _diff = true;
2703                            ColumnDef _cother = (ColumnDef)_other;
2704                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
2705                            _diff = _diff && displayAttributeDiff("type", type, _cother.type, _out, _indent+1);
2706                            return _diff;
2707                    }
2708            }
2709    
2710            /**
2711             * Holder for an array of Row elements
2712             */
2713            public static class Rows extends org.eigenbase.xom.ElementDef
2714            {
2715                    public Rows()
2716                    {
2717                    }
2718    
2719                    public Rows(org.eigenbase.xom.DOMWrapper _def)
2720                            throws org.eigenbase.xom.XOMException
2721                    {
2722                            try {
2723                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
2724                                    _parser = _parser;
2725                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
2726                                    _tempArray = _tempArray;
2727                                    _tempArray = _parser.getArray(Row.class, 0, 0);
2728                                    array = new Row[_tempArray.length];
2729                                    for(int _i=0; _i<array.length; _i++)
2730                                            array[_i] = (Row)_tempArray[_i];
2731                            } catch(org.eigenbase.xom.XOMException _ex) {
2732                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
2733                            }
2734                    }
2735    
2736    
2737                    public Row[] array;  //optional array
2738    
2739                    public String getName()
2740                    {
2741                            return "Rows";
2742                    }
2743    
2744                    public void display(java.io.PrintWriter _out, int _indent)
2745                    {
2746                            _out.println(getName());
2747                            displayElementArray(_out, "array", array, _indent+1);
2748                    }
2749                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
2750                    {
2751                            _out.beginTag("Rows", new org.eigenbase.xom.XMLAttrVector()
2752                                    );
2753                            displayXMLElementArray(_out, array);
2754                            _out.endTag("Rows");
2755                    }
2756                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
2757                    {
2758                            boolean _diff = true;
2759                            Rows _cother = (Rows)_other;
2760                            _diff = _diff && displayElementArrayDiff("array", array, _cother.array, _out, _indent+1);
2761                            return _diff;
2762                    }
2763            }
2764    
2765            /**
2766             * Row definition for an inline table.
2767             * Must have one Column for each ColumnDef in the InlineTable.
2768             */
2769            public static class Row extends org.eigenbase.xom.ElementDef
2770            {
2771                    public Row()
2772                    {
2773                    }
2774    
2775                    public Row(org.eigenbase.xom.DOMWrapper _def)
2776                            throws org.eigenbase.xom.XOMException
2777                    {
2778                            try {
2779                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
2780                                    _parser = _parser;
2781                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
2782                                    _tempArray = _tempArray;
2783                                    _tempArray = _parser.getArray(Value.class, 0, 0);
2784                                    values = new Value[_tempArray.length];
2785                                    for(int _i=0; _i<values.length; _i++)
2786                                            values[_i] = (Value)_tempArray[_i];
2787                            } catch(org.eigenbase.xom.XOMException _ex) {
2788                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
2789                            }
2790                    }
2791    
2792    
2793                    public Value[] values;  //optional array
2794    
2795                    public String getName()
2796                    {
2797                            return "Row";
2798                    }
2799    
2800                    public void display(java.io.PrintWriter _out, int _indent)
2801                    {
2802                            _out.println(getName());
2803                            displayElementArray(_out, "values", values, _indent+1);
2804                    }
2805                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
2806                    {
2807                            _out.beginTag("Row", new org.eigenbase.xom.XMLAttrVector()
2808                                    );
2809                            displayXMLElementArray(_out, values);
2810                            _out.endTag("Row");
2811                    }
2812                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
2813                    {
2814                            boolean _diff = true;
2815                            Row _cother = (Row)_other;
2816                            _diff = _diff && displayElementArrayDiff("values", values, _cother.values, _out, _indent+1);
2817                            return _diff;
2818                    }
2819            }
2820    
2821            /**
2822             * Column value for an inline table.
2823             * The CDATA holds the value of the column.
2824             */
2825            public static class Value extends org.eigenbase.xom.ElementDef
2826            {
2827                    public Value()
2828                    {
2829                    }
2830    
2831                    public Value(org.eigenbase.xom.DOMWrapper _def)
2832                            throws org.eigenbase.xom.XOMException
2833                    {
2834                            try {
2835                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
2836                                    _parser = _parser;
2837                                    column = (String)_parser.getAttribute("column", "String", null, null, true);
2838                                    cdata = _parser.getText();
2839                            } catch(org.eigenbase.xom.XOMException _ex) {
2840                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
2841                            }
2842                    }
2843    
2844                    public String column;  // required attribute
2845    
2846                    public String cdata;  // All text goes here
2847                    public String getName()
2848                    {
2849                            return "Value";
2850                    }
2851    
2852                    public void display(java.io.PrintWriter _out, int _indent)
2853                    {
2854                            _out.println(getName());
2855                            displayAttribute(_out, "column", column, _indent+1);
2856                            displayString(_out, "cdata", cdata, _indent+1);
2857                    }
2858                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
2859                    {
2860                            _out.beginTag("Value", new org.eigenbase.xom.XMLAttrVector()
2861                                    .add("column", column)
2862                                    );
2863                            _out.cdata(cdata);
2864                            _out.endTag("Value");
2865                    }
2866                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
2867                    {
2868                            boolean _diff = true;
2869                            Value _cother = (Value)_other;
2870                            _diff = _diff && displayAttributeDiff("column", column, _cother.column, _out, _indent+1);
2871                            _diff = _diff && displayStringDiff("cdata", cdata, _cother.cdata, _out, _indent+1);
2872                            return _diff;
2873                    }
2874            }
2875    
2876            /**
2877             * A definition of an aggregate table for a base fact table.
2878             * This aggregate table must be in the same schema as the
2879             * base fact table.
2880             */
2881            public static abstract class AggTable extends org.eigenbase.xom.ElementDef
2882            {
2883                    public AggTable()
2884                    {
2885                    }
2886    
2887                    public AggTable(org.eigenbase.xom.DOMWrapper _def)
2888                            throws org.eigenbase.xom.XOMException
2889                    {
2890                            try {
2891                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
2892                                    _parser = _parser;
2893                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
2894                                    _tempArray = _tempArray;
2895                                    ignorecase = (Boolean)_parser.getAttribute("ignorecase", "Boolean", "true", null, false);
2896                                    factcount = (AggFactCount)_parser.getElement(AggFactCount.class, true);
2897                                    _tempArray = _parser.getArray(AggIgnoreColumn.class, 0, 0);
2898                                    ignoreColumns = new AggIgnoreColumn[_tempArray.length];
2899                                    for(int _i=0; _i<ignoreColumns.length; _i++)
2900                                            ignoreColumns[_i] = (AggIgnoreColumn)_tempArray[_i];
2901                                    _tempArray = _parser.getArray(AggForeignKey.class, 0, 0);
2902                                    foreignKeys = new AggForeignKey[_tempArray.length];
2903                                    for(int _i=0; _i<foreignKeys.length; _i++)
2904                                            foreignKeys[_i] = (AggForeignKey)_tempArray[_i];
2905                                    _tempArray = _parser.getArray(AggMeasure.class, 0, 0);
2906                                    measures = new AggMeasure[_tempArray.length];
2907                                    for(int _i=0; _i<measures.length; _i++)
2908                                            measures[_i] = (AggMeasure)_tempArray[_i];
2909                                    _tempArray = _parser.getArray(AggLevel.class, 0, 0);
2910                                    levels = new AggLevel[_tempArray.length];
2911                                    for(int _i=0; _i<levels.length; _i++)
2912                                            levels[_i] = (AggLevel)_tempArray[_i];
2913                            } catch(org.eigenbase.xom.XOMException _ex) {
2914                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
2915                            }
2916                    }
2917    
2918                    public Boolean ignorecase;  // attribute default: true
2919    
2920                    /**
2921                     * What does the fact_count column look like.
2922                     */
2923                    public AggFactCount factcount;  //required element
2924                    public AggIgnoreColumn[] ignoreColumns;  //optional array
2925                    public AggForeignKey[] foreignKeys;  //optional array
2926                    public AggMeasure[] measures;  //optional array
2927                    public AggLevel[] levels;  //optional array
2928    
2929                    public String getName()
2930                    {
2931                            return "AggTable";
2932                    }
2933    
2934                    public void display(java.io.PrintWriter _out, int _indent)
2935                    {
2936                            _out.println(getName());
2937                            displayAttribute(_out, "ignorecase", ignorecase, _indent+1);
2938                            displayElement(_out, "factcount", factcount, _indent+1);
2939                            displayElementArray(_out, "ignoreColumns", ignoreColumns, _indent+1);
2940                            displayElementArray(_out, "foreignKeys", foreignKeys, _indent+1);
2941                            displayElementArray(_out, "measures", measures, _indent+1);
2942                            displayElementArray(_out, "levels", levels, _indent+1);
2943                    }
2944                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
2945                    {
2946                            _out.beginTag("(%AggTable;)", new org.eigenbase.xom.XMLAttrVector()
2947                                    .add("ignorecase", ignorecase)
2948                                    );
2949                            displayXMLElement(_out, factcount);
2950                            displayXMLElementArray(_out, ignoreColumns);
2951                            displayXMLElementArray(_out, foreignKeys);
2952                            displayXMLElementArray(_out, measures);
2953                            displayXMLElementArray(_out, levels);
2954                            _out.endTag("(%AggTable;)");
2955                    }
2956                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
2957                    {
2958                            boolean _diff = true;
2959                            AggTable _cother = (AggTable)_other;
2960                            _diff = _diff && displayAttributeDiff("ignorecase", ignorecase, _cother.ignorecase, _out, _indent+1);
2961                            _diff = _diff && displayElementDiff("factcount", factcount, _cother.factcount, _out, _indent+1);
2962                            _diff = _diff && displayElementArrayDiff("ignoreColumns", ignoreColumns, _cother.ignoreColumns, _out, _indent+1);
2963                            _diff = _diff && displayElementArrayDiff("foreignKeys", foreignKeys, _cother.foreignKeys, _out, _indent+1);
2964                            _diff = _diff && displayElementArrayDiff("measures", measures, _cother.measures, _out, _indent+1);
2965                            _diff = _diff && displayElementArrayDiff("levels", levels, _cother.levels, _out, _indent+1);
2966                            return _diff;
2967                    }
2968                    // BEGIN pass-through code block ---
2969    public boolean isIgnoreCase() {
2970                    return ignorecase.booleanValue();
2971                }
2972                public AggFactCount getAggFactCount() {
2973                    return factcount;
2974                }
2975                public AggIgnoreColumn[] getAggIgnoreColumns() {
2976                    return ignoreColumns;
2977                }
2978                public AggForeignKey[] getAggForeignKeys() {
2979                    return foreignKeys;
2980                }
2981                public AggMeasure[] getAggMeasures() {
2982                    return measures;
2983                }
2984                public AggLevel[] getAggLevels() {
2985                    return levels;
2986                }
2987                    // END pass-through code block ---
2988            }
2989    
2990            public static class AggName extends AggTable
2991            {
2992                    public AggName()
2993                    {
2994                    }
2995    
2996                    public AggName(org.eigenbase.xom.DOMWrapper _def)
2997                            throws org.eigenbase.xom.XOMException
2998                    {
2999                            try {
3000                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3001                                    _parser = _parser;
3002                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
3003                                    _tempArray = _tempArray;
3004                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
3005                                    ignorecase = (Boolean)_parser.getAttribute("ignorecase", "Boolean", "true", null, false);
3006                                    factcount = (AggFactCount)_parser.getElement(AggFactCount.class, true);
3007                                    _tempArray = _parser.getArray(AggIgnoreColumn.class, 0, 0);
3008                                    ignoreColumns = new AggIgnoreColumn[_tempArray.length];
3009                                    for(int _i=0; _i<ignoreColumns.length; _i++)
3010                                            ignoreColumns[_i] = (AggIgnoreColumn)_tempArray[_i];
3011                                    _tempArray = _parser.getArray(AggForeignKey.class, 0, 0);
3012                                    foreignKeys = new AggForeignKey[_tempArray.length];
3013                                    for(int _i=0; _i<foreignKeys.length; _i++)
3014                                            foreignKeys[_i] = (AggForeignKey)_tempArray[_i];
3015                                    _tempArray = _parser.getArray(AggMeasure.class, 0, 0);
3016                                    measures = new AggMeasure[_tempArray.length];
3017                                    for(int _i=0; _i<measures.length; _i++)
3018                                            measures[_i] = (AggMeasure)_tempArray[_i];
3019                                    _tempArray = _parser.getArray(AggLevel.class, 0, 0);
3020                                    levels = new AggLevel[_tempArray.length];
3021                                    for(int _i=0; _i<levels.length; _i++)
3022                                            levels[_i] = (AggLevel)_tempArray[_i];
3023                            } catch(org.eigenbase.xom.XOMException _ex) {
3024                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3025                            }
3026                    }
3027    
3028                    public String name;  // required attribute
3029    
3030    
3031                    public String getName()
3032                    {
3033                            return "AggName";
3034                    }
3035    
3036                    public void display(java.io.PrintWriter _out, int _indent)
3037                    {
3038                            _out.println(getName());
3039                            displayAttribute(_out, "name", name, _indent+1);
3040                            displayAttribute(_out, "ignorecase", ignorecase, _indent+1);
3041                            displayElement(_out, "factcount", factcount, _indent+1);
3042                            displayElementArray(_out, "ignoreColumns", ignoreColumns, _indent+1);
3043                            displayElementArray(_out, "foreignKeys", foreignKeys, _indent+1);
3044                            displayElementArray(_out, "measures", measures, _indent+1);
3045                            displayElementArray(_out, "levels", levels, _indent+1);
3046                    }
3047                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3048                    {
3049                            _out.beginTag("AggName", new org.eigenbase.xom.XMLAttrVector()
3050                                    .add("name", name)
3051                                    .add("ignorecase", ignorecase)
3052                                    );
3053                            displayXMLElement(_out, factcount);
3054                            displayXMLElementArray(_out, ignoreColumns);
3055                            displayXMLElementArray(_out, foreignKeys);
3056                            displayXMLElementArray(_out, measures);
3057                            displayXMLElementArray(_out, levels);
3058                            _out.endTag("AggName");
3059                    }
3060                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3061                    {
3062                            boolean _diff = true;
3063                            AggName _cother = (AggName)_other;
3064                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
3065                            _diff = _diff && displayElementDiff("factcount", factcount, _cother.factcount, _out, _indent+1);
3066                            _diff = _diff && displayElementArrayDiff("ignoreColumns", ignoreColumns, _cother.ignoreColumns, _out, _indent+1);
3067                            _diff = _diff && displayElementArrayDiff("foreignKeys", foreignKeys, _cother.foreignKeys, _out, _indent+1);
3068                            _diff = _diff && displayElementArrayDiff("measures", measures, _cother.measures, _out, _indent+1);
3069                            _diff = _diff && displayElementArrayDiff("levels", levels, _cother.levels, _out, _indent+1);
3070                            return _diff;
3071                    }
3072                    // BEGIN pass-through code block ---
3073    public String getNameAttribute() {
3074                    return name;
3075                }
3076                    // END pass-through code block ---
3077            }
3078    
3079            public static class AggPattern extends AggTable
3080            {
3081                    public AggPattern()
3082                    {
3083                    }
3084    
3085                    public AggPattern(org.eigenbase.xom.DOMWrapper _def)
3086                            throws org.eigenbase.xom.XOMException
3087                    {
3088                            try {
3089                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3090                                    _parser = _parser;
3091                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
3092                                    _tempArray = _tempArray;
3093                                    pattern = (String)_parser.getAttribute("pattern", "String", null, null, true);
3094                                    ignorecase = (Boolean)_parser.getAttribute("ignorecase", "Boolean", "true", null, false);
3095                                    factcount = (AggFactCount)_parser.getElement(AggFactCount.class, true);
3096                                    _tempArray = _parser.getArray(AggIgnoreColumn.class, 0, 0);
3097                                    ignoreColumns = new AggIgnoreColumn[_tempArray.length];
3098                                    for(int _i=0; _i<ignoreColumns.length; _i++)
3099                                            ignoreColumns[_i] = (AggIgnoreColumn)_tempArray[_i];
3100                                    _tempArray = _parser.getArray(AggForeignKey.class, 0, 0);
3101                                    foreignKeys = new AggForeignKey[_tempArray.length];
3102                                    for(int _i=0; _i<foreignKeys.length; _i++)
3103                                            foreignKeys[_i] = (AggForeignKey)_tempArray[_i];
3104                                    _tempArray = _parser.getArray(AggMeasure.class, 0, 0);
3105                                    measures = new AggMeasure[_tempArray.length];
3106                                    for(int _i=0; _i<measures.length; _i++)
3107                                            measures[_i] = (AggMeasure)_tempArray[_i];
3108                                    _tempArray = _parser.getArray(AggLevel.class, 0, 0);
3109                                    levels = new AggLevel[_tempArray.length];
3110                                    for(int _i=0; _i<levels.length; _i++)
3111                                            levels[_i] = (AggLevel)_tempArray[_i];
3112                                    _tempArray = _parser.getArray(AggExclude.class, 0, 0);
3113                                    excludes = new AggExclude[_tempArray.length];
3114                                    for(int _i=0; _i<excludes.length; _i++)
3115                                            excludes[_i] = (AggExclude)_tempArray[_i];
3116                            } catch(org.eigenbase.xom.XOMException _ex) {
3117                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3118                            }
3119                    }
3120    
3121                    public String pattern;  // required attribute
3122    
3123                    public AggExclude[] excludes;  //optional array
3124    
3125                    public String getName()
3126                    {
3127                            return "AggPattern";
3128                    }
3129    
3130                    public void display(java.io.PrintWriter _out, int _indent)
3131                    {
3132                            _out.println(getName());
3133                            displayAttribute(_out, "pattern", pattern, _indent+1);
3134                            displayAttribute(_out, "ignorecase", ignorecase, _indent+1);
3135                            displayElement(_out, "factcount", factcount, _indent+1);
3136                            displayElementArray(_out, "ignoreColumns", ignoreColumns, _indent+1);
3137                            displayElementArray(_out, "foreignKeys", foreignKeys, _indent+1);
3138                            displayElementArray(_out, "measures", measures, _indent+1);
3139                            displayElementArray(_out, "levels", levels, _indent+1);
3140                            displayElementArray(_out, "excludes", excludes, _indent+1);
3141                    }
3142                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3143                    {
3144                            _out.beginTag("AggPattern", new org.eigenbase.xom.XMLAttrVector()
3145                                    .add("pattern", pattern)
3146                                    .add("ignorecase", ignorecase)
3147                                    );
3148                            displayXMLElement(_out, factcount);
3149                            displayXMLElementArray(_out, ignoreColumns);
3150                            displayXMLElementArray(_out, foreignKeys);
3151                            displayXMLElementArray(_out, measures);
3152                            displayXMLElementArray(_out, levels);
3153                            displayXMLElementArray(_out, excludes);
3154                            _out.endTag("AggPattern");
3155                    }
3156                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3157                    {
3158                            boolean _diff = true;
3159                            AggPattern _cother = (AggPattern)_other;
3160                            _diff = _diff && displayAttributeDiff("pattern", pattern, _cother.pattern, _out, _indent+1);
3161                            _diff = _diff && displayElementDiff("factcount", factcount, _cother.factcount, _out, _indent+1);
3162                            _diff = _diff && displayElementArrayDiff("ignoreColumns", ignoreColumns, _cother.ignoreColumns, _out, _indent+1);
3163                            _diff = _diff && displayElementArrayDiff("foreignKeys", foreignKeys, _cother.foreignKeys, _out, _indent+1);
3164                            _diff = _diff && displayElementArrayDiff("measures", measures, _cother.measures, _out, _indent+1);
3165                            _diff = _diff && displayElementArrayDiff("levels", levels, _cother.levels, _out, _indent+1);
3166                            _diff = _diff && displayElementArrayDiff("excludes", excludes, _cother.excludes, _out, _indent+1);
3167                            return _diff;
3168                    }
3169                    // BEGIN pass-through code block ---
3170    public String getPattern() {
3171                    return pattern;
3172                }
3173                public AggExclude[] getAggExcludes() {
3174                    return excludes;
3175                }
3176                    // END pass-through code block ---
3177            }
3178    
3179            public static class AggExclude extends org.eigenbase.xom.ElementDef
3180            {
3181                    public AggExclude()
3182                    {
3183                    }
3184    
3185                    public AggExclude(org.eigenbase.xom.DOMWrapper _def)
3186                            throws org.eigenbase.xom.XOMException
3187                    {
3188                            try {
3189                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3190                                    _parser = _parser;
3191                                    pattern = (String)_parser.getAttribute("pattern", "String", null, null, false);
3192                                    name = (String)_parser.getAttribute("name", "String", null, null, false);
3193                                    ignorecase = (Boolean)_parser.getAttribute("ignorecase", "Boolean", "true", null, false);
3194                            } catch(org.eigenbase.xom.XOMException _ex) {
3195                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3196                            }
3197                    }
3198    
3199                    public String pattern;  // optional attribute
3200                    public String name;  // optional attribute
3201                    public Boolean ignorecase;  // attribute default: true
3202    
3203    
3204                    public String getName()
3205                    {
3206                            return "AggExclude";
3207                    }
3208    
3209                    public void display(java.io.PrintWriter _out, int _indent)
3210                    {
3211                            _out.println(getName());
3212                            displayAttribute(_out, "pattern", pattern, _indent+1);
3213                            displayAttribute(_out, "name", name, _indent+1);
3214                            displayAttribute(_out, "ignorecase", ignorecase, _indent+1);
3215                    }
3216                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3217                    {
3218                            _out.beginTag("AggExclude", new org.eigenbase.xom.XMLAttrVector()
3219                                    .add("pattern", pattern)
3220                                    .add("name", name)
3221                                    .add("ignorecase", ignorecase)
3222                                    );
3223                            _out.endTag("AggExclude");
3224                    }
3225                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3226                    {
3227                            boolean _diff = true;
3228                            AggExclude _cother = (AggExclude)_other;
3229                            _diff = _diff && displayAttributeDiff("pattern", pattern, _cother.pattern, _out, _indent+1);
3230                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
3231                            _diff = _diff && displayAttributeDiff("ignorecase", ignorecase, _cother.ignorecase, _out, _indent+1);
3232                            return _diff;
3233                    }
3234                    // BEGIN pass-through code block ---
3235    public String getNameAttribute() {
3236                    return name;
3237                }
3238                public String getPattern() {
3239                    return pattern;
3240                }
3241                public boolean isIgnoreCase() {
3242                    return ignorecase.booleanValue();
3243                }
3244                    // END pass-through code block ---
3245            }
3246    
3247            public static abstract class AggColumnName extends org.eigenbase.xom.ElementDef
3248            {
3249                    public AggColumnName()
3250                    {
3251                    }
3252    
3253                    public AggColumnName(org.eigenbase.xom.DOMWrapper _def)
3254                            throws org.eigenbase.xom.XOMException
3255                    {
3256                            try {
3257                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3258                                    _parser = _parser;
3259                                    column = (String)_parser.getAttribute("column", "String", null, null, true);
3260                            } catch(org.eigenbase.xom.XOMException _ex) {
3261                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3262                            }
3263                    }
3264    
3265                    public String column;  // required attribute
3266    
3267    
3268                    public String getName()
3269                    {
3270                            return "AggColumnName";
3271                    }
3272    
3273                    public void display(java.io.PrintWriter _out, int _indent)
3274                    {
3275                            _out.println(getName());
3276                            displayAttribute(_out, "column", column, _indent+1);
3277                    }
3278                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3279                    {
3280                            _out.beginTag("(%AggColumnName;)", new org.eigenbase.xom.XMLAttrVector()
3281                                    .add("column", column)
3282                                    );
3283                            _out.endTag("(%AggColumnName;)");
3284                    }
3285                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3286                    {
3287                            boolean _diff = true;
3288                            AggColumnName _cother = (AggColumnName)_other;
3289                            _diff = _diff && displayAttributeDiff("column", column, _cother.column, _out, _indent+1);
3290                            return _diff;
3291                    }
3292                    // BEGIN pass-through code block ---
3293    public String getColumnName() {
3294                    return column;
3295                }
3296                    // END pass-through code block ---
3297            }
3298    
3299            public static class AggFactCount extends AggColumnName
3300            {
3301                    public AggFactCount()
3302                    {
3303                    }
3304    
3305                    public AggFactCount(org.eigenbase.xom.DOMWrapper _def)
3306                            throws org.eigenbase.xom.XOMException
3307                    {
3308                            try {
3309                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3310                                    _parser = _parser;
3311                                    column = (String)_parser.getAttribute("column", "String", null, null, true);
3312                            } catch(org.eigenbase.xom.XOMException _ex) {
3313                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3314                            }
3315                    }
3316    
3317    
3318    
3319                    public String getName()
3320                    {
3321                            return "AggFactCount";
3322                    }
3323    
3324                    public void display(java.io.PrintWriter _out, int _indent)
3325                    {
3326                            _out.println(getName());
3327                            displayAttribute(_out, "column", column, _indent+1);
3328                    }
3329                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3330                    {
3331                            _out.beginTag("AggFactCount", new org.eigenbase.xom.XMLAttrVector()
3332                                    .add("column", column)
3333                                    );
3334                            _out.endTag("AggFactCount");
3335                    }
3336                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3337                    {
3338                            boolean _diff = true;
3339                            AggFactCount _cother = (AggFactCount)_other;
3340                            return _diff;
3341                    }
3342            }
3343    
3344            public static class AggIgnoreColumn extends AggColumnName
3345            {
3346                    public AggIgnoreColumn()
3347                    {
3348                    }
3349    
3350                    public AggIgnoreColumn(org.eigenbase.xom.DOMWrapper _def)
3351                            throws org.eigenbase.xom.XOMException
3352                    {
3353                            try {
3354                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3355                                    _parser = _parser;
3356                                    column = (String)_parser.getAttribute("column", "String", null, null, true);
3357                            } catch(org.eigenbase.xom.XOMException _ex) {
3358                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3359                            }
3360                    }
3361    
3362    
3363    
3364                    public String getName()
3365                    {
3366                            return "AggIgnoreColumn";
3367                    }
3368    
3369                    public void display(java.io.PrintWriter _out, int _indent)
3370                    {
3371                            _out.println(getName());
3372                            displayAttribute(_out, "column", column, _indent+1);
3373                    }
3374                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3375                    {
3376                            _out.beginTag("AggIgnoreColumn", new org.eigenbase.xom.XMLAttrVector()
3377                                    .add("column", column)
3378                                    );
3379                            _out.endTag("AggIgnoreColumn");
3380                    }
3381                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3382                    {
3383                            boolean _diff = true;
3384                            AggIgnoreColumn _cother = (AggIgnoreColumn)_other;
3385                            return _diff;
3386                    }
3387            }
3388    
3389            /**
3390             * The name of the column mapping from base fact table foreign key
3391             * to aggregate table foreign key.
3392             */
3393            public static class AggForeignKey extends org.eigenbase.xom.ElementDef
3394            {
3395                    public AggForeignKey()
3396                    {
3397                    }
3398    
3399                    public AggForeignKey(org.eigenbase.xom.DOMWrapper _def)
3400                            throws org.eigenbase.xom.XOMException
3401                    {
3402                            try {
3403                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3404                                    _parser = _parser;
3405                                    factColumn = (String)_parser.getAttribute("factColumn", "String", null, null, true);
3406                                    aggColumn = (String)_parser.getAttribute("aggColumn", "String", null, null, true);
3407                            } catch(org.eigenbase.xom.XOMException _ex) {
3408                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3409                            }
3410                    }
3411    
3412                    public String factColumn;  // required attribute
3413                    public String aggColumn;  // required attribute
3414    
3415    
3416                    public String getName()
3417                    {
3418                            return "AggForeignKey";
3419                    }
3420    
3421                    public void display(java.io.PrintWriter _out, int _indent)
3422                    {
3423                            _out.println(getName());
3424                            displayAttribute(_out, "factColumn", factColumn, _indent+1);
3425                            displayAttribute(_out, "aggColumn", aggColumn, _indent+1);
3426                    }
3427                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3428                    {
3429                            _out.beginTag("AggForeignKey", new org.eigenbase.xom.XMLAttrVector()
3430                                    .add("factColumn", factColumn)
3431                                    .add("aggColumn", aggColumn)
3432                                    );
3433                            _out.endTag("AggForeignKey");
3434                    }
3435                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3436                    {
3437                            boolean _diff = true;
3438                            AggForeignKey _cother = (AggForeignKey)_other;
3439                            _diff = _diff && displayAttributeDiff("factColumn", factColumn, _cother.factColumn, _out, _indent+1);
3440                            _diff = _diff && displayAttributeDiff("aggColumn", aggColumn, _cother.aggColumn, _out, _indent+1);
3441                            return _diff;
3442                    }
3443                    // BEGIN pass-through code block ---
3444    public String getFactFKColumnName() {
3445                    return factColumn;
3446                }
3447                public String getAggregateFKColumnName() {
3448                    return aggColumn;
3449                }
3450                    // END pass-through code block ---
3451            }
3452    
3453            public static class AggLevel extends org.eigenbase.xom.ElementDef
3454            {
3455                    public AggLevel()
3456                    {
3457                    }
3458    
3459                    public AggLevel(org.eigenbase.xom.DOMWrapper _def)
3460                            throws org.eigenbase.xom.XOMException
3461                    {
3462                            try {
3463                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3464                                    _parser = _parser;
3465                                    column = (String)_parser.getAttribute("column", "String", null, null, true);
3466                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
3467                            } catch(org.eigenbase.xom.XOMException _ex) {
3468                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3469                            }
3470                    }
3471    
3472                    public String column;  // required attribute
3473                    public String name;  // required attribute
3474    
3475    
3476                    public String getName()
3477                    {
3478                            return "AggLevel";
3479                    }
3480    
3481                    public void display(java.io.PrintWriter _out, int _indent)
3482                    {
3483                            _out.println(getName());
3484                            displayAttribute(_out, "column", column, _indent+1);
3485                            displayAttribute(_out, "name", name, _indent+1);
3486                    }
3487                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3488                    {
3489                            _out.beginTag("AggLevel", new org.eigenbase.xom.XMLAttrVector()
3490                                    .add("column", column)
3491                                    .add("name", name)
3492                                    );
3493                            _out.endTag("AggLevel");
3494                    }
3495                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3496                    {
3497                            boolean _diff = true;
3498                            AggLevel _cother = (AggLevel)_other;
3499                            _diff = _diff && displayAttributeDiff("column", column, _cother.column, _out, _indent+1);
3500                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
3501                            return _diff;
3502                    }
3503                    // BEGIN pass-through code block ---
3504    public String getNameAttribute() {
3505                    return name;
3506                }
3507                public String getColumnName() {
3508                    return column;
3509                }
3510                    // END pass-through code block ---
3511            }
3512    
3513            public static class AggMeasure extends org.eigenbase.xom.ElementDef
3514            {
3515                    public AggMeasure()
3516                    {
3517                    }
3518    
3519                    public AggMeasure(org.eigenbase.xom.DOMWrapper _def)
3520                            throws org.eigenbase.xom.XOMException
3521                    {
3522                            try {
3523                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3524                                    _parser = _parser;
3525                                    column = (String)_parser.getAttribute("column", "String", null, null, true);
3526                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
3527                            } catch(org.eigenbase.xom.XOMException _ex) {
3528                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3529                            }
3530                    }
3531    
3532                    public String column;  // required attribute
3533                    public String name;  // required attribute
3534    
3535    
3536                    public String getName()
3537                    {
3538                            return "AggMeasure";
3539                    }
3540    
3541                    public void display(java.io.PrintWriter _out, int _indent)
3542                    {
3543                            _out.println(getName());
3544                            displayAttribute(_out, "column", column, _indent+1);
3545                            displayAttribute(_out, "name", name, _indent+1);
3546                    }
3547                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3548                    {
3549                            _out.beginTag("AggMeasure", new org.eigenbase.xom.XMLAttrVector()
3550                                    .add("column", column)
3551                                    .add("name", name)
3552                                    );
3553                            _out.endTag("AggMeasure");
3554                    }
3555                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3556                    {
3557                            boolean _diff = true;
3558                            AggMeasure _cother = (AggMeasure)_other;
3559                            _diff = _diff && displayAttributeDiff("column", column, _cother.column, _out, _indent+1);
3560                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
3561                            return _diff;
3562                    }
3563                    // BEGIN pass-through code block ---
3564    public String getNameAttribute() {
3565                    return name;
3566                }
3567                public String getColumn() {
3568                    return column;
3569                }
3570                    // END pass-through code block ---
3571            }
3572    
3573            public static abstract class Expression extends org.eigenbase.xom.ElementDef
3574            {
3575                    public Expression()
3576                    {
3577                    }
3578    
3579                    public Expression(org.eigenbase.xom.DOMWrapper _def)
3580                            throws org.eigenbase.xom.XOMException
3581                    {
3582                    }
3583    
3584    
3585    
3586                    public String getName()
3587                    {
3588                            return "Expression";
3589                    }
3590    
3591                    public void display(java.io.PrintWriter _out, int _indent)
3592                    {
3593                    }
3594                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3595                    {
3596                            _out.beginTag("(%Expression;)", new org.eigenbase.xom.XMLAttrVector()
3597                                    );
3598                            _out.endTag("(%Expression;)");
3599                    }
3600                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3601                    {
3602                            boolean _diff = true;
3603                            return _diff;
3604                    }
3605                    // BEGIN pass-through code block ---
3606    public abstract String getExpression(SqlQuery query);
3607                public abstract String getGenericExpression();
3608                public abstract String getTableAlias();
3609                    // END pass-through code block ---
3610            }
3611    
3612            public static class Column extends Expression
3613            {
3614                    public Column()
3615                    {
3616                    }
3617    
3618                    public Column(org.eigenbase.xom.DOMWrapper _def)
3619                            throws org.eigenbase.xom.XOMException
3620                    {
3621                            try {
3622                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3623                                    _parser = _parser;
3624                                    table = (String)_parser.getAttribute("table", "String", null, null, false);
3625                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
3626                            } catch(org.eigenbase.xom.XOMException _ex) {
3627                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3628                            }
3629                    }
3630    
3631                    public String table;  // optional attribute
3632                    public String name;  // required attribute
3633    
3634    
3635                    public String getName()
3636                    {
3637                            return "Column";
3638                    }
3639    
3640                    public void display(java.io.PrintWriter _out, int _indent)
3641                    {
3642                            _out.println(getName());
3643                            displayAttribute(_out, "table", table, _indent+1);
3644                            displayAttribute(_out, "name", name, _indent+1);
3645                    }
3646                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3647                    {
3648                            _out.beginTag("Column", new org.eigenbase.xom.XMLAttrVector()
3649                                    .add("table", table)
3650                                    .add("name", name)
3651                                    );
3652                            _out.endTag("Column");
3653                    }
3654                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3655                    {
3656                            boolean _diff = true;
3657                            Column _cother = (Column)_other;
3658                            _diff = _diff && displayAttributeDiff("table", table, _cother.table, _out, _indent+1);
3659                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
3660                            return _diff;
3661                    }
3662                    // BEGIN pass-through code block ---
3663    /** Convenience constructor. */
3664                public Column(String table, String name) {
3665                    this();
3666                    Util.assertTrue(name != null);
3667                    this.table = table;
3668                    this.name = name;
3669                }
3670                public String getExpression(SqlQuery query) {
3671                    return query.getDialect().quoteIdentifier(table, name);
3672                }
3673                public String getGenericExpression() {
3674                    if (table == null) {
3675                        return name;
3676                    } else {
3677                        return table + "." + name;
3678                    }
3679                }
3680                public String getColumnName() {
3681                    return name;
3682                }
3683                public String getTableAlias() {
3684                    return table;
3685                }
3686                public int hashCode() {
3687                    return name.hashCode() ^ (table==null ? 0 : table.hashCode());
3688                }
3689    
3690                public boolean equals(Object obj) {
3691                    if (!(obj instanceof Column)) {
3692                        return false;
3693                    }
3694                    Column that = (Column) obj;
3695                    return this.name.equals(that.name) &&
3696                            Util.equals(this.table, that.table);
3697                }
3698                    // END pass-through code block ---
3699            }
3700    
3701            /**
3702             * A collection of SQL expressions, one per dialect.
3703             */
3704            public static abstract class ExpressionView extends Expression
3705            {
3706                    public ExpressionView()
3707                    {
3708                    }
3709    
3710                    public ExpressionView(org.eigenbase.xom.DOMWrapper _def)
3711                            throws org.eigenbase.xom.XOMException
3712                    {
3713                            try {
3714                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3715                                    _parser = _parser;
3716                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
3717                                    _tempArray = _tempArray;
3718                                    _tempArray = _parser.getArray(SQL.class, 1, 0);
3719                                    expressions = new SQL[_tempArray.length];
3720                                    for(int _i=0; _i<expressions.length; _i++)
3721                                            expressions[_i] = (SQL)_tempArray[_i];
3722                            } catch(org.eigenbase.xom.XOMException _ex) {
3723                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3724                            }
3725                    }
3726    
3727    
3728                    public SQL[] expressions;  //min 1
3729    
3730                    public String getName()
3731                    {
3732                            return "ExpressionView";
3733                    }
3734    
3735                    public void display(java.io.PrintWriter _out, int _indent)
3736                    {
3737                            _out.println(getName());
3738                            displayElementArray(_out, "expressions", expressions, _indent+1);
3739                    }
3740                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3741                    {
3742                            _out.beginTag("(%ExpressionView;)", new org.eigenbase.xom.XMLAttrVector()
3743                                    );
3744                            displayXMLElementArray(_out, expressions);
3745                            _out.endTag("(%ExpressionView;)");
3746                    }
3747                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3748                    {
3749                            boolean _diff = true;
3750                            ExpressionView _cother = (ExpressionView)_other;
3751                            _diff = _diff && displayElementArrayDiff("expressions", expressions, _cother.expressions, _out, _indent+1);
3752                            return _diff;
3753                    }
3754                    // BEGIN pass-through code block ---
3755    public String toString() {
3756                    return expressions[0].cdata;
3757                }
3758    
3759                public String getExpression(SqlQuery query) {
3760                    return SQL.toCodeSet(expressions).chooseQuery(query.getDialect());
3761                }
3762    
3763                public String getGenericExpression() {
3764                    for (int i = 0; i < expressions.length; i++) {
3765                        if (expressions[i].dialect.equals("generic")) {
3766                            return expressions[i].cdata;
3767                        }
3768                    }
3769                    return expressions[0].cdata;
3770                }
3771    
3772                public String getTableAlias() {
3773                    return null;
3774                }
3775    
3776                public int hashCode() {
3777                    int h = 17;
3778                    for (int i = 0; i < expressions.length; i++) {
3779                        h = 37 * h + expressions[i].hashCode();
3780                    }
3781                    return h;
3782                }
3783    
3784                public boolean equals(Object obj) {
3785                    if (!(obj instanceof ExpressionView)) {
3786                        return false;
3787                    }
3788                    ExpressionView that = (ExpressionView) obj;
3789                    if (this.expressions.length != that.expressions.length) {
3790                        return false;
3791                    }
3792                    for (int i = 0; i < expressions.length; i++) {
3793                        if (! this.expressions[i].equals(that.expressions[i])) {
3794                            return false;
3795                        }
3796                    }
3797                    return true;
3798                }
3799                    // END pass-through code block ---
3800            }
3801    
3802            public static class KeyExpression extends ExpressionView
3803            {
3804                    public KeyExpression()
3805                    {
3806                    }
3807    
3808                    public KeyExpression(org.eigenbase.xom.DOMWrapper _def)
3809                            throws org.eigenbase.xom.XOMException
3810                    {
3811                            try {
3812                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3813                                    _parser = _parser;
3814                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
3815                                    _tempArray = _tempArray;
3816                                    _tempArray = _parser.getArray(SQL.class, 1, 0);
3817                                    expressions = new SQL[_tempArray.length];
3818                                    for(int _i=0; _i<expressions.length; _i++)
3819                                            expressions[_i] = (SQL)_tempArray[_i];
3820                            } catch(org.eigenbase.xom.XOMException _ex) {
3821                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3822                            }
3823                    }
3824    
3825    
3826    
3827                    public String getName()
3828                    {
3829                            return "KeyExpression";
3830                    }
3831    
3832                    public void display(java.io.PrintWriter _out, int _indent)
3833                    {
3834                            _out.println(getName());
3835                            displayElementArray(_out, "expressions", expressions, _indent+1);
3836                    }
3837                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3838                    {
3839                            _out.beginTag("KeyExpression", new org.eigenbase.xom.XMLAttrVector()
3840                                    );
3841                            displayXMLElementArray(_out, expressions);
3842                            _out.endTag("KeyExpression");
3843                    }
3844                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3845                    {
3846                            boolean _diff = true;
3847                            KeyExpression _cother = (KeyExpression)_other;
3848                            _diff = _diff && displayElementArrayDiff("expressions", expressions, _cother.expressions, _out, _indent+1);
3849                            return _diff;
3850                    }
3851            }
3852    
3853            public static class ParentExpression extends ExpressionView
3854            {
3855                    public ParentExpression()
3856                    {
3857                    }
3858    
3859                    public ParentExpression(org.eigenbase.xom.DOMWrapper _def)
3860                            throws org.eigenbase.xom.XOMException
3861                    {
3862                            try {
3863                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3864                                    _parser = _parser;
3865                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
3866                                    _tempArray = _tempArray;
3867                                    _tempArray = _parser.getArray(SQL.class, 1, 0);
3868                                    expressions = new SQL[_tempArray.length];
3869                                    for(int _i=0; _i<expressions.length; _i++)
3870                                            expressions[_i] = (SQL)_tempArray[_i];
3871                            } catch(org.eigenbase.xom.XOMException _ex) {
3872                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3873                            }
3874                    }
3875    
3876    
3877    
3878                    public String getName()
3879                    {
3880                            return "ParentExpression";
3881                    }
3882    
3883                    public void display(java.io.PrintWriter _out, int _indent)
3884                    {
3885                            _out.println(getName());
3886                            displayElementArray(_out, "expressions", expressions, _indent+1);
3887                    }
3888                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3889                    {
3890                            _out.beginTag("ParentExpression", new org.eigenbase.xom.XMLAttrVector()
3891                                    );
3892                            displayXMLElementArray(_out, expressions);
3893                            _out.endTag("ParentExpression");
3894                    }
3895                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3896                    {
3897                            boolean _diff = true;
3898                            ParentExpression _cother = (ParentExpression)_other;
3899                            _diff = _diff && displayElementArrayDiff("expressions", expressions, _cother.expressions, _out, _indent+1);
3900                            return _diff;
3901                    }
3902            }
3903    
3904            public static class OrdinalExpression extends ExpressionView
3905            {
3906                    public OrdinalExpression()
3907                    {
3908                    }
3909    
3910                    public OrdinalExpression(org.eigenbase.xom.DOMWrapper _def)
3911                            throws org.eigenbase.xom.XOMException
3912                    {
3913                            try {
3914                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3915                                    _parser = _parser;
3916                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
3917                                    _tempArray = _tempArray;
3918                                    _tempArray = _parser.getArray(SQL.class, 1, 0);
3919                                    expressions = new SQL[_tempArray.length];
3920                                    for(int _i=0; _i<expressions.length; _i++)
3921                                            expressions[_i] = (SQL)_tempArray[_i];
3922                            } catch(org.eigenbase.xom.XOMException _ex) {
3923                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3924                            }
3925                    }
3926    
3927    
3928    
3929                    public String getName()
3930                    {
3931                            return "OrdinalExpression";
3932                    }
3933    
3934                    public void display(java.io.PrintWriter _out, int _indent)
3935                    {
3936                            _out.println(getName());
3937                            displayElementArray(_out, "expressions", expressions, _indent+1);
3938                    }
3939                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3940                    {
3941                            _out.beginTag("OrdinalExpression", new org.eigenbase.xom.XMLAttrVector()
3942                                    );
3943                            displayXMLElementArray(_out, expressions);
3944                            _out.endTag("OrdinalExpression");
3945                    }
3946                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3947                    {
3948                            boolean _diff = true;
3949                            OrdinalExpression _cother = (OrdinalExpression)_other;
3950                            _diff = _diff && displayElementArrayDiff("expressions", expressions, _cother.expressions, _out, _indent+1);
3951                            return _diff;
3952                    }
3953            }
3954    
3955            public static class NameExpression extends ExpressionView
3956            {
3957                    public NameExpression()
3958                    {
3959                    }
3960    
3961                    public NameExpression(org.eigenbase.xom.DOMWrapper _def)
3962                            throws org.eigenbase.xom.XOMException
3963                    {
3964                            try {
3965                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
3966                                    _parser = _parser;
3967                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
3968                                    _tempArray = _tempArray;
3969                                    _tempArray = _parser.getArray(SQL.class, 1, 0);
3970                                    expressions = new SQL[_tempArray.length];
3971                                    for(int _i=0; _i<expressions.length; _i++)
3972                                            expressions[_i] = (SQL)_tempArray[_i];
3973                            } catch(org.eigenbase.xom.XOMException _ex) {
3974                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
3975                            }
3976                    }
3977    
3978    
3979    
3980                    public String getName()
3981                    {
3982                            return "NameExpression";
3983                    }
3984    
3985                    public void display(java.io.PrintWriter _out, int _indent)
3986                    {
3987                            _out.println(getName());
3988                            displayElementArray(_out, "expressions", expressions, _indent+1);
3989                    }
3990                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
3991                    {
3992                            _out.beginTag("NameExpression", new org.eigenbase.xom.XMLAttrVector()
3993                                    );
3994                            displayXMLElementArray(_out, expressions);
3995                            _out.endTag("NameExpression");
3996                    }
3997                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
3998                    {
3999                            boolean _diff = true;
4000                            NameExpression _cother = (NameExpression)_other;
4001                            _diff = _diff && displayElementArrayDiff("expressions", expressions, _cother.expressions, _out, _indent+1);
4002                            return _diff;
4003                    }
4004            }
4005    
4006            public static class CaptionExpression extends ExpressionView
4007            {
4008                    public CaptionExpression()
4009                    {
4010                    }
4011    
4012                    public CaptionExpression(org.eigenbase.xom.DOMWrapper _def)
4013                            throws org.eigenbase.xom.XOMException
4014                    {
4015                            try {
4016                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
4017                                    _parser = _parser;
4018                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
4019                                    _tempArray = _tempArray;
4020                                    _tempArray = _parser.getArray(SQL.class, 1, 0);
4021                                    expressions = new SQL[_tempArray.length];
4022                                    for(int _i=0; _i<expressions.length; _i++)
4023                                            expressions[_i] = (SQL)_tempArray[_i];
4024                            } catch(org.eigenbase.xom.XOMException _ex) {
4025                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
4026                            }
4027                    }
4028    
4029    
4030    
4031                    public String getName()
4032                    {
4033                            return "CaptionExpression";
4034                    }
4035    
4036                    public void display(java.io.PrintWriter _out, int _indent)
4037                    {
4038                            _out.println(getName());
4039                            displayElementArray(_out, "expressions", expressions, _indent+1);
4040                    }
4041                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
4042                    {
4043                            _out.beginTag("CaptionExpression", new org.eigenbase.xom.XMLAttrVector()
4044                                    );
4045                            displayXMLElementArray(_out, expressions);
4046                            _out.endTag("CaptionExpression");
4047                    }
4048                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
4049                    {
4050                            boolean _diff = true;
4051                            CaptionExpression _cother = (CaptionExpression)_other;
4052                            _diff = _diff && displayElementArrayDiff("expressions", expressions, _cother.expressions, _out, _indent+1);
4053                            return _diff;
4054                    }
4055            }
4056    
4057            public static class MeasureExpression extends ExpressionView
4058            {
4059                    public MeasureExpression()
4060                    {
4061                    }
4062    
4063                    public MeasureExpression(org.eigenbase.xom.DOMWrapper _def)
4064                            throws org.eigenbase.xom.XOMException
4065                    {
4066                            try {
4067                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
4068                                    _parser = _parser;
4069                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
4070                                    _tempArray = _tempArray;
4071                                    _tempArray = _parser.getArray(SQL.class, 1, 0);
4072                                    expressions = new SQL[_tempArray.length];
4073                                    for(int _i=0; _i<expressions.length; _i++)
4074                                            expressions[_i] = (SQL)_tempArray[_i];
4075                            } catch(org.eigenbase.xom.XOMException _ex) {
4076                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
4077                            }
4078                    }
4079    
4080    
4081    
4082                    public String getName()
4083                    {
4084                            return "MeasureExpression";
4085                    }
4086    
4087                    public void display(java.io.PrintWriter _out, int _indent)
4088                    {
4089                            _out.println(getName());
4090                            displayElementArray(_out, "expressions", expressions, _indent+1);
4091                    }
4092                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
4093                    {
4094                            _out.beginTag("MeasureExpression", new org.eigenbase.xom.XMLAttrVector()
4095                                    );
4096                            displayXMLElementArray(_out, expressions);
4097                            _out.endTag("MeasureExpression");
4098                    }
4099                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
4100                    {
4101                            boolean _diff = true;
4102                            MeasureExpression _cother = (MeasureExpression)_other;
4103                            _diff = _diff && displayElementArrayDiff("expressions", expressions, _cother.expressions, _out, _indent+1);
4104                            return _diff;
4105                    }
4106            }
4107    
4108            /**
4109             * A role defines an access-control profile. It has a series of grants
4110             * (or denials) for schema elements.
4111             */
4112            public static class Role extends org.eigenbase.xom.ElementDef
4113            {
4114                    public Role()
4115                    {
4116                    }
4117    
4118                    public Role(org.eigenbase.xom.DOMWrapper _def)
4119                            throws org.eigenbase.xom.XOMException
4120                    {
4121                            try {
4122                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
4123                                    _parser = _parser;
4124                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
4125                                    _tempArray = _tempArray;
4126                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
4127                                    _tempArray = _parser.getArray(SchemaGrant.class, 0, 0);
4128                                    schemaGrants = new SchemaGrant[_tempArray.length];
4129                                    for(int _i=0; _i<schemaGrants.length; _i++)
4130                                            schemaGrants[_i] = (SchemaGrant)_tempArray[_i];
4131                                    union = (Union)_parser.getElement(Union.class, false);
4132                            } catch(org.eigenbase.xom.XOMException _ex) {
4133                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
4134                            }
4135                    }
4136    
4137                    public String name;  // required attribute
4138    
4139                    public SchemaGrant[] schemaGrants;  //optional array
4140                    public Union union;  //optional element
4141    
4142                    public String getName()
4143                    {
4144                            return "Role";
4145                    }
4146    
4147                    public void display(java.io.PrintWriter _out, int _indent)
4148                    {
4149                            _out.println(getName());
4150                            displayAttribute(_out, "name", name, _indent+1);
4151                            displayElementArray(_out, "schemaGrants", schemaGrants, _indent+1);
4152                            displayElement(_out, "union", union, _indent+1);
4153                    }
4154                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
4155                    {
4156                            _out.beginTag("Role", new org.eigenbase.xom.XMLAttrVector()
4157                                    .add("name", name)
4158                                    );
4159                            displayXMLElementArray(_out, schemaGrants);
4160                            displayXMLElement(_out, union);
4161                            _out.endTag("Role");
4162                    }
4163                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
4164                    {
4165                            boolean _diff = true;
4166                            Role _cother = (Role)_other;
4167                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
4168                            _diff = _diff && displayElementArrayDiff("schemaGrants", schemaGrants, _cother.schemaGrants, _out, _indent+1);
4169                            _diff = _diff && displayElementDiff("union", union, _cother.union, _out, _indent+1);
4170                            return _diff;
4171                    }
4172            }
4173    
4174            public static abstract class Grant extends org.eigenbase.xom.ElementDef
4175            {
4176                    public Grant()
4177                    {
4178                    }
4179    
4180                    public Grant(org.eigenbase.xom.DOMWrapper _def)
4181                            throws org.eigenbase.xom.XOMException
4182                    {
4183                            try {
4184                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
4185                                    _parser = _parser;
4186                                    access = (String)_parser.getAttribute("access", "String", null, _access_values, true);
4187                            } catch(org.eigenbase.xom.XOMException _ex) {
4188                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
4189                            }
4190                    }
4191    
4192                    /** Allowable values for {@link #access}. */
4193                    public static final String[] _access_values = {"all", "custom", "none", "all_dimensions"};
4194                    public String access;  // required attribute
4195    
4196    
4197                    public String getName()
4198                    {
4199                            return "Grant";
4200                    }
4201    
4202                    public void display(java.io.PrintWriter _out, int _indent)
4203                    {
4204                            _out.println(getName());
4205                            displayAttribute(_out, "access", access, _indent+1);
4206                    }
4207                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
4208                    {
4209                            _out.beginTag("(%Grant;)", new org.eigenbase.xom.XMLAttrVector()
4210                                    .add("access", access)
4211                                    );
4212                            _out.endTag("(%Grant;)");
4213                    }
4214                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
4215                    {
4216                            boolean _diff = true;
4217                            Grant _cother = (Grant)_other;
4218                            _diff = _diff && displayAttributeDiff("access", access, _cother.access, _out, _indent+1);
4219                            return _diff;
4220                    }
4221            }
4222    
4223            /**
4224             * Grants (or denies) this role access to this schema.
4225             * access may be "all", "all_dimensions", or "none".
4226             * If access is "all_dimensions", the role has access
4227             * to all dimensions but still needs explicit access to cubes.
4228             * See mondrian.olap.Role#grant(mondrian.olap.Schema,int).
4229             */
4230            public static class SchemaGrant extends Grant
4231            {
4232                    public SchemaGrant()
4233                    {
4234                    }
4235    
4236                    public SchemaGrant(org.eigenbase.xom.DOMWrapper _def)
4237                            throws org.eigenbase.xom.XOMException
4238                    {
4239                            try {
4240                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
4241                                    _parser = _parser;
4242                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
4243                                    _tempArray = _tempArray;
4244                                    access = (String)_parser.getAttribute("access", "String", null, _access_values, true);
4245                                    _tempArray = _parser.getArray(CubeGrant.class, 0, 0);
4246                                    cubeGrants = new CubeGrant[_tempArray.length];
4247                                    for(int _i=0; _i<cubeGrants.length; _i++)
4248                                            cubeGrants[_i] = (CubeGrant)_tempArray[_i];
4249                            } catch(org.eigenbase.xom.XOMException _ex) {
4250                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
4251                            }
4252                    }
4253    
4254    
4255                    public CubeGrant[] cubeGrants;  //optional array
4256    
4257                    public String getName()
4258                    {
4259                            return "SchemaGrant";
4260                    }
4261    
4262                    public void display(java.io.PrintWriter _out, int _indent)
4263                    {
4264                            _out.println(getName());
4265                            displayAttribute(_out, "access", access, _indent+1);
4266                            displayElementArray(_out, "cubeGrants", cubeGrants, _indent+1);
4267                    }
4268                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
4269                    {
4270                            _out.beginTag("SchemaGrant", new org.eigenbase.xom.XMLAttrVector()
4271                                    .add("access", access)
4272                                    );
4273                            displayXMLElementArray(_out, cubeGrants);
4274                            _out.endTag("SchemaGrant");
4275                    }
4276                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
4277                    {
4278                            boolean _diff = true;
4279                            SchemaGrant _cother = (SchemaGrant)_other;
4280                            _diff = _diff && displayElementArrayDiff("cubeGrants", cubeGrants, _cother.cubeGrants, _out, _indent+1);
4281                            return _diff;
4282                    }
4283            }
4284    
4285            /**
4286             * Grants (or denies) this role access to a cube.
4287             * access may be "all" or "none".
4288             * See mondrian.olap.Role#grant(mondrian.olap.Cube,int).
4289             */
4290            public static class CubeGrant extends Grant
4291            {
4292                    public CubeGrant()
4293                    {
4294                    }
4295    
4296                    public CubeGrant(org.eigenbase.xom.DOMWrapper _def)
4297                            throws org.eigenbase.xom.XOMException
4298                    {
4299                            try {
4300                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
4301                                    _parser = _parser;
4302                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
4303                                    _tempArray = _tempArray;
4304                                    cube = (String)_parser.getAttribute("cube", "String", null, null, true);
4305                                    access = (String)_parser.getAttribute("access", "String", null, _access_values, true);
4306                                    _tempArray = _parser.getArray(DimensionGrant.class, 0, 0);
4307                                    dimensionGrants = new DimensionGrant[_tempArray.length];
4308                                    for(int _i=0; _i<dimensionGrants.length; _i++)
4309                                            dimensionGrants[_i] = (DimensionGrant)_tempArray[_i];
4310                                    _tempArray = _parser.getArray(HierarchyGrant.class, 0, 0);
4311                                    hierarchyGrants = new HierarchyGrant[_tempArray.length];
4312                                    for(int _i=0; _i<hierarchyGrants.length; _i++)
4313                                            hierarchyGrants[_i] = (HierarchyGrant)_tempArray[_i];
4314                            } catch(org.eigenbase.xom.XOMException _ex) {
4315                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
4316                            }
4317                    }
4318    
4319                    public String cube;  // required attribute
4320    
4321                    public DimensionGrant[] dimensionGrants;  //optional array
4322                    public HierarchyGrant[] hierarchyGrants;  //optional array
4323    
4324                    public String getName()
4325                    {
4326                            return "CubeGrant";
4327                    }
4328    
4329                    public void display(java.io.PrintWriter _out, int _indent)
4330                    {
4331                            _out.println(getName());
4332                            displayAttribute(_out, "cube", cube, _indent+1);
4333                            displayAttribute(_out, "access", access, _indent+1);
4334                            displayElementArray(_out, "dimensionGrants", dimensionGrants, _indent+1);
4335                            displayElementArray(_out, "hierarchyGrants", hierarchyGrants, _indent+1);
4336                    }
4337                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
4338                    {
4339                            _out.beginTag("CubeGrant", new org.eigenbase.xom.XMLAttrVector()
4340                                    .add("cube", cube)
4341                                    .add("access", access)
4342                                    );
4343                            displayXMLElementArray(_out, dimensionGrants);
4344                            displayXMLElementArray(_out, hierarchyGrants);
4345                            _out.endTag("CubeGrant");
4346                    }
4347                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
4348                    {
4349                            boolean _diff = true;
4350                            CubeGrant _cother = (CubeGrant)_other;
4351                            _diff = _diff && displayAttributeDiff("cube", cube, _cother.cube, _out, _indent+1);
4352                            _diff = _diff && displayElementArrayDiff("dimensionGrants", dimensionGrants, _cother.dimensionGrants, _out, _indent+1);
4353                            _diff = _diff && displayElementArrayDiff("hierarchyGrants", hierarchyGrants, _cother.hierarchyGrants, _out, _indent+1);
4354                            return _diff;
4355                    }
4356            }
4357    
4358            /**
4359             * Grants (or denies) this role access to a dimension.
4360             * access may be "all" or "none".
4361             * Note that a role is implicitly given access to a dimension when it
4362             * is given acess to a cube.
4363             * See also the "all_dimensions" option of the "SchemaGrant" element.
4364             * See mondrian.olap.Role#grant(mondrian.olap.Dimension,int).
4365             */
4366            public static class DimensionGrant extends Grant
4367            {
4368                    public DimensionGrant()
4369                    {
4370                    }
4371    
4372                    public DimensionGrant(org.eigenbase.xom.DOMWrapper _def)
4373                            throws org.eigenbase.xom.XOMException
4374                    {
4375                            try {
4376                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
4377                                    _parser = _parser;
4378                                    dimension = (String)_parser.getAttribute("dimension", "String", null, null, true);
4379                                    access = (String)_parser.getAttribute("access", "String", null, _access_values, true);
4380                            } catch(org.eigenbase.xom.XOMException _ex) {
4381                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
4382                            }
4383                    }
4384    
4385                    public String dimension;  // required attribute
4386    
4387    
4388                    public String getName()
4389                    {
4390                            return "DimensionGrant";
4391                    }
4392    
4393                    public void display(java.io.PrintWriter _out, int _indent)
4394                    {
4395                            _out.println(getName());
4396                            displayAttribute(_out, "dimension", dimension, _indent+1);
4397                            displayAttribute(_out, "access", access, _indent+1);
4398                    }
4399                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
4400                    {
4401                            _out.beginTag("DimensionGrant", new org.eigenbase.xom.XMLAttrVector()
4402                                    .add("dimension", dimension)
4403                                    .add("access", access)
4404                                    );
4405                            _out.endTag("DimensionGrant");
4406                    }
4407                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
4408                    {
4409                            boolean _diff = true;
4410                            DimensionGrant _cother = (DimensionGrant)_other;
4411                            _diff = _diff && displayAttributeDiff("dimension", dimension, _cother.dimension, _out, _indent+1);
4412                            return _diff;
4413                    }
4414            }
4415    
4416            /**
4417             * Grants (or denies) this role access to a hierarchy.
4418             * access may be "all", "custom" or "none".
4419             * If access is "custom", you may also specify the
4420             * attributes topLevel, bottomLevel, and
4421             * the member grants.
4422             * See mondrian.olap.Role#grant(mondrian.olap.Hierarchy, int, mondrian.olap.Level).
4423             */
4424            public static class HierarchyGrant extends Grant
4425            {
4426                    public HierarchyGrant()
4427                    {
4428                    }
4429    
4430                    public HierarchyGrant(org.eigenbase.xom.DOMWrapper _def)
4431                            throws org.eigenbase.xom.XOMException
4432                    {
4433                            try {
4434                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
4435                                    _parser = _parser;
4436                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
4437                                    _tempArray = _tempArray;
4438                                    hierarchy = (String)_parser.getAttribute("hierarchy", "String", null, null, true);
4439                                    topLevel = (String)_parser.getAttribute("topLevel", "String", null, null, false);
4440                                    bottomLevel = (String)_parser.getAttribute("bottomLevel", "String", null, null, false);
4441                                    rollupPolicy = (String)_parser.getAttribute("rollupPolicy", "String", null, null, false);
4442                                    access = (String)_parser.getAttribute("access", "String", null, _access_values, true);
4443                                    _tempArray = _parser.getArray(MemberGrant.class, 0, 0);
4444                                    memberGrants = new MemberGrant[_tempArray.length];
4445                                    for(int _i=0; _i<memberGrants.length; _i++)
4446                                            memberGrants[_i] = (MemberGrant)_tempArray[_i];
4447                            } catch(org.eigenbase.xom.XOMException _ex) {
4448                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
4449                            }
4450                    }
4451    
4452                    public String hierarchy;  // required attribute
4453                    public String topLevel;  // optional attribute
4454                    public String bottomLevel;  // optional attribute
4455                    public String rollupPolicy;  // optional attribute
4456    
4457                    public MemberGrant[] memberGrants;  //optional array
4458    
4459                    public String getName()
4460                    {
4461                            return "HierarchyGrant";
4462                    }
4463    
4464                    public void display(java.io.PrintWriter _out, int _indent)
4465                    {
4466                            _out.println(getName());
4467                            displayAttribute(_out, "hierarchy", hierarchy, _indent+1);
4468                            displayAttribute(_out, "topLevel", topLevel, _indent+1);
4469                            displayAttribute(_out, "bottomLevel", bottomLevel, _indent+1);
4470                            displayAttribute(_out, "rollupPolicy", rollupPolicy, _indent+1);
4471                            displayAttribute(_out, "access", access, _indent+1);
4472                            displayElementArray(_out, "memberGrants", memberGrants, _indent+1);
4473                    }
4474                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
4475                    {
4476                            _out.beginTag("HierarchyGrant", new org.eigenbase.xom.XMLAttrVector()
4477                                    .add("hierarchy", hierarchy)
4478                                    .add("topLevel", topLevel)
4479                                    .add("bottomLevel", bottomLevel)
4480                                    .add("rollupPolicy", rollupPolicy)
4481                                    .add("access", access)
4482                                    );
4483                            displayXMLElementArray(_out, memberGrants);
4484                            _out.endTag("HierarchyGrant");
4485                    }
4486                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
4487                    {
4488                            boolean _diff = true;
4489                            HierarchyGrant _cother = (HierarchyGrant)_other;
4490                            _diff = _diff && displayAttributeDiff("hierarchy", hierarchy, _cother.hierarchy, _out, _indent+1);
4491                            _diff = _diff && displayAttributeDiff("topLevel", topLevel, _cother.topLevel, _out, _indent+1);
4492                            _diff = _diff && displayAttributeDiff("bottomLevel", bottomLevel, _cother.bottomLevel, _out, _indent+1);
4493                            _diff = _diff && displayAttributeDiff("rollupPolicy", rollupPolicy, _cother.rollupPolicy, _out, _indent+1);
4494                            _diff = _diff && displayElementArrayDiff("memberGrants", memberGrants, _cother.memberGrants, _out, _indent+1);
4495                            return _diff;
4496                    }
4497            }
4498    
4499            /**
4500             * Grants (or denies) this role access to a member.
4501             * The children of this member inherit that access.
4502             * You can implicitly see a member if you can see any of its children.
4503             * See mondrian.olap.Role#grant(mondrian.olap.Member,int).
4504             */
4505            public static class MemberGrant extends org.eigenbase.xom.ElementDef
4506            {
4507                    public MemberGrant()
4508                    {
4509                    }
4510    
4511                    public MemberGrant(org.eigenbase.xom.DOMWrapper _def)
4512                            throws org.eigenbase.xom.XOMException
4513                    {
4514                            try {
4515                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
4516                                    _parser = _parser;
4517                                    member = (String)_parser.getAttribute("member", "String", null, null, true);
4518                                    access = (String)_parser.getAttribute("access", "String", null, _access_values, true);
4519                            } catch(org.eigenbase.xom.XOMException _ex) {
4520                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
4521                            }
4522                    }
4523    
4524                    public String member;  // required attribute
4525                    /** Allowable values for {@link #access}. */
4526                    public static final String[] _access_values = {"all", "none"};
4527                    public String access;  // required attribute
4528    
4529    
4530                    public String getName()
4531                    {
4532                            return "MemberGrant";
4533                    }
4534    
4535                    public void display(java.io.PrintWriter _out, int _indent)
4536                    {
4537                            _out.println(getName());
4538                            displayAttribute(_out, "member", member, _indent+1);
4539                            displayAttribute(_out, "access", access, _indent+1);
4540                    }
4541                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
4542                    {
4543                            _out.beginTag("MemberGrant", new org.eigenbase.xom.XMLAttrVector()
4544                                    .add("member", member)
4545                                    .add("access", access)
4546                                    );
4547                            _out.endTag("MemberGrant");
4548                    }
4549                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
4550                    {
4551                            boolean _diff = true;
4552                            MemberGrant _cother = (MemberGrant)_other;
4553                            _diff = _diff && displayAttributeDiff("member", member, _cother.member, _out, _indent+1);
4554                            _diff = _diff && displayAttributeDiff("access", access, _cother.access, _out, _indent+1);
4555                            return _diff;
4556                    }
4557            }
4558    
4559            /**
4560             * Body of a Role definition which defines a Role to be the union
4561             * of several Roles. The RoleUsage elements must refer to Roles that
4562             * have been declared earlier in this schema file.
4563             */
4564            public static class Union extends org.eigenbase.xom.ElementDef
4565            {
4566                    public Union()
4567                    {
4568                    }
4569    
4570                    public Union(org.eigenbase.xom.DOMWrapper _def)
4571                            throws org.eigenbase.xom.XOMException
4572                    {
4573                            try {
4574                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
4575                                    _parser = _parser;
4576                                    org.eigenbase.xom.NodeDef[] _tempArray = null;
4577                                    _tempArray = _tempArray;
4578                                    _tempArray = _parser.getArray(RoleUsage.class, 0, 0);
4579                                    roleUsages = new RoleUsage[_tempArray.length];
4580                                    for(int _i=0; _i<roleUsages.length; _i++)
4581                                            roleUsages[_i] = (RoleUsage)_tempArray[_i];
4582                            } catch(org.eigenbase.xom.XOMException _ex) {
4583                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
4584                            }
4585                    }
4586    
4587    
4588                    public RoleUsage[] roleUsages;  //optional array
4589    
4590                    public String getName()
4591                    {
4592                            return "Union";
4593                    }
4594    
4595                    public void display(java.io.PrintWriter _out, int _indent)
4596                    {
4597                            _out.println(getName());
4598                            displayElementArray(_out, "roleUsages", roleUsages, _indent+1);
4599                    }
4600                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
4601                    {
4602                            _out.beginTag("Union", new org.eigenbase.xom.XMLAttrVector()
4603                                    );
4604                            displayXMLElementArray(_out, roleUsages);
4605                            _out.endTag("Union");
4606                    }
4607                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
4608                    {
4609                            boolean _diff = true;
4610                            Union _cother = (Union)_other;
4611                            _diff = _diff && displayElementArrayDiff("roleUsages", roleUsages, _cother.roleUsages, _out, _indent+1);
4612                            return _diff;
4613                    }
4614            }
4615    
4616            /**
4617             * Usage of a Role in a union Role.
4618             */
4619            public static class RoleUsage extends org.eigenbase.xom.ElementDef
4620            {
4621                    public RoleUsage()
4622                    {
4623                    }
4624    
4625                    public RoleUsage(org.eigenbase.xom.DOMWrapper _def)
4626                            throws org.eigenbase.xom.XOMException
4627                    {
4628                            try {
4629                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
4630                                    _parser = _parser;
4631                                    roleName = (String)_parser.getAttribute("roleName", "String", null, null, true);
4632                            } catch(org.eigenbase.xom.XOMException _ex) {
4633                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
4634                            }
4635                    }
4636    
4637                    public String roleName;  // required attribute
4638    
4639    
4640                    public String getName()
4641                    {
4642                            return "RoleUsage";
4643                    }
4644    
4645                    public void display(java.io.PrintWriter _out, int _indent)
4646                    {
4647                            _out.println(getName());
4648                            displayAttribute(_out, "roleName", roleName, _indent+1);
4649                    }
4650                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
4651                    {
4652                            _out.beginTag("RoleUsage", new org.eigenbase.xom.XMLAttrVector()
4653                                    .add("roleName", roleName)
4654                                    );
4655                            _out.endTag("RoleUsage");
4656                    }
4657                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
4658                    {
4659                            boolean _diff = true;
4660                            RoleUsage _cother = (RoleUsage)_other;
4661                            _diff = _diff && displayAttributeDiff("roleName", roleName, _cother.roleName, _out, _indent+1);
4662                            return _diff;
4663                    }
4664            }
4665    
4666            /**
4667             * A UserDefinedFunction is a function which
4668             * extends the MDX language. It must be implemented by a Java
4669             * class which implements the interface
4670             * mondrian.spi.UserDefinedFunction.
4671             */
4672            public static class UserDefinedFunction extends org.eigenbase.xom.ElementDef
4673            {
4674                    public UserDefinedFunction()
4675                    {
4676                    }
4677    
4678                    public UserDefinedFunction(org.eigenbase.xom.DOMWrapper _def)
4679                            throws org.eigenbase.xom.XOMException
4680                    {
4681                            try {
4682                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
4683                                    _parser = _parser;
4684                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
4685                                    className = (String)_parser.getAttribute("className", "String", null, null, true);
4686                            } catch(org.eigenbase.xom.XOMException _ex) {
4687                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
4688                            }
4689                    }
4690    
4691                    public String name;  // required attribute
4692                    public String className;  // required attribute
4693    
4694    
4695                    public String getName()
4696                    {
4697                            return "UserDefinedFunction";
4698                    }
4699    
4700                    public void display(java.io.PrintWriter _out, int _indent)
4701                    {
4702                            _out.println(getName());
4703                            displayAttribute(_out, "name", name, _indent+1);
4704                            displayAttribute(_out, "className", className, _indent+1);
4705                    }
4706                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
4707                    {
4708                            _out.beginTag("UserDefinedFunction", new org.eigenbase.xom.XMLAttrVector()
4709                                    .add("name", name)
4710                                    .add("className", className)
4711                                    );
4712                            _out.endTag("UserDefinedFunction");
4713                    }
4714                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
4715                    {
4716                            boolean _diff = true;
4717                            UserDefinedFunction _cother = (UserDefinedFunction)_other;
4718                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
4719                            _diff = _diff && displayAttributeDiff("className", className, _cother.className, _out, _indent+1);
4720                            return _diff;
4721                    }
4722            }
4723    
4724            /**
4725             * A Parameter defines a schema parameter.
4726             * It can be referenced from an MDX statement using the ParamRef
4727             * function and, if not final, its value can be overridden.
4728             */
4729            public static class Parameter extends org.eigenbase.xom.ElementDef
4730            {
4731                    public Parameter()
4732                    {
4733                    }
4734    
4735                    public Parameter(org.eigenbase.xom.DOMWrapper _def)
4736                            throws org.eigenbase.xom.XOMException
4737                    {
4738                            try {
4739                                    org.eigenbase.xom.DOMElementParser _parser = new org.eigenbase.xom.DOMElementParser(_def, "", MondrianDef.class);
4740                                    _parser = _parser;
4741                                    name = (String)_parser.getAttribute("name", "String", null, null, true);
4742                                    description = (String)_parser.getAttribute("description", "String", null, null, false);
4743                                    type = (String)_parser.getAttribute("type", "String", "String", _type_values, true);
4744                                    modifiable = (Boolean)_parser.getAttribute("modifiable", "Boolean", "true", null, false);
4745                                    defaultValue = (String)_parser.getAttribute("defaultValue", "String", null, null, false);
4746                            } catch(org.eigenbase.xom.XOMException _ex) {
4747                                    throw new org.eigenbase.xom.XOMException("In " + getName() + ": " + _ex.getMessage());
4748                            }
4749                    }
4750    
4751                    public String name;  // required attribute
4752                    public String description;  // optional attribute
4753                    /** Allowable values for {@link #type}. */
4754                    public static final String[] _type_values = {"String", "Numeric", "Integer", "Boolean", "Date", "Time", "Timestamp", "Member"};
4755                    public String type;  // attribute default: String
4756                    public Boolean modifiable;  // attribute default: true
4757                    public String defaultValue;  // optional attribute
4758    
4759    
4760                    public String getName()
4761                    {
4762                            return "Parameter";
4763                    }
4764    
4765                    public void display(java.io.PrintWriter _out, int _indent)
4766                    {
4767                            _out.println(getName());
4768                            displayAttribute(_out, "name", name, _indent+1);
4769                            displayAttribute(_out, "description", description, _indent+1);
4770                            displayAttribute(_out, "type", type, _indent+1);
4771                            displayAttribute(_out, "modifiable", modifiable, _indent+1);
4772                            displayAttribute(_out, "defaultValue", defaultValue, _indent+1);
4773                    }
4774                    public void displayXML(org.eigenbase.xom.XMLOutput _out, int _indent)
4775                    {
4776                            _out.beginTag("Parameter", new org.eigenbase.xom.XMLAttrVector()
4777                                    .add("name", name)
4778                                    .add("description", description)
4779                                    .add("type", type)
4780                                    .add("modifiable", modifiable)
4781                                    .add("defaultValue", defaultValue)
4782                                    );
4783                            _out.endTag("Parameter");
4784                    }
4785                    public boolean displayDiff(org.eigenbase.xom.ElementDef _other, java.io.PrintWriter _out, int _indent)
4786                    {
4787                            boolean _diff = true;
4788                            Parameter _cother = (Parameter)_other;
4789                            _diff = _diff && displayAttributeDiff("name", name, _cother.name, _out, _indent+1);
4790                            _diff = _diff && displayAttributeDiff("description", description, _cother.description, _out, _indent+1);
4791                            _diff = _diff && displayAttributeDiff("type", type, _cother.type, _out, _indent+1);
4792                            _diff = _diff && displayAttributeDiff("modifiable", modifiable, _cother.modifiable, _out, _indent+1);
4793                            _diff = _diff && displayAttributeDiff("defaultValue", defaultValue, _cother.defaultValue, _out, _indent+1);
4794                            return _diff;
4795                    }
4796            }
4797    
4798    
4799    }