1a6dc0845527df6aa86d4fd0ae0f959f2763a123
[jalview.git] / src / jalview / schemabinding / version2 / SequenceType.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  
17  * If not, see <http://www.gnu.org/licenses/>.
18  * The Jalview Authors are detailed in the 'AUTHORS' file.
19  ******************************************************************************/
20 /*
21  * This class was automatically generated with 
22  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
23  * Schema.
24  * $Id$
25  */
26
27 package jalview.schemabinding.version2;
28
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
32
33 import org.exolab.castor.xml.Marshaller;
34 import org.exolab.castor.xml.Unmarshaller;
35
36 /**
37  * Class SequenceType.
38  * 
39  * @version $Revision$ $Date$
40  */
41 public class SequenceType implements java.io.Serializable
42 {
43
44   // --------------------------/
45   // - Class/Member Variables -/
46   // --------------------------/
47
48   /**
49    * Field _id.
50    */
51   private java.lang.String _id;
52
53   /**
54    * Field _description.
55    */
56   private java.lang.String _description;
57
58   /**
59    * Field _sequence.
60    */
61   private java.lang.String _sequence;
62
63   /**
64    * Field _name.
65    */
66   private java.lang.String _name;
67
68   // ----------------/
69   // - Constructors -/
70   // ----------------/
71
72   public SequenceType()
73   {
74     super();
75   }
76
77   // -----------/
78   // - Methods -/
79   // -----------/
80
81   /**
82    * Returns the value of field 'description'.
83    * 
84    * @return the value of field 'Description'.
85    */
86   public java.lang.String getDescription()
87   {
88     return this._description;
89   }
90
91   /**
92    * Returns the value of field 'id'.
93    * 
94    * @return the value of field 'Id'.
95    */
96   public java.lang.String getId()
97   {
98     return this._id;
99   }
100
101   /**
102    * Returns the value of field 'name'.
103    * 
104    * @return the value of field 'Name'.
105    */
106   public java.lang.String getName()
107   {
108     return this._name;
109   }
110
111   /**
112    * Returns the value of field 'sequence'.
113    * 
114    * @return the value of field 'Sequence'.
115    */
116   public java.lang.String getSequence()
117   {
118     return this._sequence;
119   }
120
121   /**
122    * Method isValid.
123    * 
124    * @return true if this object is valid according to the schema
125    */
126   public boolean isValid()
127   {
128     try
129     {
130       validate();
131     } catch (org.exolab.castor.xml.ValidationException vex)
132     {
133       return false;
134     }
135     return true;
136   }
137
138   /**
139    * 
140    * 
141    * @param out
142    * @throws org.exolab.castor.xml.MarshalException
143    *           if object is null or if any SAXException is thrown during
144    *           marshaling
145    * @throws org.exolab.castor.xml.ValidationException
146    *           if this object is an invalid instance according to the schema
147    */
148   public void marshal(final java.io.Writer out)
149           throws org.exolab.castor.xml.MarshalException,
150           org.exolab.castor.xml.ValidationException
151   {
152     Marshaller.marshal(this, out);
153   }
154
155   /**
156    * 
157    * 
158    * @param handler
159    * @throws java.io.IOException
160    *           if an IOException occurs during marshaling
161    * @throws org.exolab.castor.xml.ValidationException
162    *           if this object is an invalid instance according to the schema
163    * @throws org.exolab.castor.xml.MarshalException
164    *           if object is null or if any SAXException is thrown during
165    *           marshaling
166    */
167   public void marshal(final org.xml.sax.ContentHandler handler)
168           throws java.io.IOException,
169           org.exolab.castor.xml.MarshalException,
170           org.exolab.castor.xml.ValidationException
171   {
172     Marshaller.marshal(this, handler);
173   }
174
175   /**
176    * Sets the value of field 'description'.
177    * 
178    * @param description
179    *          the value of field 'description'.
180    */
181   public void setDescription(final java.lang.String description)
182   {
183     this._description = description;
184   }
185
186   /**
187    * Sets the value of field 'id'.
188    * 
189    * @param id
190    *          the value of field 'id'.
191    */
192   public void setId(final java.lang.String id)
193   {
194     this._id = id;
195   }
196
197   /**
198    * Sets the value of field 'name'.
199    * 
200    * @param name
201    *          the value of field 'name'.
202    */
203   public void setName(final java.lang.String name)
204   {
205     this._name = name;
206   }
207
208   /**
209    * Sets the value of field 'sequence'.
210    * 
211    * @param sequence
212    *          the value of field 'sequence'.
213    */
214   public void setSequence(final java.lang.String sequence)
215   {
216     this._sequence = sequence;
217   }
218
219   /**
220    * Method unmarshal.
221    * 
222    * @param reader
223    * @throws org.exolab.castor.xml.MarshalException
224    *           if object is null or if any SAXException is thrown during
225    *           marshaling
226    * @throws org.exolab.castor.xml.ValidationException
227    *           if this object is an invalid instance according to the schema
228    * @return the unmarshaled jalview.schemabinding.version2.SequenceType
229    */
230   public static jalview.schemabinding.version2.SequenceType unmarshal(
231           final java.io.Reader reader)
232           throws org.exolab.castor.xml.MarshalException,
233           org.exolab.castor.xml.ValidationException
234   {
235     return (jalview.schemabinding.version2.SequenceType) Unmarshaller
236             .unmarshal(jalview.schemabinding.version2.SequenceType.class,
237                     reader);
238   }
239
240   /**
241    * 
242    * 
243    * @throws org.exolab.castor.xml.ValidationException
244    *           if this object is an invalid instance according to the schema
245    */
246   public void validate() throws org.exolab.castor.xml.ValidationException
247   {
248     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
249     validator.validate(this);
250   }
251
252 }