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