JAL-3082 one more test condition
[jalview.git] / src / jalview / schemabinding / version2 / SecondaryStructure.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.schemabinding.version2;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
16
17 /**
18  * Class SecondaryStructure.
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class SecondaryStructure implements java.io.Serializable
23 {
24
25   // --------------------------/
26   // - Class/Member Variables -/
27   // --------------------------/
28
29   /**
30    * Field _title.
31    */
32   private java.lang.String _title;
33
34   /**
35    * id attribute of Annotation in vamsasModel for the secondary structure
36    * annotation shown in the viewer
37    * 
38    */
39   private java.lang.String _annotationId;
40
41   /**
42    * if true the RNA structure is shown with gaps, if false without
43    * 
44    */
45   private boolean _gapped;
46
47   /**
48    * keeps track of state for field: _gapped
49    */
50   private boolean _has_gapped;
51
52   /**
53    * name of the project jar entry that holds the VARNA viewer state for the
54    * structure
55    * 
56    */
57   private java.lang.String _viewerState;
58
59   // ----------------/
60   // - Constructors -/
61   // ----------------/
62
63   public SecondaryStructure()
64   {
65     super();
66   }
67
68   // -----------/
69   // - Methods -/
70   // -----------/
71
72   /**
73      */
74   public void deleteGapped()
75   {
76     this._has_gapped = false;
77   }
78
79   /**
80    * Returns the value of field 'annotationId'. The field 'annotationId' has the
81    * following description: id attribute of Annotation in vamsasModel for the
82    * secondary structure annotation shown in the viewer
83    * 
84    * 
85    * @return the value of field 'AnnotationId'.
86    */
87   public java.lang.String getAnnotationId()
88   {
89     return this._annotationId;
90   }
91
92   /**
93    * Returns the value of field 'gapped'. The field 'gapped' has the following
94    * description: if true the RNA structure is shown with gaps, if false without
95    * 
96    * 
97    * @return the value of field 'Gapped'.
98    */
99   public boolean getGapped()
100   {
101     return this._gapped;
102   }
103
104   /**
105    * Returns the value of field 'title'.
106    * 
107    * @return the value of field 'Title'.
108    */
109   public java.lang.String getTitle()
110   {
111     return this._title;
112   }
113
114   /**
115    * Returns the value of field 'viewerState'. The field 'viewerState' has the
116    * following description: name of the project jar entry that holds the VARNA
117    * viewer state for the structure
118    * 
119    * 
120    * @return the value of field 'ViewerState'.
121    */
122   public java.lang.String getViewerState()
123   {
124     return this._viewerState;
125   }
126
127   /**
128    * Method hasGapped.
129    * 
130    * @return true if at least one Gapped has been added
131    */
132   public boolean hasGapped()
133   {
134     return this._has_gapped;
135   }
136
137   /**
138    * Returns the value of field 'gapped'. The field 'gapped' has the following
139    * description: if true the RNA structure is shown with gaps, if false without
140    * 
141    * 
142    * @return the value of field 'Gapped'.
143    */
144   public boolean isGapped()
145   {
146     return this._gapped;
147   }
148
149   /**
150    * Method isValid.
151    * 
152    * @return true if this object is valid according to the schema
153    */
154   public boolean isValid()
155   {
156     try
157     {
158       validate();
159     } catch (org.exolab.castor.xml.ValidationException vex)
160     {
161       return false;
162     }
163     return true;
164   }
165
166   /**
167    * 
168    * 
169    * @param out
170    * @throws org.exolab.castor.xml.MarshalException
171    *           if object is null or if any SAXException is thrown during
172    *           marshaling
173    * @throws org.exolab.castor.xml.ValidationException
174    *           if this object is an invalid instance according to the schema
175    */
176   public void marshal(final java.io.Writer out)
177           throws org.exolab.castor.xml.MarshalException,
178           org.exolab.castor.xml.ValidationException
179   {
180     Marshaller.marshal(this, out);
181   }
182
183   /**
184    * 
185    * 
186    * @param handler
187    * @throws java.io.IOException
188    *           if an IOException occurs during marshaling
189    * @throws org.exolab.castor.xml.ValidationException
190    *           if this object is an invalid instance according to the schema
191    * @throws org.exolab.castor.xml.MarshalException
192    *           if object is null or if any SAXException is thrown during
193    *           marshaling
194    */
195   public void marshal(final org.xml.sax.ContentHandler handler)
196           throws java.io.IOException,
197           org.exolab.castor.xml.MarshalException,
198           org.exolab.castor.xml.ValidationException
199   {
200     Marshaller.marshal(this, handler);
201   }
202
203   /**
204    * Sets the value of field 'annotationId'. The field 'annotationId' has the
205    * following description: id attribute of Annotation in vamsasModel for the
206    * secondary structure annotation shown in the viewer
207    * 
208    * 
209    * @param annotationId
210    *          the value of field 'annotationId'.
211    */
212   public void setAnnotationId(final java.lang.String annotationId)
213   {
214     this._annotationId = annotationId;
215   }
216
217   /**
218    * Sets the value of field 'gapped'. The field 'gapped' has the following
219    * description: if true the RNA structure is shown with gaps, if false without
220    * 
221    * 
222    * @param gapped
223    *          the value of field 'gapped'.
224    */
225   public void setGapped(final boolean gapped)
226   {
227     this._gapped = gapped;
228     this._has_gapped = true;
229   }
230
231   /**
232    * Sets the value of field 'title'.
233    * 
234    * @param title
235    *          the value of field 'title'.
236    */
237   public void setTitle(final java.lang.String title)
238   {
239     this._title = title;
240   }
241
242   /**
243    * Sets the value of field 'viewerState'. The field 'viewerState' has the
244    * following description: name of the project jar entry that holds the VARNA
245    * viewer state for the structure
246    * 
247    * 
248    * @param viewerState
249    *          the value of field 'viewerState'.
250    */
251   public void setViewerState(final java.lang.String viewerState)
252   {
253     this._viewerState = viewerState;
254   }
255
256   /**
257    * Method unmarshal.
258    * 
259    * @param reader
260    * @throws org.exolab.castor.xml.MarshalException
261    *           if object is null or if any SAXException is thrown during
262    *           marshaling
263    * @throws org.exolab.castor.xml.ValidationException
264    *           if this object is an invalid instance according to the schema
265    * @return the unmarshaled jalview.schemabinding.version2.SecondaryStructure
266    */
267   public static jalview.schemabinding.version2.SecondaryStructure unmarshal(
268           final java.io.Reader reader)
269           throws org.exolab.castor.xml.MarshalException,
270           org.exolab.castor.xml.ValidationException
271   {
272     return (jalview.schemabinding.version2.SecondaryStructure) Unmarshaller
273             .unmarshal(
274                     jalview.schemabinding.version2.SecondaryStructure.class,
275                     reader);
276   }
277
278   /**
279    * 
280    * 
281    * @throws org.exolab.castor.xml.ValidationException
282    *           if this object is an invalid instance according to the schema
283    */
284   public void validate() throws org.exolab.castor.xml.ValidationException
285   {
286     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
287     validator.validate(this);
288   }
289
290 }