2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
\r
3 * Copyright (C) 2008 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 MapListTo 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
60 // ----------------/
\r
61 // - Constructors -/
\r
62 // ----------------/
\r
75 public void deleteEnd()
\r
77 this._has_end = false;
\r
82 public void deleteStart()
\r
84 this._has_start = false;
\r
88 * Returns the value of field 'end'.
\r
90 * @return the value of field 'End'.
\r
98 * Returns the value of field 'start'.
\r
100 * @return the value of field 'Start'.
\r
102 public int getStart()
\r
104 return this._start;
\r
110 * @return true if at least one End has been added
\r
112 public boolean hasEnd()
\r
114 return this._has_end;
\r
120 * @return true if at least one Start has been added
\r
122 public boolean hasStart()
\r
124 return this._has_start;
\r
130 * @return true if this object is valid according to the schema
\r
132 public boolean isValid()
\r
137 } catch (org.exolab.castor.xml.ValidationException vex)
\r
148 * @throws org.exolab.castor.xml.MarshalException
\r
149 * if object is null or if any SAXException is thrown during
\r
151 * @throws org.exolab.castor.xml.ValidationException
\r
152 * if this object is an invalid instance according to the
\r
155 public void marshal(final java.io.Writer out)
\r
156 throws org.exolab.castor.xml.MarshalException,
\r
157 org.exolab.castor.xml.ValidationException
\r
159 Marshaller.marshal(this, out);
\r
166 * @throws java.io.IOException
\r
167 * if an IOException occurs during marshaling
\r
168 * @throws org.exolab.castor.xml.ValidationException
\r
169 * if this object is an invalid instance according to the
\r
171 * @throws org.exolab.castor.xml.MarshalException
\r
172 * if object is null or if any SAXException is thrown during
\r
175 public void marshal(final org.xml.sax.ContentHandler handler)
\r
176 throws java.io.IOException,
\r
177 org.exolab.castor.xml.MarshalException,
\r
178 org.exolab.castor.xml.ValidationException
\r
180 Marshaller.marshal(this, handler);
\r
184 * Sets the value of field 'end'.
\r
187 * the value of field 'end'.
\r
189 public void setEnd(final int end)
\r
192 this._has_end = true;
\r
196 * Sets the value of field 'start'.
\r
199 * the value of field 'start'.
\r
201 public void setStart(final int start)
\r
203 this._start = start;
\r
204 this._has_start = true;
\r
208 * Method unmarshal.
\r
211 * @throws org.exolab.castor.xml.MarshalException
\r
212 * if object is null or if any SAXException is thrown during
\r
214 * @throws org.exolab.castor.xml.ValidationException
\r
215 * if this object is an invalid instance according to the
\r
217 * @return the unmarshaled jalview.schemabinding.version2.MapListTo
\r
219 public static jalview.schemabinding.version2.MapListTo unmarshal(
\r
220 final java.io.Reader reader)
\r
221 throws org.exolab.castor.xml.MarshalException,
\r
222 org.exolab.castor.xml.ValidationException
\r
224 return (jalview.schemabinding.version2.MapListTo) Unmarshaller
\r
225 .unmarshal(jalview.schemabinding.version2.MapListTo.class,
\r
232 * @throws org.exolab.castor.xml.ValidationException
\r
233 * if this object is an invalid instance according to the
\r
236 public void validate() throws org.exolab.castor.xml.ValidationException
\r
238 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
239 validator.validate(this);
\r