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;
50 * keeps track of state for field: _xpos
52 private boolean _has_xpos;
60 * keeps track of state for field: _ypos
62 private boolean _has_ypos;
70 * keeps track of state for field: _width
72 private boolean _has_width;
80 * keeps track of state for field: _height
82 private boolean _has_height;
85 * additional identifier which properly disambiguates
86 * the structure view from any other view with the same
87 * attributes. This is not an ID,
88 * because it is possible to have many references to the same
89 * physical structure view
90 * from different sequences in an alignment. A structureState
91 * element citing the same
92 * viewId will appear for each instance.
94 private java.lang.String _viewId;
101 public StructureState() {
113 public void deleteHeight(
115 this._has_height= false;
120 public void deleteVisible(
122 this._has_visible= false;
127 public void deleteWidth(
129 this._has_width= false;
134 public void deleteXpos(
136 this._has_xpos= false;
141 public void deleteYpos(
143 this._has_ypos= false;
147 * Returns the value of field 'content'. The field 'content'
148 * has the following description: internal content storage
150 * @return the value of field 'Content'.
152 public java.lang.String getContent(
154 return this._content;
158 * Returns the value of field 'height'.
160 * @return the value of field 'Height'.
162 public int getHeight(
168 * Returns the value of field 'viewId'. The field 'viewId' has
169 * the following description: additional identifier which
170 * properly disambiguates
171 * the structure view from any other view with the same
172 * attributes. This is not an ID,
173 * because it is possible to have many references to the same
174 * physical structure view
175 * from different sequences in an alignment. A structureState
176 * element citing the same
177 * viewId will appear for each instance.
179 * @return the value of field 'ViewId'.
181 public java.lang.String getViewId(
187 * Returns the value of field 'visible'.
189 * @return the value of field 'Visible'.
191 public boolean getVisible(
193 return this._visible;
197 * Returns the value of field 'width'.
199 * @return the value of field 'Width'.
207 * Returns the value of field 'xpos'.
209 * @return the value of field 'Xpos'.
217 * Returns the value of field 'ypos'.
219 * @return the value of field 'Ypos'.
229 * @return true if at least one Height has been added
231 public boolean hasHeight(
233 return this._has_height;
239 * @return true if at least one Visible has been added
241 public boolean hasVisible(
243 return this._has_visible;
249 * @return true if at least one Width has been added
251 public boolean hasWidth(
253 return this._has_width;
259 * @return true if at least one Xpos has been added
261 public boolean hasXpos(
263 return this._has_xpos;
269 * @return true if at least one Ypos has been added
271 public boolean hasYpos(
273 return this._has_ypos;
279 * @return true if this object is valid according to the schema
281 public boolean isValid(
285 } catch (org.exolab.castor.xml.ValidationException vex) {
292 * Returns the value of field 'visible'.
294 * @return the value of field 'Visible'.
296 public boolean isVisible(
298 return this._visible;
305 * @throws org.exolab.castor.xml.MarshalException if object is
306 * null or if any SAXException is thrown during marshaling
307 * @throws org.exolab.castor.xml.ValidationException if this
308 * object is an invalid instance according to the schema
311 final java.io.Writer out)
312 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
313 Marshaller.marshal(this, out);
320 * @throws java.io.IOException if an IOException occurs during
322 * @throws org.exolab.castor.xml.ValidationException if this
323 * object is an invalid instance according to the schema
324 * @throws org.exolab.castor.xml.MarshalException if object is
325 * null or if any SAXException is thrown during marshaling
328 final org.xml.sax.ContentHandler handler)
329 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
330 Marshaller.marshal(this, handler);
334 * Sets the value of field 'content'. The field 'content' has
335 * the following description: internal content storage
337 * @param content the value of field 'content'.
339 public void setContent(
340 final java.lang.String content) {
341 this._content = content;
345 * Sets the value of field 'height'.
347 * @param height the value of field 'height'.
349 public void setHeight(
351 this._height = height;
352 this._has_height = true;
356 * Sets the value of field 'viewId'. The field 'viewId' has the
357 * following description: additional identifier which properly
359 * the structure view from any other view with the same
360 * attributes. This is not an ID,
361 * because it is possible to have many references to the same
362 * physical structure view
363 * from different sequences in an alignment. A structureState
364 * element citing the same
365 * viewId will appear for each instance.
367 * @param viewId the value of field 'viewId'.
369 public void setViewId(
370 final java.lang.String viewId) {
371 this._viewId = viewId;
375 * Sets the value of field 'visible'.
377 * @param visible the value of field 'visible'.
379 public void setVisible(
380 final boolean visible) {
381 this._visible = visible;
382 this._has_visible = true;
386 * Sets the value of field 'width'.
388 * @param width the value of field 'width'.
390 public void setWidth(
393 this._has_width = true;
397 * Sets the value of field 'xpos'.
399 * @param xpos the value of field 'xpos'.
404 this._has_xpos = true;
408 * Sets the value of field 'ypos'.
410 * @param ypos the value of field 'ypos'.
415 this._has_ypos = true;
422 * @throws org.exolab.castor.xml.MarshalException if object is
423 * null or if any SAXException is thrown during marshaling
424 * @throws org.exolab.castor.xml.ValidationException if this
425 * object is an invalid instance according to the schema
426 * @return the unmarshaled
427 * jalview.schemabinding.version2.StructureState
429 public static jalview.schemabinding.version2.StructureState unmarshal(
430 final java.io.Reader reader)
431 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
432 return (jalview.schemabinding.version2.StructureState) Unmarshaller.unmarshal(jalview.schemabinding.version2.StructureState.class, reader);
438 * @throws org.exolab.castor.xml.ValidationException if this
439 * object is an invalid instance according to the schema
441 public void validate(
443 throws org.exolab.castor.xml.ValidationException {
444 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
445 validator.validate(this);