1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, 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/>.
17 *******************************************************************************/
19 * This class was automatically generated with
20 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
25 package jalview.schemabinding.version2;
27 //---------------------------------/
28 //- Imported classes and packages -/
29 //---------------------------------/
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
37 * @version $Revision$ $Date$
39 public class Mapping extends jalview.schemabinding.version2.MapListType
40 implements java.io.Serializable
44 //--------------------------/
45 //- Class/Member Variables -/
46 //--------------------------/
49 * Internal choice value storage
51 private java.lang.Object _choiceValue;
54 * Field _mappingChoice.
56 private jalview.schemabinding.version2.MappingChoice _mappingChoice;
73 * Returns the value of field 'choiceValue'. The field
74 * 'choiceValue' has the following description: Internal choice
77 * @return the value of field 'ChoiceValue'.
79 public java.lang.Object getChoiceValue(
81 return this._choiceValue;
85 * Returns the value of field 'mappingChoice'.
87 * @return the value of field 'MappingChoice'.
89 public jalview.schemabinding.version2.MappingChoice getMappingChoice(
91 return this._mappingChoice;
97 * @return true if this object is valid according to the schema
99 public boolean isValid(
103 } catch (org.exolab.castor.xml.ValidationException vex) {
113 * @throws org.exolab.castor.xml.MarshalException if object is
114 * null or if any SAXException is thrown during marshaling
115 * @throws org.exolab.castor.xml.ValidationException if this
116 * object is an invalid instance according to the schema
119 final java.io.Writer out)
120 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
121 Marshaller.marshal(this, out);
128 * @throws java.io.IOException if an IOException occurs during
130 * @throws org.exolab.castor.xml.ValidationException if this
131 * object is an invalid instance according to the schema
132 * @throws org.exolab.castor.xml.MarshalException if object is
133 * null or if any SAXException is thrown during marshaling
136 final org.xml.sax.ContentHandler handler)
137 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
138 Marshaller.marshal(this, handler);
142 * Sets the value of field 'mappingChoice'.
144 * @param mappingChoice the value of field 'mappingChoice'.
146 public void setMappingChoice(
147 final jalview.schemabinding.version2.MappingChoice mappingChoice) {
148 this._mappingChoice = mappingChoice;
149 this._choiceValue = mappingChoice;
156 * @throws org.exolab.castor.xml.MarshalException if object is
157 * null or if any SAXException is thrown during marshaling
158 * @throws org.exolab.castor.xml.ValidationException if this
159 * object is an invalid instance according to the schema
160 * @return the unmarshaled
161 * jalview.schemabinding.version2.MapListType
163 public static jalview.schemabinding.version2.MapListType unmarshal(
164 final java.io.Reader reader)
165 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
166 return (jalview.schemabinding.version2.MapListType) Unmarshaller.unmarshal(jalview.schemabinding.version2.Mapping.class, reader);
172 * @throws org.exolab.castor.xml.ValidationException if this
173 * object is an invalid instance according to the schema
175 public void validate(
177 throws org.exolab.castor.xml.ValidationException {
178 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
179 validator.validate(this);