2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3 * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
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/>.
18 package jalview.schemabinding.version2;
20 //---------------------------------/
21 //- Imported classes and packages -/
22 //---------------------------------/
24 import org.exolab.castor.xml.Marshaller;
25 import org.exolab.castor.xml.Unmarshaller;
28 * a region from start to end inclusive
30 * @version $Revision$ $Date$
32 public class MapListFrom implements java.io.Serializable
35 // --------------------------/
36 // - Class/Member Variables -/
37 // --------------------------/
45 * keeps track of state for field: _start
47 private boolean _has_start;
55 * keeps track of state for field: _end
57 private boolean _has_end;
74 public void deleteEnd()
76 this._has_end = false;
81 public void deleteStart()
83 this._has_start = false;
87 * Returns the value of field 'end'.
89 * @return the value of field 'End'.
97 * Returns the value of field 'start'.
99 * @return the value of field 'Start'.
101 public int getStart()
109 * @return true if at least one End has been added
111 public boolean hasEnd()
113 return this._has_end;
119 * @return true if at least one Start has been added
121 public boolean hasStart()
123 return this._has_start;
129 * @return true if this object is valid according to the schema
131 public boolean isValid()
136 } catch (org.exolab.castor.xml.ValidationException vex)
147 * @throws org.exolab.castor.xml.MarshalException
148 * if object is null or if any SAXException is thrown during
150 * @throws org.exolab.castor.xml.ValidationException
151 * if this object is an invalid instance according to the schema
153 public void marshal(final java.io.Writer out)
154 throws org.exolab.castor.xml.MarshalException,
155 org.exolab.castor.xml.ValidationException
157 Marshaller.marshal(this, out);
164 * @throws java.io.IOException
165 * if an IOException occurs during marshaling
166 * @throws org.exolab.castor.xml.ValidationException
167 * if this object is an invalid instance according to the schema
168 * @throws org.exolab.castor.xml.MarshalException
169 * if object is null or if any SAXException is thrown during
172 public void marshal(final org.xml.sax.ContentHandler handler)
173 throws java.io.IOException,
174 org.exolab.castor.xml.MarshalException,
175 org.exolab.castor.xml.ValidationException
177 Marshaller.marshal(this, handler);
181 * Sets the value of field 'end'.
184 * the value of field 'end'.
186 public void setEnd(final int end)
189 this._has_end = true;
193 * Sets the value of field 'start'.
196 * the value of field 'start'.
198 public void setStart(final int start)
201 this._has_start = true;
208 * @throws org.exolab.castor.xml.MarshalException
209 * if object is null or if any SAXException is thrown during
211 * @throws org.exolab.castor.xml.ValidationException
212 * if this object is an invalid instance according to the schema
213 * @return the unmarshaled jalview.schemabinding.version2.MapListFrom
215 public static jalview.schemabinding.version2.MapListFrom unmarshal(
216 final java.io.Reader reader)
217 throws org.exolab.castor.xml.MarshalException,
218 org.exolab.castor.xml.ValidationException
220 return (jalview.schemabinding.version2.MapListFrom) Unmarshaller
221 .unmarshal(jalview.schemabinding.version2.MapListFrom.class,
228 * @throws org.exolab.castor.xml.ValidationException
229 * if this object is an invalid instance according to the schema
231 public void validate() throws org.exolab.castor.xml.ValidationException
233 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
234 validator.validate(this);