Java binding for new document schema (from 1st hinxton vamsas Meeting)
[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 org.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\r
50      *  be parsed. Empty property strings are\r
51      *  allowed, and can be used to prototype\r
52      *  the input to a document. TODO: specify\r
53      *  allowed types\r
54      *  \r
55      */\r
56     private java.lang.String _type;\r
57 \r
58 \r
59       //----------------/\r
60      //- Constructors -/\r
61     //----------------/\r
62 \r
63     public Param() \r
64      {\r
65         super();\r
66         setContent("");\r
67     } //-- org.vamsas.objects.core.Param()\r
68 \r
69 \r
70       //-----------/\r
71      //- Methods -/\r
72     //-----------/\r
73 \r
74     /**\r
75      * Note: hashCode() has not been overriden\r
76      * \r
77      * @param obj\r
78      * @return boolean\r
79      */\r
80     public boolean equals(java.lang.Object obj)\r
81     {\r
82         if ( this == obj )\r
83             return true;\r
84         \r
85         if (super.equals(obj)==false)\r
86             return false;\r
87         \r
88         if (obj instanceof Param) {\r
89         \r
90             Param temp = (Param)obj;\r
91             if (this._content != null) {\r
92                 if (temp._content == null) return false;\r
93                 else if (!(this._content.equals(temp._content))) \r
94                     return false;\r
95             }\r
96             else if (temp._content != null)\r
97                 return false;\r
98             if (this._name != null) {\r
99                 if (temp._name == null) return false;\r
100                 else if (!(this._name.equals(temp._name))) \r
101                     return false;\r
102             }\r
103             else if (temp._name != null)\r
104                 return false;\r
105             if (this._type != null) {\r
106                 if (temp._type == null) return false;\r
107                 else if (!(this._type.equals(temp._type))) \r
108                     return false;\r
109             }\r
110             else if (temp._type != null)\r
111                 return false;\r
112             return true;\r
113         }\r
114         return false;\r
115     } //-- boolean equals(java.lang.Object) \r
116 \r
117     /**\r
118      * Returns the value of field 'content'. The field 'content'\r
119      * has the following description: internal content storage\r
120      * \r
121      * @return String\r
122      * @return the value of field 'content'.\r
123      */\r
124     public java.lang.String getContent()\r
125     {\r
126         return this._content;\r
127     } //-- java.lang.String getContent() \r
128 \r
129     /**\r
130      * Returns the value of field 'name'.\r
131      * \r
132      * @return String\r
133      * @return the value of field 'name'.\r
134      */\r
135     public java.lang.String getName()\r
136     {\r
137         return this._name;\r
138     } //-- java.lang.String getName() \r
139 \r
140     /**\r
141      * Returns the value of field 'type'. The field 'type' has the\r
142      * following description: The type specifies how the property\r
143      * will\r
144      *  be parsed. Empty property strings are\r
145      *  allowed, and can be used to prototype\r
146      *  the input to a document. TODO: specify\r
147      *  allowed types\r
148      *  \r
149      * \r
150      * @return String\r
151      * @return the value of field 'type'.\r
152      */\r
153     public java.lang.String getType()\r
154     {\r
155         return this._type;\r
156     } //-- java.lang.String getType() \r
157 \r
158     /**\r
159      * Method isValid\r
160      * \r
161      * \r
162      * \r
163      * @return boolean\r
164      */\r
165     public boolean isValid()\r
166     {\r
167         try {\r
168             validate();\r
169         }\r
170         catch (org.exolab.castor.xml.ValidationException vex) {\r
171             return false;\r
172         }\r
173         return true;\r
174     } //-- boolean isValid() \r
175 \r
176     /**\r
177      * Method marshal\r
178      * \r
179      * \r
180      * \r
181      * @param out\r
182      */\r
183     public void marshal(java.io.Writer out)\r
184         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
185     {\r
186         \r
187         Marshaller.marshal(this, out);\r
188     } //-- void marshal(java.io.Writer) \r
189 \r
190     /**\r
191      * Method marshal\r
192      * \r
193      * \r
194      * \r
195      * @param handler\r
196      */\r
197     public void marshal(org.xml.sax.ContentHandler handler)\r
198         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
199     {\r
200         \r
201         Marshaller.marshal(this, handler);\r
202     } //-- void marshal(org.xml.sax.ContentHandler) \r
203 \r
204     /**\r
205      * Sets the value of field 'content'. The field 'content' has\r
206      * the following description: internal content storage\r
207      * \r
208      * @param content the value of field 'content'.\r
209      */\r
210     public void setContent(java.lang.String content)\r
211     {\r
212         this._content = content;\r
213     } //-- void setContent(java.lang.String) \r
214 \r
215     /**\r
216      * Sets the value of field 'name'.\r
217      * \r
218      * @param name the value of field 'name'.\r
219      */\r
220     public void setName(java.lang.String name)\r
221     {\r
222         this._name = name;\r
223     } //-- void setName(java.lang.String) \r
224 \r
225     /**\r
226      * Sets the value of field 'type'. The field 'type' has the\r
227      * following description: The type specifies how the property\r
228      * will\r
229      *  be parsed. Empty property strings are\r
230      *  allowed, and can be used to prototype\r
231      *  the input to a document. TODO: specify\r
232      *  allowed types\r
233      *  \r
234      * \r
235      * @param type the value of field 'type'.\r
236      */\r
237     public void setType(java.lang.String type)\r
238     {\r
239         this._type = type;\r
240     } //-- void setType(java.lang.String) \r
241 \r
242     /**\r
243      * Method unmarshal\r
244      * \r
245      * \r
246      * \r
247      * @param reader\r
248      * @return Param\r
249      */\r
250     public static org.vamsas.objects.core.Param unmarshal(java.io.Reader reader)\r
251         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
252     {\r
253         return (org.vamsas.objects.core.Param) Unmarshaller.unmarshal(org.vamsas.objects.core.Param.class, reader);\r
254     } //-- org.vamsas.objects.core.Param unmarshal(java.io.Reader) \r
255 \r
256     /**\r
257      * Method validate\r
258      * \r
259      */\r
260     public void validate()\r
261         throws org.exolab.castor.xml.ValidationException\r
262     {\r
263         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
264         validator.validate(this);\r
265     } //-- void validate() \r
266 \r
267 }\r