1 7 8 package com.calipso.reportgenerator.reportdefinitions; 9 10 14 import com.calipso.reportgenerator.reportdefinitions.types.ReportDataType; 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 DimensionSourceDefinition 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.ReportDataType _dataType; 51 52 55 private boolean _calculated; 56 57 60 private boolean _has_calculated; 61 62 65 private java.lang.String _expression; 66 67 70 private java.lang.String _externalData; 71 72 75 private boolean _indexed; 76 77 80 private boolean _has_indexed; 81 82 83 87 public DimensionSourceDefinition() { 88 super(); 89 } 91 92 96 99 public void deleteCalculated() 100 { 101 this._has_calculated= false; 102 } 104 107 public void deleteIndexed() 108 { 109 this._has_indexed= false; 110 } 112 117 public boolean getCalculated() 118 { 119 return this._calculated; 120 } 122 127 public com.calipso.reportgenerator.reportdefinitions.types.ReportDataType getDataType() 128 { 129 return this._dataType; 130 } 132 138 public java.lang.String getDescription() 139 { 140 return this._description; 141 } 143 148 public java.lang.String getExpression() 149 { 150 return this._expression; 151 } 153 159 public java.lang.String getExternalData() 160 { 161 return this._externalData; 162 } 164 169 public boolean getIndexed() 170 { 171 return this._indexed; 172 } 174 179 public java.lang.String getName() 180 { 181 return this._name; 182 } 184 187 public boolean hasCalculated() 188 { 189 return this._has_calculated; 190 } 192 195 public boolean hasIndexed() 196 { 197 return this._has_indexed; 198 } 200 203 public boolean isValid() 204 { 205 try { 206 validate(); 207 } 208 catch (org.exolab.castor.xml.ValidationException vex) { 209 return false; 210 } 211 return true; 212 } 214 219 public void marshal(java.io.Writer out) 220 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 221 { 222 223 Marshaller.marshal(this, out); 224 } 226 231 public void marshal(org.xml.sax.ContentHandler handler) 232 throws java.io.IOException , org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 233 { 234 235 Marshaller.marshal(this, handler); 236 } 238 243 public void setCalculated(boolean calculated) 244 { 245 this._calculated = calculated; 246 this._has_calculated = true; 247 } 249 254 public void setDataType(com.calipso.reportgenerator.reportdefinitions.types.ReportDataType dataType) 255 { 256 this._dataType = dataType; 257 } 259 264 public void setDescription(java.lang.String description) 265 { 266 this._description = description; 267 } 269 274 public void setExpression(java.lang.String expression) 275 { 276 this._expression = expression; 277 } 279 285 public void setExternalData(java.lang.String externalData) 286 { 287 this._externalData = externalData; 288 } 290 295 public void setIndexed(boolean indexed) 296 { 297 this._indexed = indexed; 298 this._has_indexed = true; 299 } 301 306 public void setName(java.lang.String name) 307 { 308 this._name = name; 309 } 311 316 public static com.calipso.reportgenerator.reportdefinitions.DimensionSourceDefinition unmarshal(java.io.Reader reader) 317 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 318 { 319 return (com.calipso.reportgenerator.reportdefinitions.DimensionSourceDefinition) Unmarshaller.unmarshal(com.calipso.reportgenerator.reportdefinitions.DimensionSourceDefinition.class, reader); 320 } 322 325 public void validate() 326 throws org.exolab.castor.xml.ValidationException 327 { 328 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 329 validator.validate(this); 330 } 332 } 333 | Popular Tags |