Clover icon

jalviewX

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

File SequenceTypeDescriptor.java

 

Coverage histogram

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

Code metrics

0
94
21
1
339
215
25
0.27
4.48
21
1.19

Classes

Class Line # Actions
SequenceTypeDescriptor 21 94 25 24
0.7913043579.1%
 

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