2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ 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
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.schemabinding.version2;
23 //---------------------------------/
24 //- Imported classes and packages -/
25 //---------------------------------/
27 import org.exolab.castor.xml.Marshaller;
28 import org.exolab.castor.xml.Unmarshaller;
33 * @version $Revision$ $Date$
35 public class Mapping extends jalview.schemabinding.version2.MapListType
36 implements java.io.Serializable
39 // --------------------------/
40 // - Class/Member Variables -/
41 // --------------------------/
44 * Internal choice value storage
46 private java.lang.Object _choiceValue;
49 * Field _mappingChoice.
51 private jalview.schemabinding.version2.MappingChoice _mappingChoice;
67 * Returns the value of field 'choiceValue'. The field 'choiceValue' has the
68 * following description: Internal choice value storage
70 * @return the value of field 'ChoiceValue'.
72 public java.lang.Object getChoiceValue()
74 return this._choiceValue;
78 * Returns the value of field 'mappingChoice'.
80 * @return the value of field 'MappingChoice'.
82 public jalview.schemabinding.version2.MappingChoice getMappingChoice()
84 return this._mappingChoice;
90 * @return true if this object is valid according to the schema
92 public boolean isValid()
97 } catch (org.exolab.castor.xml.ValidationException vex)
108 * @throws org.exolab.castor.xml.MarshalException
109 * if object is null or if any SAXException is thrown during
111 * @throws org.exolab.castor.xml.ValidationException
112 * if this object is an invalid instance according to the schema
114 public void marshal(final java.io.Writer out)
115 throws org.exolab.castor.xml.MarshalException,
116 org.exolab.castor.xml.ValidationException
118 Marshaller.marshal(this, out);
125 * @throws java.io.IOException
126 * if an IOException occurs during marshaling
127 * @throws org.exolab.castor.xml.ValidationException
128 * if this object is an invalid instance according to the schema
129 * @throws org.exolab.castor.xml.MarshalException
130 * if object is null or if any SAXException is thrown during
133 public void marshal(final org.xml.sax.ContentHandler handler)
134 throws java.io.IOException,
135 org.exolab.castor.xml.MarshalException,
136 org.exolab.castor.xml.ValidationException
138 Marshaller.marshal(this, handler);
142 * Sets the value of field 'mappingChoice'.
144 * @param mappingChoice
145 * the value of field 'mappingChoice'.
147 public void setMappingChoice(
148 final jalview.schemabinding.version2.MappingChoice mappingChoice)
150 this._mappingChoice = mappingChoice;
151 this._choiceValue = mappingChoice;
158 * @throws org.exolab.castor.xml.MarshalException
159 * if object is null or if any SAXException is thrown during
161 * @throws org.exolab.castor.xml.ValidationException
162 * if this object is an invalid instance according to the schema
163 * @return the unmarshaled jalview.schemabinding.version2.MapListType
165 public static jalview.schemabinding.version2.MapListType unmarshal(
166 final java.io.Reader reader)
167 throws org.exolab.castor.xml.MarshalException,
168 org.exolab.castor.xml.ValidationException
170 return (jalview.schemabinding.version2.MapListType) Unmarshaller
171 .unmarshal(jalview.schemabinding.version2.Mapping.class, reader);
177 * @throws org.exolab.castor.xml.ValidationException
178 * if this object is an invalid instance according to the schema
180 public void validate() throws org.exolab.castor.xml.ValidationException
182 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
183 validator.validate(this);