1 7 8 package com.calipso.reportgenerator.reportdefinitions; 9 10 14 import org.exolab.castor.mapping.AccessMode; 15 import org.exolab.castor.xml.TypeValidator; 16 import org.exolab.castor.xml.XMLFieldDescriptor; 17 import org.exolab.castor.xml.validators.*; 18 19 24 public class DimensionPropertyDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { 25 26 27 31 34 private java.lang.String nsPrefix; 35 36 39 private java.lang.String nsURI; 40 41 44 private java.lang.String xmlName; 45 46 49 private org.exolab.castor.xml.XMLFieldDescriptor identity; 50 51 52 56 public DimensionPropertyDescriptor() { 57 super(); 58 xmlName = "DimensionProperty"; 59 60 setCompositorAsSequence(); 62 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; 63 org.exolab.castor.xml.XMLFieldHandler handler = null; 64 org.exolab.castor.xml.FieldValidator fieldValidator = null; 65 67 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String .class, "_dimensionName", "DimensionName", org.exolab.castor.xml.NodeType.Attribute); 69 desc.setImmutable(true); 70 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 71 public java.lang.Object getValue( java.lang.Object object ) 72 throws IllegalStateException 73 { 74 DimensionProperty target = (DimensionProperty) object; 75 return target.getDimensionName(); 76 } 77 public void setValue( java.lang.Object object, java.lang.Object value) 78 throws IllegalStateException , IllegalArgumentException 79 { 80 try { 81 DimensionProperty target = (DimensionProperty) object; 82 target.setDimensionName( (java.lang.String ) value); 83 } 84 catch (java.lang.Exception ex) { 85 throw new IllegalStateException (ex.toString()); 86 } 87 } 88 public java.lang.Object newInstance( java.lang.Object parent ) { 89 return null; 90 } 91 } ); 92 desc.setHandler(handler); 93 desc.setRequired(true); 94 addFieldDescriptor(desc); 95 96 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 98 fieldValidator.setMinOccurs(1); 99 { StringValidator typeValidator = new StringValidator(); 101 typeValidator.setWhiteSpace("preserve"); 102 fieldValidator.setValidator(typeValidator); 103 } 104 desc.setValidator(fieldValidator); 105 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_width", "Width", org.exolab.castor.xml.NodeType.Attribute); 107 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 108 public java.lang.Object getValue( java.lang.Object object ) 109 throws IllegalStateException 110 { 111 DimensionProperty target = (DimensionProperty) object; 112 if(!target.hasWidth()) 113 return null; 114 return new Integer (target.getWidth()); 115 } 116 public void setValue( java.lang.Object object, java.lang.Object value) 117 throws IllegalStateException , IllegalArgumentException 118 { 119 try { 120 DimensionProperty target = (DimensionProperty) object; 121 if (value == null) { 123 target.deleteWidth(); 124 return; 125 } 126 target.setWidth( ((Integer )value).intValue()); 127 } 128 catch (java.lang.Exception ex) { 129 throw new IllegalStateException (ex.toString()); 130 } 131 } 132 public java.lang.Object newInstance( java.lang.Object parent ) { 133 return null; 134 } 135 } ); 136 desc.setHandler(handler); 137 addFieldDescriptor(desc); 138 139 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 141 { IntegerValidator typeValidator= new IntegerValidator(); 143 fieldValidator.setValidator(typeValidator); 144 } 145 desc.setValidator(fieldValidator); 146 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType.class, "_location", "Location", org.exolab.castor.xml.NodeType.Attribute); 148 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 149 public java.lang.Object getValue( java.lang.Object object ) 150 throws IllegalStateException 151 { 152 DimensionProperty target = (DimensionProperty) object; 153 return target.getLocation(); 154 } 155 public void setValue( java.lang.Object object, java.lang.Object value) 156 throws IllegalStateException , IllegalArgumentException 157 { 158 try { 159 DimensionProperty target = (DimensionProperty) object; 160 target.setLocation( (com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType) value); 161 } 162 catch (java.lang.Exception ex) { 163 throw new IllegalStateException (ex.toString()); 164 } 165 } 166 public java.lang.Object newInstance( java.lang.Object parent ) { 167 return null; 168 } 169 } ); 170 desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyLocationType.class, handler)); 171 desc.setImmutable(true); 172 desc.setRequired(true); 173 addFieldDescriptor(desc); 174 175 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 177 fieldValidator.setMinOccurs(1); 178 { } 180 desc.setValidator(fieldValidator); 181 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType.class, "_order", "Order", org.exolab.castor.xml.NodeType.Attribute); 183 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 184 public java.lang.Object getValue( java.lang.Object object ) 185 throws IllegalStateException 186 { 187 DimensionProperty target = (DimensionProperty) object; 188 return target.getOrder(); 189 } 190 public void setValue( java.lang.Object object, java.lang.Object value) 191 throws IllegalStateException , IllegalArgumentException 192 { 193 try { 194 DimensionProperty target = (DimensionProperty) object; 195 target.setOrder( (com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType) value); 196 } 197 catch (java.lang.Exception ex) { 198 throw new IllegalStateException (ex.toString()); 199 } 200 } 201 public java.lang.Object newInstance( java.lang.Object parent ) { 202 return null; 203 } 204 } ); 205 desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.DimensionPropertyOrderType.class, handler)); 206 desc.setImmutable(true); 207 addFieldDescriptor(desc); 208 209 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 211 { } 213 desc.setValidator(fieldValidator); 214 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_ubication", "Ubication", org.exolab.castor.xml.NodeType.Attribute); 216 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 217 public java.lang.Object getValue( java.lang.Object object ) 218 throws IllegalStateException 219 { 220 DimensionProperty target = (DimensionProperty) object; 221 if(!target.hasUbication()) 222 return null; 223 return new Integer (target.getUbication()); 224 } 225 public void setValue( java.lang.Object object, java.lang.Object value) 226 throws IllegalStateException , IllegalArgumentException 227 { 228 try { 229 DimensionProperty target = (DimensionProperty) object; 230 if (value == null) { 232 target.deleteUbication(); 233 return; 234 } 235 target.setUbication( ((Integer )value).intValue()); 236 } 237 catch (java.lang.Exception ex) { 238 throw new IllegalStateException (ex.toString()); 239 } 240 } 241 public java.lang.Object newInstance( java.lang.Object parent ) { 242 return null; 243 } 244 } ); 245 desc.setHandler(handler); 246 addFieldDescriptor(desc); 247 248 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 250 { IntegerValidator typeValidator = new IntegerValidator(); 252 fieldValidator.setValidator(typeValidator); 253 } 254 desc.setValidator(fieldValidator); 255 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String .class, "_rankMetricName", "RankMetricName", org.exolab.castor.xml.NodeType.Attribute); 257 desc.setImmutable(true); 258 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 259 public java.lang.Object getValue( java.lang.Object object ) 260 throws IllegalStateException 261 { 262 DimensionProperty target = (DimensionProperty) object; 263 return target.getRankMetricName(); 264 } 265 public void setValue( java.lang.Object object, java.lang.Object value) 266 throws IllegalStateException , IllegalArgumentException 267 { 268 try { 269 DimensionProperty target = (DimensionProperty) object; 270 target.setRankMetricName( (java.lang.String ) value); 271 } 272 catch (java.lang.Exception ex) { 273 throw new IllegalStateException (ex.toString()); 274 } 275 } 276 public java.lang.Object newInstance( java.lang.Object parent ) { 277 return null; 278 } 279 } ); 280 desc.setHandler(handler); 281 addFieldDescriptor(desc); 282 283 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 285 { StringValidator typeValidator = new StringValidator(); 287 typeValidator.setWhiteSpace("preserve"); 288 fieldValidator.setValidator(typeValidator); 289 } 290 desc.setValidator(fieldValidator); 291 293 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.ExcludeValue.class, "_excludeValueList", "ExcludeValue", org.exolab.castor.xml.NodeType.Element); 295 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 296 public java.lang.Object getValue( java.lang.Object object ) 297 throws IllegalStateException 298 { 299 DimensionProperty target = (DimensionProperty) object; 300 return target.getExcludeValue(); 301 } 302 public void setValue( java.lang.Object object, java.lang.Object value) 303 throws IllegalStateException , IllegalArgumentException 304 { 305 try { 306 DimensionProperty target = (DimensionProperty) object; 307 target.addExcludeValue( (com.calipso.reportgenerator.reportdefinitions.ExcludeValue) value); 308 } 309 catch (java.lang.Exception ex) { 310 throw new IllegalStateException (ex.toString()); 311 } 312 } 313 public java.lang.Object newInstance( java.lang.Object parent ) { 314 return new com.calipso.reportgenerator.reportdefinitions.ExcludeValue(); 315 } 316 } ); 317 desc.setHandler(handler); 318 desc.setMultivalued(true); 319 addFieldDescriptor(desc); 320 321 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 323 fieldValidator.setMinOccurs(0); 324 { } 326 desc.setValidator(fieldValidator); 327 } 329 330 334 337 public org.exolab.castor.mapping.AccessMode getAccessMode() 338 { 339 return null; 340 } 342 345 public org.exolab.castor.mapping.ClassDescriptor getExtends() 346 { 347 return null; 348 } 350 353 public org.exolab.castor.mapping.FieldDescriptor getIdentity() 354 { 355 return identity; 356 } 358 361 public java.lang.Class getJavaClass() 362 { 363 return com.calipso.reportgenerator.reportdefinitions.DimensionProperty.class; 364 } 366 369 public java.lang.String getNameSpacePrefix() 370 { 371 return nsPrefix; 372 } 374 377 public java.lang.String getNameSpaceURI() 378 { 379 return nsURI; 380 } 382 385 public org.exolab.castor.xml.TypeValidator getValidator() 386 { 387 return this; 388 } 390 393 public java.lang.String getXMLName() 394 { 395 return xmlName; 396 } 398 } 399 | Popular Tags |