JAL-1620 version bump and release notes
[jalview.git] / src / jalview / schemabinding / version2 / MapListTo.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.schemabinding.version2;
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  * a region from start to end inclusive
32  * 
33  * @version $Revision$ $Date$
34  */
35 public class MapListTo implements java.io.Serializable
36 {
37
38   // --------------------------/
39   // - Class/Member Variables -/
40   // --------------------------/
41
42   /**
43    * Field _start.
44    */
45   private int _start;
46
47   /**
48    * keeps track of state for field: _start
49    */
50   private boolean _has_start;
51
52   /**
53    * Field _end.
54    */
55   private int _end;
56
57   /**
58    * keeps track of state for field: _end
59    */
60   private boolean _has_end;
61
62   // ----------------/
63   // - Constructors -/
64   // ----------------/
65
66   public MapListTo()
67   {
68     super();
69   }
70
71   // -----------/
72   // - Methods -/
73   // -----------/
74
75   /**
76      */
77   public void deleteEnd()
78   {
79     this._has_end = false;
80   }
81
82   /**
83      */
84   public void deleteStart()
85   {
86     this._has_start = false;
87   }
88
89   /**
90    * Returns the value of field 'end'.
91    * 
92    * @return the value of field 'End'.
93    */
94   public int getEnd()
95   {
96     return this._end;
97   }
98
99   /**
100    * Returns the value of field 'start'.
101    * 
102    * @return the value of field 'Start'.
103    */
104   public int getStart()
105   {
106     return this._start;
107   }
108
109   /**
110    * Method hasEnd.
111    * 
112    * @return true if at least one End has been added
113    */
114   public boolean hasEnd()
115   {
116     return this._has_end;
117   }
118
119   /**
120    * Method hasStart.
121    * 
122    * @return true if at least one Start has been added
123    */
124   public boolean hasStart()
125   {
126     return this._has_start;
127   }
128
129   /**
130    * Method isValid.
131    * 
132    * @return true if this object is valid according to the schema
133    */
134   public boolean isValid()
135   {
136     try
137     {
138       validate();
139     } catch (org.exolab.castor.xml.ValidationException vex)
140     {
141       return false;
142     }
143     return true;
144   }
145
146   /**
147    * 
148    * 
149    * @param out
150    * @throws org.exolab.castor.xml.MarshalException
151    *           if object is null or if any SAXException is thrown during
152    *           marshaling
153    * @throws org.exolab.castor.xml.ValidationException
154    *           if this object is an invalid instance according to the schema
155    */
156   public void marshal(final java.io.Writer out)
157           throws org.exolab.castor.xml.MarshalException,
158           org.exolab.castor.xml.ValidationException
159   {
160     Marshaller.marshal(this, out);
161   }
162
163   /**
164    * 
165    * 
166    * @param handler
167    * @throws java.io.IOException
168    *           if an IOException occurs during marshaling
169    * @throws org.exolab.castor.xml.ValidationException
170    *           if this object is an invalid instance according to the schema
171    * @throws org.exolab.castor.xml.MarshalException
172    *           if object is null or if any SAXException is thrown during
173    *           marshaling
174    */
175   public void marshal(final org.xml.sax.ContentHandler handler)
176           throws java.io.IOException,
177           org.exolab.castor.xml.MarshalException,
178           org.exolab.castor.xml.ValidationException
179   {
180     Marshaller.marshal(this, handler);
181   }
182
183   /**
184    * Sets the value of field 'end'.
185    * 
186    * @param end
187    *          the value of field 'end'.
188    */
189   public void setEnd(final int end)
190   {
191     this._end = end;
192     this._has_end = true;
193   }
194
195   /**
196    * Sets the value of field 'start'.
197    * 
198    * @param start
199    *          the value of field 'start'.
200    */
201   public void setStart(final int start)
202   {
203     this._start = start;
204     this._has_start = true;
205   }
206
207   /**
208    * Method unmarshal.
209    * 
210    * @param reader
211    * @throws org.exolab.castor.xml.MarshalException
212    *           if object is null or if any SAXException is thrown during
213    *           marshaling
214    * @throws org.exolab.castor.xml.ValidationException
215    *           if this object is an invalid instance according to the schema
216    * @return the unmarshaled jalview.schemabinding.version2.MapListTo
217    */
218   public static jalview.schemabinding.version2.MapListTo unmarshal(
219           final java.io.Reader reader)
220           throws org.exolab.castor.xml.MarshalException,
221           org.exolab.castor.xml.ValidationException
222   {
223     return (jalview.schemabinding.version2.MapListTo) Unmarshaller
224             .unmarshal(jalview.schemabinding.version2.MapListTo.class,
225                     reader);
226   }
227
228   /**
229    * 
230    * 
231    * @throws org.exolab.castor.xml.ValidationException
232    *           if this object is an invalid instance according to the schema
233    */
234   public void validate() throws org.exolab.castor.xml.ValidationException
235   {
236     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
237     validator.validate(this);
238   }
239
240 }