443297149df0c989348d8a348efd83290eea7f50
[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      * Flag set if the alignment panel containing this JSeq should
98      * be included in those used to perform a structure
99      * superposition (since Jalview 2.7).
100      *  
101      */
102     private boolean _alignwithAlignPanel = true;
103
104     /**
105      * keeps track of state for field: _alignwithAlignPanel
106      */
107     private boolean _has_alignwithAlignPanel;
108
109     /**
110      * Flag set if the alignment panel containing this JSeq should
111      * be included in those used to colour its associated sequences
112      * in this structureState(since Jalview 2.7).
113      *  
114      */
115     private boolean _colourwithAlignPanel = true;
116
117     /**
118      * keeps track of state for field: _colourwithAlignPanel
119      */
120     private boolean _has_colourwithAlignPanel;
121
122
123       //----------------/
124      //- Constructors -/
125     //----------------/
126
127     public StructureState() {
128         super();
129         setContent("");
130     }
131
132
133       //-----------/
134      //- Methods -/
135     //-----------/
136
137     /**
138      */
139     public void deleteAlignwithAlignPanel(
140     ) {
141         this._has_alignwithAlignPanel= false;
142     }
143
144     /**
145      */
146     public void deleteColourwithAlignPanel(
147     ) {
148         this._has_colourwithAlignPanel= false;
149     }
150
151     /**
152      */
153     public void deleteHeight(
154     ) {
155         this._has_height= false;
156     }
157
158     /**
159      */
160     public void deleteVisible(
161     ) {
162         this._has_visible= false;
163     }
164
165     /**
166      */
167     public void deleteWidth(
168     ) {
169         this._has_width= false;
170     }
171
172     /**
173      */
174     public void deleteXpos(
175     ) {
176         this._has_xpos= false;
177     }
178
179     /**
180      */
181     public void deleteYpos(
182     ) {
183         this._has_ypos= false;
184     }
185
186     /**
187      * Returns the value of field 'alignwithAlignPanel'. The field
188      * 'alignwithAlignPanel' has the following description: Flag
189      * set if the alignment panel containing this JSeq should be
190      * included in those used to perform a structure superposition
191      * (since Jalview 2.7).
192      *  
193      * 
194      * @return the value of field 'AlignwithAlignPanel'.
195      */
196     public boolean getAlignwithAlignPanel(
197     ) {
198         return this._alignwithAlignPanel;
199     }
200
201     /**
202      * Returns the value of field 'colourwithAlignPanel'. The field
203      * 'colourwithAlignPanel' has the following description: Flag
204      * set if the alignment panel containing this JSeq should be
205      * included in those used to colour its associated sequences in
206      * this structureState(since Jalview 2.7).
207      *  
208      * 
209      * @return the value of field 'ColourwithAlignPanel'.
210      */
211     public boolean getColourwithAlignPanel(
212     ) {
213         return this._colourwithAlignPanel;
214     }
215
216     /**
217      * Returns the value of field 'content'. The field 'content'
218      * has the following description: internal content storage
219      * 
220      * @return the value of field 'Content'.
221      */
222     public java.lang.String getContent(
223     ) {
224         return this._content;
225     }
226
227     /**
228      * Returns the value of field 'height'.
229      * 
230      * @return the value of field 'Height'.
231      */
232     public int getHeight(
233     ) {
234         return this._height;
235     }
236
237     /**
238      * Returns the value of field 'viewId'. The field 'viewId' has
239      * the following description: additional identifier which
240      * properly disambiguates
241      *  the structure view from any other view with the same
242      * attributes. This is not an ID,
243      *  because it is possible to have many references to the same
244      * physical structure view
245      *  from different sequences in an alignment. A structureState
246      * element citing the same
247      *  viewId will appear for each instance.
248      * 
249      * @return the value of field 'ViewId'.
250      */
251     public java.lang.String getViewId(
252     ) {
253         return this._viewId;
254     }
255
256     /**
257      * Returns the value of field 'visible'.
258      * 
259      * @return the value of field 'Visible'.
260      */
261     public boolean getVisible(
262     ) {
263         return this._visible;
264     }
265
266     /**
267      * Returns the value of field 'width'.
268      * 
269      * @return the value of field 'Width'.
270      */
271     public int getWidth(
272     ) {
273         return this._width;
274     }
275
276     /**
277      * Returns the value of field 'xpos'.
278      * 
279      * @return the value of field 'Xpos'.
280      */
281     public int getXpos(
282     ) {
283         return this._xpos;
284     }
285
286     /**
287      * Returns the value of field 'ypos'.
288      * 
289      * @return the value of field 'Ypos'.
290      */
291     public int getYpos(
292     ) {
293         return this._ypos;
294     }
295
296     /**
297      * Method hasAlignwithAlignPanel.
298      * 
299      * @return true if at least one AlignwithAlignPanel has been
300      * added
301      */
302     public boolean hasAlignwithAlignPanel(
303     ) {
304         return this._has_alignwithAlignPanel;
305     }
306
307     /**
308      * Method hasColourwithAlignPanel.
309      * 
310      * @return true if at least one ColourwithAlignPanel has been
311      * added
312      */
313     public boolean hasColourwithAlignPanel(
314     ) {
315         return this._has_colourwithAlignPanel;
316     }
317
318     /**
319      * Method hasHeight.
320      * 
321      * @return true if at least one Height has been added
322      */
323     public boolean hasHeight(
324     ) {
325         return this._has_height;
326     }
327
328     /**
329      * Method hasVisible.
330      * 
331      * @return true if at least one Visible has been added
332      */
333     public boolean hasVisible(
334     ) {
335         return this._has_visible;
336     }
337
338     /**
339      * Method hasWidth.
340      * 
341      * @return true if at least one Width has been added
342      */
343     public boolean hasWidth(
344     ) {
345         return this._has_width;
346     }
347
348     /**
349      * Method hasXpos.
350      * 
351      * @return true if at least one Xpos has been added
352      */
353     public boolean hasXpos(
354     ) {
355         return this._has_xpos;
356     }
357
358     /**
359      * Method hasYpos.
360      * 
361      * @return true if at least one Ypos has been added
362      */
363     public boolean hasYpos(
364     ) {
365         return this._has_ypos;
366     }
367
368     /**
369      * Returns the value of field 'alignwithAlignPanel'. The field
370      * 'alignwithAlignPanel' has the following description: Flag
371      * set if the alignment panel containing this JSeq should be
372      * included in those used to perform a structure superposition
373      * (since Jalview 2.7).
374      *  
375      * 
376      * @return the value of field 'AlignwithAlignPanel'.
377      */
378     public boolean isAlignwithAlignPanel(
379     ) {
380         return this._alignwithAlignPanel;
381     }
382
383     /**
384      * Returns the value of field 'colourwithAlignPanel'. The field
385      * 'colourwithAlignPanel' has the following description: Flag
386      * set if the alignment panel containing this JSeq should be
387      * included in those used to colour its associated sequences in
388      * this structureState(since Jalview 2.7).
389      *  
390      * 
391      * @return the value of field 'ColourwithAlignPanel'.
392      */
393     public boolean isColourwithAlignPanel(
394     ) {
395         return this._colourwithAlignPanel;
396     }
397
398     /**
399      * Method isValid.
400      * 
401      * @return true if this object is valid according to the schema
402      */
403     public boolean isValid(
404     ) {
405         try {
406             validate();
407         } catch (org.exolab.castor.xml.ValidationException vex) {
408             return false;
409         }
410         return true;
411     }
412
413     /**
414      * Returns the value of field 'visible'.
415      * 
416      * @return the value of field 'Visible'.
417      */
418     public boolean isVisible(
419     ) {
420         return this._visible;
421     }
422
423     /**
424      * 
425      * 
426      * @param out
427      * @throws org.exolab.castor.xml.MarshalException if object is
428      * null or if any SAXException is thrown during marshaling
429      * @throws org.exolab.castor.xml.ValidationException if this
430      * object is an invalid instance according to the schema
431      */
432     public void marshal(
433             final java.io.Writer out)
434     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
435         Marshaller.marshal(this, out);
436     }
437
438     /**
439      * 
440      * 
441      * @param handler
442      * @throws java.io.IOException if an IOException occurs during
443      * marshaling
444      * @throws org.exolab.castor.xml.ValidationException if this
445      * object is an invalid instance according to the schema
446      * @throws org.exolab.castor.xml.MarshalException if object is
447      * null or if any SAXException is thrown during marshaling
448      */
449     public void marshal(
450             final org.xml.sax.ContentHandler handler)
451     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
452         Marshaller.marshal(this, handler);
453     }
454
455     /**
456      * Sets the value of field 'alignwithAlignPanel'. The field
457      * 'alignwithAlignPanel' has the following description: Flag
458      * set if the alignment panel containing this JSeq should be
459      * included in those used to perform a structure superposition
460      * (since Jalview 2.7).
461      *  
462      * 
463      * @param alignwithAlignPanel the value of field
464      * 'alignwithAlignPanel'.
465      */
466     public void setAlignwithAlignPanel(
467             final boolean alignwithAlignPanel) {
468         this._alignwithAlignPanel = alignwithAlignPanel;
469         this._has_alignwithAlignPanel = true;
470     }
471
472     /**
473      * Sets the value of field 'colourwithAlignPanel'. The field
474      * 'colourwithAlignPanel' has the following description: Flag
475      * set if the alignment panel containing this JSeq should be
476      * included in those used to colour its associated sequences in
477      * this structureState(since Jalview 2.7).
478      *  
479      * 
480      * @param colourwithAlignPanel the value of field
481      * 'colourwithAlignPanel'.
482      */
483     public void setColourwithAlignPanel(
484             final boolean colourwithAlignPanel) {
485         this._colourwithAlignPanel = colourwithAlignPanel;
486         this._has_colourwithAlignPanel = true;
487     }
488
489     /**
490      * Sets the value of field 'content'. The field 'content' has
491      * the following description: internal content storage
492      * 
493      * @param content the value of field 'content'.
494      */
495     public void setContent(
496             final java.lang.String content) {
497         this._content = content;
498     }
499
500     /**
501      * Sets the value of field 'height'.
502      * 
503      * @param height the value of field 'height'.
504      */
505     public void setHeight(
506             final int height) {
507         this._height = height;
508         this._has_height = true;
509     }
510
511     /**
512      * Sets the value of field 'viewId'. The field 'viewId' has the
513      * following description: additional identifier which properly
514      * disambiguates
515      *  the structure view from any other view with the same
516      * attributes. This is not an ID,
517      *  because it is possible to have many references to the same
518      * physical structure view
519      *  from different sequences in an alignment. A structureState
520      * element citing the same
521      *  viewId will appear for each instance.
522      * 
523      * @param viewId the value of field 'viewId'.
524      */
525     public void setViewId(
526             final java.lang.String viewId) {
527         this._viewId = viewId;
528     }
529
530     /**
531      * Sets the value of field 'visible'.
532      * 
533      * @param visible the value of field 'visible'.
534      */
535     public void setVisible(
536             final boolean visible) {
537         this._visible = visible;
538         this._has_visible = true;
539     }
540
541     /**
542      * Sets the value of field 'width'.
543      * 
544      * @param width the value of field 'width'.
545      */
546     public void setWidth(
547             final int width) {
548         this._width = width;
549         this._has_width = true;
550     }
551
552     /**
553      * Sets the value of field 'xpos'.
554      * 
555      * @param xpos the value of field 'xpos'.
556      */
557     public void setXpos(
558             final int xpos) {
559         this._xpos = xpos;
560         this._has_xpos = true;
561     }
562
563     /**
564      * Sets the value of field 'ypos'.
565      * 
566      * @param ypos the value of field 'ypos'.
567      */
568     public void setYpos(
569             final int ypos) {
570         this._ypos = ypos;
571         this._has_ypos = true;
572     }
573
574     /**
575      * Method unmarshal.
576      * 
577      * @param reader
578      * @throws org.exolab.castor.xml.MarshalException if object is
579      * null or if any SAXException is thrown during marshaling
580      * @throws org.exolab.castor.xml.ValidationException if this
581      * object is an invalid instance according to the schema
582      * @return the unmarshaled
583      * jalview.schemabinding.version2.StructureState
584      */
585     public static jalview.schemabinding.version2.StructureState unmarshal(
586             final java.io.Reader reader)
587     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
588         return (jalview.schemabinding.version2.StructureState) Unmarshaller.unmarshal(jalview.schemabinding.version2.StructureState.class, reader);
589     }
590
591     /**
592      * 
593      * 
594      * @throws org.exolab.castor.xml.ValidationException if this
595      * object is an invalid instance according to the schema
596      */
597     public void validate(
598     )
599     throws org.exolab.castor.xml.ValidationException {
600         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
601         validator.validate(this);
602     }
603
604 }