Clover icon

jalviewX

  1. Project Clover database Wed Oct 31 2018 15:13:58 GMT
  2. Package jalview.schemabinding.version2

File StructureState.java

 

Coverage histogram

../../../img/srcFileCovDistChart7.png
28% of files have more coverage

Code metrics

0
61
48
1
706
244
49
0.8
1.27
48
1.02

Classes

Class Line # Actions
StructureState 22 61 49 38
0.651376165.1%
 

Contributing tests

This file is covered by 6 tests. .

Source view

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    * An identifier for the viewer type, currently either JMOL or CHIMERA
93    *
94    */
95    private java.lang.String _type;
96   
97    /**
98    * Field _width.
99    */
100    private int _width;
101   
102    /**
103    * keeps track of state for field: _width
104    */
105    private boolean _has_width;
106   
107    /**
108    * Field _height.
109    */
110    private int _height;
111   
112    /**
113    * keeps track of state for field: _height
114    */
115    private boolean _has_height;
116   
117    /**
118    * Field _xpos.
119    */
120    private int _xpos;
121   
122    /**
123    * keeps track of state for field: _xpos
124    */
125    private boolean _has_xpos;
126   
127    /**
128    * Field _ypos.
129    */
130    private int _ypos;
131   
132    /**
133    * keeps track of state for field: _ypos
134    */
135    private boolean _has_ypos;
136   
137    // ----------------/
138    // - Constructors -/
139    // ----------------/
140   
 
141  140 toggle public StructureState()
142    {
143  140 super();
144  140 setContent("");
145    }
146   
147    // -----------/
148    // - Methods -/
149    // -----------/
150   
151    /**
152    */
 
153  0 toggle public void deleteAlignwithAlignPanel()
154    {
155  0 this._has_alignwithAlignPanel = false;
156    }
157   
158    /**
159    */
 
160  0 toggle public void deleteColourByJmol()
161    {
162  0 this._has_colourByJmol = false;
163    }
164   
165    /**
166    */
 
167  0 toggle public void deleteColourwithAlignPanel()
168    {
169  0 this._has_colourwithAlignPanel = false;
170    }
171   
172    /**
173    */
 
174  0 toggle public void deleteHeight()
175    {
176  0 this._has_height = false;
177    }
178   
179    /**
180    */
 
181  0 toggle public void deleteVisible()
182    {
183  0 this._has_visible = false;
184    }
185   
186    /**
187    */
 
188  0 toggle public void deleteWidth()
189    {
190  0 this._has_width = false;
191    }
192   
193    /**
194    */
 
195  0 toggle public void deleteXpos()
196    {
197  0 this._has_xpos = false;
198    }
199   
200    /**
201    */
 
202  0 toggle public void deleteYpos()
203    {
204  0 this._has_ypos = false;
205    }
206   
207    /**
208    * Returns the value of field 'alignwithAlignPanel'. The field
209    * 'alignwithAlignPanel' has the following description: Flag set if the
210    * alignment panel containing this JSeq should be included in those used to
211    * perform a structure superposition (since Jalview 2.7).
212    *
213    *
214    * @return the value of field 'AlignwithAlignPanel'.
215    */
 
216  160 toggle public boolean getAlignwithAlignPanel()
217    {
218  160 return this._alignwithAlignPanel;
219    }
220   
221    /**
222    * Returns the value of field 'colourByJmol'. The field 'colourByJmol' has the
223    * following description: Flag set if the structure display is coloured by the
224    * Jmol state, rather than by one or more linked alignment views.
225    *
226    *
227    * @return the value of field 'ColourByJmol'.
228    */
 
229  160 toggle public boolean getColourByJmol()
230    {
231  160 return this._colourByJmol;
232    }
233   
234    /**
235    * Returns the value of field 'colourwithAlignPanel'. The field
236    * 'colourwithAlignPanel' has the following description: Flag set if the
237    * alignment panel containing this JSeq should be included in those used to
238    * colour its associated sequences in this structureState(since Jalview 2.7).
239    *
240    *
241    * @return the value of field 'ColourwithAlignPanel'.
242    */
 
243  160 toggle public boolean getColourwithAlignPanel()
244    {
245  160 return this._colourwithAlignPanel;
246    }
247   
248    /**
249    * Returns the value of field 'content'. The field 'content' has the following
250    * description: internal content storage
251    *
252    * @return the value of field 'Content'.
253    */
 
254  210 toggle public java.lang.String getContent()
255    {
256  210 return this._content;
257    }
258   
259    /**
260    * Returns the value of field 'height'.
261    *
262    * @return the value of field 'Height'.
263    */
 
264  160 toggle public int getHeight()
265    {
266  160 return this._height;
267    }
268   
269    /**
270    * Returns the value of field 'type'. The field 'type' has the following
271    * description: An identifier for the viewer type, currently either JMOL or
272    * CHIMERA
273    *
274    *
275    * @return the value of field 'Type'.
276    */
 
277  100 toggle public java.lang.String getType()
278    {
279  100 return this._type;
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  340 toggle public java.lang.String getViewId()
294    {
295  340 return this._viewId;
296    }
297   
298    /**
299    * Returns the value of field 'visible'.
300    *
301    * @return the value of field 'Visible'.
302    */
 
303  40 toggle public boolean getVisible()
304    {
305  40 return this._visible;
306    }
307   
308    /**
309    * Returns the value of field 'width'.
310    *
311    * @return the value of field 'Width'.
312    */
 
313  160 toggle public int getWidth()
314    {
315  160 return this._width;
316    }
317   
318    /**
319    * Returns the value of field 'xpos'.
320    *
321    * @return the value of field 'Xpos'.
322    */
 
323  160 toggle public int getXpos()
324    {
325  160 return this._xpos;
326    }
327   
328    /**
329    * Returns the value of field 'ypos'.
330    *
331    * @return the value of field 'Ypos'.
332    */
 
333  160 toggle public int getYpos()
334    {
335  160 return this._ypos;
336    }
337   
338    /**
339    * Method hasAlignwithAlignPanel.
340    *
341    * @return true if at least one AlignwithAlignPanel has been added
342    */
 
343  160 toggle public boolean hasAlignwithAlignPanel()
344    {
345  160 return this._has_alignwithAlignPanel;
346    }
347   
348    /**
349    * Method hasColourByJmol.
350    *
351    * @return true if at least one ColourByJmol has been added
352    */
 
353  160 toggle public boolean hasColourByJmol()
354    {
355  160 return this._has_colourByJmol;
356    }
357   
358    /**
359    * Method hasColourwithAlignPanel.
360    *
361    * @return true if at least one ColourwithAlignPanel has been added
362    */
 
363  160 toggle public boolean hasColourwithAlignPanel()
364    {
365  160 return this._has_colourwithAlignPanel;
366    }
367   
368    /**
369    * Method hasHeight.
370    *
371    * @return true if at least one Height has been added
372    */
 
373  40 toggle public boolean hasHeight()
374    {
375  40 return this._has_height;
376    }
377   
378    /**
379    * Method hasVisible.
380    *
381    * @return true if at least one Visible has been added
382    */
 
383  40 toggle public boolean hasVisible()
384    {
385  40 return this._has_visible;
386    }
387   
388    /**
389    * Method hasWidth.
390    *
391    * @return true if at least one Width has been added
392    */
 
393  40 toggle public boolean hasWidth()
394    {
395  40 return this._has_width;
396    }
397   
398    /**
399    * Method hasXpos.
400    *
401    * @return true if at least one Xpos has been added
402    */
 
403  40 toggle public boolean hasXpos()
404    {
405  40 return this._has_xpos;
406    }
407   
408    /**
409    * Method hasYpos.
410    *
411    * @return true if at least one Ypos has been added
412    */
 
413  40 toggle public boolean hasYpos()
414    {
415  40 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  0 toggle public boolean isAlignwithAlignPanel()
428    {
429  0 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  0 toggle public boolean isColourByJmol()
441    {
442  0 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  0 toggle public boolean isColourwithAlignPanel()
455    {
456  0 return this._colourwithAlignPanel;
457    }
458   
459    /**
460    * Method isValid.
461    *
462    * @return true if this object is valid according to the schema
463    */
 
464  0 toggle public boolean isValid()
465    {
466  0 try
467    {
468  0 validate();
469    } catch (org.exolab.castor.xml.ValidationException vex)
470    {
471  0 return false;
472    }
473  0 return true;
474    }
475   
476    /**
477    * Returns the value of field 'visible'.
478    *
479    * @return the value of field 'Visible'.
480    */
 
481  0 toggle public boolean isVisible()
482    {
483  0 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  0 toggle public void marshal(final java.io.Writer out)
497    throws org.exolab.castor.xml.MarshalException,
498    org.exolab.castor.xml.ValidationException
499    {
500  0 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  0 toggle 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  0 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  140 toggle public void setAlignwithAlignPanel(final boolean alignwithAlignPanel)
534    {
535  140 this._alignwithAlignPanel = alignwithAlignPanel;
536  140 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  140 toggle public void setColourByJmol(final boolean colourByJmol)
549    {
550  140 this._colourByJmol = colourByJmol;
551  140 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  140 toggle public void setColourwithAlignPanel(final boolean colourwithAlignPanel)
565    {
566  140 this._colourwithAlignPanel = colourwithAlignPanel;
567  140 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  240 toggle public void setContent(final java.lang.String content)
578    {
579  240 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  140 toggle public void setHeight(final int height)
589    {
590  140 this._height = height;
591  140 this._has_height = true;
592    }
593   
594    /**
595    * Sets the value of field 'type'. The field 'type' has the following
596    * description: An identifier for the viewer type, currently either JMOL or
597    * CHIMERA
598    *
599    *
600    * @param type
601    * the value of field 'type'.
602    */
 
603  40 toggle public void setType(final java.lang.String type)
604    {
605  40 this._type = type;
606    }
607   
608    /**
609    * Sets the value of field 'viewId'. The field 'viewId' has the following
610    * description: additional identifier which properly disambiguates the
611    * structure view from any other view with the same attributes. This is not an
612    * ID, because it is possible to have many references to the same physical
613    * structure view from different sequences in an alignment. A structureState
614    * element citing the same viewId will appear for each instance.
615    *
616    *
617    * @param viewId
618    * the value of field 'viewId'.
619    */
 
620  140 toggle public void setViewId(final java.lang.String viewId)
621    {
622  140 this._viewId = viewId;
623    }
624   
625    /**
626    * Sets the value of field 'visible'.
627    *
628    * @param visible
629    * the value of field 'visible'.
630    */
 
631  140 toggle public void setVisible(final boolean visible)
632    {
633  140 this._visible = visible;
634  140 this._has_visible = true;
635    }
636   
637    /**
638    * Sets the value of field 'width'.
639    *
640    * @param width
641    * the value of field 'width'.
642    */
 
643  140 toggle public void setWidth(final int width)
644    {
645  140 this._width = width;
646  140 this._has_width = true;
647    }
648   
649    /**
650    * Sets the value of field 'xpos'.
651    *
652    * @param xpos
653    * the value of field 'xpos'.
654    */
 
655  140 toggle public void setXpos(final int xpos)
656    {
657  140 this._xpos = xpos;
658  140 this._has_xpos = true;
659    }
660   
661    /**
662    * Sets the value of field 'ypos'.
663    *
664    * @param ypos
665    * the value of field 'ypos'.
666    */
 
667  140 toggle public void setYpos(final int ypos)
668    {
669  140 this._ypos = ypos;
670  140 this._has_ypos = true;
671    }
672   
673    /**
674    * Method unmarshal.
675    *
676    * @param reader
677    * @throws org.exolab.castor.xml.MarshalException
678    * if object is null or if any SAXException is thrown during
679    * marshaling
680    * @throws org.exolab.castor.xml.ValidationException
681    * if this object is an invalid instance according to the schema
682    * @return the unmarshaled jalview.schemabinding.version2.StructureState
683    */
 
684  0 toggle public static jalview.schemabinding.version2.StructureState unmarshal(
685    final java.io.Reader reader)
686    throws org.exolab.castor.xml.MarshalException,
687    org.exolab.castor.xml.ValidationException
688    {
689  0 return (jalview.schemabinding.version2.StructureState) Unmarshaller
690    .unmarshal(jalview.schemabinding.version2.StructureState.class,
691    reader);
692    }
693   
694    /**
695    *
696    *
697    * @throws org.exolab.castor.xml.ValidationException
698    * if this object is an invalid instance according to the schema
699    */
 
700  0 toggle public void validate() throws org.exolab.castor.xml.ValidationException
701    {
702  0 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
703  0 validator.validate(this);
704    }
705   
706    }