1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
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. If not, see <http://www.gnu.org/licenses/>.
17 *******************************************************************************/
19 * This class was automatically generated with
20 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
25 package jalview.schemabinding.version2;
27 //---------------------------------/
28 //- Imported classes and packages -/
29 //---------------------------------/
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
35 * Class StructureState.
37 * @version $Revision$ $Date$
39 public class StructureState implements java.io.Serializable {
42 //--------------------------/
43 //- Class/Member Variables -/
44 //--------------------------/
47 * internal content storage
49 private java.lang.String _content = "";
54 private boolean _visible;
57 * keeps track of state for field: _visible
59 private boolean _has_visible;
62 * additional identifier which properly disambiguates
63 * the structure view from any other view with the same
64 * attributes. This is not an ID,
65 * because it is possible to have many references to the same
66 * physical structure view
67 * from different sequences in an alignment. A structureState
68 * element citing the same
69 * viewId will appear for each instance.
71 private java.lang.String _viewId;
74 * Flag set if the alignment panel containing this JSeq should
75 * be included in those used to perform a structure
76 * 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
88 * be included in those used to colour its associated sequences
89 * in this structureState(since Jalview 2.7).
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
101 * state, rather 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;
117 * keeps track of state for field: _width
119 private boolean _has_width;
127 * keeps track of state for field: _height
129 private boolean _has_height;
137 * keeps track of state for field: _xpos
139 private boolean _has_xpos;
147 * keeps track of state for field: _ypos
149 private boolean _has_ypos;
156 public StructureState() {
168 public void deleteAlignwithAlignPanel(
170 this._has_alignwithAlignPanel= false;
175 public void deleteColourByJmol(
177 this._has_colourByJmol= false;
182 public void deleteColourwithAlignPanel(
184 this._has_colourwithAlignPanel= false;
189 public void deleteHeight(
191 this._has_height= false;
196 public void deleteVisible(
198 this._has_visible= false;
203 public void deleteWidth(
205 this._has_width= false;
210 public void deleteXpos(
212 this._has_xpos= false;
217 public void deleteYpos(
219 this._has_ypos= false;
223 * Returns the value of field 'alignwithAlignPanel'. The field
224 * 'alignwithAlignPanel' has the following description: Flag
225 * set if the alignment panel containing this JSeq should be
226 * included in those used to perform a structure superposition
227 * (since Jalview 2.7).
230 * @return the value of field 'AlignwithAlignPanel'.
232 public boolean getAlignwithAlignPanel(
234 return this._alignwithAlignPanel;
238 * Returns the value of field 'colourByJmol'. The field
239 * 'colourByJmol' has the following description: Flag set if
240 * the structure display is coloured by the Jmol state, rather
241 * than by one or more linked alignment views.
244 * @return the value of field 'ColourByJmol'.
246 public boolean getColourByJmol(
248 return this._colourByJmol;
252 * Returns the value of field 'colourwithAlignPanel'. The field
253 * 'colourwithAlignPanel' has the following description: Flag
254 * set if the alignment panel containing this JSeq should be
255 * included in those used to colour its associated sequences in
256 * this structureState(since Jalview 2.7).
259 * @return the value of field 'ColourwithAlignPanel'.
261 public boolean getColourwithAlignPanel(
263 return this._colourwithAlignPanel;
267 * Returns the value of field 'content'. The field 'content'
268 * has the following description: internal content storage
270 * @return the value of field 'Content'.
272 public java.lang.String getContent(
274 return this._content;
278 * Returns the value of field 'height'.
280 * @return the value of field 'Height'.
282 public int getHeight(
288 * Returns the value of field 'viewId'. The field 'viewId' has
289 * the following description: additional identifier which
290 * properly disambiguates
291 * the structure view from any other view with the same
292 * attributes. This is not an ID,
293 * because it is possible to have many references to the same
294 * physical structure view
295 * from different sequences in an alignment. A structureState
296 * element citing the same
297 * viewId will appear for each instance.
299 * @return the value of field 'ViewId'.
301 public java.lang.String getViewId(
307 * Returns the value of field 'visible'.
309 * @return the value of field 'Visible'.
311 public boolean getVisible(
313 return this._visible;
317 * Returns the value of field 'width'.
319 * @return the value of field 'Width'.
327 * Returns the value of field 'xpos'.
329 * @return the value of field 'Xpos'.
337 * Returns the value of field 'ypos'.
339 * @return the value of field 'Ypos'.
347 * Method hasAlignwithAlignPanel.
349 * @return true if at least one AlignwithAlignPanel has been
352 public boolean hasAlignwithAlignPanel(
354 return this._has_alignwithAlignPanel;
358 * Method hasColourByJmol.
360 * @return true if at least one ColourByJmol has been added
362 public boolean hasColourByJmol(
364 return this._has_colourByJmol;
368 * Method hasColourwithAlignPanel.
370 * @return true if at least one ColourwithAlignPanel has been
373 public boolean hasColourwithAlignPanel(
375 return this._has_colourwithAlignPanel;
381 * @return true if at least one Height has been added
383 public boolean hasHeight(
385 return this._has_height;
391 * @return true if at least one Visible has been added
393 public boolean hasVisible(
395 return this._has_visible;
401 * @return true if at least one Width has been added
403 public boolean hasWidth(
405 return this._has_width;
411 * @return true if at least one Xpos has been added
413 public boolean hasXpos(
415 return this._has_xpos;
421 * @return true if at least one Ypos has been added
423 public boolean hasYpos(
425 return this._has_ypos;
429 * Returns the value of field 'alignwithAlignPanel'. The field
430 * 'alignwithAlignPanel' has the following description: Flag
431 * set if the alignment panel containing this JSeq should be
432 * included in those used to perform a structure superposition
433 * (since Jalview 2.7).
436 * @return the value of field 'AlignwithAlignPanel'.
438 public boolean isAlignwithAlignPanel(
440 return this._alignwithAlignPanel;
444 * Returns the value of field 'colourByJmol'. The field
445 * 'colourByJmol' has the following description: Flag set if
446 * the structure display is coloured by the Jmol state, rather
447 * than by one or more linked alignment views.
450 * @return the value of field 'ColourByJmol'.
452 public boolean isColourByJmol(
454 return this._colourByJmol;
458 * Returns the value of field 'colourwithAlignPanel'. The field
459 * 'colourwithAlignPanel' has the following description: Flag
460 * set if the alignment panel containing this JSeq should be
461 * included in those used to colour its associated sequences in
462 * this structureState(since Jalview 2.7).
465 * @return the value of field 'ColourwithAlignPanel'.
467 public boolean isColourwithAlignPanel(
469 return this._colourwithAlignPanel;
475 * @return true if this object is valid according to the schema
477 public boolean isValid(
481 } catch (org.exolab.castor.xml.ValidationException vex) {
488 * Returns the value of field 'visible'.
490 * @return the value of field 'Visible'.
492 public boolean isVisible(
494 return this._visible;
501 * @throws org.exolab.castor.xml.MarshalException if object is
502 * null or if any SAXException is thrown during marshaling
503 * @throws org.exolab.castor.xml.ValidationException if this
504 * object is an invalid instance according to the schema
507 final java.io.Writer out)
508 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
509 Marshaller.marshal(this, out);
516 * @throws java.io.IOException if an IOException occurs during
518 * @throws org.exolab.castor.xml.ValidationException if this
519 * object is an invalid instance according to the schema
520 * @throws org.exolab.castor.xml.MarshalException if object is
521 * null or if any SAXException is thrown during marshaling
524 final org.xml.sax.ContentHandler handler)
525 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
526 Marshaller.marshal(this, handler);
530 * Sets the value of field 'alignwithAlignPanel'. The field
531 * 'alignwithAlignPanel' has the following description: Flag
532 * set if the alignment panel containing this JSeq should be
533 * included in those used to perform a structure superposition
534 * (since Jalview 2.7).
537 * @param alignwithAlignPanel the value of field
538 * 'alignwithAlignPanel'.
540 public void setAlignwithAlignPanel(
541 final boolean alignwithAlignPanel) {
542 this._alignwithAlignPanel = alignwithAlignPanel;
543 this._has_alignwithAlignPanel = true;
547 * Sets the value of field 'colourByJmol'. The field
548 * 'colourByJmol' has the following description: Flag set if
549 * the structure display is coloured by the Jmol state, rather
550 * than by one or more linked alignment views.
553 * @param colourByJmol the value of field 'colourByJmol'.
555 public void setColourByJmol(
556 final boolean colourByJmol) {
557 this._colourByJmol = colourByJmol;
558 this._has_colourByJmol = true;
562 * Sets the value of field 'colourwithAlignPanel'. The field
563 * 'colourwithAlignPanel' has the following description: Flag
564 * set if the alignment panel containing this JSeq should be
565 * included in those used to colour its associated sequences in
566 * this structureState(since Jalview 2.7).
569 * @param colourwithAlignPanel the value of field
570 * 'colourwithAlignPanel'.
572 public void setColourwithAlignPanel(
573 final boolean colourwithAlignPanel) {
574 this._colourwithAlignPanel = colourwithAlignPanel;
575 this._has_colourwithAlignPanel = true;
579 * Sets the value of field 'content'. The field 'content' has
580 * the following description: internal content storage
582 * @param content the value of field 'content'.
584 public void setContent(
585 final java.lang.String content) {
586 this._content = content;
590 * Sets the value of field 'height'.
592 * @param height the value of field 'height'.
594 public void setHeight(
596 this._height = height;
597 this._has_height = true;
601 * Sets the value of field 'viewId'. The field 'viewId' has the
602 * following description: additional identifier which properly
604 * the structure view from any other view with the same
605 * attributes. This is not an ID,
606 * because it is possible to have many references to the same
607 * physical structure view
608 * from different sequences in an alignment. A structureState
609 * element citing the same
610 * viewId will appear for each instance.
612 * @param viewId the value of field 'viewId'.
614 public void setViewId(
615 final java.lang.String viewId) {
616 this._viewId = viewId;
620 * Sets the value of field 'visible'.
622 * @param visible the value of field 'visible'.
624 public void setVisible(
625 final boolean visible) {
626 this._visible = visible;
627 this._has_visible = true;
631 * Sets the value of field 'width'.
633 * @param width the value of field 'width'.
635 public void setWidth(
638 this._has_width = true;
642 * Sets the value of field 'xpos'.
644 * @param xpos the value of field 'xpos'.
649 this._has_xpos = true;
653 * Sets the value of field 'ypos'.
655 * @param ypos the value of field 'ypos'.
660 this._has_ypos = true;
667 * @throws org.exolab.castor.xml.MarshalException if object is
668 * null or if any SAXException is thrown during marshaling
669 * @throws org.exolab.castor.xml.ValidationException if this
670 * object is an invalid instance according to the schema
671 * @return the unmarshaled
672 * jalview.schemabinding.version2.StructureState
674 public static jalview.schemabinding.version2.StructureState unmarshal(
675 final java.io.Reader reader)
676 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
677 return (jalview.schemabinding.version2.StructureState) Unmarshaller.unmarshal(jalview.schemabinding.version2.StructureState.class, reader);
683 * @throws org.exolab.castor.xml.ValidationException if this
684 * object is an invalid instance according to the schema
686 public void validate(
688 throws org.exolab.castor.xml.ValidationException {
689 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
690 validator.validate(this);