82773a3de0f256ea0156f376c84409c070261d6c
[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
46      *  identifier
47      *  which
48      *  properly
49      *  disambiguates
50      *  the
51      *  structure
52      *  view
53      *  from
54      *  any
55      *  other
56      *  view
57      *  with
58      *  the
59      *  same
60      *  attributes.
61      *  This
62      *  is
63      *  not
64      *  an
65      *  ID,
66      *  because
67      *  it
68      *  is
69      *  possible
70      *  to
71      *  have
72      *  many
73      *  references
74      *  to
75      *  the
76      *  same
77      *  physical
78      *  structure
79      *  view
80      *  from
81      *  different
82      *  sequences
83      *  in
84      *  an
85      *  alignment.
86      *  A
87      *  structureState
88      *  element
89      *  citing
90      *  the
91      *  same
92      *  viewId
93      *  will
94      *  appear
95      *  for
96      *  each
97      *  instance.
98      *  
99      */
100     private java.lang.String _viewId;
101
102     /**
103      * Flag
104      *  set
105      *  if
106      *  the
107      *  alignment
108      *  panel
109      *  containing
110      *  this
111      *  JSeq
112      *  should
113      *  be
114      *  included
115      *  in
116      *  those
117      *  used
118      *  to
119      *  perform
120      *  a
121      *  structure
122      *  superposition
123      *  (since
124      *  Jalview
125      *  2.7).
126      *  
127      */
128     private boolean _alignwithAlignPanel = true;
129
130     /**
131      * keeps track of state for field: _alignwithAlignPanel
132      */
133     private boolean _has_alignwithAlignPanel;
134
135     /**
136      * Flag
137      *  set
138      *  if
139      *  the
140      *  alignment
141      *  panel
142      *  containing
143      *  this
144      *  JSeq
145      *  should
146      *  be
147      *  included
148      *  in
149      *  those
150      *  used
151      *  to
152      *  colour
153      *  its
154      *  associated
155      *  sequences
156      *  in
157      *  this
158      *  structureState(since
159      *  Jalview
160      *  2.7).
161      *  
162      */
163     private boolean _colourwithAlignPanel = false;
164
165     /**
166      * keeps track of state for field: _colourwithAlignPanel
167      */
168     private boolean _has_colourwithAlignPanel;
169
170     /**
171      * Flag
172      *  set
173      *  if
174      *  the
175      *  structure
176      *  display
177      *  is
178      *  coloured
179      *  by
180      *  the
181      *  Jmol
182      *  state,
183      *  rather
184      *  than
185      *  by
186      *  one
187      *  or
188      *  more
189      *  linked
190      *  alignment
191      *  views.
192      *  
193      */
194     private boolean _colourByJmol = true;
195
196     /**
197      * keeps track of state for field: _colourByJmol
198      */
199     private boolean _has_colourByJmol;
200
201     /**
202      * An identifier for the viewer type, currently either
203      *  JMOL or CHIMERA
204      *  
205      */
206     private java.lang.String _type;
207
208     /**
209      * Field _width.
210      */
211     private int _width;
212
213     /**
214      * keeps track of state for field: _width
215      */
216     private boolean _has_width;
217
218     /**
219      * Field _height.
220      */
221     private int _height;
222
223     /**
224      * keeps track of state for field: _height
225      */
226     private boolean _has_height;
227
228     /**
229      * Field _xpos.
230      */
231     private int _xpos;
232
233     /**
234      * keeps track of state for field: _xpos
235      */
236     private boolean _has_xpos;
237
238     /**
239      * Field _ypos.
240      */
241     private int _ypos;
242
243     /**
244      * keeps track of state for field: _ypos
245      */
246     private boolean _has_ypos;
247
248
249       //----------------/
250      //- Constructors -/
251     //----------------/
252
253     public StructureState() {
254         super();
255         setContent("");
256     }
257
258
259       //-----------/
260      //- Methods -/
261     //-----------/
262
263     /**
264      */
265     public void deleteAlignwithAlignPanel(
266     ) {
267         this._has_alignwithAlignPanel= false;
268     }
269
270     /**
271      */
272     public void deleteColourByJmol(
273     ) {
274         this._has_colourByJmol= false;
275     }
276
277     /**
278      */
279     public void deleteColourwithAlignPanel(
280     ) {
281         this._has_colourwithAlignPanel= false;
282     }
283
284     /**
285      */
286     public void deleteHeight(
287     ) {
288         this._has_height= false;
289     }
290
291     /**
292      */
293     public void deleteVisible(
294     ) {
295         this._has_visible= false;
296     }
297
298     /**
299      */
300     public void deleteWidth(
301     ) {
302         this._has_width= false;
303     }
304
305     /**
306      */
307     public void deleteXpos(
308     ) {
309         this._has_xpos= false;
310     }
311
312     /**
313      */
314     public void deleteYpos(
315     ) {
316         this._has_ypos= false;
317     }
318
319     /**
320      * Returns the value of field 'alignwithAlignPanel'. The field
321      * 'alignwithAlignPanel' has the following description: Flag
322      *  set
323      *  if
324      *  the
325      *  alignment
326      *  panel
327      *  containing
328      *  this
329      *  JSeq
330      *  should
331      *  be
332      *  included
333      *  in
334      *  those
335      *  used
336      *  to
337      *  perform
338      *  a
339      *  structure
340      *  superposition
341      *  (since
342      *  Jalview
343      *  2.7).
344      *  
345      * 
346      * @return the value of field 'AlignwithAlignPanel'.
347      */
348     public boolean getAlignwithAlignPanel(
349     ) {
350         return this._alignwithAlignPanel;
351     }
352
353     /**
354      * Returns the value of field 'colourByJmol'. The field
355      * 'colourByJmol' has the following description: Flag
356      *  set
357      *  if
358      *  the
359      *  structure
360      *  display
361      *  is
362      *  coloured
363      *  by
364      *  the
365      *  Jmol
366      *  state,
367      *  rather
368      *  than
369      *  by
370      *  one
371      *  or
372      *  more
373      *  linked
374      *  alignment
375      *  views.
376      *  
377      * 
378      * @return the value of field 'ColourByJmol'.
379      */
380     public boolean getColourByJmol(
381     ) {
382         return this._colourByJmol;
383     }
384
385     /**
386      * Returns the value of field 'colourwithAlignPanel'. The field
387      * 'colourwithAlignPanel' has the following description: Flag
388      *  set
389      *  if
390      *  the
391      *  alignment
392      *  panel
393      *  containing
394      *  this
395      *  JSeq
396      *  should
397      *  be
398      *  included
399      *  in
400      *  those
401      *  used
402      *  to
403      *  colour
404      *  its
405      *  associated
406      *  sequences
407      *  in
408      *  this
409      *  structureState(since
410      *  Jalview
411      *  2.7).
412      *  
413      * 
414      * @return the value of field 'ColourwithAlignPanel'.
415      */
416     public boolean getColourwithAlignPanel(
417     ) {
418         return this._colourwithAlignPanel;
419     }
420
421     /**
422      * Returns the value of field 'content'. The field 'content'
423      * has the following description: internal content storage
424      * 
425      * @return the value of field 'Content'.
426      */
427     public java.lang.String getContent(
428     ) {
429         return this._content;
430     }
431
432     /**
433      * Returns the value of field 'height'.
434      * 
435      * @return the value of field 'Height'.
436      */
437     public int getHeight(
438     ) {
439         return this._height;
440     }
441
442     /**
443      * Returns the value of field 'type'. The field 'type' has the
444      * following description: An identifier for the viewer type,
445      * currently either
446      *  JMOL or CHIMERA
447      *  
448      * 
449      * @return the value of field 'Type'.
450      */
451     public java.lang.String getType(
452     ) {
453         return this._type;
454     }
455
456     /**
457      * Returns the value of field 'viewId'. The field 'viewId' has
458      * the following description: additional
459      *  identifier
460      *  which
461      *  properly
462      *  disambiguates
463      *  the
464      *  structure
465      *  view
466      *  from
467      *  any
468      *  other
469      *  view
470      *  with
471      *  the
472      *  same
473      *  attributes.
474      *  This
475      *  is
476      *  not
477      *  an
478      *  ID,
479      *  because
480      *  it
481      *  is
482      *  possible
483      *  to
484      *  have
485      *  many
486      *  references
487      *  to
488      *  the
489      *  same
490      *  physical
491      *  structure
492      *  view
493      *  from
494      *  different
495      *  sequences
496      *  in
497      *  an
498      *  alignment.
499      *  A
500      *  structureState
501      *  element
502      *  citing
503      *  the
504      *  same
505      *  viewId
506      *  will
507      *  appear
508      *  for
509      *  each
510      *  instance.
511      *  
512      * 
513      * @return the value of field 'ViewId'.
514      */
515     public java.lang.String getViewId(
516     ) {
517         return this._viewId;
518     }
519
520     /**
521      * Returns the value of field 'visible'.
522      * 
523      * @return the value of field 'Visible'.
524      */
525     public boolean getVisible(
526     ) {
527         return this._visible;
528     }
529
530     /**
531      * Returns the value of field 'width'.
532      * 
533      * @return the value of field 'Width'.
534      */
535     public int getWidth(
536     ) {
537         return this._width;
538     }
539
540     /**
541      * Returns the value of field 'xpos'.
542      * 
543      * @return the value of field 'Xpos'.
544      */
545     public int getXpos(
546     ) {
547         return this._xpos;
548     }
549
550     /**
551      * Returns the value of field 'ypos'.
552      * 
553      * @return the value of field 'Ypos'.
554      */
555     public int getYpos(
556     ) {
557         return this._ypos;
558     }
559
560     /**
561      * Method hasAlignwithAlignPanel.
562      * 
563      * @return true if at least one AlignwithAlignPanel has been
564      * added
565      */
566     public boolean hasAlignwithAlignPanel(
567     ) {
568         return this._has_alignwithAlignPanel;
569     }
570
571     /**
572      * Method hasColourByJmol.
573      * 
574      * @return true if at least one ColourByJmol has been added
575      */
576     public boolean hasColourByJmol(
577     ) {
578         return this._has_colourByJmol;
579     }
580
581     /**
582      * Method hasColourwithAlignPanel.
583      * 
584      * @return true if at least one ColourwithAlignPanel has been
585      * added
586      */
587     public boolean hasColourwithAlignPanel(
588     ) {
589         return this._has_colourwithAlignPanel;
590     }
591
592     /**
593      * Method hasHeight.
594      * 
595      * @return true if at least one Height has been added
596      */
597     public boolean hasHeight(
598     ) {
599         return this._has_height;
600     }
601
602     /**
603      * Method hasVisible.
604      * 
605      * @return true if at least one Visible has been added
606      */
607     public boolean hasVisible(
608     ) {
609         return this._has_visible;
610     }
611
612     /**
613      * Method hasWidth.
614      * 
615      * @return true if at least one Width has been added
616      */
617     public boolean hasWidth(
618     ) {
619         return this._has_width;
620     }
621
622     /**
623      * Method hasXpos.
624      * 
625      * @return true if at least one Xpos has been added
626      */
627     public boolean hasXpos(
628     ) {
629         return this._has_xpos;
630     }
631
632     /**
633      * Method hasYpos.
634      * 
635      * @return true if at least one Ypos has been added
636      */
637     public boolean hasYpos(
638     ) {
639         return this._has_ypos;
640     }
641
642     /**
643      * Returns the value of field 'alignwithAlignPanel'. The field
644      * 'alignwithAlignPanel' has the following description: Flag
645      *  set
646      *  if
647      *  the
648      *  alignment
649      *  panel
650      *  containing
651      *  this
652      *  JSeq
653      *  should
654      *  be
655      *  included
656      *  in
657      *  those
658      *  used
659      *  to
660      *  perform
661      *  a
662      *  structure
663      *  superposition
664      *  (since
665      *  Jalview
666      *  2.7).
667      *  
668      * 
669      * @return the value of field 'AlignwithAlignPanel'.
670      */
671     public boolean isAlignwithAlignPanel(
672     ) {
673         return this._alignwithAlignPanel;
674     }
675
676     /**
677      * Returns the value of field 'colourByJmol'. The field
678      * 'colourByJmol' has the following description: Flag
679      *  set
680      *  if
681      *  the
682      *  structure
683      *  display
684      *  is
685      *  coloured
686      *  by
687      *  the
688      *  Jmol
689      *  state,
690      *  rather
691      *  than
692      *  by
693      *  one
694      *  or
695      *  more
696      *  linked
697      *  alignment
698      *  views.
699      *  
700      * 
701      * @return the value of field 'ColourByJmol'.
702      */
703     public boolean isColourByJmol(
704     ) {
705         return this._colourByJmol;
706     }
707
708     /**
709      * Returns the value of field 'colourwithAlignPanel'. The field
710      * 'colourwithAlignPanel' has the following description: Flag
711      *  set
712      *  if
713      *  the
714      *  alignment
715      *  panel
716      *  containing
717      *  this
718      *  JSeq
719      *  should
720      *  be
721      *  included
722      *  in
723      *  those
724      *  used
725      *  to
726      *  colour
727      *  its
728      *  associated
729      *  sequences
730      *  in
731      *  this
732      *  structureState(since
733      *  Jalview
734      *  2.7).
735      *  
736      * 
737      * @return the value of field 'ColourwithAlignPanel'.
738      */
739     public boolean isColourwithAlignPanel(
740     ) {
741         return this._colourwithAlignPanel;
742     }
743
744     /**
745      * Method isValid.
746      * 
747      * @return true if this object is valid according to the schema
748      */
749     public boolean isValid(
750     ) {
751         try {
752             validate();
753         } catch (org.exolab.castor.xml.ValidationException vex) {
754             return false;
755         }
756         return true;
757     }
758
759     /**
760      * Returns the value of field 'visible'.
761      * 
762      * @return the value of field 'Visible'.
763      */
764     public boolean isVisible(
765     ) {
766         return this._visible;
767     }
768
769     /**
770      * 
771      * 
772      * @param out
773      * @throws org.exolab.castor.xml.MarshalException if object is
774      * null or if any SAXException is thrown during marshaling
775      * @throws org.exolab.castor.xml.ValidationException if this
776      * object is an invalid instance according to the schema
777      */
778     public void marshal(
779             final java.io.Writer out)
780     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
781         Marshaller.marshal(this, out);
782     }
783
784     /**
785      * 
786      * 
787      * @param handler
788      * @throws java.io.IOException if an IOException occurs during
789      * marshaling
790      * @throws org.exolab.castor.xml.ValidationException if this
791      * object is an invalid instance according to the schema
792      * @throws org.exolab.castor.xml.MarshalException if object is
793      * null or if any SAXException is thrown during marshaling
794      */
795     public void marshal(
796             final org.xml.sax.ContentHandler handler)
797     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
798         Marshaller.marshal(this, handler);
799     }
800
801     /**
802      * Sets the value of field 'alignwithAlignPanel'. The field
803      * 'alignwithAlignPanel' has the following description: Flag
804      *  set
805      *  if
806      *  the
807      *  alignment
808      *  panel
809      *  containing
810      *  this
811      *  JSeq
812      *  should
813      *  be
814      *  included
815      *  in
816      *  those
817      *  used
818      *  to
819      *  perform
820      *  a
821      *  structure
822      *  superposition
823      *  (since
824      *  Jalview
825      *  2.7).
826      *  
827      * 
828      * @param alignwithAlignPanel the value of field
829      * 'alignwithAlignPanel'.
830      */
831     public void setAlignwithAlignPanel(
832             final boolean alignwithAlignPanel) {
833         this._alignwithAlignPanel = alignwithAlignPanel;
834         this._has_alignwithAlignPanel = true;
835     }
836
837     /**
838      * Sets the value of field 'colourByJmol'. The field
839      * 'colourByJmol' has the following description: Flag
840      *  set
841      *  if
842      *  the
843      *  structure
844      *  display
845      *  is
846      *  coloured
847      *  by
848      *  the
849      *  Jmol
850      *  state,
851      *  rather
852      *  than
853      *  by
854      *  one
855      *  or
856      *  more
857      *  linked
858      *  alignment
859      *  views.
860      *  
861      * 
862      * @param colourByJmol the value of field 'colourByJmol'.
863      */
864     public void setColourByJmol(
865             final boolean colourByJmol) {
866         this._colourByJmol = colourByJmol;
867         this._has_colourByJmol = true;
868     }
869
870     /**
871      * Sets the value of field 'colourwithAlignPanel'. The field
872      * 'colourwithAlignPanel' has the following description: Flag
873      *  set
874      *  if
875      *  the
876      *  alignment
877      *  panel
878      *  containing
879      *  this
880      *  JSeq
881      *  should
882      *  be
883      *  included
884      *  in
885      *  those
886      *  used
887      *  to
888      *  colour
889      *  its
890      *  associated
891      *  sequences
892      *  in
893      *  this
894      *  structureState(since
895      *  Jalview
896      *  2.7).
897      *  
898      * 
899      * @param colourwithAlignPanel the value of field
900      * 'colourwithAlignPanel'.
901      */
902     public void setColourwithAlignPanel(
903             final boolean colourwithAlignPanel) {
904         this._colourwithAlignPanel = colourwithAlignPanel;
905         this._has_colourwithAlignPanel = true;
906     }
907
908     /**
909      * Sets the value of field 'content'. The field 'content' has
910      * the following description: internal content storage
911      * 
912      * @param content the value of field 'content'.
913      */
914     public void setContent(
915             final java.lang.String content) {
916         this._content = content;
917     }
918
919     /**
920      * Sets the value of field 'height'.
921      * 
922      * @param height the value of field 'height'.
923      */
924     public void setHeight(
925             final int height) {
926         this._height = height;
927         this._has_height = true;
928     }
929
930     /**
931      * Sets the value of field 'type'. The field 'type' has the
932      * following description: An identifier for the viewer type,
933      * currently either
934      *  JMOL or CHIMERA
935      *  
936      * 
937      * @param type the value of field 'type'.
938      */
939     public void setType(
940             final java.lang.String type) {
941         this._type = type;
942     }
943
944     /**
945      * Sets the value of field 'viewId'. The field 'viewId' has the
946      * following description: additional
947      *  identifier
948      *  which
949      *  properly
950      *  disambiguates
951      *  the
952      *  structure
953      *  view
954      *  from
955      *  any
956      *  other
957      *  view
958      *  with
959      *  the
960      *  same
961      *  attributes.
962      *  This
963      *  is
964      *  not
965      *  an
966      *  ID,
967      *  because
968      *  it
969      *  is
970      *  possible
971      *  to
972      *  have
973      *  many
974      *  references
975      *  to
976      *  the
977      *  same
978      *  physical
979      *  structure
980      *  view
981      *  from
982      *  different
983      *  sequences
984      *  in
985      *  an
986      *  alignment.
987      *  A
988      *  structureState
989      *  element
990      *  citing
991      *  the
992      *  same
993      *  viewId
994      *  will
995      *  appear
996      *  for
997      *  each
998      *  instance.
999      *  
1000      * 
1001      * @param viewId the value of field 'viewId'.
1002      */
1003     public void setViewId(
1004             final java.lang.String viewId) {
1005         this._viewId = viewId;
1006     }
1007
1008     /**
1009      * Sets the value of field 'visible'.
1010      * 
1011      * @param visible the value of field 'visible'.
1012      */
1013     public void setVisible(
1014             final boolean visible) {
1015         this._visible = visible;
1016         this._has_visible = true;
1017     }
1018
1019     /**
1020      * Sets the value of field 'width'.
1021      * 
1022      * @param width the value of field 'width'.
1023      */
1024     public void setWidth(
1025             final int width) {
1026         this._width = width;
1027         this._has_width = true;
1028     }
1029
1030     /**
1031      * Sets the value of field 'xpos'.
1032      * 
1033      * @param xpos the value of field 'xpos'.
1034      */
1035     public void setXpos(
1036             final int xpos) {
1037         this._xpos = xpos;
1038         this._has_xpos = true;
1039     }
1040
1041     /**
1042      * Sets the value of field 'ypos'.
1043      * 
1044      * @param ypos the value of field 'ypos'.
1045      */
1046     public void setYpos(
1047             final int ypos) {
1048         this._ypos = ypos;
1049         this._has_ypos = true;
1050     }
1051
1052     /**
1053      * Method unmarshal.
1054      * 
1055      * @param reader
1056      * @throws org.exolab.castor.xml.MarshalException if object is
1057      * null or if any SAXException is thrown during marshaling
1058      * @throws org.exolab.castor.xml.ValidationException if this
1059      * object is an invalid instance according to the schema
1060      * @return the unmarshaled
1061      * jalview.schemabinding.version2.StructureState
1062      */
1063     public static jalview.schemabinding.version2.StructureState unmarshal(
1064             final java.io.Reader reader)
1065     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
1066         return (jalview.schemabinding.version2.StructureState) Unmarshaller.unmarshal(jalview.schemabinding.version2.StructureState.class, reader);
1067     }
1068
1069     /**
1070      * 
1071      * 
1072      * @throws org.exolab.castor.xml.ValidationException if this
1073      * object is an invalid instance according to the schema
1074      */
1075     public void validate(
1076     )
1077     throws org.exolab.castor.xml.ValidationException {
1078         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1079         validator.validate(this);
1080     }
1081
1082 }