eaa86c2dfb741ee9bb1989705b4358c6ca4a5789
[jalview.git] / src / jalview / schemabinding / version2 / MapListFrom.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  * a region from start to end inclusive
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class MapListFrom implements java.io.Serializable {
23
24
25       //--------------------------/
26      //- Class/Member Variables -/
27     //--------------------------/
28
29     /**
30      * Field _start.
31      */
32     private int _start;
33
34     /**
35      * keeps track of state for field: _start
36      */
37     private boolean _has_start;
38
39     /**
40      * Field _end.
41      */
42     private int _end;
43
44     /**
45      * keeps track of state for field: _end
46      */
47     private boolean _has_end;
48
49
50       //----------------/
51      //- Constructors -/
52     //----------------/
53
54     public MapListFrom() {
55         super();
56     }
57
58
59       //-----------/
60      //- Methods -/
61     //-----------/
62
63     /**
64      */
65     public void deleteEnd(
66     ) {
67         this._has_end= false;
68     }
69
70     /**
71      */
72     public void deleteStart(
73     ) {
74         this._has_start= false;
75     }
76
77     /**
78      * Returns the value of field 'end'.
79      * 
80      * @return the value of field 'End'.
81      */
82     public int getEnd(
83     ) {
84         return this._end;
85     }
86
87     /**
88      * Returns the value of field 'start'.
89      * 
90      * @return the value of field 'Start'.
91      */
92     public int getStart(
93     ) {
94         return this._start;
95     }
96
97     /**
98      * Method hasEnd.
99      * 
100      * @return true if at least one End has been added
101      */
102     public boolean hasEnd(
103     ) {
104         return this._has_end;
105     }
106
107     /**
108      * Method hasStart.
109      * 
110      * @return true if at least one Start has been added
111      */
112     public boolean hasStart(
113     ) {
114         return this._has_start;
115     }
116
117     /**
118      * Method isValid.
119      * 
120      * @return true if this object is valid according to the schema
121      */
122     public boolean isValid(
123     ) {
124         try {
125             validate();
126         } catch (org.exolab.castor.xml.ValidationException vex) {
127             return false;
128         }
129         return true;
130     }
131
132     /**
133      * 
134      * 
135      * @param out
136      * @throws org.exolab.castor.xml.MarshalException if object is
137      * null or if any SAXException is thrown during marshaling
138      * @throws org.exolab.castor.xml.ValidationException if this
139      * object is an invalid instance according to the schema
140      */
141     public void marshal(
142             final java.io.Writer out)
143     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
144         Marshaller.marshal(this, out);
145     }
146
147     /**
148      * 
149      * 
150      * @param handler
151      * @throws java.io.IOException if an IOException occurs during
152      * marshaling
153      * @throws org.exolab.castor.xml.ValidationException if this
154      * object is an invalid instance according to the schema
155      * @throws org.exolab.castor.xml.MarshalException if object is
156      * null or if any SAXException is thrown during marshaling
157      */
158     public void marshal(
159             final org.xml.sax.ContentHandler handler)
160     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
161         Marshaller.marshal(this, handler);
162     }
163
164     /**
165      * Sets the value of field 'end'.
166      * 
167      * @param end the value of field 'end'.
168      */
169     public void setEnd(
170             final int end) {
171         this._end = end;
172         this._has_end = true;
173     }
174
175     /**
176      * Sets the value of field 'start'.
177      * 
178      * @param start the value of field 'start'.
179      */
180     public void setStart(
181             final int start) {
182         this._start = start;
183         this._has_start = true;
184     }
185
186     /**
187      * Method unmarshal.
188      * 
189      * @param reader
190      * @throws org.exolab.castor.xml.MarshalException if object is
191      * null or if any SAXException is thrown during marshaling
192      * @throws org.exolab.castor.xml.ValidationException if this
193      * object is an invalid instance according to the schema
194      * @return the unmarshaled
195      * jalview.schemabinding.version2.MapListFrom
196      */
197     public static jalview.schemabinding.version2.MapListFrom unmarshal(
198             final java.io.Reader reader)
199     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
200         return (jalview.schemabinding.version2.MapListFrom) Unmarshaller.unmarshal(jalview.schemabinding.version2.MapListFrom.class, reader);
201     }
202
203     /**
204      * 
205      * 
206      * @throws org.exolab.castor.xml.ValidationException if this
207      * object is an invalid instance according to the schema
208      */
209     public void validate(
210     )
211     throws org.exolab.castor.xml.ValidationException {
212         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
213         validator.validate(this);
214     }
215
216 }