JAL-3082 one more test condition
[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   // - Class/Member Variables -/
28   // --------------------------/
29
30   /**
31    * Internal choice value storage
32    */
33   private java.lang.Object _choiceValue;
34
35   /**
36    * Field _mappingChoice.
37    */
38   private jalview.schemabinding.version2.MappingChoice _mappingChoice;
39
40   // ----------------/
41   // - Constructors -/
42   // ----------------/
43
44   public Mapping()
45   {
46     super();
47   }
48
49   // -----------/
50   // - Methods -/
51   // -----------/
52
53   /**
54    * Returns the value of field 'choiceValue'. The field 'choiceValue' has the
55    * following description: Internal choice value storage
56    * 
57    * @return the value of field 'ChoiceValue'.
58    */
59   public java.lang.Object getChoiceValue()
60   {
61     return this._choiceValue;
62   }
63
64   /**
65    * Returns the value of field 'mappingChoice'.
66    * 
67    * @return the value of field 'MappingChoice'.
68    */
69   public jalview.schemabinding.version2.MappingChoice getMappingChoice()
70   {
71     return this._mappingChoice;
72   }
73
74   /**
75    * Method isValid.
76    * 
77    * @return true if this object is valid according to the schema
78    */
79   public boolean isValid()
80   {
81     try
82     {
83       validate();
84     } catch (org.exolab.castor.xml.ValidationException vex)
85     {
86       return false;
87     }
88     return true;
89   }
90
91   /**
92    * 
93    * 
94    * @param out
95    * @throws org.exolab.castor.xml.MarshalException
96    *           if object is null or if any SAXException is thrown during
97    *           marshaling
98    * @throws org.exolab.castor.xml.ValidationException
99    *           if this object is an invalid instance according to the schema
100    */
101   public void marshal(final java.io.Writer out)
102           throws org.exolab.castor.xml.MarshalException,
103           org.exolab.castor.xml.ValidationException
104   {
105     Marshaller.marshal(this, out);
106   }
107
108   /**
109    * 
110    * 
111    * @param handler
112    * @throws java.io.IOException
113    *           if an IOException occurs during marshaling
114    * @throws org.exolab.castor.xml.ValidationException
115    *           if this object is an invalid instance according to the schema
116    * @throws org.exolab.castor.xml.MarshalException
117    *           if object is null or if any SAXException is thrown during
118    *           marshaling
119    */
120   public void marshal(final org.xml.sax.ContentHandler handler)
121           throws java.io.IOException,
122           org.exolab.castor.xml.MarshalException,
123           org.exolab.castor.xml.ValidationException
124   {
125     Marshaller.marshal(this, handler);
126   }
127
128   /**
129    * Sets the value of field 'mappingChoice'.
130    * 
131    * @param mappingChoice
132    *          the value of field 'mappingChoice'.
133    */
134   public void setMappingChoice(
135           final jalview.schemabinding.version2.MappingChoice mappingChoice)
136   {
137     this._mappingChoice = mappingChoice;
138     this._choiceValue = mappingChoice;
139   }
140
141   /**
142    * Method unmarshal.
143    * 
144    * @param reader
145    * @throws org.exolab.castor.xml.MarshalException
146    *           if object is null or if any SAXException is thrown during
147    *           marshaling
148    * @throws org.exolab.castor.xml.ValidationException
149    *           if this object is an invalid instance according to the schema
150    * @return the unmarshaled jalview.schemabinding.version2.MapListType
151    */
152   public static jalview.schemabinding.version2.MapListType unmarshal(
153           final java.io.Reader reader)
154           throws org.exolab.castor.xml.MarshalException,
155           org.exolab.castor.xml.ValidationException
156   {
157     return (jalview.schemabinding.version2.MapListType) Unmarshaller
158             .unmarshal(jalview.schemabinding.version2.Mapping.class, reader);
159   }
160
161   /**
162    * 
163    * 
164    * @throws org.exolab.castor.xml.ValidationException
165    *           if this object is an invalid instance according to the schema
166    */
167   public void validate() throws org.exolab.castor.xml.ValidationException
168   {
169     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
170     validator.validate(this);
171   }
172
173 }