1 7 8 package com.calipso.reportgenerator.reportdefinitions; 9 10 14 import com.calipso.reportgenerator.reportdefinitions.types.DataSourceDefinitionSourceTypeType; 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 DataSourceDefinition implements java.io.Serializable { 31 32 33 37 40 private java.lang.String _name; 41 42 45 private com.calipso.reportgenerator.reportdefinitions.types.DataSourceDefinitionSourceTypeType _sourceType; 46 47 50 private java.lang.String _expression; 51 52 55 private java.lang.String _externalClassName; 56 57 60 private java.lang.String _externalSourceData; 61 62 65 private java.lang.String _externalConnectionString; 66 67 70 private java.lang.String _externalConnectionClassName; 71 72 75 private java.lang.String _externalConnectionLocalUrl; 76 77 80 private java.lang.String _externalConnectionDistributedUrl; 81 82 85 private java.lang.String _externalConnectionUser; 86 87 90 private java.lang.String _externalConnectionPassword; 91 92 95 private java.lang.String _datePattern; 96 97 100 private java.lang.String _dateTimePattern; 101 102 105 private java.lang.String _sheetName; 106 107 110 private java.lang.String _dataInitialCell; 111 112 115 private java.lang.String _dataEndingCell; 116 117 118 122 public DataSourceDefinition() { 123 super(); 124 } 126 127 131 137 public java.lang.String getDataEndingCell() 138 { 139 return this._dataEndingCell; 140 } 142 148 public java.lang.String getDataInitialCell() 149 { 150 return this._dataInitialCell; 151 } 153 159 public java.lang.String getDatePattern() 160 { 161 return this._datePattern; 162 } 164 170 public java.lang.String getDateTimePattern() 171 { 172 return this._dateTimePattern; 173 } 175 180 public java.lang.String getExpression() 181 { 182 return this._expression; 183 } 185 191 public java.lang.String getExternalClassName() 192 { 193 return this._externalClassName; 194 } 196 202 public java.lang.String getExternalConnectionClassName() 203 { 204 return this._externalConnectionClassName; 205 } 207 213 public java.lang.String getExternalConnectionDistributedUrl() 214 { 215 return this._externalConnectionDistributedUrl; 216 } 218 224 public java.lang.String getExternalConnectionLocalUrl() 225 { 226 return this._externalConnectionLocalUrl; 227 } 229 235 public java.lang.String getExternalConnectionPassword() 236 { 237 return this._externalConnectionPassword; 238 } 240 246 public java.lang.String getExternalConnectionString() 247 { 248 return this._externalConnectionString; 249 } 251 257 public java.lang.String getExternalConnectionUser() 258 { 259 return this._externalConnectionUser; 260 } 262 268 public java.lang.String getExternalSourceData() 269 { 270 return this._externalSourceData; 271 } 273 278 public java.lang.String getName() 279 { 280 return this._name; 281 } 283 288 public java.lang.String getSheetName() 289 { 290 return this._sheetName; 291 } 293 298 public com.calipso.reportgenerator.reportdefinitions.types.DataSourceDefinitionSourceTypeType getSourceType() 299 { 300 return this._sourceType; 301 } 303 306 public boolean isValid() 307 { 308 try { 309 validate(); 310 } 311 catch (org.exolab.castor.xml.ValidationException vex) { 312 return false; 313 } 314 return true; 315 } 317 322 public void marshal(java.io.Writer out) 323 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 324 { 325 326 Marshaller.marshal(this, out); 327 } 329 334 public void marshal(org.xml.sax.ContentHandler handler) 335 throws java.io.IOException , org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 336 { 337 338 Marshaller.marshal(this, handler); 339 } 341 347 public void setDataEndingCell(java.lang.String dataEndingCell) 348 { 349 this._dataEndingCell = dataEndingCell; 350 } 352 358 public void setDataInitialCell(java.lang.String dataInitialCell) 359 { 360 this._dataInitialCell = dataInitialCell; 361 } 363 368 public void setDatePattern(java.lang.String datePattern) 369 { 370 this._datePattern = datePattern; 371 } 373 379 public void setDateTimePattern(java.lang.String dateTimePattern) 380 { 381 this._dateTimePattern = dateTimePattern; 382 } 384 389 public void setExpression(java.lang.String expression) 390 { 391 this._expression = expression; 392 } 394 401 public void setExternalClassName(java.lang.String externalClassName) 402 { 403 this._externalClassName = externalClassName; 404 } 406 413 public void setExternalConnectionClassName(java.lang.String externalConnectionClassName) 414 { 415 this._externalConnectionClassName = externalConnectionClassName; 416 } 418 425 public void setExternalConnectionDistributedUrl(java.lang.String externalConnectionDistributedUrl) 426 { 427 this._externalConnectionDistributedUrl = externalConnectionDistributedUrl; 428 } 430 437 public void setExternalConnectionLocalUrl(java.lang.String externalConnectionLocalUrl) 438 { 439 this._externalConnectionLocalUrl = externalConnectionLocalUrl; 440 } 442 449 public void setExternalConnectionPassword(java.lang.String externalConnectionPassword) 450 { 451 this._externalConnectionPassword = externalConnectionPassword; 452 } 454 461 public void setExternalConnectionString(java.lang.String externalConnectionString) 462 { 463 this._externalConnectionString = externalConnectionString; 464 } 466 473 public void setExternalConnectionUser(java.lang.String externalConnectionUser) 474 { 475 this._externalConnectionUser = externalConnectionUser; 476 } 478 485 public void setExternalSourceData(java.lang.String externalSourceData) 486 { 487 this._externalSourceData = externalSourceData; 488 } 490 495 public void setName(java.lang.String name) 496 { 497 this._name = name; 498 } 500 505 public void setSheetName(java.lang.String sheetName) 506 { 507 this._sheetName = sheetName; 508 } 510 515 public void setSourceType(com.calipso.reportgenerator.reportdefinitions.types.DataSourceDefinitionSourceTypeType sourceType) 516 { 517 this._sourceType = sourceType; 518 } 520 525 public static com.calipso.reportgenerator.reportdefinitions.DataSourceDefinition unmarshal(java.io.Reader reader) 526 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 527 { 528 return (com.calipso.reportgenerator.reportdefinitions.DataSourceDefinition) Unmarshaller.unmarshal(com.calipso.reportgenerator.reportdefinitions.DataSourceDefinition.class, reader); 529 } 531 534 public void validate() 535 throws org.exolab.castor.xml.ValidationException 536 { 537 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 538 validator.validate(this); 539 } 541 } 542 | Popular Tags |