1 7 8 package org.openejb.alt.config.sys; 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 Container implements java.io.Serializable , org.openejb.alt.config.Service { 30 31 32 36 39 private java.lang.String _id; 40 41 44 private java.lang.String _provider; 45 46 49 private java.lang.String _ctype; 50 51 54 private java.lang.String _jar; 55 56 59 private java.lang.String _content = ""; 60 61 62 66 public Container() { 67 super(); 68 setContent(""); 69 } 71 72 76 82 public java.lang.String getContent() 83 { 84 return this._content; 85 } 87 92 public java.lang.String getCtype() 93 { 94 return this._ctype; 95 } 97 102 public java.lang.String getId() 103 { 104 return this._id; 105 } 107 112 public java.lang.String getJar() 113 { 114 return this._jar; 115 } 117 122 public java.lang.String getProvider() 123 { 124 return this._provider; 125 } 127 130 public boolean isValid() 131 { 132 try { 133 validate(); 134 } 135 catch (org.exolab.castor.xml.ValidationException vex) { 136 return false; 137 } 138 return true; 139 } 141 146 public void marshal(java.io.Writer out) 147 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 148 { 149 150 Marshaller.marshal(this, out); 151 } 153 158 public void marshal(org.xml.sax.ContentHandler handler) 159 throws java.io.IOException , org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 160 { 161 162 Marshaller.marshal(this, handler); 163 } 165 171 public void setContent(java.lang.String content) 172 { 173 this._content = content; 174 } 176 181 public void setCtype(java.lang.String ctype) 182 { 183 this._ctype = ctype; 184 } 186 191 public void setId(java.lang.String id) 192 { 193 this._id = id; 194 } 196 201 public void setJar(java.lang.String jar) 202 { 203 this._jar = jar; 204 } 206 211 public void setProvider(java.lang.String provider) 212 { 213 this._provider = provider; 214 } 216 221 public static java.lang.Object unmarshal(java.io.Reader reader) 222 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 223 { 224 return (org.openejb.alt.config.sys.Container) Unmarshaller.unmarshal(org.openejb.alt.config.sys.Container.class, reader); 225 } 227 230 public void validate() 231 throws org.exolab.castor.xml.ValidationException 232 { 233 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 234 validator.validate(this); 235 } 237 } 238 | Popular Tags |