2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
\r
3 * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
\r
5 * This file is part of Jalview.
\r
7 * Jalview is free software: you can redistribute it and/or
\r
8 * modify it under the terms of the GNU General Public License
\r
9 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
\r
11 * Jalview is distributed in the hope that it will be useful, but
\r
12 * WITHOUT ANY WARRANTY; without even the implied warranty
\r
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
\r
14 * PURPOSE. See the GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
\r
18 package jalview.schemabinding.version2;
\r
20 //---------------------------------/
\r
21 //- Imported classes and packages -/
\r
22 //---------------------------------/
\r
24 import org.exolab.castor.xml.Marshaller;
\r
25 import org.exolab.castor.xml.Unmarshaller;
\r
30 * @version $Revision$ $Date$
\r
32 public class Mapping extends jalview.schemabinding.version2.MapListType
\r
33 implements java.io.Serializable
\r
36 // --------------------------/
\r
37 // - Class/Member Variables -/
\r
38 // --------------------------/
\r
41 * Internal choice value storage
\r
43 private java.lang.Object _choiceValue;
\r
46 * Field _mappingChoice.
\r
48 private jalview.schemabinding.version2.MappingChoice _mappingChoice;
\r
50 // ----------------/
\r
51 // - Constructors -/
\r
52 // ----------------/
\r
64 * Returns the value of field 'choiceValue'. The field 'choiceValue' has the
\r
65 * following description: Internal choice value storage
\r
67 * @return the value of field 'ChoiceValue'.
\r
69 public java.lang.Object getChoiceValue()
\r
71 return this._choiceValue;
\r
75 * Returns the value of field 'mappingChoice'.
\r
77 * @return the value of field 'MappingChoice'.
\r
79 public jalview.schemabinding.version2.MappingChoice getMappingChoice()
\r
81 return this._mappingChoice;
\r
87 * @return true if this object is valid according to the schema
\r
89 public boolean isValid()
\r
94 } catch (org.exolab.castor.xml.ValidationException vex)
\r
105 * @throws org.exolab.castor.xml.MarshalException
\r
106 * if object is null or if any SAXException is thrown during
\r
108 * @throws org.exolab.castor.xml.ValidationException
\r
109 * if this object is an invalid instance according to the schema
\r
111 public void marshal(final java.io.Writer out)
\r
112 throws org.exolab.castor.xml.MarshalException,
\r
113 org.exolab.castor.xml.ValidationException
\r
115 Marshaller.marshal(this, out);
\r
122 * @throws java.io.IOException
\r
123 * if an IOException occurs during marshaling
\r
124 * @throws org.exolab.castor.xml.ValidationException
\r
125 * if this object is an invalid instance according to the schema
\r
126 * @throws org.exolab.castor.xml.MarshalException
\r
127 * if object is null or if any SAXException is thrown during
\r
130 public void marshal(final org.xml.sax.ContentHandler handler)
\r
131 throws java.io.IOException,
\r
132 org.exolab.castor.xml.MarshalException,
\r
133 org.exolab.castor.xml.ValidationException
\r
135 Marshaller.marshal(this, handler);
\r
139 * Sets the value of field 'mappingChoice'.
\r
141 * @param mappingChoice
\r
142 * the value of field 'mappingChoice'.
\r
144 public void setMappingChoice(
\r
145 final jalview.schemabinding.version2.MappingChoice mappingChoice)
\r
147 this._mappingChoice = mappingChoice;
\r
148 this._choiceValue = mappingChoice;
\r
152 * Method unmarshal.
\r
155 * @throws org.exolab.castor.xml.MarshalException
\r
156 * if object is null or if any SAXException is thrown during
\r
158 * @throws org.exolab.castor.xml.ValidationException
\r
159 * if this object is an invalid instance according to the schema
\r
160 * @return the unmarshaled jalview.schemabinding.version2.MapListType
\r
162 public static jalview.schemabinding.version2.MapListType unmarshal(
\r
163 final java.io.Reader reader)
\r
164 throws org.exolab.castor.xml.MarshalException,
\r
165 org.exolab.castor.xml.ValidationException
\r
167 return (jalview.schemabinding.version2.MapListType) Unmarshaller
\r
168 .unmarshal(jalview.schemabinding.version2.Mapping.class, reader);
\r
174 * @throws org.exolab.castor.xml.ValidationException
\r
175 * if this object is an invalid instance according to the schema
\r
177 public void validate() throws org.exolab.castor.xml.ValidationException
\r
179 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
180 validator.validate(this);
\r