1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $(date) The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
20 *******************************************************************************/
22 * This class was automatically generated with
23 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
28 package jalview.schemabinding.version2;
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
38 * Class StructureState.
40 * @version $Revision$ $Date$
42 public class StructureState implements java.io.Serializable
45 // --------------------------/
46 // - Class/Member Variables -/
47 // --------------------------/
50 * internal content storage
52 private java.lang.String _content = "";
57 private boolean _visible;
60 * keeps track of state for field: _visible
62 private boolean _has_visible;
65 * additional identifier which properly disambiguates the structure view from
66 * any other view with the same attributes. This is not an ID, because it is
67 * possible to have many references to the same physical structure view from
68 * different sequences in an alignment. A structureState element citing the
69 * same viewId will appear for each instance.
72 private java.lang.String _viewId;
75 * Flag set if the alignment panel containing this JSeq should be included in
76 * those used to perform a structure superposition (since Jalview 2.7).
79 private boolean _alignwithAlignPanel = true;
82 * keeps track of state for field: _alignwithAlignPanel
84 private boolean _has_alignwithAlignPanel;
87 * Flag set if the alignment panel containing this JSeq should be included in
88 * those used to colour its associated sequences in this structureState(since
92 private boolean _colourwithAlignPanel = false;
95 * keeps track of state for field: _colourwithAlignPanel
97 private boolean _has_colourwithAlignPanel;
100 * Flag set if the structure display is coloured by the Jmol state, rather
101 * than by one or more linked alignment views.
104 private boolean _colourByJmol = true;
107 * keeps track of state for field: _colourByJmol
109 private boolean _has_colourByJmol;
112 * An identifier for the viewer type, currently either JMOL or CHIMERA
115 private java.lang.String _type;
123 * keeps track of state for field: _width
125 private boolean _has_width;
133 * keeps track of state for field: _height
135 private boolean _has_height;
143 * keeps track of state for field: _xpos
145 private boolean _has_xpos;
153 * keeps track of state for field: _ypos
155 private boolean _has_ypos;
161 public StructureState()
173 public void deleteAlignwithAlignPanel()
175 this._has_alignwithAlignPanel = false;
180 public void deleteColourByJmol()
182 this._has_colourByJmol = false;
187 public void deleteColourwithAlignPanel()
189 this._has_colourwithAlignPanel = false;
194 public void deleteHeight()
196 this._has_height = false;
201 public void deleteVisible()
203 this._has_visible = false;
208 public void deleteWidth()
210 this._has_width = false;
215 public void deleteXpos()
217 this._has_xpos = false;
222 public void deleteYpos()
224 this._has_ypos = false;
228 * Returns the value of field 'alignwithAlignPanel'. The field
229 * 'alignwithAlignPanel' has the following description: Flag set if the
230 * alignment panel containing this JSeq should be included in those used to
231 * perform a structure superposition (since Jalview 2.7).
234 * @return the value of field 'AlignwithAlignPanel'.
236 public boolean getAlignwithAlignPanel()
238 return this._alignwithAlignPanel;
242 * Returns the value of field 'colourByJmol'. The field 'colourByJmol' has the
243 * following description: Flag set if the structure display is coloured by the
244 * Jmol state, rather than by one or more linked alignment views.
247 * @return the value of field 'ColourByJmol'.
249 public boolean getColourByJmol()
251 return this._colourByJmol;
255 * Returns the value of field 'colourwithAlignPanel'. The field
256 * 'colourwithAlignPanel' has the following description: Flag set if the
257 * alignment panel containing this JSeq should be included in those used to
258 * colour its associated sequences in this structureState(since Jalview 2.7).
261 * @return the value of field 'ColourwithAlignPanel'.
263 public boolean getColourwithAlignPanel()
265 return this._colourwithAlignPanel;
269 * Returns the value of field 'content'. The field 'content' has the following
270 * description: internal content storage
272 * @return the value of field 'Content'.
274 public java.lang.String getContent()
276 return this._content;
280 * Returns the value of field 'height'.
282 * @return the value of field 'Height'.
284 public int getHeight()
290 * Returns the value of field 'type'. The field 'type' has the following
291 * description: An identifier for the viewer type, currently either JMOL or
295 * @return the value of field 'Type'.
297 public java.lang.String getType()
303 * Returns the value of field 'viewId'. The field 'viewId' has the following
304 * description: additional identifier which properly disambiguates the
305 * structure view from any other view with the same attributes. This is not an
306 * ID, because it is possible to have many references to the same physical
307 * structure view from different sequences in an alignment. A structureState
308 * element citing the same viewId will appear for each instance.
311 * @return the value of field 'ViewId'.
313 public java.lang.String getViewId()
319 * Returns the value of field 'visible'.
321 * @return the value of field 'Visible'.
323 public boolean getVisible()
325 return this._visible;
329 * Returns the value of field 'width'.
331 * @return the value of field 'Width'.
333 public int getWidth()
339 * Returns the value of field 'xpos'.
341 * @return the value of field 'Xpos'.
349 * Returns the value of field 'ypos'.
351 * @return the value of field 'Ypos'.
359 * Method hasAlignwithAlignPanel.
361 * @return true if at least one AlignwithAlignPanel has been added
363 public boolean hasAlignwithAlignPanel()
365 return this._has_alignwithAlignPanel;
369 * Method hasColourByJmol.
371 * @return true if at least one ColourByJmol has been added
373 public boolean hasColourByJmol()
375 return this._has_colourByJmol;
379 * Method hasColourwithAlignPanel.
381 * @return true if at least one ColourwithAlignPanel has been added
383 public boolean hasColourwithAlignPanel()
385 return this._has_colourwithAlignPanel;
391 * @return true if at least one Height has been added
393 public boolean hasHeight()
395 return this._has_height;
401 * @return true if at least one Visible has been added
403 public boolean hasVisible()
405 return this._has_visible;
411 * @return true if at least one Width has been added
413 public boolean hasWidth()
415 return this._has_width;
421 * @return true if at least one Xpos has been added
423 public boolean hasXpos()
425 return this._has_xpos;
431 * @return true if at least one Ypos has been added
433 public boolean hasYpos()
435 return this._has_ypos;
439 * Returns the value of field 'alignwithAlignPanel'. The field
440 * 'alignwithAlignPanel' has the following description: Flag set if the
441 * alignment panel containing this JSeq should be included in those used to
442 * perform a structure superposition (since Jalview 2.7).
445 * @return the value of field 'AlignwithAlignPanel'.
447 public boolean isAlignwithAlignPanel()
449 return this._alignwithAlignPanel;
453 * Returns the value of field 'colourByJmol'. The field 'colourByJmol' has the
454 * following description: Flag set if the structure display is coloured by the
455 * Jmol state, rather than by one or more linked alignment views.
458 * @return the value of field 'ColourByJmol'.
460 public boolean isColourByJmol()
462 return this._colourByJmol;
466 * Returns the value of field 'colourwithAlignPanel'. The field
467 * 'colourwithAlignPanel' has the following description: Flag set if the
468 * alignment panel containing this JSeq should be included in those used to
469 * colour its associated sequences in this structureState(since Jalview 2.7).
472 * @return the value of field 'ColourwithAlignPanel'.
474 public boolean isColourwithAlignPanel()
476 return this._colourwithAlignPanel;
482 * @return true if this object is valid according to the schema
484 public boolean isValid()
489 } catch (org.exolab.castor.xml.ValidationException vex)
497 * Returns the value of field 'visible'.
499 * @return the value of field 'Visible'.
501 public boolean isVisible()
503 return this._visible;
510 * @throws org.exolab.castor.xml.MarshalException
511 * if object is null or if any SAXException is thrown during
513 * @throws org.exolab.castor.xml.ValidationException
514 * if this object is an invalid instance according to the schema
516 public void marshal(final java.io.Writer out)
517 throws org.exolab.castor.xml.MarshalException,
518 org.exolab.castor.xml.ValidationException
520 Marshaller.marshal(this, out);
527 * @throws java.io.IOException
528 * if an IOException occurs during marshaling
529 * @throws org.exolab.castor.xml.ValidationException
530 * if this object is an invalid instance according to the schema
531 * @throws org.exolab.castor.xml.MarshalException
532 * if object is null or if any SAXException is thrown during
535 public void marshal(final org.xml.sax.ContentHandler handler)
536 throws java.io.IOException,
537 org.exolab.castor.xml.MarshalException,
538 org.exolab.castor.xml.ValidationException
540 Marshaller.marshal(this, handler);
544 * Sets the value of field 'alignwithAlignPanel'. The field
545 * 'alignwithAlignPanel' has the following description: Flag set if the
546 * alignment panel containing this JSeq should be included in those used to
547 * perform a structure superposition (since Jalview 2.7).
550 * @param alignwithAlignPanel
551 * the value of field 'alignwithAlignPanel'.
553 public void setAlignwithAlignPanel(final boolean alignwithAlignPanel)
555 this._alignwithAlignPanel = alignwithAlignPanel;
556 this._has_alignwithAlignPanel = true;
560 * Sets the value of field 'colourByJmol'. The field 'colourByJmol' has the
561 * following description: Flag set if the structure display is coloured by the
562 * Jmol state, rather than by one or more linked alignment views.
565 * @param colourByJmol
566 * the value of field 'colourByJmol'.
568 public void setColourByJmol(final boolean colourByJmol)
570 this._colourByJmol = colourByJmol;
571 this._has_colourByJmol = true;
575 * Sets the value of field 'colourwithAlignPanel'. The field
576 * 'colourwithAlignPanel' has the following description: Flag set if the
577 * alignment panel containing this JSeq should be included in those used to
578 * colour its associated sequences in this structureState(since Jalview 2.7).
581 * @param colourwithAlignPanel
582 * the value of field 'colourwithAlignPanel'.
584 public void setColourwithAlignPanel(final boolean colourwithAlignPanel)
586 this._colourwithAlignPanel = colourwithAlignPanel;
587 this._has_colourwithAlignPanel = true;
591 * Sets the value of field 'content'. The field 'content' has the following
592 * description: internal content storage
595 * the value of field 'content'.
597 public void setContent(final java.lang.String content)
599 this._content = content;
603 * Sets the value of field 'height'.
606 * the value of field 'height'.
608 public void setHeight(final int height)
610 this._height = height;
611 this._has_height = true;
615 * Sets the value of field 'type'. The field 'type' has the following
616 * description: An identifier for the viewer type, currently either JMOL or
621 * the value of field 'type'.
623 public void setType(final java.lang.String type)
629 * Sets the value of field 'viewId'. The field 'viewId' has the following
630 * description: additional identifier which properly disambiguates the
631 * structure view from any other view with the same attributes. This is not an
632 * ID, because it is possible to have many references to the same physical
633 * structure view from different sequences in an alignment. A structureState
634 * element citing the same viewId will appear for each instance.
638 * the value of field 'viewId'.
640 public void setViewId(final java.lang.String viewId)
642 this._viewId = viewId;
646 * Sets the value of field 'visible'.
649 * the value of field 'visible'.
651 public void setVisible(final boolean visible)
653 this._visible = visible;
654 this._has_visible = true;
658 * Sets the value of field 'width'.
661 * the value of field 'width'.
663 public void setWidth(final int width)
666 this._has_width = true;
670 * Sets the value of field 'xpos'.
673 * the value of field 'xpos'.
675 public void setXpos(final int xpos)
678 this._has_xpos = true;
682 * Sets the value of field 'ypos'.
685 * the value of field 'ypos'.
687 public void setYpos(final int ypos)
690 this._has_ypos = true;
697 * @throws org.exolab.castor.xml.MarshalException
698 * if object is null or if any SAXException is thrown during
700 * @throws org.exolab.castor.xml.ValidationException
701 * if this object is an invalid instance according to the schema
702 * @return the unmarshaled jalview.schemabinding.version2.StructureState
704 public static jalview.schemabinding.version2.StructureState unmarshal(
705 final java.io.Reader reader)
706 throws org.exolab.castor.xml.MarshalException,
707 org.exolab.castor.xml.ValidationException
709 return (jalview.schemabinding.version2.StructureState) Unmarshaller
710 .unmarshal(jalview.schemabinding.version2.StructureState.class,
717 * @throws org.exolab.castor.xml.ValidationException
718 * if this object is an invalid instance according to the schema
720 public void validate() throws org.exolab.castor.xml.ValidationException
722 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
723 validator.validate(this);