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