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