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