1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
package jalview.schemabinding.version2.descriptors; |
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
import jalview.schemabinding.version2.Sequence; |
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
@version |
20 |
|
|
|
|
| 79.2% |
Uncovered Elements: 15 (72) |
Complexity: 19 |
Complexity Density: 0.34 |
|
21 |
|
public class SequenceDescriptor extends |
22 |
|
jalview.schemabinding.version2.descriptors.SequenceTypeDescriptor |
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 (30) |
Complexity: 1 |
Complexity Density: 0.03 |
|
53 |
1126 |
public SequenceDescriptor()... |
54 |
|
{ |
55 |
1126 |
super(); |
56 |
1126 |
setExtendsWithoutFlatten(new jalview.schemabinding.version2.descriptors.SequenceTypeDescriptor()); |
57 |
1126 |
_nsURI = "www.vamsas.ac.uk/jalview/version2"; |
58 |
1126 |
_xmlName = "Sequence"; |
59 |
1126 |
_elementDefinition = true; |
60 |
|
|
61 |
|
|
62 |
1126 |
setCompositorAsSequence(); |
63 |
1126 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; |
64 |
1126 |
org.exolab.castor.mapping.FieldHandler handler = null; |
65 |
1126 |
org.exolab.castor.xml.FieldValidator fieldValidator = null; |
66 |
|
|
67 |
|
|
68 |
|
|
69 |
1126 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
70 |
|
java.lang.String.class, "_dsseqid", "dsseqid", |
71 |
|
org.exolab.castor.xml.NodeType.Attribute); |
72 |
1126 |
desc.setImmutable(true); |
73 |
1126 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
74 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
75 |
644 |
public java.lang.Object getValue(java.lang.Object object)... |
76 |
|
throws IllegalStateException |
77 |
|
{ |
78 |
644 |
Sequence target = (Sequence) object; |
79 |
644 |
return target.getDsseqid(); |
80 |
|
} |
81 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
82 |
482 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
83 |
|
throws IllegalStateException, IllegalArgumentException |
84 |
|
{ |
85 |
482 |
try |
86 |
|
{ |
87 |
482 |
Sequence target = (Sequence) object; |
88 |
482 |
target.setDsseqid((java.lang.String) value); |
89 |
|
} catch (java.lang.Exception ex) |
90 |
|
{ |
91 |
0 |
throw new IllegalStateException(ex.toString()); |
92 |
|
} |
93 |
|
} |
94 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
95 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
96 |
|
{ |
97 |
0 |
return null; |
98 |
|
} |
99 |
|
}; |
100 |
1126 |
desc.setHandler(handler); |
101 |
1126 |
desc.setMultivalued(false); |
102 |
1126 |
addFieldDescriptor(desc); |
103 |
|
|
104 |
|
|
105 |
1126 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
106 |
|
{ |
107 |
1126 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
108 |
1126 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
109 |
1126 |
fieldValidator.setValidator(typeValidator); |
110 |
1126 |
typeValidator.setWhiteSpace("preserve"); |
111 |
|
} |
112 |
1126 |
desc.setValidator(fieldValidator); |
113 |
|
|
114 |
|
|
115 |
|
|
116 |
1126 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
117 |
|
jalview.schemabinding.version2.DBRef.class, "_DBRefList", |
118 |
|
"DBRef", org.exolab.castor.xml.NodeType.Element); |
119 |
1126 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
120 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
121 |
644 |
public java.lang.Object getValue(java.lang.Object object)... |
122 |
|
throws IllegalStateException |
123 |
|
{ |
124 |
644 |
Sequence target = (Sequence) object; |
125 |
644 |
return target.getDBRef(); |
126 |
|
} |
127 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
128 |
333 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
129 |
|
throws IllegalStateException, IllegalArgumentException |
130 |
|
{ |
131 |
333 |
try |
132 |
|
{ |
133 |
333 |
Sequence target = (Sequence) object; |
134 |
333 |
target.addDBRef((jalview.schemabinding.version2.DBRef) value); |
135 |
|
} catch (java.lang.Exception ex) |
136 |
|
{ |
137 |
0 |
throw new IllegalStateException(ex.toString()); |
138 |
|
} |
139 |
|
} |
140 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
141 |
0 |
public void resetValue(Object object) throws IllegalStateException,... |
142 |
|
IllegalArgumentException |
143 |
|
{ |
144 |
0 |
try |
145 |
|
{ |
146 |
0 |
Sequence target = (Sequence) object; |
147 |
0 |
target.removeAllDBRef(); |
148 |
|
} catch (java.lang.Exception ex) |
149 |
|
{ |
150 |
0 |
throw new IllegalStateException(ex.toString()); |
151 |
|
} |
152 |
|
} |
153 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
154 |
333 |
public java.lang.Object newInstance(java.lang.Object parent)... |
155 |
|
{ |
156 |
333 |
return new jalview.schemabinding.version2.DBRef(); |
157 |
|
} |
158 |
|
}; |
159 |
1126 |
desc.setHandler(handler); |
160 |
1126 |
desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); |
161 |
1126 |
desc.setMultivalued(true); |
162 |
1126 |
addFieldDescriptor(desc); |
163 |
|
|
164 |
|
|
165 |
1126 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
166 |
1126 |
fieldValidator.setMinOccurs(0); |
167 |
|
{ |
168 |
|
} |
169 |
1126 |
desc.setValidator(fieldValidator); |
170 |
|
} |
171 |
|
|
172 |
|
|
173 |
|
|
174 |
|
|
175 |
|
|
176 |
|
|
177 |
|
|
178 |
|
|
179 |
|
@return |
180 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
181 |
0 |
public org.exolab.castor.mapping.AccessMode getAccessMode()... |
182 |
|
{ |
183 |
0 |
return null; |
184 |
|
} |
185 |
|
|
186 |
|
|
187 |
|
|
188 |
|
|
189 |
|
@return |
190 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
191 |
2580 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity()... |
192 |
|
{ |
193 |
2580 |
return super.getIdentity(); |
194 |
|
} |
195 |
|
|
196 |
|
|
197 |
|
|
198 |
|
|
199 |
|
@return |
200 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
201 |
804 |
public java.lang.Class getJavaClass()... |
202 |
|
{ |
203 |
804 |
return jalview.schemabinding.version2.Sequence.class; |
204 |
|
} |
205 |
|
|
206 |
|
|
207 |
|
|
208 |
|
|
209 |
|
@return |
210 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
211 |
322 |
public java.lang.String getNameSpacePrefix()... |
212 |
|
{ |
213 |
322 |
return _nsPrefix; |
214 |
|
} |
215 |
|
|
216 |
|
|
217 |
|
|
218 |
|
|
219 |
|
@return |
220 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
221 |
0 |
public java.lang.String getNameSpaceURI()... |
222 |
|
{ |
223 |
0 |
return _nsURI; |
224 |
|
} |
225 |
|
|
226 |
|
|
227 |
|
|
228 |
|
|
229 |
|
@return |
230 |
|
|
231 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
232 |
322 |
public org.exolab.castor.xml.TypeValidator getValidator()... |
233 |
|
{ |
234 |
322 |
return this; |
235 |
|
} |
236 |
|
|
237 |
|
|
238 |
|
|
239 |
|
|
240 |
|
@return |
241 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
242 |
2252 |
public java.lang.String getXMLName()... |
243 |
|
{ |
244 |
2252 |
return _xmlName; |
245 |
|
} |
246 |
|
|
247 |
|
|
248 |
|
|
249 |
|
|
250 |
|
@return |
251 |
|
|
252 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
253 |
0 |
public boolean isElementDefinition()... |
254 |
|
{ |
255 |
0 |
return _elementDefinition; |
256 |
|
} |
257 |
|
|
258 |
|
} |