2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3 * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, 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/>.
18 package jalview.schemabinding.version2;
20 //---------------------------------/
21 //- Imported classes and packages -/
22 //---------------------------------/
24 import org.exolab.castor.xml.Marshaller;
25 import org.exolab.castor.xml.Unmarshaller;
30 * @version $Revision$ $Date$
32 public class Mapping extends jalview.schemabinding.version2.MapListType
33 implements java.io.Serializable
36 // --------------------------/
37 // - Class/Member Variables -/
38 // --------------------------/
41 * Internal choice value storage
43 private java.lang.Object _choiceValue;
46 * Field _mappingChoice.
48 private jalview.schemabinding.version2.MappingChoice _mappingChoice;
64 * Returns the value of field 'choiceValue'. The field 'choiceValue' has the
65 * following description: Internal choice value storage
67 * @return the value of field 'ChoiceValue'.
69 public java.lang.Object getChoiceValue()
71 return this._choiceValue;
75 * Returns the value of field 'mappingChoice'.
77 * @return the value of field 'MappingChoice'.
79 public jalview.schemabinding.version2.MappingChoice getMappingChoice()
81 return this._mappingChoice;
87 * @return true if this object is valid according to the schema
89 public boolean isValid()
94 } catch (org.exolab.castor.xml.ValidationException vex)
105 * @throws org.exolab.castor.xml.MarshalException
106 * if object is null or if any SAXException is thrown during
108 * @throws org.exolab.castor.xml.ValidationException
109 * if this object is an invalid instance according to the schema
111 public void marshal(final java.io.Writer out)
112 throws org.exolab.castor.xml.MarshalException,
113 org.exolab.castor.xml.ValidationException
115 Marshaller.marshal(this, out);
122 * @throws java.io.IOException
123 * if an IOException occurs during marshaling
124 * @throws org.exolab.castor.xml.ValidationException
125 * if this object is an invalid instance according to the schema
126 * @throws org.exolab.castor.xml.MarshalException
127 * if object is null or if any SAXException is thrown during
130 public void marshal(final org.xml.sax.ContentHandler handler)
131 throws java.io.IOException,
132 org.exolab.castor.xml.MarshalException,
133 org.exolab.castor.xml.ValidationException
135 Marshaller.marshal(this, handler);
139 * Sets the value of field 'mappingChoice'.
141 * @param mappingChoice
142 * the value of field 'mappingChoice'.
144 public void setMappingChoice(
145 final jalview.schemabinding.version2.MappingChoice mappingChoice)
147 this._mappingChoice = mappingChoice;
148 this._choiceValue = mappingChoice;
155 * @throws org.exolab.castor.xml.MarshalException
156 * if object is null or if any SAXException is thrown during
158 * @throws org.exolab.castor.xml.ValidationException
159 * if this object is an invalid instance according to the schema
160 * @return the unmarshaled jalview.schemabinding.version2.MapListType
162 public static jalview.schemabinding.version2.MapListType unmarshal(
163 final java.io.Reader reader)
164 throws org.exolab.castor.xml.MarshalException,
165 org.exolab.castor.xml.ValidationException
167 return (jalview.schemabinding.version2.MapListType) Unmarshaller
168 .unmarshal(jalview.schemabinding.version2.Mapping.class, reader);
174 * @throws org.exolab.castor.xml.ValidationException
175 * if this object is an invalid instance according to the schema
177 public void validate() throws org.exolab.castor.xml.ValidationException
179 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
180 validator.validate(this);