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