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