Clover icon

jalviewX

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

File FeatureMatcherDescriptor.java

 

Coverage histogram

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

Code metrics

0
99
22
1
356
231
27
0.27
4.5
22
1.23

Classes

Class Line # Actions
FeatureMatcherDescriptor 21 99 27 29
0.7603305676%
 

Contributing tests

This file is covered by 2 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.descriptors;
9   
10    //---------------------------------/
11    //- Imported classes and packages -/
12    //---------------------------------/
13   
14    import jalview.schemabinding.version2.FeatureMatcher;
15   
16    /**
17    * Class FeatureMatcherDescriptor.
18    *
19    * @version $Revision$ $Date$
20    */
 
21    public class FeatureMatcherDescriptor
22    extends 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  70 toggle public FeatureMatcherDescriptor()
54    {
55  70 super();
56  70 _nsURI = "www.jalview.org/colours";
57  70 _xmlName = "FeatureMatcher";
58  70 _elementDefinition = false;
59   
60    // -- set grouping compositor
61  70 setCompositorAsSequence();
62  70 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
63  70 org.exolab.castor.mapping.FieldHandler handler = null;
64  70 org.exolab.castor.xml.FieldValidator fieldValidator = null;
65    // -- initialize attribute descriptors
66   
67    // -- _by
68  70 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
69    jalview.schemabinding.version2.types.FeatureMatcherByType.class,
70    "_by", "by", org.exolab.castor.xml.NodeType.Attribute);
71  70 handler = new org.exolab.castor.xml.XMLFieldHandler()
72    {
 
73  25 toggle public java.lang.Object getValue(java.lang.Object object)
74    throws IllegalStateException
75    {
76  25 FeatureMatcher target = (FeatureMatcher) object;
77  25 return target.getBy();
78    }
79   
 
80  10 toggle public void setValue(java.lang.Object object, java.lang.Object value)
81    throws IllegalStateException, IllegalArgumentException
82    {
83  10 try
84    {
85  10 FeatureMatcher target = (FeatureMatcher) object;
86  10 target.setBy(
87    (jalview.schemabinding.version2.types.FeatureMatcherByType) value);
88    } catch (java.lang.Exception ex)
89    {
90  0 throw new IllegalStateException(ex.toString());
91    }
92    }
93   
 
94  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
95    {
96  0 return null;
97    }
98    };
99  70 handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(
100    jalview.schemabinding.version2.types.FeatureMatcherByType.class,
101    handler);
102  70 desc.setImmutable(true);
103  70 desc.setHandler(handler);
104  70 desc.setMultivalued(false);
105  70 addFieldDescriptor(desc);
106   
107    // -- validation code for: _by
108  70 fieldValidator = new org.exolab.castor.xml.FieldValidator();
109    { // -- local scope
110    }
111  70 desc.setValidator(fieldValidator);
112    // -- initialize element descriptors
113   
114    // -- _attributeNameList
115  70 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
116    java.lang.String.class, "_attributeNameList", "attributeName",
117    org.exolab.castor.xml.NodeType.Element);
118  70 desc.setImmutable(true);
119  70 handler = new org.exolab.castor.xml.XMLFieldHandler()
120    {
 
121  25 toggle public java.lang.Object getValue(java.lang.Object object)
122    throws IllegalStateException
123    {
124  25 FeatureMatcher target = (FeatureMatcher) object;
125  25 return target.getAttributeName();
126    }
127   
 
128  6 toggle public void setValue(java.lang.Object object, java.lang.Object value)
129    throws IllegalStateException, IllegalArgumentException
130    {
131  6 try
132    {
133  6 FeatureMatcher target = (FeatureMatcher) object;
134  6 target.addAttributeName((java.lang.String) value);
135    } catch (java.lang.Exception ex)
136    {
137  0 throw new IllegalStateException(ex.toString());
138    }
139    }
140   
 
141  0 toggle public void resetValue(Object object)
142    throws IllegalStateException, IllegalArgumentException
143    {
144  0 try
145    {
146  0 FeatureMatcher target = (FeatureMatcher) object;
147  0 target.removeAllAttributeName();
148    } catch (java.lang.Exception ex)
149    {
150  0 throw new IllegalStateException(ex.toString());
151    }
152    }
153   
 
154  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
155    {
156  0 return null;
157    }
158    };
159  70 desc.setHandler(handler);
160  70 desc.setMultivalued(true);
161  70 addFieldDescriptor(desc);
162   
163    // -- validation code for: _attributeNameList
164  70 fieldValidator = new org.exolab.castor.xml.FieldValidator();
165  70 fieldValidator.setMinOccurs(0);
166  70 fieldValidator.setMaxOccurs(2);
167    { // -- local scope
168  70 org.exolab.castor.xml.validators.StringValidator typeValidator;
169  70 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
170  70 fieldValidator.setValidator(typeValidator);
171  70 typeValidator.setWhiteSpace("preserve");
172    }
173  70 desc.setValidator(fieldValidator);
174    // -- _condition
175  70 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
176    java.lang.String.class, "_condition", "condition",
177    org.exolab.castor.xml.NodeType.Element);
178  70 desc.setImmutable(true);
179  70 handler = new org.exolab.castor.xml.XMLFieldHandler()
180    {
 
181  25 toggle public java.lang.Object getValue(java.lang.Object object)
182    throws IllegalStateException
183    {
184  25 FeatureMatcher target = (FeatureMatcher) object;
185  25 return target.getCondition();
186    }
187   
 
188  10 toggle public void setValue(java.lang.Object object, java.lang.Object value)
189    throws IllegalStateException, IllegalArgumentException
190    {
191  10 try
192    {
193  10 FeatureMatcher target = (FeatureMatcher) object;
194  10 target.setCondition((java.lang.String) value);
195    } catch (java.lang.Exception ex)
196    {
197  0 throw new IllegalStateException(ex.toString());
198    }
199    }
200   
 
201  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
202    {
203  0 return null;
204    }
205    };
206  70 desc.setHandler(handler);
207  70 desc.setRequired(true);
208  70 desc.setMultivalued(false);
209  70 addFieldDescriptor(desc);
210   
211    // -- validation code for: _condition
212  70 fieldValidator = new org.exolab.castor.xml.FieldValidator();
213  70 fieldValidator.setMinOccurs(1);
214    { // -- local scope
215  70 org.exolab.castor.xml.validators.StringValidator typeValidator;
216  70 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
217  70 fieldValidator.setValidator(typeValidator);
218  70 typeValidator.setWhiteSpace("preserve");
219    }
220  70 desc.setValidator(fieldValidator);
221    // -- _value
222  70 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
223    java.lang.String.class, "_value", "value",
224    org.exolab.castor.xml.NodeType.Element);
225  70 desc.setImmutable(true);
226  70 handler = new org.exolab.castor.xml.XMLFieldHandler()
227    {
 
228  25 toggle public java.lang.Object getValue(java.lang.Object object)
229    throws IllegalStateException
230    {
231  25 FeatureMatcher target = (FeatureMatcher) object;
232  25 return target.getValue();
233    }
234   
 
235  10 toggle public void setValue(java.lang.Object object, java.lang.Object value)
236    throws IllegalStateException, IllegalArgumentException
237    {
238  10 try
239    {
240  10 FeatureMatcher target = (FeatureMatcher) object;
241  10 target.setValue((java.lang.String) value);
242    } catch (java.lang.Exception ex)
243    {
244  0 throw new IllegalStateException(ex.toString());
245    }
246    }
247   
 
248  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
249    {
250  0 return null;
251    }
252    };
253  70 desc.setHandler(handler);
254  70 desc.setRequired(true);
255  70 desc.setMultivalued(false);
256  70 addFieldDescriptor(desc);
257   
258    // -- validation code for: _value
259  70 fieldValidator = new org.exolab.castor.xml.FieldValidator();
260  70 fieldValidator.setMinOccurs(1);
261    { // -- local scope
262  70 org.exolab.castor.xml.validators.StringValidator typeValidator;
263  70 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
264  70 fieldValidator.setValidator(typeValidator);
265  70 typeValidator.setWhiteSpace("preserve");
266    }
267  70 desc.setValidator(fieldValidator);
268    }
269   
270    // -----------/
271    // - Methods -/
272    // -----------/
273   
274    /**
275    * Method getAccessMode.
276    *
277    * @return the access mode specified for this class.
278    */
 
279  0 toggle public org.exolab.castor.mapping.AccessMode getAccessMode()
280    {
281  0 return null;
282    }
283   
284    /**
285    * Method getIdentity.
286    *
287    * @return the identity field, null if this class has no identity.
288    */
 
289  60 toggle public org.exolab.castor.mapping.FieldDescriptor getIdentity()
290    {
291  60 return super.getIdentity();
292    }
293   
294    /**
295    * Method getJavaClass.
296    *
297    * @return the Java class represented by this descriptor.
298    */
 
299  15 toggle public java.lang.Class getJavaClass()
300    {
301  15 return jalview.schemabinding.version2.FeatureMatcher.class;
302    }
303   
304    /**
305    * Method getNameSpacePrefix.
306    *
307    * @return the namespace prefix to use when marshaling as XML.
308    */
 
309  0 toggle public java.lang.String getNameSpacePrefix()
310    {
311  0 return _nsPrefix;
312    }
313   
314    /**
315    * Method getNameSpaceURI.
316    *
317    * @return the namespace URI used when marshaling and unmarshaling as XML.
318    */
 
319  0 toggle public java.lang.String getNameSpaceURI()
320    {
321  0 return _nsURI;
322    }
323   
324    /**
325    * Method getValidator.
326    *
327    * @return a specific validator for the class described by this
328    * ClassDescriptor.
329    */
 
330  0 toggle public org.exolab.castor.xml.TypeValidator getValidator()
331    {
332  0 return this;
333    }
334   
335    /**
336    * Method getXMLName.
337    *
338    * @return the XML Name for the Class being described.
339    */
 
340  0 toggle public java.lang.String getXMLName()
341    {
342  0 return _xmlName;
343    }
344   
345    /**
346    * Method isElementDefinition.
347    *
348    * @return true if XML schema definition of this Class is that of a global
349    * element or element with anonymous type definition.
350    */
 
351  0 toggle public boolean isElementDefinition()
352    {
353  0 return _elementDefinition;
354    }
355   
356    }