6f4310838f101855145cd5b04ad413d2354fa218
[jalview.git] / src / jalview / schemabinding / version2 / StructureState.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 StructureState.
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class StructureState implements java.io.Serializable {
23
24
25       //--------------------------/
26      //- Class/Member Variables -/
27     //--------------------------/
28
29     /**
30      * internal content storage
31      */
32     private java.lang.String _content = "";
33
34     /**
35      * Field _visible.
36      */
37     private boolean _visible;
38
39     /**
40      * keeps track of state for field: _visible
41      */
42     private boolean _has_visible;
43
44     /**
45      * Field _xpos.
46      */
47     private int _xpos;
48
49     /**
50      * keeps track of state for field: _xpos
51      */
52     private boolean _has_xpos;
53
54     /**
55      * Field _ypos.
56      */
57     private int _ypos;
58
59     /**
60      * keeps track of state for field: _ypos
61      */
62     private boolean _has_ypos;
63
64     /**
65      * Field _width.
66      */
67     private int _width;
68
69     /**
70      * keeps track of state for field: _width
71      */
72     private boolean _has_width;
73
74     /**
75      * Field _height.
76      */
77     private int _height;
78
79     /**
80      * keeps track of state for field: _height
81      */
82     private boolean _has_height;
83
84     /**
85      * Field _viewId.
86      */
87     private java.lang.String _viewId;
88
89
90       //----------------/
91      //- Constructors -/
92     //----------------/
93
94     public StructureState() {
95         super();
96         setContent("");
97     }
98
99
100       //-----------/
101      //- Methods -/
102     //-----------/
103
104     /**
105      */
106     public void deleteHeight(
107     ) {
108         this._has_height= false;
109     }
110
111     /**
112      */
113     public void deleteVisible(
114     ) {
115         this._has_visible= false;
116     }
117
118     /**
119      */
120     public void deleteWidth(
121     ) {
122         this._has_width= false;
123     }
124
125     /**
126      */
127     public void deleteXpos(
128     ) {
129         this._has_xpos= false;
130     }
131
132     /**
133      */
134     public void deleteYpos(
135     ) {
136         this._has_ypos= false;
137     }
138
139     /**
140      * Returns the value of field 'content'. The field 'content'
141      * has the following description: internal content storage
142      * 
143      * @return the value of field 'Content'.
144      */
145     public java.lang.String getContent(
146     ) {
147         return this._content;
148     }
149
150     /**
151      * Returns the value of field 'height'.
152      * 
153      * @return the value of field 'Height'.
154      */
155     public int getHeight(
156     ) {
157         return this._height;
158     }
159
160     /**
161      * Returns the value of field 'viewId'.
162      * 
163      * @return the value of field 'ViewId'.
164      */
165     public java.lang.String getViewId(
166     ) {
167         return this._viewId;
168     }
169
170     /**
171      * Returns the value of field 'visible'.
172      * 
173      * @return the value of field 'Visible'.
174      */
175     public boolean getVisible(
176     ) {
177         return this._visible;
178     }
179
180     /**
181      * Returns the value of field 'width'.
182      * 
183      * @return the value of field 'Width'.
184      */
185     public int getWidth(
186     ) {
187         return this._width;
188     }
189
190     /**
191      * Returns the value of field 'xpos'.
192      * 
193      * @return the value of field 'Xpos'.
194      */
195     public int getXpos(
196     ) {
197         return this._xpos;
198     }
199
200     /**
201      * Returns the value of field 'ypos'.
202      * 
203      * @return the value of field 'Ypos'.
204      */
205     public int getYpos(
206     ) {
207         return this._ypos;
208     }
209
210     /**
211      * Method hasHeight.
212      * 
213      * @return true if at least one Height has been added
214      */
215     public boolean hasHeight(
216     ) {
217         return this._has_height;
218     }
219
220     /**
221      * Method hasVisible.
222      * 
223      * @return true if at least one Visible has been added
224      */
225     public boolean hasVisible(
226     ) {
227         return this._has_visible;
228     }
229
230     /**
231      * Method hasWidth.
232      * 
233      * @return true if at least one Width has been added
234      */
235     public boolean hasWidth(
236     ) {
237         return this._has_width;
238     }
239
240     /**
241      * Method hasXpos.
242      * 
243      * @return true if at least one Xpos has been added
244      */
245     public boolean hasXpos(
246     ) {
247         return this._has_xpos;
248     }
249
250     /**
251      * Method hasYpos.
252      * 
253      * @return true if at least one Ypos has been added
254      */
255     public boolean hasYpos(
256     ) {
257         return this._has_ypos;
258     }
259
260     /**
261      * Method isValid.
262      * 
263      * @return true if this object is valid according to the schema
264      */
265     public boolean isValid(
266     ) {
267         try {
268             validate();
269         } catch (org.exolab.castor.xml.ValidationException vex) {
270             return false;
271         }
272         return true;
273     }
274
275     /**
276      * Returns the value of field 'visible'.
277      * 
278      * @return the value of field 'Visible'.
279      */
280     public boolean isVisible(
281     ) {
282         return this._visible;
283     }
284
285     /**
286      * 
287      * 
288      * @param out
289      * @throws org.exolab.castor.xml.MarshalException if object is
290      * null or if any SAXException is thrown during marshaling
291      * @throws org.exolab.castor.xml.ValidationException if this
292      * object is an invalid instance according to the schema
293      */
294     public void marshal(
295             final java.io.Writer out)
296     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
297         Marshaller.marshal(this, out);
298     }
299
300     /**
301      * 
302      * 
303      * @param handler
304      * @throws java.io.IOException if an IOException occurs during
305      * marshaling
306      * @throws org.exolab.castor.xml.ValidationException if this
307      * object is an invalid instance according to the schema
308      * @throws org.exolab.castor.xml.MarshalException if object is
309      * null or if any SAXException is thrown during marshaling
310      */
311     public void marshal(
312             final org.xml.sax.ContentHandler handler)
313     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
314         Marshaller.marshal(this, handler);
315     }
316
317     /**
318      * Sets the value of field 'content'. The field 'content' has
319      * the following description: internal content storage
320      * 
321      * @param content the value of field 'content'.
322      */
323     public void setContent(
324             final java.lang.String content) {
325         this._content = content;
326     }
327
328     /**
329      * Sets the value of field 'height'.
330      * 
331      * @param height the value of field 'height'.
332      */
333     public void setHeight(
334             final int height) {
335         this._height = height;
336         this._has_height = true;
337     }
338
339     /**
340      * Sets the value of field 'viewId'.
341      * 
342      * @param viewId the value of field 'viewId'.
343      */
344     public void setViewId(
345             final java.lang.String viewId) {
346         this._viewId = viewId;
347     }
348
349     /**
350      * Sets the value of field 'visible'.
351      * 
352      * @param visible the value of field 'visible'.
353      */
354     public void setVisible(
355             final boolean visible) {
356         this._visible = visible;
357         this._has_visible = true;
358     }
359
360     /**
361      * Sets the value of field 'width'.
362      * 
363      * @param width the value of field 'width'.
364      */
365     public void setWidth(
366             final int width) {
367         this._width = width;
368         this._has_width = true;
369     }
370
371     /**
372      * Sets the value of field 'xpos'.
373      * 
374      * @param xpos the value of field 'xpos'.
375      */
376     public void setXpos(
377             final int xpos) {
378         this._xpos = xpos;
379         this._has_xpos = true;
380     }
381
382     /**
383      * Sets the value of field 'ypos'.
384      * 
385      * @param ypos the value of field 'ypos'.
386      */
387     public void setYpos(
388             final int ypos) {
389         this._ypos = ypos;
390         this._has_ypos = true;
391     }
392
393     /**
394      * Method unmarshal.
395      * 
396      * @param reader
397      * @throws org.exolab.castor.xml.MarshalException if object is
398      * null or if any SAXException is thrown during marshaling
399      * @throws org.exolab.castor.xml.ValidationException if this
400      * object is an invalid instance according to the schema
401      * @return the unmarshaled
402      * jalview.schemabinding.version2.StructureState
403      */
404     public static jalview.schemabinding.version2.StructureState unmarshal(
405             final java.io.Reader reader)
406     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
407         return (jalview.schemabinding.version2.StructureState) Unmarshaller.unmarshal(jalview.schemabinding.version2.StructureState.class, reader);
408     }
409
410     /**
411      * 
412      * 
413      * @throws org.exolab.castor.xml.ValidationException if this
414      * object is an invalid instance according to the schema
415      */
416     public void validate(
417     )
418     throws org.exolab.castor.xml.ValidationException {
419         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
420         validator.validate(this);
421     }
422
423 }