2 * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
\r
3 * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
5 * This program is free software; you can redistribute it and/or
\r
6 * modify it under the terms of the GNU General Public License
\r
7 * as published by the Free Software Foundation; either version 2
\r
8 * of the License, or (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program; if not, write to the Free Software
\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
19 package jalview.schemabinding.version2;
\r
21 //---------------------------------/
\r
22 //- Imported classes and packages -/
\r
23 //---------------------------------/
\r
25 import org.exolab.castor.xml.Marshaller;
\r
26 import org.exolab.castor.xml.Unmarshaller;
\r
29 * a region from start to end inclusive
\r
31 * @version $Revision$ $Date$
\r
33 public class MapListFrom implements java.io.Serializable {
\r
36 //--------------------------/
\r
37 //- Class/Member Variables -/
\r
38 //--------------------------/
\r
46 * keeps track of state for field: _start
\r
48 private boolean _has_start;
\r
56 * keeps track of state for field: _end
\r
58 private boolean _has_end;
\r
65 public MapListFrom() {
\r
76 public void deleteEnd(
\r
78 this._has_end= false;
\r
83 public void deleteStart(
\r
85 this._has_start= false;
\r
89 * Returns the value of field 'end'.
\r
91 * @return the value of field 'End'.
\r
99 * Returns the value of field 'start'.
\r
101 * @return the value of field 'Start'.
\r
103 public int getStart(
\r
105 return this._start;
\r
111 * @return true if at least one End has been added
\r
113 public boolean hasEnd(
\r
115 return this._has_end;
\r
121 * @return true if at least one Start has been added
\r
123 public boolean hasStart(
\r
125 return this._has_start;
\r
131 * @return true if this object is valid according to the schema
\r
133 public boolean isValid(
\r
137 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
147 * @throws org.exolab.castor.xml.MarshalException if object is
\r
148 * null or if any SAXException is thrown during marshaling
\r
149 * @throws org.exolab.castor.xml.ValidationException if this
\r
150 * object is an invalid instance according to the schema
\r
152 public void marshal(
\r
153 final java.io.Writer out)
\r
154 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
155 Marshaller.marshal(this, out);
\r
162 * @throws java.io.IOException if an IOException occurs during
\r
164 * @throws org.exolab.castor.xml.ValidationException if this
\r
165 * object is an invalid instance according to the schema
\r
166 * @throws org.exolab.castor.xml.MarshalException if object is
\r
167 * null or if any SAXException is thrown during marshaling
\r
169 public void marshal(
\r
170 final org.xml.sax.ContentHandler handler)
\r
171 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
172 Marshaller.marshal(this, handler);
\r
176 * Sets the value of field 'end'.
\r
178 * @param end the value of field 'end'.
\r
180 public void setEnd(
\r
183 this._has_end = true;
\r
187 * Sets the value of field 'start'.
\r
189 * @param start the value of field 'start'.
\r
191 public void setStart(
\r
193 this._start = start;
\r
194 this._has_start = true;
\r
198 * Method unmarshal.
\r
201 * @throws org.exolab.castor.xml.MarshalException if object is
\r
202 * null or if any SAXException is thrown during marshaling
\r
203 * @throws org.exolab.castor.xml.ValidationException if this
\r
204 * object is an invalid instance according to the schema
\r
205 * @return the unmarshaled
\r
206 * jalview.schemabinding.version2.MapListFrom
\r
208 public static jalview.schemabinding.version2.MapListFrom unmarshal(
\r
209 final java.io.Reader reader)
\r
210 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
211 return (jalview.schemabinding.version2.MapListFrom) Unmarshaller.unmarshal(jalview.schemabinding.version2.MapListFrom.class, reader);
\r
217 * @throws org.exolab.castor.xml.ValidationException if this
\r
218 * object is an invalid instance according to the schema
\r
220 public void validate(
\r
222 throws org.exolab.castor.xml.ValidationException {
\r
223 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
224 validator.validate(this);
\r