2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
8 package jalview.schemabinding.version2;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
18 * Class StructureState.
20 * @version $Revision$ $Date$
22 public class StructureState implements java.io.Serializable
25 // --------------------------/
26 // - Class/Member Variables -/
27 // --------------------------/
30 * internal content storage
32 private java.lang.String _content = "";
37 private boolean _visible;
40 * keeps track of state for field: _visible
42 private boolean _has_visible;
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.
52 private java.lang.String _viewId;
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).
59 private boolean _alignwithAlignPanel = true;
62 * keeps track of state for field: _alignwithAlignPanel
64 private boolean _has_alignwithAlignPanel;
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
72 private boolean _colourwithAlignPanel = false;
75 * keeps track of state for field: _colourwithAlignPanel
77 private boolean _has_colourwithAlignPanel;
80 * Flag set if the structure display is coloured by the Jmol state, rather
81 * than by one or more linked alignment views.
84 private boolean _colourByJmol = true;
87 * keeps track of state for field: _colourByJmol
89 private boolean _has_colourByJmol;
92 * An identifier for the viewer type, currently either JMOL or CHIMERA
95 private java.lang.String _type;
103 * keeps track of state for field: _width
105 private boolean _has_width;
113 * keeps track of state for field: _height
115 private boolean _has_height;
123 * keeps track of state for field: _xpos
125 private boolean _has_xpos;
133 * keeps track of state for field: _ypos
135 private boolean _has_ypos;
141 public StructureState()
153 public void deleteAlignwithAlignPanel()
155 this._has_alignwithAlignPanel = false;
160 public void deleteColourByJmol()
162 this._has_colourByJmol = false;
167 public void deleteColourwithAlignPanel()
169 this._has_colourwithAlignPanel = false;
174 public void deleteHeight()
176 this._has_height = false;
181 public void deleteVisible()
183 this._has_visible = false;
188 public void deleteWidth()
190 this._has_width = false;
195 public void deleteXpos()
197 this._has_xpos = false;
202 public void deleteYpos()
204 this._has_ypos = false;
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).
214 * @return the value of field 'AlignwithAlignPanel'.
216 public boolean getAlignwithAlignPanel()
218 return this._alignwithAlignPanel;
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.
227 * @return the value of field 'ColourByJmol'.
229 public boolean getColourByJmol()
231 return this._colourByJmol;
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).
241 * @return the value of field 'ColourwithAlignPanel'.
243 public boolean getColourwithAlignPanel()
245 return this._colourwithAlignPanel;
249 * Returns the value of field 'content'. The field 'content' has the following
250 * description: internal content storage
252 * @return the value of field 'Content'.
254 public java.lang.String getContent()
256 return this._content;
260 * Returns the value of field 'height'.
262 * @return the value of field 'Height'.
264 public int getHeight()
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
275 * @return the value of field 'Type'.
277 public java.lang.String getType()
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.
291 * @return the value of field 'ViewId'.
293 public java.lang.String getViewId()
299 * Returns the value of field 'visible'.
301 * @return the value of field 'Visible'.
303 public boolean getVisible()
305 return this._visible;
309 * Returns the value of field 'width'.
311 * @return the value of field 'Width'.
313 public int getWidth()
319 * Returns the value of field 'xpos'.
321 * @return the value of field 'Xpos'.
329 * Returns the value of field 'ypos'.
331 * @return the value of field 'Ypos'.
339 * Method hasAlignwithAlignPanel.
341 * @return true if at least one AlignwithAlignPanel has been added
343 public boolean hasAlignwithAlignPanel()
345 return this._has_alignwithAlignPanel;
349 * Method hasColourByJmol.
351 * @return true if at least one ColourByJmol has been added
353 public boolean hasColourByJmol()
355 return this._has_colourByJmol;
359 * Method hasColourwithAlignPanel.
361 * @return true if at least one ColourwithAlignPanel has been added
363 public boolean hasColourwithAlignPanel()
365 return this._has_colourwithAlignPanel;
371 * @return true if at least one Height has been added
373 public boolean hasHeight()
375 return this._has_height;
381 * @return true if at least one Visible has been added
383 public boolean hasVisible()
385 return this._has_visible;
391 * @return true if at least one Width has been added
393 public boolean hasWidth()
395 return this._has_width;
401 * @return true if at least one Xpos has been added
403 public boolean hasXpos()
405 return this._has_xpos;
411 * @return true if at least one Ypos has been added
413 public boolean hasYpos()
415 return this._has_ypos;
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).
425 * @return the value of field 'AlignwithAlignPanel'.
427 public boolean isAlignwithAlignPanel()
429 return this._alignwithAlignPanel;
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.
438 * @return the value of field 'ColourByJmol'.
440 public boolean isColourByJmol()
442 return this._colourByJmol;
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).
452 * @return the value of field 'ColourwithAlignPanel'.
454 public boolean isColourwithAlignPanel()
456 return this._colourwithAlignPanel;
462 * @return true if this object is valid according to the schema
464 public boolean isValid()
469 } catch (org.exolab.castor.xml.ValidationException vex)
477 * Returns the value of field 'visible'.
479 * @return the value of field 'Visible'.
481 public boolean isVisible()
483 return this._visible;
490 * @throws org.exolab.castor.xml.MarshalException
491 * if object is null or if any SAXException is thrown during
493 * @throws org.exolab.castor.xml.ValidationException
494 * if this object is an invalid instance according to the schema
496 public void marshal(final java.io.Writer out)
497 throws org.exolab.castor.xml.MarshalException,
498 org.exolab.castor.xml.ValidationException
500 Marshaller.marshal(this, out);
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
515 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
520 Marshaller.marshal(this, handler);
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).
530 * @param alignwithAlignPanel
531 * the value of field 'alignwithAlignPanel'.
533 public void setAlignwithAlignPanel(final boolean alignwithAlignPanel)
535 this._alignwithAlignPanel = alignwithAlignPanel;
536 this._has_alignwithAlignPanel = true;
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.
545 * @param colourByJmol
546 * the value of field 'colourByJmol'.
548 public void setColourByJmol(final boolean colourByJmol)
550 this._colourByJmol = colourByJmol;
551 this._has_colourByJmol = true;
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).
561 * @param colourwithAlignPanel
562 * the value of field 'colourwithAlignPanel'.
564 public void setColourwithAlignPanel(final boolean colourwithAlignPanel)
566 this._colourwithAlignPanel = colourwithAlignPanel;
567 this._has_colourwithAlignPanel = true;
571 * Sets the value of field 'content'. The field 'content' has the following
572 * description: internal content storage
575 * the value of field 'content'.
577 public void setContent(final java.lang.String content)
579 this._content = content;
583 * Sets the value of field 'height'.
586 * the value of field 'height'.
588 public void setHeight(final int height)
590 this._height = height;
591 this._has_height = true;
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
601 * the value of field 'type'.
603 public void setType(final java.lang.String type)
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.
618 * the value of field 'viewId'.
620 public void setViewId(final java.lang.String viewId)
622 this._viewId = viewId;
626 * Sets the value of field 'visible'.
629 * the value of field 'visible'.
631 public void setVisible(final boolean visible)
633 this._visible = visible;
634 this._has_visible = true;
638 * Sets the value of field 'width'.
641 * the value of field 'width'.
643 public void setWidth(final int width)
646 this._has_width = true;
650 * Sets the value of field 'xpos'.
653 * the value of field 'xpos'.
655 public void setXpos(final int xpos)
658 this._has_xpos = true;
662 * Sets the value of field 'ypos'.
665 * the value of field 'ypos'.
667 public void setYpos(final int ypos)
670 this._has_ypos = true;
677 * @throws org.exolab.castor.xml.MarshalException
678 * if object is null or if any SAXException is thrown during
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
684 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
689 return (jalview.schemabinding.version2.StructureState) Unmarshaller
690 .unmarshal(jalview.schemabinding.version2.StructureState.class,
697 * @throws org.exolab.castor.xml.ValidationException
698 * if this object is an invalid instance according to the schema
700 public void validate() throws org.exolab.castor.xml.ValidationException
702 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
703 validator.validate(this);