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 LightBoxDefinitionDescriptor 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 LightBoxDefinitionDescriptor() { 57 super(); 58 xmlName = "LightBoxDefinition"; 59 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; 60 org.exolab.castor.xml.XMLFieldHandler handler = null; 61 org.exolab.castor.xml.FieldValidator fieldValidator = null; 62 64 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String .class, "_metricName", "MetricName", org.exolab.castor.xml.NodeType.Attribute); 66 desc.setImmutable(true); 67 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 68 public java.lang.Object getValue( java.lang.Object object ) 69 throws IllegalStateException 70 { 71 LightBoxDefinition target = (LightBoxDefinition) object; 72 return target.getMetricName(); 73 } 74 public void setValue( java.lang.Object object, java.lang.Object value) 75 throws IllegalStateException , IllegalArgumentException 76 { 77 try { 78 LightBoxDefinition target = (LightBoxDefinition) object; 79 target.setMetricName( (java.lang.String ) value); 80 } 81 catch (java.lang.Exception ex) { 82 throw new IllegalStateException (ex.toString()); 83 } 84 } 85 public java.lang.Object newInstance( java.lang.Object parent ) { 86 return null; 87 } 88 } ); 89 desc.setHandler(handler); 90 desc.setRequired(true); 91 addFieldDescriptor(desc); 92 93 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 95 fieldValidator.setMinOccurs(1); 96 { StringValidator typeValidator = new StringValidator(); 98 typeValidator.setWhiteSpace("preserve"); 99 fieldValidator.setValidator(typeValidator); 100 } 101 desc.setValidator(fieldValidator); 102 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionTypeType.class, "_type", "Type", org.exolab.castor.xml.NodeType.Attribute); 104 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 105 public java.lang.Object getValue( java.lang.Object object ) 106 throws IllegalStateException 107 { 108 LightBoxDefinition target = (LightBoxDefinition) object; 109 return target.getType(); 110 } 111 public void setValue( java.lang.Object object, java.lang.Object value) 112 throws IllegalStateException , IllegalArgumentException 113 { 114 try { 115 LightBoxDefinition target = (LightBoxDefinition) object; 116 target.setType( (com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionTypeType) value); 117 } 118 catch (java.lang.Exception ex) { 119 throw new IllegalStateException (ex.toString()); 120 } 121 } 122 public java.lang.Object newInstance( java.lang.Object parent ) { 123 return null; 124 } 125 } ); 126 desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionTypeType.class, handler)); 127 desc.setImmutable(true); 128 desc.setRequired(true); 129 addFieldDescriptor(desc); 130 131 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 133 fieldValidator.setMinOccurs(1); 134 { } 136 desc.setValidator(fieldValidator); 137 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionParameterType.class, "_parameter", "Parameter", org.exolab.castor.xml.NodeType.Attribute); 139 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 140 public java.lang.Object getValue( java.lang.Object object ) 141 throws IllegalStateException 142 { 143 LightBoxDefinition target = (LightBoxDefinition) object; 144 return target.getParameter(); 145 } 146 public void setValue( java.lang.Object object, java.lang.Object value) 147 throws IllegalStateException , IllegalArgumentException 148 { 149 try { 150 LightBoxDefinition target = (LightBoxDefinition) object; 151 target.setParameter( (com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionParameterType) value); 152 } 153 catch (java.lang.Exception ex) { 154 throw new IllegalStateException (ex.toString()); 155 } 156 } 157 public java.lang.Object newInstance( java.lang.Object parent ) { 158 return null; 159 } 160 } ); 161 desc.setHandler( new org.exolab.castor.xml.handlers.EnumFieldHandler(com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionParameterType.class, handler)); 162 desc.setImmutable(true); 163 desc.setRequired(true); 164 addFieldDescriptor(desc); 165 166 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 168 fieldValidator.setMinOccurs(1); 169 { } 171 desc.setValidator(fieldValidator); 172 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colorRed", "ColorRed", org.exolab.castor.xml.NodeType.Attribute); 174 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 175 public java.lang.Object getValue( java.lang.Object object ) 176 throws IllegalStateException 177 { 178 LightBoxDefinition target = (LightBoxDefinition) object; 179 if(!target.hasColorRed()) 180 return null; 181 return new Integer (target.getColorRed()); 182 } 183 public void setValue( java.lang.Object object, java.lang.Object value) 184 throws IllegalStateException , IllegalArgumentException 185 { 186 try { 187 LightBoxDefinition target = (LightBoxDefinition) object; 188 if (value == null) return; 190 191 target.setColorRed( ((Integer )value).intValue()); 192 } 193 catch (java.lang.Exception ex) { 194 throw new IllegalStateException (ex.toString()); 195 } 196 } 197 public java.lang.Object newInstance( java.lang.Object parent ) { 198 return null; 199 } 200 } ); 201 desc.setHandler(handler); 202 desc.setRequired(true); 203 addFieldDescriptor(desc); 204 205 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 207 fieldValidator.setMinOccurs(1); 208 { IntegerValidator typeValidator = new IntegerValidator(); 210 fieldValidator.setValidator(typeValidator); 211 } 212 desc.setValidator(fieldValidator); 213 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colorGreen", "ColorGreen", org.exolab.castor.xml.NodeType.Attribute); 215 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 216 public java.lang.Object getValue( java.lang.Object object ) 217 throws IllegalStateException 218 { 219 LightBoxDefinition target = (LightBoxDefinition) object; 220 if(!target.hasColorGreen()) 221 return null; 222 return new Integer (target.getColorGreen()); 223 } 224 public void setValue( java.lang.Object object, java.lang.Object value) 225 throws IllegalStateException , IllegalArgumentException 226 { 227 try { 228 LightBoxDefinition target = (LightBoxDefinition) object; 229 if (value == null) return; 231 232 target.setColorGreen( ((Integer )value).intValue()); 233 } 234 catch (java.lang.Exception ex) { 235 throw new IllegalStateException (ex.toString()); 236 } 237 } 238 public java.lang.Object newInstance( java.lang.Object parent ) { 239 return null; 240 } 241 } ); 242 desc.setHandler(handler); 243 desc.setRequired(true); 244 addFieldDescriptor(desc); 245 246 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 248 fieldValidator.setMinOccurs(1); 249 { IntegerValidator typeValidator = new IntegerValidator(); 251 fieldValidator.setValidator(typeValidator); 252 } 253 desc.setValidator(fieldValidator); 254 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_colorBlue", "ColorBlue", org.exolab.castor.xml.NodeType.Attribute); 256 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 257 public java.lang.Object getValue( java.lang.Object object ) 258 throws IllegalStateException 259 { 260 LightBoxDefinition target = (LightBoxDefinition) object; 261 if(!target.hasColorBlue()) 262 return null; 263 return new Integer (target.getColorBlue()); 264 } 265 public void setValue( java.lang.Object object, java.lang.Object value) 266 throws IllegalStateException , IllegalArgumentException 267 { 268 try { 269 LightBoxDefinition target = (LightBoxDefinition) object; 270 if (value == null) return; 272 273 target.setColorBlue( ((Integer )value).intValue()); 274 } 275 catch (java.lang.Exception ex) { 276 throw new IllegalStateException (ex.toString()); 277 } 278 } 279 public java.lang.Object newInstance( java.lang.Object parent ) { 280 return null; 281 } 282 } ); 283 desc.setHandler(handler); 284 desc.setRequired(true); 285 addFieldDescriptor(desc); 286 287 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 289 fieldValidator.setMinOccurs(1); 290 { IntegerValidator typeValidator = new IntegerValidator(); 292 fieldValidator.setValidator(typeValidator); 293 } 294 desc.setValidator(fieldValidator); 295 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String .class, "_value", "Value", org.exolab.castor.xml.NodeType.Attribute); 297 desc.setImmutable(true); 298 handler = (new org.exolab.castor.xml.XMLFieldHandler() { 299 public java.lang.Object getValue( java.lang.Object object ) 300 throws IllegalStateException 301 { 302 LightBoxDefinition target = (LightBoxDefinition) object; 303 return target.getValue(); 304 } 305 public void setValue( java.lang.Object object, java.lang.Object value) 306 throws IllegalStateException , IllegalArgumentException 307 { 308 try { 309 LightBoxDefinition target = (LightBoxDefinition) object; 310 target.setValue( (java.lang.String ) value); 311 } 312 catch (java.lang.Exception ex) { 313 throw new IllegalStateException (ex.toString()); 314 } 315 } 316 public java.lang.Object newInstance( java.lang.Object parent ) { 317 return null; 318 } 319 } ); 320 desc.setHandler(handler); 321 desc.setRequired(true); 322 addFieldDescriptor(desc); 323 324 fieldValidator = new org.exolab.castor.xml.FieldValidator(); 326 fieldValidator.setMinOccurs(1); 327 { StringValidator typeValidator = new StringValidator(); 329 typeValidator.setWhiteSpace("preserve"); 330 fieldValidator.setValidator(typeValidator); 331 } 332 desc.setValidator(fieldValidator); 333 335 } 337 338 342 345 public org.exolab.castor.mapping.AccessMode getAccessMode() 346 { 347 return null; 348 } 350 353 public org.exolab.castor.mapping.ClassDescriptor getExtends() 354 { 355 return null; 356 } 358 361 public org.exolab.castor.mapping.FieldDescriptor getIdentity() 362 { 363 return identity; 364 } 366 369 public java.lang.Class getJavaClass() 370 { 371 return com.calipso.reportgenerator.reportdefinitions.LightBoxDefinition.class; 372 } 374 377 public java.lang.String getNameSpacePrefix() 378 { 379 return nsPrefix; 380 } 382 385 public java.lang.String getNameSpaceURI() 386 { 387 return nsURI; 388 } 390 393 public org.exolab.castor.xml.TypeValidator getValidator() 394 { 395 return this; 396 } 398 401 public java.lang.String getXMLName() 402 { 403 return xmlName; 404 } 406 } 407 | Popular Tags |