2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3 * Copyright (C) 2014 The Jalview Authors
5 * This file is part of Jalview.
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.
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.
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
17 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 package jalview.schemabinding.version2;
21 //---------------------------------/
22 //- Imported classes and packages -/
23 //---------------------------------/
25 import org.exolab.castor.xml.Marshaller;
26 import org.exolab.castor.xml.Unmarshaller;
29 * a region from start to end inclusive
31 * @version $Revision$ $Date$
33 public class MapListFrom implements java.io.Serializable
36 // --------------------------/
37 // - Class/Member Variables -/
38 // --------------------------/
46 * keeps track of state for field: _start
48 private boolean _has_start;
56 * keeps track of state for field: _end
58 private boolean _has_end;
75 public void deleteEnd()
77 this._has_end = false;
82 public void deleteStart()
84 this._has_start = false;
88 * Returns the value of field 'end'.
90 * @return the value of field 'End'.
98 * Returns the value of field 'start'.
100 * @return the value of field 'Start'.
102 public int getStart()
110 * @return true if at least one End has been added
112 public boolean hasEnd()
114 return this._has_end;
120 * @return true if at least one Start has been added
122 public boolean hasStart()
124 return this._has_start;
130 * @return true if this object is valid according to the schema
132 public boolean isValid()
137 } catch (org.exolab.castor.xml.ValidationException vex)
148 * @throws org.exolab.castor.xml.MarshalException
149 * if object is null or if any SAXException is thrown during
151 * @throws org.exolab.castor.xml.ValidationException
152 * if this object is an invalid instance according to the schema
154 public void marshal(final java.io.Writer out)
155 throws org.exolab.castor.xml.MarshalException,
156 org.exolab.castor.xml.ValidationException
158 Marshaller.marshal(this, out);
165 * @throws java.io.IOException
166 * if an IOException occurs during marshaling
167 * @throws org.exolab.castor.xml.ValidationException
168 * if this object is an invalid instance according to the schema
169 * @throws org.exolab.castor.xml.MarshalException
170 * if object is null or if any SAXException is thrown during
173 public void marshal(final org.xml.sax.ContentHandler handler)
174 throws java.io.IOException,
175 org.exolab.castor.xml.MarshalException,
176 org.exolab.castor.xml.ValidationException
178 Marshaller.marshal(this, handler);
182 * Sets the value of field 'end'.
185 * the value of field 'end'.
187 public void setEnd(final int end)
190 this._has_end = true;
194 * Sets the value of field 'start'.
197 * the value of field 'start'.
199 public void setStart(final int start)
202 this._has_start = true;
209 * @throws org.exolab.castor.xml.MarshalException
210 * if object is null or if any SAXException is thrown during
212 * @throws org.exolab.castor.xml.ValidationException
213 * if this object is an invalid instance according to the schema
214 * @return the unmarshaled jalview.schemabinding.version2.MapListFrom
216 public static jalview.schemabinding.version2.MapListFrom unmarshal(
217 final java.io.Reader reader)
218 throws org.exolab.castor.xml.MarshalException,
219 org.exolab.castor.xml.ValidationException
221 return (jalview.schemabinding.version2.MapListFrom) Unmarshaller
222 .unmarshal(jalview.schemabinding.version2.MapListFrom.class,
229 * @throws org.exolab.castor.xml.ValidationException
230 * if this object is an invalid instance according to the schema
232 public void validate() throws org.exolab.castor.xml.ValidationException
234 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
235 validator.validate(this);