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