GPL license added
[jalview.git] / src / jalview / binding / SequenceType.java
1 /*\r
2  * This class was automatically generated with\r
3  * <a href="http://www.castor.org">Castor 0.9.6</a>, using an XML\r
4  * Schema.\r
5  * $Id$\r
6  */\r
7 \r
8 /*\r
9 * Jalview - A Sequence Alignment Editor and Viewer\r
10 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
11 *\r
12 * This program is free software; you can redistribute it and/or\r
13 * modify it under the terms of the GNU General Public License\r
14 * as published by the Free Software Foundation; either version 2\r
15 * of the License, or (at your option) any later version.\r
16 *\r
17 * This program is distributed in the hope that it will be useful,\r
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
20 * GNU General Public License for more details.\r
21 *\r
22 * You should have received a copy of the GNU General Public License\r
23 * along with this program; if not, write to the Free Software\r
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
25 */\r
26 \r
27 package jalview.binding;\r
28 \r
29   //---------------------------------/\r
30  //- Imported classes and packages -/\r
31 //---------------------------------/\r
32 \r
33 import java.io.IOException;\r
34 import java.io.Reader;\r
35 import java.io.Serializable;\r
36 import java.io.Writer;\r
37 import org.exolab.castor.xml.MarshalException;\r
38 import org.exolab.castor.xml.Marshaller;\r
39 import org.exolab.castor.xml.Unmarshaller;\r
40 import org.exolab.castor.xml.ValidationException;\r
41 import org.xml.sax.ContentHandler;\r
42 \r
43 /**\r
44  * Class SequenceType.\r
45  *\r
46  * @version $Revision$ $Date$\r
47  */\r
48 public class SequenceType implements java.io.Serializable {\r
49 \r
50 \r
51       //--------------------------/\r
52      //- Class/Member Variables -/\r
53     //--------------------------/\r
54 \r
55     /**\r
56      * Field _id\r
57      */\r
58     private java.lang.String _id;\r
59 \r
60     /**\r
61      * Field _sequence\r
62      */\r
63     private java.lang.String _sequence;\r
64 \r
65     /**\r
66      * Field _name\r
67      */\r
68     private java.lang.String _name;\r
69 \r
70 \r
71       //----------------/\r
72      //- Constructors -/\r
73     //----------------/\r
74 \r
75     public SequenceType() {\r
76         super();\r
77     } //-- jalview.binding.SequenceType()\r
78 \r
79 \r
80       //-----------/\r
81      //- Methods -/\r
82     //-----------/\r
83 \r
84     /**\r
85      * Returns the value of field 'id'.\r
86      *\r
87      * @return String\r
88      * @return the value of field 'id'.\r
89      */\r
90     public java.lang.String getId()\r
91     {\r
92         return this._id;\r
93     } //-- java.lang.String getId()\r
94 \r
95     /**\r
96      * Returns the value of field 'name'.\r
97      *\r
98      * @return String\r
99      * @return the value of field 'name'.\r
100      */\r
101     public java.lang.String getName()\r
102     {\r
103         return this._name;\r
104     } //-- java.lang.String getName()\r
105 \r
106     /**\r
107      * Returns the value of field 'sequence'.\r
108      *\r
109      * @return String\r
110      * @return the value of field 'sequence'.\r
111      */\r
112     public java.lang.String getSequence()\r
113     {\r
114         return this._sequence;\r
115     } //-- java.lang.String getSequence()\r
116 \r
117     /**\r
118      * Method isValid\r
119      *\r
120      *\r
121      *\r
122      * @return boolean\r
123      */\r
124     public boolean isValid()\r
125     {\r
126         try {\r
127             validate();\r
128         }\r
129         catch (org.exolab.castor.xml.ValidationException vex) {\r
130             return false;\r
131         }\r
132         return true;\r
133     } //-- boolean isValid()\r
134 \r
135     /**\r
136      * Method marshal\r
137      *\r
138      *\r
139      *\r
140      * @param out\r
141      */\r
142     public void marshal(java.io.Writer out)\r
143         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
144     {\r
145 \r
146         Marshaller.marshal(this, out);\r
147     } //-- void marshal(java.io.Writer)\r
148 \r
149     /**\r
150      * Method marshal\r
151      *\r
152      *\r
153      *\r
154      * @param handler\r
155      */\r
156     public void marshal(org.xml.sax.ContentHandler handler)\r
157         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
158     {\r
159 \r
160         Marshaller.marshal(this, handler);\r
161     } //-- void marshal(org.xml.sax.ContentHandler)\r
162 \r
163     /**\r
164      * Sets the value of field 'id'.\r
165      *\r
166      * @param id the value of field 'id'.\r
167      */\r
168     public void setId(java.lang.String id)\r
169     {\r
170         this._id = id;\r
171     } //-- void setId(java.lang.String)\r
172 \r
173     /**\r
174      * Sets the value of field 'name'.\r
175      *\r
176      * @param name the value of field 'name'.\r
177      */\r
178     public void setName(java.lang.String name)\r
179     {\r
180         this._name = name;\r
181     } //-- void setName(java.lang.String)\r
182 \r
183     /**\r
184      * Sets the value of field 'sequence'.\r
185      *\r
186      * @param sequence the value of field 'sequence'.\r
187      */\r
188     public void setSequence(java.lang.String sequence)\r
189     {\r
190         this._sequence = sequence;\r
191     } //-- void setSequence(java.lang.String)\r
192 \r
193     /**\r
194      * Method unmarshal\r
195      *\r
196      *\r
197      *\r
198      * @param reader\r
199      * @return Object\r
200      */\r
201     public static java.lang.Object unmarshal(java.io.Reader reader)\r
202         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
203     {\r
204         return (jalview.binding.SequenceType) Unmarshaller.unmarshal(jalview.binding.SequenceType.class, reader);\r
205     } //-- java.lang.Object unmarshal(java.io.Reader)\r
206 \r
207     /**\r
208      * Method validate\r
209      *\r
210      */\r
211     public void validate()\r
212         throws org.exolab.castor.xml.ValidationException\r
213     {\r
214         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
215         validator.validate(this);\r
216     } //-- void validate()\r
217 \r
218 }\r