refactored org to uk
[vamsas.git] / src / org / vamsas / objects / core / Param.java
1 /*\r
2  * This class was automatically generated with \r
3  * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
4  * Schema.\r
5  * $Id$\r
6  */\r
7 \r
8 package org.vamsas.objects.core;\r
9 \r
10   //---------------------------------/\r
11  //- Imported classes and packages -/\r
12 //---------------------------------/\r
13 \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
23 \r
24 /**\r
25  * Class Param.\r
26  * \r
27  * @version $Revision$ $Date$\r
28  */\r
29 public class Param extends uk.ac.vamsas.client.Vobject \r
30 implements java.io.Serializable\r
31 {\r
32 \r
33 \r
34       //--------------------------/\r
35      //- Class/Member Variables -/\r
36     //--------------------------/\r
37 \r
38     /**\r
39      * internal content storage\r
40      */\r
41     private java.lang.String _content = "";\r
42 \r
43     /**\r
44      * Field _name\r
45      */\r
46     private java.lang.String _name;\r
47 \r
48     /**\r
49      * The type specifies how the property will be parsed.\r
50      *  Empty property strings are allowed, and can be used to\r
51      * prototype the\r
52      *  input to a document. TODO: specify allowed types \r
53      */\r
54     private java.lang.String _type;\r
55 \r
56 \r
57       //----------------/\r
58      //- Constructors -/\r
59     //----------------/\r
60 \r
61     public Param() \r
62      {\r
63         super();\r
64         setContent("");\r
65     } //-- org.vamsas.objects.core.Param()\r
66 \r
67 \r
68       //-----------/\r
69      //- Methods -/\r
70     //-----------/\r
71 \r
72     /**\r
73      * Note: hashCode() has not been overriden\r
74      * \r
75      * @param obj\r
76      * @return boolean\r
77      */\r
78     public boolean equals(java.lang.Object obj)\r
79     {\r
80         if ( this == obj )\r
81             return true;\r
82         \r
83         if (super.equals(obj)==false)\r
84             return false;\r
85         \r
86         if (obj instanceof Param) {\r
87         \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
92                     return false;\r
93             }\r
94             else if (temp._content != null)\r
95                 return false;\r
96             if (this._name != null) {\r
97                 if (temp._name == null) return false;\r
98                 else if (!(this._name.equals(temp._name))) \r
99                     return false;\r
100             }\r
101             else if (temp._name != null)\r
102                 return false;\r
103             if (this._type != null) {\r
104                 if (temp._type == null) return false;\r
105                 else if (!(this._type.equals(temp._type))) \r
106                     return false;\r
107             }\r
108             else if (temp._type != null)\r
109                 return false;\r
110             return true;\r
111         }\r
112         return false;\r
113     } //-- boolean equals(java.lang.Object) \r
114 \r
115     /**\r
116      * Returns the value of field 'content'. The field 'content'\r
117      * has the following description: internal content storage\r
118      * \r
119      * @return String\r
120      * @return the value of field 'content'.\r
121      */\r
122     public java.lang.String getContent()\r
123     {\r
124         return this._content;\r
125     } //-- java.lang.String getContent() \r
126 \r
127     /**\r
128      * Returns the value of field 'name'.\r
129      * \r
130      * @return String\r
131      * @return the value of field 'name'.\r
132      */\r
133     public java.lang.String getName()\r
134     {\r
135         return this._name;\r
136     } //-- java.lang.String getName() \r
137 \r
138     /**\r
139      * Returns the value of field 'type'. The field 'type' has the\r
140      * following description: The type specifies how the property\r
141      * will be parsed.\r
142      *  Empty property strings are allowed, and can be used to\r
143      * prototype the\r
144      *  input to a document. TODO: specify allowed types \r
145      * \r
146      * @return String\r
147      * @return the value of field 'type'.\r
148      */\r
149     public java.lang.String getType()\r
150     {\r
151         return this._type;\r
152     } //-- java.lang.String getType() \r
153 \r
154     /**\r
155      * Method isValid\r
156      * \r
157      * \r
158      * \r
159      * @return boolean\r
160      */\r
161     public boolean isValid()\r
162     {\r
163         try {\r
164             validate();\r
165         }\r
166         catch (org.exolab.castor.xml.ValidationException vex) {\r
167             return false;\r
168         }\r
169         return true;\r
170     } //-- boolean isValid() \r
171 \r
172     /**\r
173      * Method marshal\r
174      * \r
175      * \r
176      * \r
177      * @param out\r
178      */\r
179     public void marshal(java.io.Writer out)\r
180         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
181     {\r
182         \r
183         Marshaller.marshal(this, out);\r
184     } //-- void marshal(java.io.Writer) \r
185 \r
186     /**\r
187      * Method marshal\r
188      * \r
189      * \r
190      * \r
191      * @param handler\r
192      */\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
195     {\r
196         \r
197         Marshaller.marshal(this, handler);\r
198     } //-- void marshal(org.xml.sax.ContentHandler) \r
199 \r
200     /**\r
201      * Sets the value of field 'content'. The field 'content' has\r
202      * the following description: internal content storage\r
203      * \r
204      * @param content the value of field 'content'.\r
205      */\r
206     public void setContent(java.lang.String content)\r
207     {\r
208         this._content = content;\r
209     } //-- void setContent(java.lang.String) \r
210 \r
211     /**\r
212      * Sets the value of field 'name'.\r
213      * \r
214      * @param name the value of field 'name'.\r
215      */\r
216     public void setName(java.lang.String name)\r
217     {\r
218         this._name = name;\r
219     } //-- void setName(java.lang.String) \r
220 \r
221     /**\r
222      * Sets the value of field 'type'. The field 'type' has the\r
223      * following description: The type specifies how the property\r
224      * will be parsed.\r
225      *  Empty property strings are allowed, and can be used to\r
226      * prototype the\r
227      *  input to a document. TODO: specify allowed types \r
228      * \r
229      * @param type the value of field 'type'.\r
230      */\r
231     public void setType(java.lang.String type)\r
232     {\r
233         this._type = type;\r
234     } //-- void setType(java.lang.String) \r
235 \r
236     /**\r
237      * Method unmarshal\r
238      * \r
239      * \r
240      * \r
241      * @param reader\r
242      * @return Param\r
243      */\r
244     public static org.vamsas.objects.core.Param unmarshal(java.io.Reader reader)\r
245         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
246     {\r
247         return (org.vamsas.objects.core.Param) Unmarshaller.unmarshal(org.vamsas.objects.core.Param.class, reader);\r
248     } //-- org.vamsas.objects.core.Param unmarshal(java.io.Reader) \r
249 \r
250     /**\r
251      * Method validate\r
252      * \r
253      */\r
254     public void validate()\r
255         throws org.exolab.castor.xml.ValidationException\r
256     {\r
257         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
258         validator.validate(this);\r
259     } //-- void validate() \r
260 \r
261 }\r