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