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