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 Connector 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 _jar; 50 51 54 private java.lang.String _content = ""; 55 56 57 61 public Connector() { 62 super(); 63 setContent(""); 64 } 66 67 71 77 public java.lang.String getContent() 78 { 79 return this._content; 80 } 82 87 public java.lang.String getId() 88 { 89 return this._id; 90 } 92 97 public java.lang.String getJar() 98 { 99 return this._jar; 100 } 102 107 public java.lang.String getProvider() 108 { 109 return this._provider; 110 } 112 115 public boolean isValid() 116 { 117 try { 118 validate(); 119 } 120 catch (org.exolab.castor.xml.ValidationException vex) { 121 return false; 122 } 123 return true; 124 } 126 131 public void marshal(java.io.Writer out) 132 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 133 { 134 135 Marshaller.marshal(this, out); 136 } 138 143 public void marshal(org.xml.sax.ContentHandler handler) 144 throws java.io.IOException , org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 145 { 146 147 Marshaller.marshal(this, handler); 148 } 150 156 public void setContent(java.lang.String content) 157 { 158 this._content = content; 159 } 161 166 public void setId(java.lang.String id) 167 { 168 this._id = id; 169 } 171 176 public void setJar(java.lang.String jar) 177 { 178 this._jar = jar; 179 } 181 186 public void setProvider(java.lang.String provider) 187 { 188 this._provider = provider; 189 } 191 196 public static java.lang.Object unmarshal(java.io.Reader reader) 197 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 198 { 199 return (org.openejb.alt.config.sys.Connector) Unmarshaller.unmarshal(org.openejb.alt.config.sys.Connector.class, reader); 200 } 202 205 public void validate() 206 throws org.exolab.castor.xml.ValidationException 207 { 208 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 209 validator.validate(this); 210 } 212 } 213 | Popular Tags |