Clover icon

jalviewX

  1. Project Clover database Wed Oct 31 2018 15:13:58 GMT
  2. Package jalview.schemabinding.version2

File AnnotationElement.java

 

Coverage histogram

../../../img/srcFileCovDistChart7.png
28% of files have more coverage

Code metrics

0
31
24
1
356
134
25
0.81
1.29
24
1.04

Classes

Class Line # Actions
AnnotationElement 22 31 25 20
0.636363663.6%
 

Contributing tests

This file is covered by 16 tests. .

Source view

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 AnnotationElement.
19    *
20    * @version $Revision$ $Date$
21    */
 
22    public class AnnotationElement implements java.io.Serializable
23    {
24   
25    // --------------------------/
26    // - Class/Member Variables -/
27    // --------------------------/
28   
29    /**
30    * Field _position.
31    */
32    private int _position;
33   
34    /**
35    * keeps track of state for field: _position
36    */
37    private boolean _has_position;
38   
39    /**
40    * Field _colour.
41    */
42    private int _colour;
43   
44    /**
45    * keeps track of state for field: _colour
46    */
47    private boolean _has_colour;
48   
49    /**
50    * Field _displayCharacter.
51    */
52    private java.lang.String _displayCharacter;
53   
54    /**
55    * Field _description.
56    */
57    private java.lang.String _description;
58   
59    /**
60    * Field _secondaryStructure.
61    */
62    private java.lang.String _secondaryStructure;
63   
64    /**
65    * Field _value.
66    */
67    private float _value;
68   
69    /**
70    * keeps track of state for field: _value
71    */
72    private boolean _has_value;
73   
74    // ----------------/
75    // - Constructors -/
76    // ----------------/
77   
 
78  97584 toggle public AnnotationElement()
79    {
80  97584 super();
81    }
82   
83    // -----------/
84    // - Methods -/
85    // -----------/
86   
87    /**
88    */
 
89  0 toggle public void deleteColour()
90    {
91  0 this._has_colour = false;
92    }
93   
94    /**
95    */
 
96  0 toggle public void deletePosition()
97    {
98  0 this._has_position = false;
99    }
100   
101    /**
102    */
 
103  0 toggle public void deleteValue()
104    {
105  0 this._has_value = false;
106    }
107   
108    /**
109    * Returns the value of field 'colour'.
110    *
111    * @return the value of field 'Colour'.
112    */
 
113  95953 toggle public int getColour()
114    {
115  95953 return this._colour;
116    }
117   
118    /**
119    * Returns the value of field 'description'.
120    *
121    * @return the value of field 'Description'.
122    */
 
123  129639 toggle public java.lang.String getDescription()
124    {
125  129639 return this._description;
126    }
127   
128    /**
129    * Returns the value of field 'displayCharacter'.
130    *
131    * @return the value of field 'DisplayCharacter'.
132    */
 
133  129639 toggle public java.lang.String getDisplayCharacter()
134    {
135  129639 return this._displayCharacter;
136    }
137   
138    /**
139    * Returns the value of field 'position'.
140    *
141    * @return the value of field 'Position'.
142    */
 
143  129639 toggle public int getPosition()
144    {
145  129639 return this._position;
146    }
147   
148    /**
149    * Returns the value of field 'secondaryStructure'.
150    *
151    * @return the value of field 'SecondaryStructure'.
152    */
 
153  143215 toggle public java.lang.String getSecondaryStructure()
154    {
155  143215 return this._secondaryStructure;
156    }
157   
158    /**
159    * Returns the value of field 'value'.
160    *
161    * @return the value of field 'Value'.
162    */
 
163  126903 toggle public float getValue()
164    {
165  126903 return this._value;
166    }
167   
168    /**
169    * Method hasColour.
170    *
171    * @return true if at least one Colour has been added
172    */
 
173  66326 toggle public boolean hasColour()
174    {
175  66326 return this._has_colour;
176    }
177   
178    /**
179    * Method hasPosition.
180    *
181    * @return true if at least one Position has been added
182    */
 
183  66326 toggle public boolean hasPosition()
184    {
185  66326 return this._has_position;
186    }
187   
188    /**
189    * Method hasValue.
190    *
191    * @return true if at least one Value has been added
192    */
 
193  66326 toggle public boolean hasValue()
194    {
195  66326 return this._has_value;
196    }
197   
198    /**
199    * Method isValid.
200    *
201    * @return true if this object is valid according to the schema
202    */
 
203  0 toggle public boolean isValid()
204    {
205  0 try
206    {
207  0 validate();
208    } catch (org.exolab.castor.xml.ValidationException vex)
209    {
210  0 return false;
211    }
212  0 return true;
213    }
214   
215    /**
216    *
217    *
218    * @param out
219    * @throws org.exolab.castor.xml.MarshalException
220    * if object is null or if any SAXException is thrown during
221    * marshaling
222    * @throws org.exolab.castor.xml.ValidationException
223    * if this object is an invalid instance according to the schema
224    */
 
225  0 toggle public void marshal(final java.io.Writer out)
226    throws org.exolab.castor.xml.MarshalException,
227    org.exolab.castor.xml.ValidationException
228    {
229  0 Marshaller.marshal(this, out);
230    }
231   
232    /**
233    *
234    *
235    * @param handler
236    * @throws java.io.IOException
237    * if an IOException occurs during marshaling
238    * @throws org.exolab.castor.xml.ValidationException
239    * if this object is an invalid instance according to the schema
240    * @throws org.exolab.castor.xml.MarshalException
241    * if object is null or if any SAXException is thrown during
242    * marshaling
243    */
 
244  0 toggle public void marshal(final org.xml.sax.ContentHandler handler)
245    throws java.io.IOException,
246    org.exolab.castor.xml.MarshalException,
247    org.exolab.castor.xml.ValidationException
248    {
249  0 Marshaller.marshal(this, handler);
250    }
251   
252    /**
253    * Sets the value of field 'colour'.
254    *
255    * @param colour
256    * the value of field 'colour'.
257    */
 
258  50839 toggle public void setColour(final int colour)
259    {
260  50839 this._colour = colour;
261  50839 this._has_colour = true;
262    }
263   
264    /**
265    * Sets the value of field 'description'.
266    *
267    * @param description
268    * the value of field 'description'.
269    */
 
270  87136 toggle public void setDescription(final java.lang.String description)
271    {
272  87136 this._description = description;
273    }
274   
275    /**
276    * Sets the value of field 'displayCharacter'.
277    *
278    * @param displayCharacter
279    * the value of field 'displayCharacter'
280    */
 
281  90590 toggle public void setDisplayCharacter(final java.lang.String displayCharacter)
282    {
283  90590 this._displayCharacter = displayCharacter;
284    }
285   
286    /**
287    * Sets the value of field 'position'.
288    *
289    * @param position
290    * the value of field 'position'.
291    */
 
292  97584 toggle public void setPosition(final int position)
293    {
294  97584 this._position = position;
295  97584 this._has_position = true;
296    }
297   
298    /**
299    * Sets the value of field 'secondaryStructure'.
300    *
301    * @param secondaryStructure
302    * the value of field 'secondaryStructure'.
303    */
 
304  13272 toggle public void setSecondaryStructure(
305    final java.lang.String secondaryStructure)
306    {
307  13272 this._secondaryStructure = secondaryStructure;
308    }
309   
310    /**
311    * Sets the value of field 'value'.
312    *
313    * @param value
314    * the value of field 'value'.
315    */
 
316  94362 toggle public void setValue(final float value)
317    {
318  94362 this._value = value;
319  94362 this._has_value = true;
320    }
321   
322    /**
323    * Method unmarshal.
324    *
325    * @param reader
326    * @throws org.exolab.castor.xml.MarshalException
327    * if object is null or if any SAXException is thrown during
328    * marshaling
329    * @throws org.exolab.castor.xml.ValidationException
330    * if this object is an invalid instance according to the schema
331    * @return the unmarshaled jalview.schemabinding.version2.AnnotationElement
332    */
 
333  0 toggle public static jalview.schemabinding.version2.AnnotationElement unmarshal(
334    final java.io.Reader reader)
335    throws org.exolab.castor.xml.MarshalException,
336    org.exolab.castor.xml.ValidationException
337    {
338  0 return (jalview.schemabinding.version2.AnnotationElement) Unmarshaller
339    .unmarshal(
340    jalview.schemabinding.version2.AnnotationElement.class,
341    reader);
342    }
343   
344    /**
345    *
346    *
347    * @throws org.exolab.castor.xml.ValidationException
348    * if this object is an invalid instance according to the schema
349    */
 
350  0 toggle public void validate() throws org.exolab.castor.xml.ValidationException
351    {
352  0 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
353  0 validator.validate(this);
354    }
355   
356    }