fixes JAL-778 - flag to indicate binding between an alignment panel and Jmol view...
[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 explicitly linked to the Jmol view referred to/created by
99      * this structureState (since Jalview 2.7).
100      *  
101      */
102     private boolean _linkAlignPanel = true;
103
104     /**
105      * keeps track of state for field: _linkAlignPanel
106      */
107     private boolean _has_linkAlignPanel;
108
109     /**
110      * Flag set if the alignment panel containing this JSeq should
111      * be included in those used to perform a structure
112      * superposition (since Jalview 2.7).
113      *  
114      */
115     private boolean _alignwithAlignPanel = true;
116
117     /**
118      * keeps track of state for field: _alignwithAlignPanel
119      */
120     private boolean _has_alignwithAlignPanel;
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 deleteHeight(
147     ) {
148         this._has_height= false;
149     }
150
151     /**
152      */
153     public void deleteLinkAlignPanel(
154     ) {
155         this._has_linkAlignPanel= 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 'content'. The field 'content'
203      * has the following description: internal content storage
204      * 
205      * @return the value of field 'Content'.
206      */
207     public java.lang.String getContent(
208     ) {
209         return this._content;
210     }
211
212     /**
213      * Returns the value of field 'height'.
214      * 
215      * @return the value of field 'Height'.
216      */
217     public int getHeight(
218     ) {
219         return this._height;
220     }
221
222     /**
223      * Returns the value of field 'linkAlignPanel'. The field
224      * 'linkAlignPanel' has the following description: Flag set if
225      * the alignment panel containing this JSeq should be
226      * explicitly linked to the Jmol view referred to/created by
227      * this structureState (since Jalview 2.7).
228      *  
229      * 
230      * @return the value of field 'LinkAlignPanel'.
231      */
232     public boolean getLinkAlignPanel(
233     ) {
234         return this._linkAlignPanel;
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 hasHeight.
309      * 
310      * @return true if at least one Height has been added
311      */
312     public boolean hasHeight(
313     ) {
314         return this._has_height;
315     }
316
317     /**
318      * Method hasLinkAlignPanel.
319      * 
320      * @return true if at least one LinkAlignPanel has been added
321      */
322     public boolean hasLinkAlignPanel(
323     ) {
324         return this._has_linkAlignPanel;
325     }
326
327     /**
328      * Method hasVisible.
329      * 
330      * @return true if at least one Visible has been added
331      */
332     public boolean hasVisible(
333     ) {
334         return this._has_visible;
335     }
336
337     /**
338      * Method hasWidth.
339      * 
340      * @return true if at least one Width has been added
341      */
342     public boolean hasWidth(
343     ) {
344         return this._has_width;
345     }
346
347     /**
348      * Method hasXpos.
349      * 
350      * @return true if at least one Xpos has been added
351      */
352     public boolean hasXpos(
353     ) {
354         return this._has_xpos;
355     }
356
357     /**
358      * Method hasYpos.
359      * 
360      * @return true if at least one Ypos has been added
361      */
362     public boolean hasYpos(
363     ) {
364         return this._has_ypos;
365     }
366
367     /**
368      * Returns the value of field 'alignwithAlignPanel'. The field
369      * 'alignwithAlignPanel' has the following description: Flag
370      * set if the alignment panel containing this JSeq should be
371      * included in those used to perform a structure superposition
372      * (since Jalview 2.7).
373      *  
374      * 
375      * @return the value of field 'AlignwithAlignPanel'.
376      */
377     public boolean isAlignwithAlignPanel(
378     ) {
379         return this._alignwithAlignPanel;
380     }
381
382     /**
383      * Returns the value of field 'linkAlignPanel'. The field
384      * 'linkAlignPanel' has the following description: Flag set if
385      * the alignment panel containing this JSeq should be
386      * explicitly linked to the Jmol view referred to/created by
387      * this structureState (since Jalview 2.7).
388      *  
389      * 
390      * @return the value of field 'LinkAlignPanel'.
391      */
392     public boolean isLinkAlignPanel(
393     ) {
394         return this._linkAlignPanel;
395     }
396
397     /**
398      * Method isValid.
399      * 
400      * @return true if this object is valid according to the schema
401      */
402     public boolean isValid(
403     ) {
404         try {
405             validate();
406         } catch (org.exolab.castor.xml.ValidationException vex) {
407             return false;
408         }
409         return true;
410     }
411
412     /**
413      * Returns the value of field 'visible'.
414      * 
415      * @return the value of field 'Visible'.
416      */
417     public boolean isVisible(
418     ) {
419         return this._visible;
420     }
421
422     /**
423      * 
424      * 
425      * @param out
426      * @throws org.exolab.castor.xml.MarshalException if object is
427      * null or if any SAXException is thrown during marshaling
428      * @throws org.exolab.castor.xml.ValidationException if this
429      * object is an invalid instance according to the schema
430      */
431     public void marshal(
432             final java.io.Writer out)
433     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
434         Marshaller.marshal(this, out);
435     }
436
437     /**
438      * 
439      * 
440      * @param handler
441      * @throws java.io.IOException if an IOException occurs during
442      * marshaling
443      * @throws org.exolab.castor.xml.ValidationException if this
444      * object is an invalid instance according to the schema
445      * @throws org.exolab.castor.xml.MarshalException if object is
446      * null or if any SAXException is thrown during marshaling
447      */
448     public void marshal(
449             final org.xml.sax.ContentHandler handler)
450     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
451         Marshaller.marshal(this, handler);
452     }
453
454     /**
455      * Sets the value of field 'alignwithAlignPanel'. The field
456      * 'alignwithAlignPanel' has the following description: Flag
457      * set if the alignment panel containing this JSeq should be
458      * included in those used to perform a structure superposition
459      * (since Jalview 2.7).
460      *  
461      * 
462      * @param alignwithAlignPanel the value of field
463      * 'alignwithAlignPanel'.
464      */
465     public void setAlignwithAlignPanel(
466             final boolean alignwithAlignPanel) {
467         this._alignwithAlignPanel = alignwithAlignPanel;
468         this._has_alignwithAlignPanel = true;
469     }
470
471     /**
472      * Sets the value of field 'content'. The field 'content' has
473      * the following description: internal content storage
474      * 
475      * @param content the value of field 'content'.
476      */
477     public void setContent(
478             final java.lang.String content) {
479         this._content = content;
480     }
481
482     /**
483      * Sets the value of field 'height'.
484      * 
485      * @param height the value of field 'height'.
486      */
487     public void setHeight(
488             final int height) {
489         this._height = height;
490         this._has_height = true;
491     }
492
493     /**
494      * Sets the value of field 'linkAlignPanel'. The field
495      * 'linkAlignPanel' has the following description: Flag set if
496      * the alignment panel containing this JSeq should be
497      * explicitly linked to the Jmol view referred to/created by
498      * this structureState (since Jalview 2.7).
499      *  
500      * 
501      * @param linkAlignPanel the value of field 'linkAlignPanel'.
502      */
503     public void setLinkAlignPanel(
504             final boolean linkAlignPanel) {
505         this._linkAlignPanel = linkAlignPanel;
506         this._has_linkAlignPanel = true;
507     }
508
509     /**
510      * Sets the value of field 'viewId'. The field 'viewId' has the
511      * following description: additional identifier which properly
512      * disambiguates
513      *  the structure view from any other view with the same
514      * attributes. This is not an ID,
515      *  because it is possible to have many references to the same
516      * physical structure view
517      *  from different sequences in an alignment. A structureState
518      * element citing the same
519      *  viewId will appear for each instance.
520      * 
521      * @param viewId the value of field 'viewId'.
522      */
523     public void setViewId(
524             final java.lang.String viewId) {
525         this._viewId = viewId;
526     }
527
528     /**
529      * Sets the value of field 'visible'.
530      * 
531      * @param visible the value of field 'visible'.
532      */
533     public void setVisible(
534             final boolean visible) {
535         this._visible = visible;
536         this._has_visible = true;
537     }
538
539     /**
540      * Sets the value of field 'width'.
541      * 
542      * @param width the value of field 'width'.
543      */
544     public void setWidth(
545             final int width) {
546         this._width = width;
547         this._has_width = true;
548     }
549
550     /**
551      * Sets the value of field 'xpos'.
552      * 
553      * @param xpos the value of field 'xpos'.
554      */
555     public void setXpos(
556             final int xpos) {
557         this._xpos = xpos;
558         this._has_xpos = true;
559     }
560
561     /**
562      * Sets the value of field 'ypos'.
563      * 
564      * @param ypos the value of field 'ypos'.
565      */
566     public void setYpos(
567             final int ypos) {
568         this._ypos = ypos;
569         this._has_ypos = true;
570     }
571
572     /**
573      * Method unmarshal.
574      * 
575      * @param reader
576      * @throws org.exolab.castor.xml.MarshalException if object is
577      * null or if any SAXException is thrown during marshaling
578      * @throws org.exolab.castor.xml.ValidationException if this
579      * object is an invalid instance according to the schema
580      * @return the unmarshaled
581      * jalview.schemabinding.version2.StructureState
582      */
583     public static jalview.schemabinding.version2.StructureState unmarshal(
584             final java.io.Reader reader)
585     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
586         return (jalview.schemabinding.version2.StructureState) Unmarshaller.unmarshal(jalview.schemabinding.version2.StructureState.class, reader);
587     }
588
589     /**
590      * 
591      * 
592      * @throws org.exolab.castor.xml.ValidationException if this
593      * object is an invalid instance according to the schema
594      */
595     public void validate(
596     )
597     throws org.exolab.castor.xml.ValidationException {
598         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
599         validator.validate(this);
600     }
601
602 }