Clover icon

jalviewX

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

File HiddenColumnsDescriptor.java

 

Coverage histogram

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

Code metrics

8
63
15
1
264
150
21
0.33
4.2
15
1.4

Classes

Class Line # Actions
HiddenColumnsDescriptor 21 63 21 22
0.7441860474.4%
 

Contributing tests

This file is covered by 6 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.HiddenColumns;
15   
16    /**
17    * Class HiddenColumnsDescriptor.
18    *
19    * @version $Revision$ $Date$
20    */
 
21    public class HiddenColumnsDescriptor 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  48 toggle public HiddenColumnsDescriptor()
54    {
55  48 super();
56  48 _nsURI = "www.jalview.org";
57  48 _xmlName = "hiddenColumns";
58  48 _elementDefinition = true;
59  48 org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
60  48 org.exolab.castor.mapping.FieldHandler handler = null;
61  48 org.exolab.castor.xml.FieldValidator fieldValidator = null;
62    // -- initialize attribute descriptors
63   
64    // -- _start
65  48 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
66    java.lang.Integer.TYPE, "_start", "start",
67    org.exolab.castor.xml.NodeType.Attribute);
68  48 handler = new org.exolab.castor.xml.XMLFieldHandler()
69    {
 
70  12 toggle public java.lang.Object getValue(java.lang.Object object)
71    throws IllegalStateException
72    {
73  12 HiddenColumns target = (HiddenColumns) object;
74  12 if (!target.hasStart())
75    {
76  0 return null;
77    }
78  12 return new java.lang.Integer(target.getStart());
79    }
80   
 
81  36 toggle public void setValue(java.lang.Object object, java.lang.Object value)
82    throws IllegalStateException, IllegalArgumentException
83    {
84  36 try
85    {
86  36 HiddenColumns target = (HiddenColumns) object;
87    // if null, use delete method for optional primitives
88  36 if (value == null)
89    {
90  0 target.deleteStart();
91  0 return;
92    }
93  36 target.setStart(((java.lang.Integer) value).intValue());
94    } catch (java.lang.Exception ex)
95    {
96  0 throw new IllegalStateException(ex.toString());
97    }
98    }
99   
 
100  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
101    {
102  0 return null;
103    }
104    };
105  48 desc.setHandler(handler);
106  48 desc.setMultivalued(false);
107  48 addFieldDescriptor(desc);
108   
109    // -- validation code for: _start
110  48 fieldValidator = new org.exolab.castor.xml.FieldValidator();
111    { // -- local scope
112  48 org.exolab.castor.xml.validators.IntValidator typeValidator;
113  48 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
114  48 fieldValidator.setValidator(typeValidator);
115  48 typeValidator.setMinInclusive(-2147483648);
116  48 typeValidator.setMaxInclusive(2147483647);
117    }
118  48 desc.setValidator(fieldValidator);
119    // -- _end
120  48 desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
121    java.lang.Integer.TYPE, "_end", "end",
122    org.exolab.castor.xml.NodeType.Attribute);
123  48 handler = new org.exolab.castor.xml.XMLFieldHandler()
124    {
 
125  12 toggle public java.lang.Object getValue(java.lang.Object object)
126    throws IllegalStateException
127    {
128  12 HiddenColumns target = (HiddenColumns) object;
129  12 if (!target.hasEnd())
130    {
131  0 return null;
132    }
133  12 return new java.lang.Integer(target.getEnd());
134    }
135   
 
136  36 toggle public void setValue(java.lang.Object object, java.lang.Object value)
137    throws IllegalStateException, IllegalArgumentException
138    {
139  36 try
140    {
141  36 HiddenColumns target = (HiddenColumns) object;
142    // if null, use delete method for optional primitives
143  36 if (value == null)
144    {
145  0 target.deleteEnd();
146  0 return;
147    }
148  36 target.setEnd(((java.lang.Integer) value).intValue());
149    } catch (java.lang.Exception ex)
150    {
151  0 throw new IllegalStateException(ex.toString());
152    }
153    }
154   
 
155  0 toggle public java.lang.Object newInstance(java.lang.Object parent)
156    {
157  0 return null;
158    }
159    };
160  48 desc.setHandler(handler);
161  48 desc.setMultivalued(false);
162  48 addFieldDescriptor(desc);
163   
164    // -- validation code for: _end
165  48 fieldValidator = new org.exolab.castor.xml.FieldValidator();
166    { // -- local scope
167  48 org.exolab.castor.xml.validators.IntValidator typeValidator;
168  48 typeValidator = new org.exolab.castor.xml.validators.IntValidator();
169  48 fieldValidator.setValidator(typeValidator);
170  48 typeValidator.setMinInclusive(-2147483648);
171  48 typeValidator.setMaxInclusive(2147483647);
172    }
173  48 desc.setValidator(fieldValidator);
174    // -- initialize element descriptors
175   
176    }
177   
178    // -----------/
179    // - Methods -/
180    // -----------/
181   
182    /**
183    * Method getAccessMode.
184    *
185    * @return the access mode specified for this class.
186    */
 
187  0 toggle public org.exolab.castor.mapping.AccessMode getAccessMode()
188    {
189  0 return null;
190    }
191   
192    /**
193    * Method getIdentity.
194    *
195    * @return the identity field, null if this class has no identity.
196    */
 
197  78 toggle public org.exolab.castor.mapping.FieldDescriptor getIdentity()
198    {
199  78 return super.getIdentity();
200    }
201   
202    /**
203    * Method getJavaClass.
204    *
205    * @return the Java class represented by this descriptor.
206    */
 
207  42 toggle public java.lang.Class getJavaClass()
208    {
209  42 return jalview.schemabinding.version2.HiddenColumns.class;
210    }
211   
212    /**
213    * Method getNameSpacePrefix.
214    *
215    * @return the namespace prefix to use when marshaling as XML.
216    */
 
217  6 toggle public java.lang.String getNameSpacePrefix()
218    {
219  6 return _nsPrefix;
220    }
221   
222    /**
223    * Method getNameSpaceURI.
224    *
225    * @return the namespace URI used when marshaling and unmarshaling as XML.
226    */
 
227  0 toggle public java.lang.String getNameSpaceURI()
228    {
229  0 return _nsURI;
230    }
231   
232    /**
233    * Method getValidator.
234    *
235    * @return a specific validator for the class described by this
236    * ClassDescriptor.
237    */
 
238  6 toggle public org.exolab.castor.xml.TypeValidator getValidator()
239    {
240  6 return this;
241    }
242   
243    /**
244    * Method getXMLName.
245    *
246    * @return the XML Name for the Class being described.
247    */
 
248  96 toggle public java.lang.String getXMLName()
249    {
250  96 return _xmlName;
251    }
252   
253    /**
254    * Method isElementDefinition.
255    *
256    * @return true if XML schema definition of this Class is that of a global
257    * element or element with anonymous type definition.
258    */
 
259  0 toggle public boolean isElementDefinition()
260    {
261  0 return _elementDefinition;
262    }
263   
264    }