Clover icon

jalviewX

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

File DBRefDescriptor.java

 

Coverage histogram

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

Code metrics

0
88
21
1
333
209
25
0.28
4.19
21
1.19

Classes

Class Line # Actions
DBRefDescriptor 21 88 25 22
0.7981651479.8%
 

Contributing tests

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