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