update author list in license for (JAL-826)
[jalview.git] / src / jalview / schemabinding / version2 / Mapping.java
1 /*******************************************************************************
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3  * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
4  *
5  * This file is part of Jalview.
6  *
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.
10  *
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.
15  *
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  *******************************************************************************/
18 /*
19  * This class was automatically generated with 
20  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
21  * Schema.
22  * $Id$
23  */
24
25 package jalview.schemabinding.version2;
26
27   //---------------------------------/
28  //- Imported classes and packages -/
29 //---------------------------------/
30
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
33
34 /**
35  * Class Mapping.
36  * 
37  * @version $Revision$ $Date$
38  */
39 public class Mapping extends jalview.schemabinding.version2.MapListType 
40 implements java.io.Serializable
41 {
42
43
44       //--------------------------/
45      //- Class/Member Variables -/
46     //--------------------------/
47
48     /**
49      * Internal choice value storage
50      */
51     private java.lang.Object _choiceValue;
52
53     /**
54      * Field _mappingChoice.
55      */
56     private jalview.schemabinding.version2.MappingChoice _mappingChoice;
57
58
59       //----------------/
60      //- Constructors -/
61     //----------------/
62
63     public Mapping() {
64         super();
65     }
66
67
68       //-----------/
69      //- Methods -/
70     //-----------/
71
72     /**
73      * Returns the value of field 'choiceValue'. The field
74      * 'choiceValue' has the following description: Internal choice
75      * value storage
76      * 
77      * @return the value of field 'ChoiceValue'.
78      */
79     public java.lang.Object getChoiceValue(
80     ) {
81         return this._choiceValue;
82     }
83
84     /**
85      * Returns the value of field 'mappingChoice'.
86      * 
87      * @return the value of field 'MappingChoice'.
88      */
89     public jalview.schemabinding.version2.MappingChoice getMappingChoice(
90     ) {
91         return this._mappingChoice;
92     }
93
94     /**
95      * Method isValid.
96      * 
97      * @return true if this object is valid according to the schema
98      */
99     public boolean isValid(
100     ) {
101         try {
102             validate();
103         } catch (org.exolab.castor.xml.ValidationException vex) {
104             return false;
105         }
106         return true;
107     }
108
109     /**
110      * 
111      * 
112      * @param out
113      * @throws org.exolab.castor.xml.MarshalException if object is
114      * null or if any SAXException is thrown during marshaling
115      * @throws org.exolab.castor.xml.ValidationException if this
116      * object is an invalid instance according to the schema
117      */
118     public void marshal(
119             final java.io.Writer out)
120     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
121         Marshaller.marshal(this, out);
122     }
123
124     /**
125      * 
126      * 
127      * @param handler
128      * @throws java.io.IOException if an IOException occurs during
129      * marshaling
130      * @throws org.exolab.castor.xml.ValidationException if this
131      * object is an invalid instance according to the schema
132      * @throws org.exolab.castor.xml.MarshalException if object is
133      * null or if any SAXException is thrown during marshaling
134      */
135     public void marshal(
136             final org.xml.sax.ContentHandler handler)
137     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
138         Marshaller.marshal(this, handler);
139     }
140
141     /**
142      * Sets the value of field 'mappingChoice'.
143      * 
144      * @param mappingChoice the value of field 'mappingChoice'.
145      */
146     public void setMappingChoice(
147             final jalview.schemabinding.version2.MappingChoice mappingChoice) {
148         this._mappingChoice = mappingChoice;
149         this._choiceValue = mappingChoice;
150     }
151
152     /**
153      * Method unmarshal.
154      * 
155      * @param reader
156      * @throws org.exolab.castor.xml.MarshalException if object is
157      * null or if any SAXException is thrown during marshaling
158      * @throws org.exolab.castor.xml.ValidationException if this
159      * object is an invalid instance according to the schema
160      * @return the unmarshaled
161      * jalview.schemabinding.version2.MapListType
162      */
163     public static jalview.schemabinding.version2.MapListType unmarshal(
164             final java.io.Reader reader)
165     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
166         return (jalview.schemabinding.version2.MapListType) Unmarshaller.unmarshal(jalview.schemabinding.version2.Mapping.class, reader);
167     }
168
169     /**
170      * 
171      * 
172      * @throws org.exolab.castor.xml.ValidationException if this
173      * object is an invalid instance according to the schema
174      */
175     public void validate(
176     )
177     throws org.exolab.castor.xml.ValidationException {
178         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
179         validator.validate(this);
180     }
181
182 }