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