1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
3 * Copyright (C) 2014 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 of the License, or (at your option) any later version.
11 * Jalview is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along with Jalview.
17 * If not, see <http://www.gnu.org/licenses/>.
18 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 ******************************************************************************/
21 * This class was automatically generated with
22 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
27 package jalview.schemabinding.version2;
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
33 import org.exolab.castor.xml.Marshaller;
34 import org.exolab.castor.xml.Unmarshaller;
37 * Class StructureState.
39 * @version $Revision$ $Date$
41 public class StructureState implements java.io.Serializable
44 // --------------------------/
45 // - Class/Member Variables -/
46 // --------------------------/
49 * internal content storage
51 private java.lang.String _content = "";
56 private boolean _visible;
59 * keeps track of state for field: _visible
61 private boolean _has_visible;
64 * additional identifier which properly disambiguates the structure view from
65 * any other view with the same attributes. This is not an ID, because it is
66 * possible to have many references to the same physical structure view from
67 * different sequences in an alignment. A structureState element citing the
68 * same viewId will appear for each instance.
71 private java.lang.String _viewId;
74 * Flag set if the alignment panel containing this JSeq should be included in
75 * those used to perform a structure superposition (since Jalview 2.7).
78 private boolean _alignwithAlignPanel = true;
81 * keeps track of state for field: _alignwithAlignPanel
83 private boolean _has_alignwithAlignPanel;
86 * Flag set if the alignment panel containing this JSeq should be included in
87 * those used to colour its associated sequences in this structureState(since
91 private boolean _colourwithAlignPanel = false;
94 * keeps track of state for field: _colourwithAlignPanel
96 private boolean _has_colourwithAlignPanel;
99 * Flag set if the structure display is coloured by the Jmol state, rather
100 * than by one or more linked alignment views.
103 private boolean _colourByJmol = true;
106 * keeps track of state for field: _colourByJmol
108 private boolean _has_colourByJmol;
116 * keeps track of state for field: _width
118 private boolean _has_width;
126 * keeps track of state for field: _height
128 private boolean _has_height;
136 * keeps track of state for field: _xpos
138 private boolean _has_xpos;
146 * keeps track of state for field: _ypos
148 private boolean _has_ypos;
154 public StructureState()
166 public void deleteAlignwithAlignPanel()
168 this._has_alignwithAlignPanel = false;
173 public void deleteColourByJmol()
175 this._has_colourByJmol = false;
180 public void deleteColourwithAlignPanel()
182 this._has_colourwithAlignPanel = false;
187 public void deleteHeight()
189 this._has_height = false;
194 public void deleteVisible()
196 this._has_visible = false;
201 public void deleteWidth()
203 this._has_width = false;
208 public void deleteXpos()
210 this._has_xpos = false;
215 public void deleteYpos()
217 this._has_ypos = false;
221 * Returns the value of field 'alignwithAlignPanel'. The field
222 * 'alignwithAlignPanel' has the following description: Flag set if the
223 * alignment panel containing this JSeq should be included in those used to
224 * perform a structure superposition (since Jalview 2.7).
227 * @return the value of field 'AlignwithAlignPanel'.
229 public boolean getAlignwithAlignPanel()
231 return this._alignwithAlignPanel;
235 * Returns the value of field 'colourByJmol'. The field 'colourByJmol' has the
236 * following description: Flag set if the structure display is coloured by the
237 * Jmol state, rather than by one or more linked alignment views.
240 * @return the value of field 'ColourByJmol'.
242 public boolean getColourByJmol()
244 return this._colourByJmol;
248 * Returns the value of field 'colourwithAlignPanel'. The field
249 * 'colourwithAlignPanel' has the following description: Flag set if the
250 * alignment panel containing this JSeq should be included in those used to
251 * colour its associated sequences in this structureState(since Jalview 2.7).
254 * @return the value of field 'ColourwithAlignPanel'.
256 public boolean getColourwithAlignPanel()
258 return this._colourwithAlignPanel;
262 * Returns the value of field 'content'. The field 'content' has the following
263 * description: internal content storage
265 * @return the value of field 'Content'.
267 public java.lang.String getContent()
269 return this._content;
273 * Returns the value of field 'height'.
275 * @return the value of field 'Height'.
277 public int getHeight()
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 'viewId'. The field 'viewId' has the following
596 * description: additional identifier which properly disambiguates the
597 * structure view from any other view with the same attributes. This is not an
598 * ID, because it is possible to have many references to the same physical
599 * structure view from different sequences in an alignment. A structureState
600 * element citing the same viewId will appear for each instance.
604 * the value of field 'viewId'.
606 public void setViewId(final java.lang.String viewId)
608 this._viewId = viewId;
612 * Sets the value of field 'visible'.
615 * the value of field 'visible'.
617 public void setVisible(final boolean visible)
619 this._visible = visible;
620 this._has_visible = true;
624 * Sets the value of field 'width'.
627 * the value of field 'width'.
629 public void setWidth(final int width)
632 this._has_width = true;
636 * Sets the value of field 'xpos'.
639 * the value of field 'xpos'.
641 public void setXpos(final int xpos)
644 this._has_xpos = true;
648 * Sets the value of field 'ypos'.
651 * the value of field 'ypos'.
653 public void setYpos(final int ypos)
656 this._has_ypos = true;
663 * @throws org.exolab.castor.xml.MarshalException
664 * if object is null or if any SAXException is thrown during
666 * @throws org.exolab.castor.xml.ValidationException
667 * if this object is an invalid instance according to the schema
668 * @return the unmarshaled jalview.schemabinding.version2.StructureState
670 public static jalview.schemabinding.version2.StructureState unmarshal(
671 final java.io.Reader reader)
672 throws org.exolab.castor.xml.MarshalException,
673 org.exolab.castor.xml.ValidationException
675 return (jalview.schemabinding.version2.StructureState) Unmarshaller
676 .unmarshal(jalview.schemabinding.version2.StructureState.class,
683 * @throws org.exolab.castor.xml.ValidationException
684 * if this object is an invalid instance according to the schema
686 public void validate() throws org.exolab.castor.xml.ValidationException
688 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
689 validator.validate(this);