1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $(date) 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.
20 *******************************************************************************/
22 * This class was automatically generated with
23 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
28 package jalview.schemabinding.version2;
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
40 * @version $Revision$ $Date$
42 public class Mapping extends jalview.schemabinding.version2.MapListType
43 implements java.io.Serializable
46 // --------------------------/
47 // - Class/Member Variables -/
48 // --------------------------/
51 * Internal choice value storage
53 private java.lang.Object _choiceValue;
56 * Field _mappingChoice.
58 private jalview.schemabinding.version2.MappingChoice _mappingChoice;
74 * Returns the value of field 'choiceValue'. The field 'choiceValue' has the
75 * following description: Internal choice value storage
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()
104 } catch (org.exolab.castor.xml.ValidationException vex)
115 * @throws org.exolab.castor.xml.MarshalException
116 * if object is null or if any SAXException is thrown during
118 * @throws org.exolab.castor.xml.ValidationException
119 * if this object is an invalid instance according to the schema
121 public void marshal(final java.io.Writer out)
122 throws org.exolab.castor.xml.MarshalException,
123 org.exolab.castor.xml.ValidationException
125 Marshaller.marshal(this, out);
132 * @throws java.io.IOException
133 * if an IOException occurs during marshaling
134 * @throws org.exolab.castor.xml.ValidationException
135 * if this object is an invalid instance according to the schema
136 * @throws org.exolab.castor.xml.MarshalException
137 * if object is null or if any SAXException is thrown during
140 public void marshal(final org.xml.sax.ContentHandler handler)
141 throws java.io.IOException,
142 org.exolab.castor.xml.MarshalException,
143 org.exolab.castor.xml.ValidationException
145 Marshaller.marshal(this, handler);
149 * Sets the value of field 'mappingChoice'.
151 * @param mappingChoice
152 * the value of field 'mappingChoice'.
154 public void setMappingChoice(
155 final jalview.schemabinding.version2.MappingChoice mappingChoice)
157 this._mappingChoice = mappingChoice;
158 this._choiceValue = mappingChoice;
165 * @throws org.exolab.castor.xml.MarshalException
166 * if object is null or if any SAXException is thrown during
168 * @throws org.exolab.castor.xml.ValidationException
169 * if this object is an invalid instance according to the schema
170 * @return the unmarshaled jalview.schemabinding.version2.MapListType
172 public static jalview.schemabinding.version2.MapListType unmarshal(
173 final java.io.Reader reader)
174 throws org.exolab.castor.xml.MarshalException,
175 org.exolab.castor.xml.ValidationException
177 return (jalview.schemabinding.version2.MapListType) Unmarshaller
178 .unmarshal(jalview.schemabinding.version2.Mapping.class, reader);
184 * @throws org.exolab.castor.xml.ValidationException
185 * if this object is an invalid instance according to the schema
187 public void validate() throws org.exolab.castor.xml.ValidationException
189 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
190 validator.validate(this);