2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
\r
8 package uk.ac.vamsas.objects.core;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import java.io.IOException;
\r
15 import java.io.Reader;
\r
16 import java.io.Serializable;
\r
17 import java.io.Writer;
\r
18 import org.exolab.castor.xml.MarshalException;
\r
19 import org.exolab.castor.xml.Marshaller;
\r
20 import org.exolab.castor.xml.Unmarshaller;
\r
21 import org.exolab.castor.xml.ValidationException;
\r
22 import org.xml.sax.ContentHandler;
\r
27 * @version $Revision$ $Date$
\r
29 public class Param extends uk.ac.vamsas.client.Vobject
\r
30 implements java.io.Serializable
\r
34 //--------------------------/
\r
35 //- Class/Member Variables -/
\r
36 //--------------------------/
\r
39 * internal content storage
\r
41 private java.lang.String _content = "";
\r
46 private java.lang.String _name;
\r
49 * The type specifies how the property will be parsed.
\r
50 * Empty property strings are allowed, and can be used to
\r
52 * input to a document. TODO: specify allowed types
\r
54 private java.lang.String _type;
\r
65 } //-- uk.ac.vamsas.objects.core.Param()
\r
73 * Note: hashCode() has not been overriden
\r
78 public boolean equals(java.lang.Object obj)
\r
83 if (super.equals(obj)==false)
\r
86 if (obj instanceof Param) {
\r
88 Param temp = (Param)obj;
\r
89 if (this._content != null) {
\r
90 if (temp._content == null) return false;
\r
91 else if (!(this._content.equals(temp._content)))
\r
94 else if (temp._content != null)
\r
96 if (this._name != null) {
\r
97 if (temp._name == null) return false;
\r
98 else if (!(this._name.equals(temp._name)))
\r
101 else if (temp._name != null)
\r
103 if (this._type != null) {
\r
104 if (temp._type == null) return false;
\r
105 else if (!(this._type.equals(temp._type)))
\r
108 else if (temp._type != null)
\r
113 } //-- boolean equals(java.lang.Object)
\r
116 * Returns the value of field 'content'. The field 'content'
\r
117 * has the following description: internal content storage
\r
120 * @return the value of field 'content'.
\r
122 public java.lang.String getContent()
\r
124 return this._content;
\r
125 } //-- java.lang.String getContent()
\r
128 * Returns the value of field 'name'.
\r
131 * @return the value of field 'name'.
\r
133 public java.lang.String getName()
\r
136 } //-- java.lang.String getName()
\r
139 * Returns the value of field 'type'. The field 'type' has the
\r
140 * following description: The type specifies how the property
\r
142 * Empty property strings are allowed, and can be used to
\r
144 * input to a document. TODO: specify allowed types
\r
147 * @return the value of field 'type'.
\r
149 public java.lang.String getType()
\r
152 } //-- java.lang.String getType()
\r
161 public boolean isValid()
\r
166 catch (org.exolab.castor.xml.ValidationException vex) {
\r
170 } //-- boolean isValid()
\r
179 public void marshal(java.io.Writer out)
\r
180 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
183 Marshaller.marshal(this, out);
\r
184 } //-- void marshal(java.io.Writer)
\r
193 public void marshal(org.xml.sax.ContentHandler handler)
\r
194 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
197 Marshaller.marshal(this, handler);
\r
198 } //-- void marshal(org.xml.sax.ContentHandler)
\r
201 * Sets the value of field 'content'. The field 'content' has
\r
202 * the following description: internal content storage
\r
204 * @param content the value of field 'content'.
\r
206 public void setContent(java.lang.String content)
\r
208 this._content = content;
\r
209 } //-- void setContent(java.lang.String)
\r
212 * Sets the value of field 'name'.
\r
214 * @param name the value of field 'name'.
\r
216 public void setName(java.lang.String name)
\r
219 } //-- void setName(java.lang.String)
\r
222 * Sets the value of field 'type'. The field 'type' has the
\r
223 * following description: The type specifies how the property
\r
225 * Empty property strings are allowed, and can be used to
\r
227 * input to a document. TODO: specify allowed types
\r
229 * @param type the value of field 'type'.
\r
231 public void setType(java.lang.String type)
\r
234 } //-- void setType(java.lang.String)
\r
244 public static uk.ac.vamsas.objects.core.Param unmarshal(java.io.Reader reader)
\r
245 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
\r
247 return (uk.ac.vamsas.objects.core.Param) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Param.class, reader);
\r
248 } //-- uk.ac.vamsas.objects.core.Param unmarshal(java.io.Reader)
\r
254 public void validate()
\r
255 throws org.exolab.castor.xml.ValidationException
\r
257 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
258 validator.validate(this);
\r
259 } //-- void validate()
\r