Clover icon

jalviewX

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

File OtherDataDescriptor.java

 

Coverage histogram

../../../../img/srcFileCovDistChart9.png
12% of files have more coverage

Code metrics

0
76
18
1
272
155
21
0.28
4.22
18
1.17

Classes

Class Line # Actions
OtherDataDescriptor 21 76 21 15
0.8404255584%
 

Contributing tests

This file is covered by 7 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.OtherData;
15   
16    /**
17    * Class OtherDataDescriptor.
18    *
19    * @version $Revision$ $Date$
20    */
 
21    public class OtherDataDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
22   
23   
24    //--------------------------/
25    //- Class/Member Variables -/
26    //--------------------------/
27   
28    /**
29    * Field _elementDefinition.
30    */
31    private boolean _elementDefinition;
32   
33    /**
34    * Field _nsPrefix.
35    */
36    private java.lang.String _nsPrefix;
37   
38    /**
39    * Field _nsURI.
40    */
41    private java.lang.String _nsURI;
42   
43    /**
44    * Field _xmlName.
45    */
46    private java.lang.String _xmlName;
47   
48   
49    //----------------/
50    //- Constructors -/
51    //----------------/
52   
 
53  31080 toggle public OtherDataDescriptor() {
54  31080 super();
55  31080 _nsURI = "www.jalview.org";
56  31080 _xmlName = "otherData";
57  31080 _elementDefinition = true;
58  31080 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
59  31080 org.exolab.castor.mapping.FieldHandler handler = null;
60  31080 org.exolab.castor.xml.FieldValidator fieldValidator = null;
61    //-- initialize attribute descriptors
62   
63    //-- _key
64  31080 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_key", "key", org.exolab.castor.xml.NodeType.Attribute);
65  31080 desc.setImmutable(true);
66  31080 handler = new org.exolab.castor.xml.XMLFieldHandler() {
 
67  8720 toggle public java.lang.Object getValue( java.lang.Object object )
68    throws IllegalStateException
69    {
70  8720 OtherData target = (OtherData) object;
71  8720 return target.getKey();
72    }
 
73  22360 toggle public void setValue( java.lang.Object object, java.lang.Object value)
74    throws IllegalStateException, IllegalArgumentException
75    {
76  22360 try {
77  22360 OtherData target = (OtherData) object;
78  22360 target.setKey( (java.lang.String) value);
79    } catch (java.lang.Exception ex) {
80  0 throw new IllegalStateException(ex.toString());
81    }
82    }
 
83  0 toggle public java.lang.Object newInstance(java.lang.Object parent) {
84  0 return null;
85    }
86    };
87  31080 desc.setHandler(handler);
88  31080 desc.setRequired(true);
89  31080 desc.setMultivalued(false);
90  31080 addFieldDescriptor(desc);
91   
92    //-- validation code for: _key
93  31080 fieldValidator = new org.exolab.castor.xml.FieldValidator();
94  31080 fieldValidator.setMinOccurs(1);
95    { //-- local scope
96  31080 org.exolab.castor.xml.validators.StringValidator typeValidator;
97  31080 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
98  31080 fieldValidator.setValidator(typeValidator);
99  31080 typeValidator.setWhiteSpace("preserve");
100    }
101  31080 desc.setValidator(fieldValidator);
102    //-- _key2
103  31080 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_key2", "key2", org.exolab.castor.xml.NodeType.Attribute);
104  31080 desc.setImmutable(true);
105  31080 handler = new org.exolab.castor.xml.XMLFieldHandler() {
 
106  8720 toggle public java.lang.Object getValue( java.lang.Object object )
107    throws IllegalStateException
108    {
109  8720 OtherData target = (OtherData) object;
110  8720 return target.getKey2();
111    }
 
112  20 toggle public void setValue( java.lang.Object object, java.lang.Object value)
113    throws IllegalStateException, IllegalArgumentException
114    {
115  20 try {
116  20 OtherData target = (OtherData) object;
117  20 target.setKey2( (java.lang.String) value);
118    } catch (java.lang.Exception ex) {
119  0 throw new IllegalStateException(ex.toString());
120    }
121    }
 
122  0 toggle public java.lang.Object newInstance(java.lang.Object parent) {
123  0 return null;
124    }
125    };
126  31080 desc.setHandler(handler);
127  31080 desc.setMultivalued(false);
128  31080 addFieldDescriptor(desc);
129   
130    //-- validation code for: _key2
131  31080 fieldValidator = new org.exolab.castor.xml.FieldValidator();
132    { //-- local scope
133  31080 org.exolab.castor.xml.validators.StringValidator typeValidator;
134  31080 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
135  31080 fieldValidator.setValidator(typeValidator);
136  31080 typeValidator.setWhiteSpace("preserve");
137    }
138  31080 desc.setValidator(fieldValidator);
139    //-- _value
140  31080 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute);
141  31080 desc.setImmutable(true);
142  31080 handler = new org.exolab.castor.xml.XMLFieldHandler() {
 
143  8720 toggle public java.lang.Object getValue( java.lang.Object object )
144    throws IllegalStateException
145    {
146  8720 OtherData target = (OtherData) object;
147  8720 return target.getValue();
148    }
 
149  22360 toggle public void setValue( java.lang.Object object, java.lang.Object value)
150    throws IllegalStateException, IllegalArgumentException
151    {
152  22360 try {
153  22360 OtherData target = (OtherData) object;
154  22360 target.setValue( (java.lang.String) value);
155    } catch (java.lang.Exception ex) {
156  0 throw new IllegalStateException(ex.toString());
157    }
158    }
 
159  0 toggle public java.lang.Object newInstance(java.lang.Object parent) {
160  0 return null;
161    }
162    };
163  31080 desc.setHandler(handler);
164  31080 desc.setRequired(true);
165  31080 desc.setMultivalued(false);
166  31080 addFieldDescriptor(desc);
167   
168    //-- validation code for: _value
169  31080 fieldValidator = new org.exolab.castor.xml.FieldValidator();
170  31080 fieldValidator.setMinOccurs(1);
171    { //-- local scope
172  31080 org.exolab.castor.xml.validators.StringValidator typeValidator;
173  31080 typeValidator = new org.exolab.castor.xml.validators.StringValidator();
174  31080 fieldValidator.setValidator(typeValidator);
175  31080 typeValidator.setWhiteSpace("preserve");
176    }
177  31080 desc.setValidator(fieldValidator);
178    //-- initialize element descriptors
179   
180    }
181   
182   
183    //-----------/
184    //- Methods -/
185    //-----------/
186   
187    /**
188    * Method getAccessMode.
189    *
190    * @return the access mode specified for this class.
191    */
 
192  0 toggle public org.exolab.castor.mapping.AccessMode getAccessMode(
193    ) {
194  0 return null;
195    }
196   
197    /**
198    * Method getIdentity.
199    *
200    * @return the identity field, null if this class has no
201    * identity.
202    */
 
203  49100 toggle public org.exolab.castor.mapping.FieldDescriptor getIdentity(
204    ) {
205  49100 return super.getIdentity();
206    }
207   
208    /**
209    * Method getJavaClass.
210    *
211    * @return the Java class represented by this descriptor.
212    */
 
213  26720 toggle public java.lang.Class getJavaClass(
214    ) {
215  26720 return jalview.schemabinding.version2.OtherData.class;
216    }
217   
218    /**
219    * Method getNameSpacePrefix.
220    *
221    * @return the namespace prefix to use when marshaling as XML.
222    */
 
223  4360 toggle public java.lang.String getNameSpacePrefix(
224    ) {
225  4360 return _nsPrefix;
226    }
227   
228    /**
229    * Method getNameSpaceURI.
230    *
231    * @return the namespace URI used when marshaling and
232    * unmarshaling as XML.
233    */
 
234  0 toggle public java.lang.String getNameSpaceURI(
235    ) {
236  0 return _nsURI;
237    }
238   
239    /**
240    * Method getValidator.
241    *
242    * @return a specific validator for the class described by this
243    * ClassDescriptor.
244    */
 
245  4360 toggle public org.exolab.castor.xml.TypeValidator getValidator(
246    ) {
247  4360 return this;
248    }
249   
250    /**
251    * Method getXMLName.
252    *
253    * @return the XML Name for the Class being described.
254    */
 
255  62160 toggle public java.lang.String getXMLName(
256    ) {
257  62160 return _xmlName;
258    }
259   
260    /**
261    * Method isElementDefinition.
262    *
263    * @return true if XML schema definition of this Class is that
264    * of a global
265    * element or element with anonymous type definition.
266    */
 
267  0 toggle public boolean isElementDefinition(
268    ) {
269  0 return _elementDefinition;
270    }
271   
272    }