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