structureState element to structure view Id is a many to one relationship - so viewId...
[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      * additional identifier which properly disambiguates
86      *  the structure view from any other view with the same
87      * attributes. This is not an ID,
88      *  because it is possible to have many references to the same
89      * physical structure view
90      *  from different sequences in an alignment. A structureState
91      * element citing the same
92      *  viewId will appear for each instance.
93      */
94     private java.lang.String _viewId;
95
96
97       //----------------/
98      //- Constructors -/
99     //----------------/
100
101     public StructureState() {
102         super();
103         setContent("");
104     }
105
106
107       //-----------/
108      //- Methods -/
109     //-----------/
110
111     /**
112      */
113     public void deleteHeight(
114     ) {
115         this._has_height= false;
116     }
117
118     /**
119      */
120     public void deleteVisible(
121     ) {
122         this._has_visible= false;
123     }
124
125     /**
126      */
127     public void deleteWidth(
128     ) {
129         this._has_width= false;
130     }
131
132     /**
133      */
134     public void deleteXpos(
135     ) {
136         this._has_xpos= false;
137     }
138
139     /**
140      */
141     public void deleteYpos(
142     ) {
143         this._has_ypos= false;
144     }
145
146     /**
147      * Returns the value of field 'content'. The field 'content'
148      * has the following description: internal content storage
149      * 
150      * @return the value of field 'Content'.
151      */
152     public java.lang.String getContent(
153     ) {
154         return this._content;
155     }
156
157     /**
158      * Returns the value of field 'height'.
159      * 
160      * @return the value of field 'Height'.
161      */
162     public int getHeight(
163     ) {
164         return this._height;
165     }
166
167     /**
168      * Returns the value of field 'viewId'. The field 'viewId' has
169      * the following description: additional identifier which
170      * properly disambiguates
171      *  the structure view from any other view with the same
172      * attributes. This is not an ID,
173      *  because it is possible to have many references to the same
174      * physical structure view
175      *  from different sequences in an alignment. A structureState
176      * element citing the same
177      *  viewId will appear for each instance.
178      * 
179      * @return the value of field 'ViewId'.
180      */
181     public java.lang.String getViewId(
182     ) {
183         return this._viewId;
184     }
185
186     /**
187      * Returns the value of field 'visible'.
188      * 
189      * @return the value of field 'Visible'.
190      */
191     public boolean getVisible(
192     ) {
193         return this._visible;
194     }
195
196     /**
197      * Returns the value of field 'width'.
198      * 
199      * @return the value of field 'Width'.
200      */
201     public int getWidth(
202     ) {
203         return this._width;
204     }
205
206     /**
207      * Returns the value of field 'xpos'.
208      * 
209      * @return the value of field 'Xpos'.
210      */
211     public int getXpos(
212     ) {
213         return this._xpos;
214     }
215
216     /**
217      * Returns the value of field 'ypos'.
218      * 
219      * @return the value of field 'Ypos'.
220      */
221     public int getYpos(
222     ) {
223         return this._ypos;
224     }
225
226     /**
227      * Method hasHeight.
228      * 
229      * @return true if at least one Height has been added
230      */
231     public boolean hasHeight(
232     ) {
233         return this._has_height;
234     }
235
236     /**
237      * Method hasVisible.
238      * 
239      * @return true if at least one Visible has been added
240      */
241     public boolean hasVisible(
242     ) {
243         return this._has_visible;
244     }
245
246     /**
247      * Method hasWidth.
248      * 
249      * @return true if at least one Width has been added
250      */
251     public boolean hasWidth(
252     ) {
253         return this._has_width;
254     }
255
256     /**
257      * Method hasXpos.
258      * 
259      * @return true if at least one Xpos has been added
260      */
261     public boolean hasXpos(
262     ) {
263         return this._has_xpos;
264     }
265
266     /**
267      * Method hasYpos.
268      * 
269      * @return true if at least one Ypos has been added
270      */
271     public boolean hasYpos(
272     ) {
273         return this._has_ypos;
274     }
275
276     /**
277      * Method isValid.
278      * 
279      * @return true if this object is valid according to the schema
280      */
281     public boolean isValid(
282     ) {
283         try {
284             validate();
285         } catch (org.exolab.castor.xml.ValidationException vex) {
286             return false;
287         }
288         return true;
289     }
290
291     /**
292      * Returns the value of field 'visible'.
293      * 
294      * @return the value of field 'Visible'.
295      */
296     public boolean isVisible(
297     ) {
298         return this._visible;
299     }
300
301     /**
302      * 
303      * 
304      * @param out
305      * @throws org.exolab.castor.xml.MarshalException if object is
306      * null or if any SAXException is thrown during marshaling
307      * @throws org.exolab.castor.xml.ValidationException if this
308      * object is an invalid instance according to the schema
309      */
310     public void marshal(
311             final java.io.Writer out)
312     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
313         Marshaller.marshal(this, out);
314     }
315
316     /**
317      * 
318      * 
319      * @param handler
320      * @throws java.io.IOException if an IOException occurs during
321      * marshaling
322      * @throws org.exolab.castor.xml.ValidationException if this
323      * object is an invalid instance according to the schema
324      * @throws org.exolab.castor.xml.MarshalException if object is
325      * null or if any SAXException is thrown during marshaling
326      */
327     public void marshal(
328             final org.xml.sax.ContentHandler handler)
329     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
330         Marshaller.marshal(this, handler);
331     }
332
333     /**
334      * Sets the value of field 'content'. The field 'content' has
335      * the following description: internal content storage
336      * 
337      * @param content the value of field 'content'.
338      */
339     public void setContent(
340             final java.lang.String content) {
341         this._content = content;
342     }
343
344     /**
345      * Sets the value of field 'height'.
346      * 
347      * @param height the value of field 'height'.
348      */
349     public void setHeight(
350             final int height) {
351         this._height = height;
352         this._has_height = true;
353     }
354
355     /**
356      * Sets the value of field 'viewId'. The field 'viewId' has the
357      * following description: additional identifier which properly
358      * disambiguates
359      *  the structure view from any other view with the same
360      * attributes. This is not an ID,
361      *  because it is possible to have many references to the same
362      * physical structure view
363      *  from different sequences in an alignment. A structureState
364      * element citing the same
365      *  viewId will appear for each instance.
366      * 
367      * @param viewId the value of field 'viewId'.
368      */
369     public void setViewId(
370             final java.lang.String viewId) {
371         this._viewId = viewId;
372     }
373
374     /**
375      * Sets the value of field 'visible'.
376      * 
377      * @param visible the value of field 'visible'.
378      */
379     public void setVisible(
380             final boolean visible) {
381         this._visible = visible;
382         this._has_visible = true;
383     }
384
385     /**
386      * Sets the value of field 'width'.
387      * 
388      * @param width the value of field 'width'.
389      */
390     public void setWidth(
391             final int width) {
392         this._width = width;
393         this._has_width = true;
394     }
395
396     /**
397      * Sets the value of field 'xpos'.
398      * 
399      * @param xpos the value of field 'xpos'.
400      */
401     public void setXpos(
402             final int xpos) {
403         this._xpos = xpos;
404         this._has_xpos = true;
405     }
406
407     /**
408      * Sets the value of field 'ypos'.
409      * 
410      * @param ypos the value of field 'ypos'.
411      */
412     public void setYpos(
413             final int ypos) {
414         this._ypos = ypos;
415         this._has_ypos = true;
416     }
417
418     /**
419      * Method unmarshal.
420      * 
421      * @param reader
422      * @throws org.exolab.castor.xml.MarshalException if object is
423      * null or if any SAXException is thrown during marshaling
424      * @throws org.exolab.castor.xml.ValidationException if this
425      * object is an invalid instance according to the schema
426      * @return the unmarshaled
427      * jalview.schemabinding.version2.StructureState
428      */
429     public static jalview.schemabinding.version2.StructureState unmarshal(
430             final java.io.Reader reader)
431     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
432         return (jalview.schemabinding.version2.StructureState) Unmarshaller.unmarshal(jalview.schemabinding.version2.StructureState.class, reader);
433     }
434
435     /**
436      * 
437      * 
438      * @throws org.exolab.castor.xml.ValidationException if this
439      * object is an invalid instance according to the schema
440      */
441     public void validate(
442     )
443     throws org.exolab.castor.xml.ValidationException {
444         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
445         validator.validate(this);
446     }
447
448 }