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 * Class MappingChoice.
\r
31 * @version $Revision$ $Date$
\r
33 public class MappingChoice implements java.io.Serializable {
\r
36 //--------------------------/
\r
37 //- Class/Member Variables -/
\r
38 //--------------------------/
\r
43 private jalview.schemabinding.version2.Sequence _sequence;
\r
48 private java.lang.String _dseqFor;
\r
55 public MappingChoice() {
\r
65 * Returns the value of field 'dseqFor'.
\r
67 * @return the value of field 'DseqFor'.
\r
69 public java.lang.String getDseqFor(
\r
71 return this._dseqFor;
\r
75 * Returns the value of field 'sequence'.
\r
77 * @return the value of field 'Sequence'.
\r
79 public jalview.schemabinding.version2.Sequence getSequence(
\r
81 return this._sequence;
\r
87 * @return true if this object is valid according to the schema
\r
89 public boolean isValid(
\r
93 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
103 * @throws org.exolab.castor.xml.MarshalException if object is
\r
104 * null or if any SAXException is thrown during marshaling
\r
105 * @throws org.exolab.castor.xml.ValidationException if this
\r
106 * object is an invalid instance according to the schema
\r
108 public void marshal(
\r
109 final java.io.Writer out)
\r
110 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
111 Marshaller.marshal(this, out);
\r
118 * @throws java.io.IOException if an IOException occurs during
\r
120 * @throws org.exolab.castor.xml.ValidationException if this
\r
121 * object is an invalid instance according to the schema
\r
122 * @throws org.exolab.castor.xml.MarshalException if object is
\r
123 * null or if any SAXException is thrown during marshaling
\r
125 public void marshal(
\r
126 final org.xml.sax.ContentHandler handler)
\r
127 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
128 Marshaller.marshal(this, handler);
\r
132 * Sets the value of field 'dseqFor'.
\r
134 * @param dseqFor the value of field 'dseqFor'.
\r
136 public void setDseqFor(
\r
137 final java.lang.String dseqFor) {
\r
138 this._dseqFor = dseqFor;
\r
142 * Sets the value of field 'sequence'.
\r
144 * @param sequence the value of field 'sequence'.
\r
146 public void setSequence(
\r
147 final jalview.schemabinding.version2.Sequence sequence) {
\r
148 this._sequence = sequence;
\r
152 * Method unmarshal.
\r
155 * @throws org.exolab.castor.xml.MarshalException if object is
\r
156 * null or if any SAXException is thrown during marshaling
\r
157 * @throws org.exolab.castor.xml.ValidationException if this
\r
158 * object is an invalid instance according to the schema
\r
159 * @return the unmarshaled
\r
160 * jalview.schemabinding.version2.MappingChoice
\r
162 public static jalview.schemabinding.version2.MappingChoice unmarshal(
\r
163 final java.io.Reader reader)
\r
164 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
165 return (jalview.schemabinding.version2.MappingChoice) Unmarshaller.unmarshal(jalview.schemabinding.version2.MappingChoice.class, reader);
\r
171 * @throws org.exolab.castor.xml.ValidationException if this
\r
172 * object is an invalid instance according to the schema
\r
174 public void validate(
\r
176 throws org.exolab.castor.xml.ValidationException {
\r
177 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
178 validator.validate(this);
\r