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