1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
package jalview.schemabinding.version2.descriptors; |
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
import jalview.schemabinding.version2.Group; |
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
@version |
20 |
|
|
|
|
| 80% |
Uncovered Elements: 16 (80) |
Complexity: 20 |
Complexity Density: 0.34 |
|
21 |
|
public class GroupDescriptor extends |
22 |
|
org.exolab.castor.xml.util.XMLClassDescriptorImpl |
23 |
|
{ |
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
private boolean _elementDefinition; |
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
private java.lang.String _nsPrefix; |
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
private java.lang.String _nsURI; |
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
private java.lang.String _xmlName; |
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (33) |
Complexity: 1 |
Complexity Density: 0.03 |
|
53 |
249 |
public GroupDescriptor()... |
54 |
|
{ |
55 |
249 |
super(); |
56 |
249 |
_nsURI = "www.jalview.org"; |
57 |
249 |
_xmlName = "group"; |
58 |
249 |
_elementDefinition = true; |
59 |
249 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; |
60 |
249 |
org.exolab.castor.mapping.FieldHandler handler = null; |
61 |
249 |
org.exolab.castor.xml.FieldValidator fieldValidator = null; |
62 |
|
|
63 |
|
|
64 |
|
|
65 |
249 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
66 |
|
java.lang.String.class, "_name", "name", |
67 |
|
org.exolab.castor.xml.NodeType.Attribute); |
68 |
249 |
desc.setImmutable(true); |
69 |
249 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
70 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
71 |
66 |
public java.lang.Object getValue(java.lang.Object object)... |
72 |
|
throws IllegalStateException |
73 |
|
{ |
74 |
66 |
Group target = (Group) object; |
75 |
66 |
return target.getName(); |
76 |
|
} |
77 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
78 |
183 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
79 |
|
throws IllegalStateException, IllegalArgumentException |
80 |
|
{ |
81 |
183 |
try |
82 |
|
{ |
83 |
183 |
Group target = (Group) object; |
84 |
183 |
target.setName((java.lang.String) value); |
85 |
|
} catch (java.lang.Exception ex) |
86 |
|
{ |
87 |
0 |
throw new IllegalStateException(ex.toString()); |
88 |
|
} |
89 |
|
} |
90 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
91 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
92 |
|
{ |
93 |
0 |
return null; |
94 |
|
} |
95 |
|
}; |
96 |
249 |
desc.setHandler(handler); |
97 |
249 |
desc.setRequired(true); |
98 |
249 |
desc.setMultivalued(false); |
99 |
249 |
addFieldDescriptor(desc); |
100 |
|
|
101 |
|
|
102 |
249 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
103 |
249 |
fieldValidator.setMinOccurs(1); |
104 |
|
{ |
105 |
249 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
106 |
249 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
107 |
249 |
fieldValidator.setValidator(typeValidator); |
108 |
249 |
typeValidator.setWhiteSpace("preserve"); |
109 |
|
} |
110 |
249 |
desc.setValidator(fieldValidator); |
111 |
|
|
112 |
249 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
113 |
|
java.lang.Boolean.TYPE, "_display", "display", |
114 |
|
org.exolab.castor.xml.NodeType.Attribute); |
115 |
249 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
116 |
|
{ |
|
|
| 75% |
Uncovered Elements: 2 (8) |
Complexity: 3 |
Complexity Density: 0.75 |
|
117 |
66 |
public java.lang.Object getValue(java.lang.Object object)... |
118 |
|
throws IllegalStateException |
119 |
|
{ |
120 |
66 |
Group target = (Group) object; |
121 |
66 |
if (!target.hasDisplay()) |
122 |
|
{ |
123 |
0 |
return null; |
124 |
|
} |
125 |
66 |
return (target.getDisplay() ? java.lang.Boolean.TRUE |
126 |
|
: java.lang.Boolean.FALSE); |
127 |
|
} |
128 |
|
|
|
|
| 62.5% |
Uncovered Elements: 3 (8) |
Complexity: 3 |
Complexity Density: 0.5 |
|
129 |
183 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
130 |
|
throws IllegalStateException, IllegalArgumentException |
131 |
|
{ |
132 |
183 |
try |
133 |
|
{ |
134 |
183 |
Group target = (Group) object; |
135 |
|
|
136 |
183 |
if (value == null) |
137 |
|
{ |
138 |
0 |
return; |
139 |
|
} |
140 |
|
|
141 |
183 |
target.setDisplay(((java.lang.Boolean) value).booleanValue()); |
142 |
|
} catch (java.lang.Exception ex) |
143 |
|
{ |
144 |
0 |
throw new IllegalStateException(ex.toString()); |
145 |
|
} |
146 |
|
} |
147 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
148 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
149 |
|
{ |
150 |
0 |
return null; |
151 |
|
} |
152 |
|
}; |
153 |
249 |
desc.setHandler(handler); |
154 |
249 |
desc.setRequired(true); |
155 |
249 |
desc.setMultivalued(false); |
156 |
249 |
addFieldDescriptor(desc); |
157 |
|
|
158 |
|
|
159 |
249 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
160 |
249 |
fieldValidator.setMinOccurs(1); |
161 |
|
{ |
162 |
249 |
org.exolab.castor.xml.validators.BooleanValidator typeValidator; |
163 |
249 |
typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); |
164 |
249 |
fieldValidator.setValidator(typeValidator); |
165 |
|
} |
166 |
249 |
desc.setValidator(fieldValidator); |
167 |
|
|
168 |
|
|
169 |
|
} |
170 |
|
|
171 |
|
|
172 |
|
|
173 |
|
|
174 |
|
|
175 |
|
|
176 |
|
|
177 |
|
|
178 |
|
@return |
179 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
180 |
0 |
public org.exolab.castor.mapping.AccessMode getAccessMode()... |
181 |
|
{ |
182 |
0 |
return null; |
183 |
|
} |
184 |
|
|
185 |
|
|
186 |
|
|
187 |
|
|
188 |
|
@return |
189 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
190 |
399 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity()... |
191 |
|
{ |
192 |
399 |
return super.getIdentity(); |
193 |
|
} |
194 |
|
|
195 |
|
|
196 |
|
|
197 |
|
|
198 |
|
@return |
199 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
200 |
216 |
public java.lang.Class getJavaClass()... |
201 |
|
{ |
202 |
216 |
return jalview.schemabinding.version2.Group.class; |
203 |
|
} |
204 |
|
|
205 |
|
|
206 |
|
|
207 |
|
|
208 |
|
@return |
209 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
210 |
33 |
public java.lang.String getNameSpacePrefix()... |
211 |
|
{ |
212 |
33 |
return _nsPrefix; |
213 |
|
} |
214 |
|
|
215 |
|
|
216 |
|
|
217 |
|
|
218 |
|
@return |
219 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
220 |
0 |
public java.lang.String getNameSpaceURI()... |
221 |
|
{ |
222 |
0 |
return _nsURI; |
223 |
|
} |
224 |
|
|
225 |
|
|
226 |
|
|
227 |
|
|
228 |
|
@return |
229 |
|
|
230 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
231 |
33 |
public org.exolab.castor.xml.TypeValidator getValidator()... |
232 |
|
{ |
233 |
33 |
return this; |
234 |
|
} |
235 |
|
|
236 |
|
|
237 |
|
|
238 |
|
|
239 |
|
@return |
240 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
241 |
498 |
public java.lang.String getXMLName()... |
242 |
|
{ |
243 |
498 |
return _xmlName; |
244 |
|
} |
245 |
|
|
246 |
|
|
247 |
|
|
248 |
|
|
249 |
|
@return |
250 |
|
|
251 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
252 |
0 |
public boolean isElementDefinition()... |
253 |
|
{ |
254 |
0 |
return _elementDefinition; |
255 |
|
} |
256 |
|
|
257 |
|
} |