2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3 * Copyright (C) 2014 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 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 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 package jalview.schemabinding.version2;
21 //---------------------------------/
22 //- Imported classes and packages -/
23 //---------------------------------/
25 import org.exolab.castor.xml.Marshaller;
26 import org.exolab.castor.xml.Unmarshaller;
31 * @version $Revision$ $Date$
33 public class Mapping extends jalview.schemabinding.version2.MapListType
34 implements java.io.Serializable
37 // --------------------------/
38 // - Class/Member Variables -/
39 // --------------------------/
42 * Internal choice value storage
44 private java.lang.Object _choiceValue;
47 * Field _mappingChoice.
49 private jalview.schemabinding.version2.MappingChoice _mappingChoice;
65 * Returns the value of field 'choiceValue'. The field 'choiceValue' has the
66 * following description: Internal choice value storage
68 * @return the value of field 'ChoiceValue'.
70 public java.lang.Object getChoiceValue()
72 return this._choiceValue;
76 * Returns the value of field 'mappingChoice'.
78 * @return the value of field 'MappingChoice'.
80 public jalview.schemabinding.version2.MappingChoice getMappingChoice()
82 return this._mappingChoice;
88 * @return true if this object is valid according to the schema
90 public boolean isValid()
95 } catch (org.exolab.castor.xml.ValidationException vex)
106 * @throws org.exolab.castor.xml.MarshalException
107 * if object is null or if any SAXException is thrown during
109 * @throws org.exolab.castor.xml.ValidationException
110 * if this object is an invalid instance according to the schema
112 public void marshal(final java.io.Writer out)
113 throws org.exolab.castor.xml.MarshalException,
114 org.exolab.castor.xml.ValidationException
116 Marshaller.marshal(this, out);
123 * @throws java.io.IOException
124 * if an IOException occurs during marshaling
125 * @throws org.exolab.castor.xml.ValidationException
126 * if this object is an invalid instance according to the schema
127 * @throws org.exolab.castor.xml.MarshalException
128 * if object is null or if any SAXException is thrown during
131 public void marshal(final org.xml.sax.ContentHandler handler)
132 throws java.io.IOException,
133 org.exolab.castor.xml.MarshalException,
134 org.exolab.castor.xml.ValidationException
136 Marshaller.marshal(this, handler);
140 * Sets the value of field 'mappingChoice'.
142 * @param mappingChoice
143 * the value of field 'mappingChoice'.
145 public void setMappingChoice(
146 final jalview.schemabinding.version2.MappingChoice mappingChoice)
148 this._mappingChoice = mappingChoice;
149 this._choiceValue = mappingChoice;
156 * @throws org.exolab.castor.xml.MarshalException
157 * if object is null or if any SAXException is thrown during
159 * @throws org.exolab.castor.xml.ValidationException
160 * if this object is an invalid instance according to the schema
161 * @return the unmarshaled 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,
166 org.exolab.castor.xml.ValidationException
168 return (jalview.schemabinding.version2.MapListType) Unmarshaller
169 .unmarshal(jalview.schemabinding.version2.Mapping.class, reader);
175 * @throws org.exolab.castor.xml.ValidationException
176 * if this object is an invalid instance according to the schema
178 public void validate() throws org.exolab.castor.xml.ValidationException
180 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
181 validator.validate(this);