Clover icon

jalviewX

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

File SequenceSetDescriptor.java

 

Coverage histogram

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

Code metrics

0
136
31
1
472
334
41
0.3
4.39
31
1.32

Classes

Class Line # Actions
SequenceSetDescriptor 21 136 41 42
0.7485029774.9%
 

Contributing tests

This file is covered by 14 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.SequenceSet;
15   
16    /**
17    * Class SequenceSetDescriptor.
18    *
19    * @version $Revision$ $Date$
20    */
 
21    public class SequenceSetDescriptor 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  137 toggle public SequenceSetDescriptor()
54    {
55  137 super();
56  137 _nsURI = "www.vamsas.ac.uk/jalview/version2";
57  137 _xmlName = "SequenceSet";
58  137 _elementDefinition = true;
59   
60    // -- set grouping compositor
61  137 setCompositorAsSequence();
62  137 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
63  137 org.exolab.castor.mapping.FieldHandler handler = null;
64  137 org.exolab.castor.xml.FieldValidator fieldValidator = null;
65    // -- initialize attribute descriptors
66   
67    // -- _gapChar
68  137 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
69    java.lang.String.class, "_gapChar", "gapChar",
70    org.exolab.castor.xml.NodeType.Attribute);
71  137 desc.setImmutable(true);
72  137 handler = new org.exolab.castor.xml.XMLFieldHandler()
73    {
 
74  58 toggle public java.lang.Object getValue(java.lang.Object object)
75    throws IllegalStateException
76    {
77  58 SequenceSet target = (SequenceSet) object;
78  58 return target.getGapChar();
79    }
80   
 
81  79 toggle public void setValue(java.lang.Object object, java.lang.Object value)
82    throws IllegalStateException, IllegalArgumentException
83    {
84  79 try
85    {
86  79 SequenceSet target = (SequenceSet) object;
87  79 target.setGapChar((java.lang.String) 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  137 desc.setHandler(handler);
100  137 desc.setRequired(true);
101  137 desc.setMultivalued(false);
102  137 addFieldDescriptor(desc);
103   
104    // -- validation code for: _gapChar
105  137 fieldValidator = new org.exolab.castor.xml.FieldValidator();
106  137 fieldValidator.setMinOccurs(1);
107    { // -- local scope
108  137 org.exolab.castor.xml.validators.StringValidator typeValidator;
109  137 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
110  137 fieldValidator.setValidator(typeValidator);
111  137 typeValidator.setWhiteSpace("preserve");
112    }
113  137 desc.setValidator(fieldValidator);
114    // -- _datasetId
115  137 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
116    java.lang.String.class, "_datasetId", "datasetId",
117    org.exolab.castor.xml.NodeType.Attribute);
118  137 desc.setImmutable(true);
119  137 handler = new org.exolab.castor.xml.XMLFieldHandler()
120    {
 
121  58 toggle public java.lang.Object getValue(java.lang.Object object)
122    throws IllegalStateException
123    {
124  58 SequenceSet target = (SequenceSet) object;
125  58 return target.getDatasetId();
126    }
127   
 
128  29 toggle public void setValue(java.lang.Object object, java.lang.Object value)
129    throws IllegalStateException, IllegalArgumentException
130    {
131  29 try
132    {
133  29 SequenceSet target = (SequenceSet) object;
134  29 target.setDatasetId((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 java.lang.Object newInstance(java.lang.Object parent)
142    {
143  0 return null;
144    }
145    };
146  137 desc.setHandler(handler);
147  137 desc.setMultivalued(false);
148  137 addFieldDescriptor(desc);
149   
150    // -- validation code for: _datasetId
151  137 fieldValidator = new org.exolab.castor.xml.FieldValidator();
152    { // -- local scope
153  137 org.exolab.castor.xml.validators.StringValidator typeValidator;
154  137 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
155  137 fieldValidator.setValidator(typeValidator);
156  137 typeValidator.setWhiteSpace("preserve");
157    }
158  137 desc.setValidator(fieldValidator);
159    // -- initialize element descriptors
160   
161    // -- _sequenceList
162  137 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
163    jalview.schemabinding.version2.Sequence.class, "_sequenceList",
164    "Sequence", org.exolab.castor.xml.NodeType.Element);
165  137 handler = new org.exolab.castor.xml.XMLFieldHandler()
166    {
 
167  58 toggle public java.lang.Object getValue(java.lang.Object object)
168    throws IllegalStateException
169    {
170  58 SequenceSet target = (SequenceSet) object;
171  58 return target.getSequence();
172    }
173   
 
174  482 toggle public void setValue(java.lang.Object object, java.lang.Object value)
175    throws IllegalStateException, IllegalArgumentException
176    {
177  482 try
178    {
179  482 SequenceSet target = (SequenceSet) object;
180  482 target.addSequence((jalview.schemabinding.version2.Sequence) value);
181    } catch (java.lang.Exception ex)
182    {
183  0 throw new IllegalStateException(ex.toString());
184    }
185    }
186   
 
187  0 toggle public void resetValue(Object object) throws IllegalStateException,
188    IllegalArgumentException
189    {
190  0 try
191    {
192  0 SequenceSet target = (SequenceSet) object;
193  0 target.removeAllSequence();
194    } catch (java.lang.Exception ex)
195    {
196  0 throw new IllegalStateException(ex.toString());
197    }
198    }
199   
 
200  482 toggle public java.lang.Object newInstance(java.lang.Object parent)
201    {
202  482 return new jalview.schemabinding.version2.Sequence();
203    }
204    };
205  137 desc.setHandler(handler);
206  137 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
207  137 desc.setMultivalued(true);
208  137 addFieldDescriptor(desc);
209   
210    // -- validation code for: _sequenceList
211  137 fieldValidator = new org.exolab.castor.xml.FieldValidator();
212  137 fieldValidator.setMinOccurs(0);
213    { // -- local scope
214    }
215  137 desc.setValidator(fieldValidator);
216    // -- _annotationList
217  137 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
218    jalview.schemabinding.version2.Annotation.class,
219    "_annotationList", "Annotation",
220    org.exolab.castor.xml.NodeType.Element);
221  137 handler = new org.exolab.castor.xml.XMLFieldHandler()
222    {
 
223  58 toggle public java.lang.Object getValue(java.lang.Object object)
224    throws IllegalStateException
225    {
226  58 SequenceSet target = (SequenceSet) object;
227  58 return target.getAnnotation();
228    }
229   
 
230  545 toggle public void setValue(java.lang.Object object, java.lang.Object value)
231    throws IllegalStateException, IllegalArgumentException
232    {
233  545 try
234    {
235  545 SequenceSet target = (SequenceSet) object;
236  545 target.addAnnotation((jalview.schemabinding.version2.Annotation) value);
237    } catch (java.lang.Exception ex)
238    {
239  0 throw new IllegalStateException(ex.toString());
240    }
241    }
242   
 
243  0 toggle public void resetValue(Object object) throws IllegalStateException,
244    IllegalArgumentException
245    {
246  0 try
247    {
248  0 SequenceSet target = (SequenceSet) object;
249  0 target.removeAllAnnotation();
250    } catch (java.lang.Exception ex)
251    {
252  0 throw new IllegalStateException(ex.toString());
253    }
254    }
255   
 
256  545 toggle public java.lang.Object newInstance(java.lang.Object parent)
257    {
258  545 return new jalview.schemabinding.version2.Annotation();
259    }
260    };
261  137 desc.setHandler(handler);
262  137 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
263  137 desc.setMultivalued(true);
264  137 addFieldDescriptor(desc);
265   
266    // -- validation code for: _annotationList
267  137 fieldValidator = new org.exolab.castor.xml.FieldValidator();
268  137 fieldValidator.setMinOccurs(0);
269    { // -- local scope
270    }
271  137 desc.setValidator(fieldValidator);
272    // -- _sequenceSetPropertiesList
273  137 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
274    jalview.schemabinding.version2.SequenceSetProperties.class,
275    "_sequenceSetPropertiesList", "sequenceSetProperties",
276    org.exolab.castor.xml.NodeType.Element);
277  137 handler = new org.exolab.castor.xml.XMLFieldHandler()
278    {
 
279  58 toggle public java.lang.Object getValue(java.lang.Object object)
280    throws IllegalStateException
281    {
282  58 SequenceSet target = (SequenceSet) object;
283  58 return target.getSequenceSetProperties();
284    }
285   
 
286  21 toggle public void setValue(java.lang.Object object, java.lang.Object value)
287    throws IllegalStateException, IllegalArgumentException
288    {
289  21 try
290    {
291  21 SequenceSet target = (SequenceSet) object;
292  21 target.addSequenceSetProperties((jalview.schemabinding.version2.SequenceSetProperties) value);
293    } catch (java.lang.Exception ex)
294    {
295  0 throw new IllegalStateException(ex.toString());
296    }
297    }
298   
 
299  0 toggle public void resetValue(Object object) throws IllegalStateException,
300    IllegalArgumentException
301    {
302  0 try
303    {
304  0 SequenceSet target = (SequenceSet) object;
305  0 target.removeAllSequenceSetProperties();
306    } catch (java.lang.Exception ex)
307    {
308  0 throw new IllegalStateException(ex.toString());
309    }
310    }
311   
 
312  21 toggle public java.lang.Object newInstance(java.lang.Object parent)
313    {
314  21 return new jalview.schemabinding.version2.SequenceSetProperties();
315    }
316    };
317  137 desc.setHandler(handler);
318  137 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
319  137 desc.setMultivalued(true);
320  137 addFieldDescriptor(desc);
321   
322    // -- validation code for: _sequenceSetPropertiesList
323  137 fieldValidator = new org.exolab.castor.xml.FieldValidator();
324  137 fieldValidator.setMinOccurs(0);
325    { // -- local scope
326    }
327  137 desc.setValidator(fieldValidator);
328    // -- _alcodonFrameList
329  137 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
330    jalview.schemabinding.version2.AlcodonFrame.class,
331    "_alcodonFrameList", "AlcodonFrame",
332    org.exolab.castor.xml.NodeType.Element);
333  137 handler = new org.exolab.castor.xml.XMLFieldHandler()
334    {
 
335  58 toggle public java.lang.Object getValue(java.lang.Object object)
336    throws IllegalStateException
337    {
338  58 SequenceSet target = (SequenceSet) object;
339  58 return target.getAlcodonFrame();
340    }
341   
 
342  0 toggle public void setValue(java.lang.Object object, java.lang.Object value)
343    throws IllegalStateException, IllegalArgumentException
344    {
345  0 try
346    {
347  0 SequenceSet target = (SequenceSet) object;
348  0 target.addAlcodonFrame((jalview.schemabinding.version2.AlcodonFrame) value);
349    } catch (java.lang.Exception ex)
350    {
351  0 throw new IllegalStateException(ex.toString());
352    }
353    }
354   
 
355  0 toggle public void resetValue(Object object) throws IllegalStateException,
356    IllegalArgumentException
357    {
358  0 try
359    {
360  0 SequenceSet target = (SequenceSet) object;
361  0 target.removeAllAlcodonFrame();
362    } catch (java.lang.Exception ex)
363    {
364  0 throw new IllegalStateException(ex.toString());
365    }
366    }
367   
 
368  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
369    {
370  0 return new jalview.schemabinding.version2.AlcodonFrame();
371    }
372    };
373  137 desc.setHandler(handler);
374  137 desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2");
375  137 desc.setMultivalued(true);
376  137 addFieldDescriptor(desc);
377   
378    // -- validation code for: _alcodonFrameList
379  137 fieldValidator = new org.exolab.castor.xml.FieldValidator();
380  137 fieldValidator.setMinOccurs(0);
381    { // -- local scope
382    }
383  137 desc.setValidator(fieldValidator);
384    }
385   
386    // -----------/
387    // - Methods -/
388    // -----------/
389   
390    /**
391    * Method getAccessMode.
392    *
393    * @return the access mode specified for this class.
394    */
 
395  0 toggle public org.exolab.castor.mapping.AccessMode getAccessMode()
396    {
397  0 return null;
398    }
399   
400    /**
401    * Method getIdentity.
402    *
403    * @return the identity field, null if this class has no identity.
404    */
 
405  137 toggle public org.exolab.castor.mapping.FieldDescriptor getIdentity()
406    {
407  137 return super.getIdentity();
408    }
409   
410    /**
411    * Method getJavaClass.
412    *
413    * @return the Java class represented by this descriptor.
414    */
 
415  108 toggle public java.lang.Class getJavaClass()
416    {
417  108 return jalview.schemabinding.version2.SequenceSet.class;
418    }
419   
420    /**
421    * Method getNameSpacePrefix.
422    *
423    * @return the namespace prefix to use when marshaling as XML.
424    */
 
425  29 toggle public java.lang.String getNameSpacePrefix()
426    {
427  29 return _nsPrefix;
428    }
429   
430    /**
431    * Method getNameSpaceURI.
432    *
433    * @return the namespace URI used when marshaling and unmarshaling as XML.
434    */
 
435  0 toggle public java.lang.String getNameSpaceURI()
436    {
437  0 return _nsURI;
438    }
439   
440    /**
441    * Method getValidator.
442    *
443    * @return a specific validator for the class described by this
444    * ClassDescriptor.
445    */
 
446  29 toggle public org.exolab.castor.xml.TypeValidator getValidator()
447    {
448  29 return this;
449    }
450   
451    /**
452    * Method getXMLName.
453    *
454    * @return the XML Name for the Class being described.
455    */
 
456  274 toggle public java.lang.String getXMLName()
457    {
458  274 return _xmlName;
459    }
460   
461    /**
462    * Method isElementDefinition.
463    *
464    * @return true if XML schema definition of this Class is that of a global
465    * element or element with anonymous type definition.
466    */
 
467  0 toggle public boolean isElementDefinition()
468    {
469  0 return _elementDefinition;
470    }
471   
472    }