1 7 8 package com.calipso.reportgenerator.reportdefinitions; 9 10 14 import java.io.IOException ; 15 import java.io.Reader ; 16 import java.io.Serializable ; 17 import java.io.Writer ; 18 import org.exolab.castor.xml.MarshalException; 19 import org.exolab.castor.xml.Marshaller; 20 import org.exolab.castor.xml.Unmarshaller; 21 import org.exolab.castor.xml.ValidationException; 22 import org.xml.sax.ContentHandler ; 23 24 29 public class Literals implements java.io.Serializable { 30 31 32 36 39 private java.lang.String _code; 40 41 44 private java.lang.String _value; 45 46 47 51 public Literals() { 52 super(); 53 } 55 56 60 65 public java.lang.String getCode() 66 { 67 return this._code; 68 } 70 75 public java.lang.String getValue() 76 { 77 return this._value; 78 } 80 83 public boolean isValid() 84 { 85 try { 86 validate(); 87 } 88 catch (org.exolab.castor.xml.ValidationException vex) { 89 return false; 90 } 91 return true; 92 } 94 99 public void marshal(java.io.Writer out) 100 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 101 { 102 103 Marshaller.marshal(this, out); 104 } 106 111 public void marshal(org.xml.sax.ContentHandler handler) 112 throws java.io.IOException , org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 113 { 114 115 Marshaller.marshal(this, handler); 116 } 118 123 public void setCode(java.lang.String code) 124 { 125 this._code = code; 126 } 128 133 public void setValue(java.lang.String value) 134 { 135 this._value = value; 136 } 138 143 public static com.calipso.reportgenerator.reportdefinitions.Literals unmarshal(java.io.Reader reader) 144 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 145 { 146 return (com.calipso.reportgenerator.reportdefinitions.Literals) Unmarshaller.unmarshal(com.calipso.reportgenerator.reportdefinitions.Literals.class, reader); 147 } 149 152 public void validate() 153 throws org.exolab.castor.xml.ValidationException 154 { 155 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 156 validator.validate(this); 157 } 159 } 160 | Popular Tags |