2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
\r
3 * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
\r
5 * This file is part of Jalview.
\r
7 * Jalview is free software: you can redistribute it and/or
\r
8 * modify it under the terms of the GNU General Public License
\r
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
\r
11 * Jalview is distributed in the hope that it will be useful, but
\r
12 * WITHOUT ANY WARRANTY; without even the implied warranty
\r
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
\r
14 * PURPOSE. See the GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
\r
18 package jalview.schemabinding.version2;
\r
20 //---------------------------------/
\r
21 //- Imported classes and packages -/
\r
22 //---------------------------------/
\r
24 import org.exolab.castor.xml.Marshaller;
\r
25 import org.exolab.castor.xml.Unmarshaller;
\r
28 * Class MappingChoice.
\r
30 * @version $Revision$ $Date$
\r
32 public class MappingChoice implements java.io.Serializable
\r
35 // --------------------------/
\r
36 // - Class/Member Variables -/
\r
37 // --------------------------/
\r
42 private jalview.schemabinding.version2.Sequence _sequence;
\r
47 private java.lang.String _dseqFor;
\r
49 // ----------------/
\r
50 // - Constructors -/
\r
51 // ----------------/
\r
53 public MappingChoice()
\r
63 * Returns the value of field 'dseqFor'.
\r
65 * @return the value of field 'DseqFor'.
\r
67 public java.lang.String getDseqFor()
\r
69 return this._dseqFor;
\r
73 * Returns the value of field 'sequence'.
\r
75 * @return the value of field 'Sequence'.
\r
77 public jalview.schemabinding.version2.Sequence getSequence()
\r
79 return this._sequence;
\r
85 * @return true if this object is valid according to the schema
\r
87 public boolean isValid()
\r
92 } catch (org.exolab.castor.xml.ValidationException vex)
\r
103 * @throws org.exolab.castor.xml.MarshalException
\r
104 * if object is null or if any SAXException is thrown during
\r
106 * @throws org.exolab.castor.xml.ValidationException
\r
107 * if this object is an invalid instance according to the schema
\r
109 public void marshal(final java.io.Writer out)
\r
110 throws org.exolab.castor.xml.MarshalException,
\r
111 org.exolab.castor.xml.ValidationException
\r
113 Marshaller.marshal(this, out);
\r
120 * @throws java.io.IOException
\r
121 * if an IOException occurs during marshaling
\r
122 * @throws org.exolab.castor.xml.ValidationException
\r
123 * if this object is an invalid instance according to the schema
\r
124 * @throws org.exolab.castor.xml.MarshalException
\r
125 * if object is null or if any SAXException is thrown during
\r
128 public void marshal(final org.xml.sax.ContentHandler handler)
\r
129 throws java.io.IOException,
\r
130 org.exolab.castor.xml.MarshalException,
\r
131 org.exolab.castor.xml.ValidationException
\r
133 Marshaller.marshal(this, handler);
\r
137 * Sets the value of field 'dseqFor'.
\r
140 * the value of field 'dseqFor'.
\r
142 public void setDseqFor(final java.lang.String dseqFor)
\r
144 this._dseqFor = dseqFor;
\r
148 * Sets the value of field 'sequence'.
\r
151 * the value of field 'sequence'.
\r
153 public void setSequence(
\r
154 final jalview.schemabinding.version2.Sequence sequence)
\r
156 this._sequence = sequence;
\r
160 * Method unmarshal.
\r
163 * @throws org.exolab.castor.xml.MarshalException
\r
164 * if object is null or if any SAXException is thrown during
\r
166 * @throws org.exolab.castor.xml.ValidationException
\r
167 * if this object is an invalid instance according to the schema
\r
168 * @return the unmarshaled jalview.schemabinding.version2.MappingChoice
\r
170 public static jalview.schemabinding.version2.MappingChoice unmarshal(
\r
171 final java.io.Reader reader)
\r
172 throws org.exolab.castor.xml.MarshalException,
\r
173 org.exolab.castor.xml.ValidationException
\r
175 return (jalview.schemabinding.version2.MappingChoice) Unmarshaller
\r
176 .unmarshal(jalview.schemabinding.version2.MappingChoice.class,
\r
183 * @throws org.exolab.castor.xml.ValidationException
\r
184 * if this object is an invalid instance according to the schema
\r
186 public void validate() throws org.exolab.castor.xml.ValidationException
\r
188 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
189 validator.validate(this);
\r