1 7 8 package com.calipso.reportgenerator.reportdefinitions; 9 10 14 import com.calipso.reportgenerator.reportdefinitions.types.CalculationType; 15 import java.io.IOException ; 16 import java.io.Reader ; 17 import java.io.Serializable ; 18 import java.io.Writer ; 19 import org.exolab.castor.xml.MarshalException; 20 import org.exolab.castor.xml.Marshaller; 21 import org.exolab.castor.xml.Unmarshaller; 22 import org.exolab.castor.xml.ValidationException; 23 import org.xml.sax.ContentHandler ; 24 25 30 public class MetricSourceDefinition implements java.io.Serializable { 31 32 33 37 40 private java.lang.String _name; 41 42 45 private java.lang.String _description; 46 47 50 private com.calipso.reportgenerator.reportdefinitions.types.CalculationType _aggregateType; 51 52 55 private com.calipso.reportgenerator.reportdefinitions.types.CalculationType _groupFooterType; 56 57 60 private boolean _calculated; 61 62 65 private boolean _has_calculated; 66 67 70 private java.lang.String _aggregateFunction; 71 72 75 private java.lang.String _groupFooterFunction; 76 77 80 private java.lang.String _externalData; 81 82 85 private boolean _externalCalculated; 86 87 90 private boolean _has_externalCalculated; 91 92 93 97 public MetricSourceDefinition() { 98 super(); 99 } 101 102 106 109 public void deleteCalculated() 110 { 111 this._has_calculated= false; 112 } 114 117 public void deleteExternalCalculated() 118 { 119 this._has_externalCalculated= false; 120 } 122 128 public java.lang.String getAggregateFunction() 129 { 130 return this._aggregateFunction; 131 } 133 139 public com.calipso.reportgenerator.reportdefinitions.types.CalculationType getAggregateType() 140 { 141 return this._aggregateType; 142 } 144 149 public boolean getCalculated() 150 { 151 return this._calculated; 152 } 154 160 public java.lang.String getDescription() 161 { 162 return this._description; 163 } 165 171 public boolean getExternalCalculated() 172 { 173 return this._externalCalculated; 174 } 176 182 public java.lang.String getExternalData() 183 { 184 return this._externalData; 185 } 187 193 public java.lang.String getGroupFooterFunction() 194 { 195 return this._groupFooterFunction; 196 } 198 204 public com.calipso.reportgenerator.reportdefinitions.types.CalculationType getGroupFooterType() 205 { 206 return this._groupFooterType; 207 } 209 214 public java.lang.String getName() 215 { 216 return this._name; 217 } 219 222 public boolean hasCalculated() 223 { 224 return this._has_calculated; 225 } 227 230 public boolean hasExternalCalculated() 231 { 232 return this._has_externalCalculated; 233 } 235 238 public boolean isValid() 239 { 240 try { 241 validate(); 242 } 243 catch (org.exolab.castor.xml.ValidationException vex) { 244 return false; 245 } 246 return true; 247 } 249 254 public void marshal(java.io.Writer out) 255 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 256 { 257 258 Marshaller.marshal(this, out); 259 } 261 266 public void marshal(org.xml.sax.ContentHandler handler) 267 throws java.io.IOException , org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 268 { 269 270 Marshaller.marshal(this, handler); 271 } 273 280 public void setAggregateFunction(java.lang.String aggregateFunction) 281 { 282 this._aggregateFunction = aggregateFunction; 283 } 285 291 public void setAggregateType(com.calipso.reportgenerator.reportdefinitions.types.CalculationType aggregateType) 292 { 293 this._aggregateType = aggregateType; 294 } 296 301 public void setCalculated(boolean calculated) 302 { 303 this._calculated = calculated; 304 this._has_calculated = true; 305 } 307 312 public void setDescription(java.lang.String description) 313 { 314 this._description = description; 315 } 317 324 public void setExternalCalculated(boolean externalCalculated) 325 { 326 this._externalCalculated = externalCalculated; 327 this._has_externalCalculated = true; 328 } 330 336 public void setExternalData(java.lang.String externalData) 337 { 338 this._externalData = externalData; 339 } 341 348 public void setGroupFooterFunction(java.lang.String groupFooterFunction) 349 { 350 this._groupFooterFunction = groupFooterFunction; 351 } 353 359 public void setGroupFooterType(com.calipso.reportgenerator.reportdefinitions.types.CalculationType groupFooterType) 360 { 361 this._groupFooterType = groupFooterType; 362 } 364 369 public void setName(java.lang.String name) 370 { 371 this._name = name; 372 } 374 379 public static com.calipso.reportgenerator.reportdefinitions.MetricSourceDefinition unmarshal(java.io.Reader reader) 380 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 381 { 382 return (com.calipso.reportgenerator.reportdefinitions.MetricSourceDefinition) Unmarshaller.unmarshal(com.calipso.reportgenerator.reportdefinitions.MetricSourceDefinition.class, reader); 383 } 385 388 public void validate() 389 throws org.exolab.castor.xml.ValidationException 390 { 391 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 392 validator.validate(this); 393 } 395 } 396 | Popular Tags |