Clover icon

jalviewX

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

File ThresholdLineDescriptor.java

 

Coverage histogram

../../../../img/srcFileCovDistChart8.png
19% of files have more coverage

Code metrics

8
82
18
1
309
190
25
0.3
4.56
18
1.39

Classes

Class Line # Actions
ThresholdLineDescriptor 21 82 25 25
0.768518576.9%
 

Contributing tests

This file is covered by 1 test. .

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.descriptors;
9   
10    //---------------------------------/
11    //- Imported classes and packages -/
12    //---------------------------------/
13   
14    import jalview.schemabinding.version2.ThresholdLine;
15   
16    /**
17    * Class ThresholdLineDescriptor.
18    *
19    * @version $Revision$ $Date$
20    */
 
21    public class ThresholdLineDescriptor extends
22    org.exolab.castor.xml.util.XMLClassDescriptorImpl
23    {
24   
25    // --------------------------/
26    // - Class/Member Variables -/
27    // --------------------------/
28   
29    /**
30    * Field _elementDefinition.
31    */
32    private boolean _elementDefinition;
33   
34    /**
35    * Field _nsPrefix.
36    */
37    private java.lang.String _nsPrefix;
38   
39    /**
40    * Field _nsURI.
41    */
42    private java.lang.String _nsURI;
43   
44    /**
45    * Field _xmlName.
46    */
47    private java.lang.String _xmlName;
48   
49    // ----------------/
50    // - Constructors -/
51    // ----------------/
52   
 
53  90 toggle public ThresholdLineDescriptor()
54    {
55  90 super();
56  90 _nsURI = "www.vamsas.ac.uk/jalview/version2";
57  90 _xmlName = "thresholdLine";
58  90 _elementDefinition = true;
59  90 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
60  90 org.exolab.castor.mapping.FieldHandler handler = null;
61  90 org.exolab.castor.xml.FieldValidator fieldValidator = null;
62    // -- initialize attribute descriptors
63   
64    // -- _label
65  90 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
66    java.lang.String.class, "_label", "label",
67    org.exolab.castor.xml.NodeType.Attribute);
68  90 desc.setImmutable(true);
69  90 handler = new org.exolab.castor.xml.XMLFieldHandler()
70    {
 
71  60 toggle public java.lang.Object getValue(java.lang.Object object)
72    throws IllegalStateException
73    {
74  60 ThresholdLine target = (ThresholdLine) object;
75  60 return target.getLabel();
76    }
77   
 
78  30 toggle public void setValue(java.lang.Object object, java.lang.Object value)
79    throws IllegalStateException, IllegalArgumentException
80    {
81  30 try
82    {
83  30 ThresholdLine target = (ThresholdLine) object;
84  30 target.setLabel((java.lang.String) value);
85    } catch (java.lang.Exception ex)
86    {
87  0 throw new IllegalStateException(ex.toString());
88    }
89    }
90   
 
91  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
92    {
93  0 return null;
94    }
95    };
96  90 desc.setHandler(handler);
97  90 desc.setMultivalued(false);
98  90 addFieldDescriptor(desc);
99   
100    // -- validation code for: _label
101  90 fieldValidator = new org.exolab.castor.xml.FieldValidator();
102    { // -- local scope
103  90 org.exolab.castor.xml.validators.StringValidator typeValidator;
104  90 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
105  90 fieldValidator.setValidator(typeValidator);
106  90 typeValidator.setWhiteSpace("preserve");
107    }
108  90 desc.setValidator(fieldValidator);
109    // -- _value
110  90 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
111    java.lang.Float.TYPE, "_value", "value",
112    org.exolab.castor.xml.NodeType.Attribute);
113  90 handler = new org.exolab.castor.xml.XMLFieldHandler()
114    {
 
115  60 toggle public java.lang.Object getValue(java.lang.Object object)
116    throws IllegalStateException
117    {
118  60 ThresholdLine target = (ThresholdLine) object;
119  60 if (!target.hasValue())
120    {
121  0 return null;
122    }
123  60 return new java.lang.Float(target.getValue());
124    }
125   
 
126  30 toggle public void setValue(java.lang.Object object, java.lang.Object value)
127    throws IllegalStateException, IllegalArgumentException
128    {
129  30 try
130    {
131  30 ThresholdLine target = (ThresholdLine) object;
132    // if null, use delete method for optional primitives
133  30 if (value == null)
134    {
135  0 target.deleteValue();
136  0 return;
137    }
138  30 target.setValue(((java.lang.Float) value).floatValue());
139    } catch (java.lang.Exception ex)
140    {
141  0 throw new IllegalStateException(ex.toString());
142    }
143    }
144   
 
145  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
146    {
147  0 return null;
148    }
149    };
150  90 desc.setHandler(handler);
151  90 desc.setMultivalued(false);
152  90 addFieldDescriptor(desc);
153   
154    // -- validation code for: _value
155  90 fieldValidator = new org.exolab.castor.xml.FieldValidator();
156    { // -- local scope
157  90 org.exolab.castor.xml.validators.FloatValidator typeValidator;
158  90 typeValidator = new org.exolab.castor.xml.validators.FloatValidator();
159  90 fieldValidator.setValidator(typeValidator);
160  90 typeValidator.setMinInclusive((float) -3.4028235E38);
161  90 typeValidator.setMaxInclusive((float) 3.4028235E38);
162    }
163  90 desc.setValidator(fieldValidator);
164    // -- _colour
165  90 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
166    java.lang.Integer.TYPE, "_colour", "colour",
167    org.exolab.castor.xml.NodeType.Attribute);
168  90 handler = new org.exolab.castor.xml.XMLFieldHandler()
169    {
 
170  60 toggle public java.lang.Object getValue(java.lang.Object object)
171    throws IllegalStateException
172    {
173  60 ThresholdLine target = (ThresholdLine) object;
174  60 if (!target.hasColour())
175    {
176  0 return null;
177    }
178  60 return new java.lang.Integer(target.getColour());
179    }
180   
 
181  30 toggle public void setValue(java.lang.Object object, java.lang.Object value)
182    throws IllegalStateException, IllegalArgumentException
183    {
184  30 try
185    {
186  30 ThresholdLine target = (ThresholdLine) object;
187    // if null, use delete method for optional primitives
188  30 if (value == null)
189    {
190  0 target.deleteColour();
191  0 return;
192    }
193  30 target.setColour(((java.lang.Integer) value).intValue());
194    } catch (java.lang.Exception ex)
195    {
196  0 throw new IllegalStateException(ex.toString());
197    }
198    }
199   
 
200  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
201    {
202  0 return null;
203    }
204    };
205  90 desc.setHandler(handler);
206  90 desc.setMultivalued(false);
207  90 addFieldDescriptor(desc);
208   
209    // -- validation code for: _colour
210  90 fieldValidator = new org.exolab.castor.xml.FieldValidator();
211    { // -- local scope
212  90 org.exolab.castor.xml.validators.IntValidator typeValidator;
213  90 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
214  90 fieldValidator.setValidator(typeValidator);
215  90 typeValidator.setMinInclusive(-2147483648);
216  90 typeValidator.setMaxInclusive(2147483647);
217    }
218  90 desc.setValidator(fieldValidator);
219    // -- initialize element descriptors
220   
221    }
222   
223    // -----------/
224    // - Methods -/
225    // -----------/
226   
227    /**
228    * Method getAccessMode.
229    *
230    * @return the access mode specified for this class.
231    */
 
232  0 toggle public org.exolab.castor.mapping.AccessMode getAccessMode()
233    {
234  0 return null;
235    }
236   
237    /**
238    * Method getIdentity.
239    *
240    * @return the identity field, null if this class has no identity.
241    */
 
242  120 toggle public org.exolab.castor.mapping.FieldDescriptor getIdentity()
243    {
244  120 return super.getIdentity();
245    }
246   
247    /**
248    * Method getJavaClass.
249    *
250    * @return the Java class represented by this descriptor.
251    */
 
252  60 toggle public java.lang.Class getJavaClass()
253    {
254  60 return jalview.schemabinding.version2.ThresholdLine.class;
255    }
256   
257    /**
258    * Method getNameSpacePrefix.
259    *
260    * @return the namespace prefix to use when marshaling as XML.
261    */
 
262  30 toggle public java.lang.String getNameSpacePrefix()
263    {
264  30 return _nsPrefix;
265    }
266   
267    /**
268    * Method getNameSpaceURI.
269    *
270    * @return the namespace URI used when marshaling and unmarshaling as XML.
271    */
 
272  0 toggle public java.lang.String getNameSpaceURI()
273    {
274  0 return _nsURI;
275    }
276   
277    /**
278    * Method getValidator.
279    *
280    * @return a specific validator for the class described by this
281    * ClassDescriptor.
282    */
 
283  30 toggle public org.exolab.castor.xml.TypeValidator getValidator()
284    {
285  30 return this;
286    }
287   
288    /**
289    * Method getXMLName.
290    *
291    * @return the XML Name for the Class being described.
292    */
 
293  180 toggle public java.lang.String getXMLName()
294    {
295  180 return _xmlName;
296    }
297   
298    /**
299    * Method isElementDefinition.
300    *
301    * @return true if XML schema definition of this Class is that of a global
302    * element or element with anonymous type definition.
303    */
 
304  0 toggle public boolean isElementDefinition()
305    {
306  0 return _elementDefinition;
307    }
308   
309    }