JAL-1432 updated copyright notices
[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.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package jalview.schemabinding.version2;
20
21 //---------------------------------/
22 //- Imported classes and packages -/
23 //---------------------------------/
24
25 import org.exolab.castor.xml.Marshaller;
26 import org.exolab.castor.xml.Unmarshaller;
27
28 /**
29  * Class SequenceType.
30  * 
31  * @version $Revision$ $Date$
32  */
33 public class SequenceType implements java.io.Serializable
34 {
35
36   // --------------------------/
37   // - Class/Member Variables -/
38   // --------------------------/
39
40   /**
41    * Field _id.
42    */
43   private java.lang.String _id;
44
45   /**
46    * Field _description.
47    */
48   private java.lang.String _description;
49
50   /**
51    * Field _sequence.
52    */
53   private java.lang.String _sequence;
54
55   /**
56    * Field _name.
57    */
58   private java.lang.String _name;
59
60   // ----------------/
61   // - Constructors -/
62   // ----------------/
63
64   public SequenceType()
65   {
66     super();
67   }
68
69   // -----------/
70   // - Methods -/
71   // -----------/
72
73   /**
74    * Returns the value of field 'description'.
75    * 
76    * @return the value of field 'Description'.
77    */
78   public java.lang.String getDescription()
79   {
80     return this._description;
81   }
82
83   /**
84    * Returns the value of field 'id'.
85    * 
86    * @return the value of field 'Id'.
87    */
88   public java.lang.String getId()
89   {
90     return this._id;
91   }
92
93   /**
94    * Returns the value of field 'name'.
95    * 
96    * @return the value of field 'Name'.
97    */
98   public java.lang.String getName()
99   {
100     return this._name;
101   }
102
103   /**
104    * Returns the value of field 'sequence'.
105    * 
106    * @return the value of field 'Sequence'.
107    */
108   public java.lang.String getSequence()
109   {
110     return this._sequence;
111   }
112
113   /**
114    * Method isValid.
115    * 
116    * @return true if this object is valid according to the schema
117    */
118   public boolean isValid()
119   {
120     try
121     {
122       validate();
123     } catch (org.exolab.castor.xml.ValidationException vex)
124     {
125       return false;
126     }
127     return true;
128   }
129
130   /**
131    * 
132    * 
133    * @param out
134    * @throws org.exolab.castor.xml.MarshalException
135    *           if object is null or if any SAXException is thrown during
136    *           marshaling
137    * @throws org.exolab.castor.xml.ValidationException
138    *           if this object is an invalid instance according to the schema
139    */
140   public void marshal(final java.io.Writer out)
141           throws org.exolab.castor.xml.MarshalException,
142           org.exolab.castor.xml.ValidationException
143   {
144     Marshaller.marshal(this, out);
145   }
146
147   /**
148    * 
149    * 
150    * @param handler
151    * @throws java.io.IOException
152    *           if an IOException occurs during marshaling
153    * @throws org.exolab.castor.xml.ValidationException
154    *           if this object is an invalid instance according to the schema
155    * @throws org.exolab.castor.xml.MarshalException
156    *           if object is null or if any SAXException is thrown during
157    *           marshaling
158    */
159   public void marshal(final org.xml.sax.ContentHandler handler)
160           throws java.io.IOException,
161           org.exolab.castor.xml.MarshalException,
162           org.exolab.castor.xml.ValidationException
163   {
164     Marshaller.marshal(this, handler);
165   }
166
167   /**
168    * Sets the value of field 'description'.
169    * 
170    * @param description
171    *          the value of field 'description'.
172    */
173   public void setDescription(final java.lang.String description)
174   {
175     this._description = description;
176   }
177
178   /**
179    * Sets the value of field 'id'.
180    * 
181    * @param id
182    *          the value of field 'id'.
183    */
184   public void setId(final java.lang.String id)
185   {
186     this._id = id;
187   }
188
189   /**
190    * Sets the value of field 'name'.
191    * 
192    * @param name
193    *          the value of field 'name'.
194    */
195   public void setName(final java.lang.String name)
196   {
197     this._name = name;
198   }
199
200   /**
201    * Sets the value of field 'sequence'.
202    * 
203    * @param sequence
204    *          the value of field 'sequence'.
205    */
206   public void setSequence(final java.lang.String sequence)
207   {
208     this._sequence = sequence;
209   }
210
211   /**
212    * Method unmarshal.
213    * 
214    * @param reader
215    * @throws org.exolab.castor.xml.MarshalException
216    *           if object is null or if any SAXException is thrown during
217    *           marshaling
218    * @throws org.exolab.castor.xml.ValidationException
219    *           if this object is an invalid instance according to the schema
220    * @return the unmarshaled jalview.schemabinding.version2.SequenceType
221    */
222   public static jalview.schemabinding.version2.SequenceType unmarshal(
223           final java.io.Reader reader)
224           throws org.exolab.castor.xml.MarshalException,
225           org.exolab.castor.xml.ValidationException
226   {
227     return (jalview.schemabinding.version2.SequenceType) Unmarshaller
228             .unmarshal(jalview.schemabinding.version2.SequenceType.class,
229                     reader);
230   }
231
232   /**
233    * 
234    * 
235    * @throws org.exolab.castor.xml.ValidationException
236    *           if this object is an invalid instance according to the schema
237    */
238   public void validate() throws org.exolab.castor.xml.ValidationException
239   {
240     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
241     validator.validate(this);
242   }
243
244 }