autogenerated java classes for current schema
[vamsas.git] / src / org / vamsas / objects / core / Newick.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package org.vamsas.objects.core;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
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 /**
25  * Class Newick.
26  * 
27  * @version $Revision$ $Date$
28  */
29 public class Newick extends org.vamsas.client.Vobject 
30 implements java.io.Serializable
31 {
32
33
34       //--------------------------/
35      //- Class/Member Variables -/
36     //--------------------------/
37
38     /**
39      * internal content storage
40      */
41     private java.lang.String _content = "";
42
43     /**
44      * Field _title
45      */
46     private java.lang.String _title;
47
48     /**
49      * Primary Key for vamsas
50      *  object referencing
51      *  
52      */
53     private java.lang.String _id;
54
55     /**
56      * objects with
57      *  modifiable=false will not be
58      *  modified by a vamsas client
59      *  update
60      *  
61      */
62     private boolean _modifiable = true;
63
64     /**
65      * keeps track of state for field: _modifiable
66      */
67     private boolean _has_modifiable;
68
69
70       //----------------/
71      //- Constructors -/
72     //----------------/
73
74     public Newick() 
75      {
76         super();
77         setContent("");
78     } //-- org.vamsas.objects.core.Newick()
79
80
81       //-----------/
82      //- Methods -/
83     //-----------/
84
85     /**
86      * Method deleteModifiable
87      * 
88      */
89     public void deleteModifiable()
90     {
91         this._has_modifiable= false;
92     } //-- void deleteModifiable() 
93
94     /**
95      * Note: hashCode() has not been overriden
96      * 
97      * @param obj
98      * @return boolean
99      */
100     public boolean equals(java.lang.Object obj)
101     {
102         if ( this == obj )
103             return true;
104         
105         if (super.equals(obj)==false)
106             return false;
107         
108         if (obj instanceof Newick) {
109         
110             Newick temp = (Newick)obj;
111             if (this._content != null) {
112                 if (temp._content == null) return false;
113                 else if (!(this._content.equals(temp._content))) 
114                     return false;
115             }
116             else if (temp._content != null)
117                 return false;
118             if (this._title != null) {
119                 if (temp._title == null) return false;
120                 else if (!(this._title.equals(temp._title))) 
121                     return false;
122             }
123             else if (temp._title != null)
124                 return false;
125             if (this._id != null) {
126                 if (temp._id == null) return false;
127                 else if (!(this._id.equals(temp._id))) 
128                     return false;
129             }
130             else if (temp._id != null)
131                 return false;
132             if (this._modifiable != temp._modifiable)
133                 return false;
134             if (this._has_modifiable != temp._has_modifiable)
135                 return false;
136             return true;
137         }
138         return false;
139     } //-- boolean equals(java.lang.Object) 
140
141     /**
142      * Returns the value of field 'content'. The field 'content'
143      * has the following description: internal content storage
144      * 
145      * @return String
146      * @return the value of field 'content'.
147      */
148     public java.lang.String getContent()
149     {
150         return this._content;
151     } //-- java.lang.String getContent() 
152
153     /**
154      * Returns the value of field 'id'. The field 'id' has the
155      * following description: Primary Key for vamsas
156      *  object referencing
157      *  
158      * 
159      * @return String
160      * @return the value of field 'id'.
161      */
162     public java.lang.String getId()
163     {
164         return this._id;
165     } //-- java.lang.String getId() 
166
167     /**
168      * Returns the value of field 'modifiable'. The field
169      * 'modifiable' has the following description: objects with
170      *  modifiable=false will not be
171      *  modified by a vamsas client
172      *  update
173      *  
174      * 
175      * @return boolean
176      * @return the value of field 'modifiable'.
177      */
178     public boolean getModifiable()
179     {
180         return this._modifiable;
181     } //-- boolean getModifiable() 
182
183     /**
184      * Returns the value of field 'title'.
185      * 
186      * @return String
187      * @return the value of field 'title'.
188      */
189     public java.lang.String getTitle()
190     {
191         return this._title;
192     } //-- java.lang.String getTitle() 
193
194     /**
195      * Method hasModifiable
196      * 
197      * 
198      * 
199      * @return boolean
200      */
201     public boolean hasModifiable()
202     {
203         return this._has_modifiable;
204     } //-- boolean hasModifiable() 
205
206     /**
207      * Method isValid
208      * 
209      * 
210      * 
211      * @return boolean
212      */
213     public boolean isValid()
214     {
215         try {
216             validate();
217         }
218         catch (org.exolab.castor.xml.ValidationException vex) {
219             return false;
220         }
221         return true;
222     } //-- boolean isValid() 
223
224     /**
225      * Method marshal
226      * 
227      * 
228      * 
229      * @param out
230      */
231     public void marshal(java.io.Writer out)
232         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
233     {
234         
235         Marshaller.marshal(this, out);
236     } //-- void marshal(java.io.Writer) 
237
238     /**
239      * Method marshal
240      * 
241      * 
242      * 
243      * @param handler
244      */
245     public void marshal(org.xml.sax.ContentHandler handler)
246         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
247     {
248         
249         Marshaller.marshal(this, handler);
250     } //-- void marshal(org.xml.sax.ContentHandler) 
251
252     /**
253      * Sets the value of field 'content'. The field 'content' has
254      * the following description: internal content storage
255      * 
256      * @param content the value of field 'content'.
257      */
258     public void setContent(java.lang.String content)
259     {
260         this._content = content;
261     } //-- void setContent(java.lang.String) 
262
263     /**
264      * Sets the value of field 'id'. The field 'id' has the
265      * following description: Primary Key for vamsas
266      *  object referencing
267      *  
268      * 
269      * @param id the value of field 'id'.
270      */
271     public void setId(java.lang.String id)
272     {
273         this._id = id;
274     } //-- void setId(java.lang.String) 
275
276     /**
277      * Sets the value of field 'modifiable'. The field 'modifiable'
278      * has the following description: objects with
279      *  modifiable=false will not be
280      *  modified by a vamsas client
281      *  update
282      *  
283      * 
284      * @param modifiable the value of field 'modifiable'.
285      */
286     public void setModifiable(boolean modifiable)
287     {
288         this._modifiable = modifiable;
289         this._has_modifiable = true;
290     } //-- void setModifiable(boolean) 
291
292     /**
293      * Sets the value of field 'title'.
294      * 
295      * @param title the value of field 'title'.
296      */
297     public void setTitle(java.lang.String title)
298     {
299         this._title = title;
300     } //-- void setTitle(java.lang.String) 
301
302     /**
303      * Method unmarshal
304      * 
305      * 
306      * 
307      * @param reader
308      * @return Newick
309      */
310     public static org.vamsas.objects.core.Newick unmarshal(java.io.Reader reader)
311         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
312     {
313         return (org.vamsas.objects.core.Newick) Unmarshaller.unmarshal(org.vamsas.objects.core.Newick.class, reader);
314     } //-- org.vamsas.objects.core.Newick unmarshal(java.io.Reader) 
315
316     /**
317      * Method validate
318      * 
319      */
320     public void validate()
321         throws org.exolab.castor.xml.ValidationException
322     {
323         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
324         validator.validate(this);
325     } //-- void validate() 
326
327 }