Clover coverage report - JFox Service-Oriented Application Framework - 1.0-M2 Coverage timestamp: 星期四 十一月 25 2004 17:14:11 PST FRAMES NO FRAMES |
file stats: | LOC: | 349 |  | Methods: | 27
| NCLOC: | 241 |  | Classes: | 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
Source file | Conditionals | Statements | Methods | TOTAL
ServiceEntryDescriptor.java | - | 83.7% | 55.6% | 78.7% |

1 |  |
     /**
2 |  |
      * JFoxSOAF, Service-Oriented Application Framework
3 |  |
      *
4 |  |
      * Copyright (C) www.huihoo.org
5 |  |
      *
6 |  |
      * Distributable under GNU LGPL For more information, please visit:
7 |  |
      * http://www.huihoo.org/jfox/jfoxsoaf
8 |  |
      */
9 |  |
10 |  |
     package org.huihoo.jfox.soaf.schema.service;
11 |  |
12 |  |
     import org.exolab.castor.xml.validators.StringValidator;
13 |  |
14 |  |
     /**
15 |  |
      * <p>
16 |  |
      * Class ServiceEntryDescriptor.
17 |  |
      * </p>
18 |  |
      *
19 |  |
      * @author <a href="mailto:founder_chen@yahoo.com.cn">Peter Cheng </a>
20 |  |
      * @version $Revision: 1.4 $ $Date: 2004/10/18 11:47:02 $
21 |  |
      * @version Revision: 1.0
22 |  |
      */
23 |  |
24 |  |
     public class ServiceEntryDescriptor extends
25 |  |
             org.exolab.castor.xml.util.XMLClassDescriptorImpl {
26 |  |
27 |  |
         /**
28 |  |
          * Field nsPrefix
29 |  |
          */
30 |  |
         private java.lang.String nsPrefix;
31 |  |
32 |  |
         /**
33 |  |
          * Field nsURI
34 |  |
          */
35 |  |
         private java.lang.String nsURI;
36 |  |
37 |  |
         /**
38 |  |
          * Field xmlName
39 |  |
          */
40 |  |
         private java.lang.String xmlName;
41 |  |
42 |  |
         /**
43 |  |
          * Field identity
44 |  |
          */
45 |  |
         private org.exolab.castor.xml.XMLFieldDescriptor identity;
46 |  |
47 | 9 |
         public ServiceEntryDescriptor() {
48 | 9 |
             super();
49 | 9 |
             xmlName = "service-entry";
50 |  |
51 |  |
             //-- set grouping compositor
52 | 9 |
             setCompositorAsSequence();
53 | 9 |
             org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
54 | 9 |
             org.exolab.castor.xml.XMLFieldHandler handler = null;
55 | 9 |
             org.exolab.castor.xml.FieldValidator fieldValidator = null;
56 |  |
             //-- initialize attribute descriptors
57 |  |
58 |  |
             //-- initialize element descriptors
59 |  |
60 |  |
             //-- _id
61 | 9 |
             desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
62 |  |
                     java.lang.String.class, "_id", "id",
63 |  |
                     org.exolab.castor.xml.NodeType.Element);
64 | 9 |
             desc.setImmutable(true);
65 | 9 |
             handler = (new org.exolab.castor.xml.XMLFieldHandler() {
66 | 16 |
                 public java.lang.Object getValue(java.lang.Object object)
67 |  |
                         throws IllegalStateException {
68 | 16 |
                     ServiceEntry target = (ServiceEntry) object;
69 | 16 |
                     return target.getId();
70 |  |
                 }
71 |  |
72 | 16 |
                 public void setValue(java.lang.Object object, java.lang.Object value)
73 |  |
                         throws IllegalStateException, IllegalArgumentException {
74 | 16 |
                     try {
75 | 16 |
                         ServiceEntry target = (ServiceEntry) object;
76 | 16 |
                         target.setId((java.lang.String) value);
77 |  |
                     } catch (java.lang.Exception ex) {
78 | 0 |
                         throw new IllegalStateException(ex.toString());
79 |  |
                     }
80 |  |
                 }
81 |  |
82 | 0 |
                 public java.lang.Object newInstance(java.lang.Object parent) {
83 | 0 |
                     return null;
84 |  |
                 }
85 |  |
             });
86 | 9 |
             desc.setHandler(handler);
87 | 9 |
             desc.setMultivalued(false);
88 | 9 |
             addFieldDescriptor(desc);
89 |  |
90 |  |
             //-- validation code for: _id
91 | 9 |
             fieldValidator = new org.exolab.castor.xml.FieldValidator();
92 |  |
             { //-- local scope
93 | 9 |
                 StringValidator typeValidator = new StringValidator();
94 | 9 |
                 typeValidator.setWhiteSpace("preserve");
95 | 9 |
                 fieldValidator.setValidator(typeValidator);
96 |  |
             }
97 | 9 |
             desc.setValidator(fieldValidator);
98 |  |
             //-- _description
99 | 9 |
             desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
100 |  |
                     java.lang.String.class, "_description", "description",
101 |  |
                     org.exolab.castor.xml.NodeType.Element);
102 | 9 |
             desc.setImmutable(true);
103 | 9 |
             handler = (new org.exolab.castor.xml.XMLFieldHandler() {
104 | 16 |
                 public java.lang.Object getValue(java.lang.Object object)
105 |  |
                         throws IllegalStateException {
106 | 16 |
                     ServiceEntry target = (ServiceEntry) object;
107 | 16 |
                     return target.getDescription();
108 |  |
                 }
109 |  |
110 | 16 |
                 public void setValue(java.lang.Object object, java.lang.Object value)
111 |  |
                         throws IllegalStateException, IllegalArgumentException {
112 | 16 |
                     try {
113 | 16 |
                         ServiceEntry target = (ServiceEntry) object;
114 | 16 |
                         target.setDescription((java.lang.String) value);
115 |  |
                     } catch (java.lang.Exception ex) {
116 | 0 |
                         throw new IllegalStateException(ex.toString());
117 |  |
                     }
118 |  |
                 }
119 |  |
120 | 0 |
                 public java.lang.Object newInstance(java.lang.Object parent) {
121 | 0 |
                     return null;
122 |  |
                 }
123 |  |
             });
124 | 9 |
             desc.setHandler(handler);
125 | 9 |
             desc.setMultivalued(false);
126 | 9 |
             addFieldDescriptor(desc);
127 |  |
128 |  |
             //-- validation code for: _description
129 | 9 |
             fieldValidator = new org.exolab.castor.xml.FieldValidator();
130 |  |
             { //-- local scope
131 | 9 |
                 StringValidator typeValidator = new StringValidator();
132 | 9 |
                 typeValidator.setWhiteSpace("preserve");
133 | 9 |
                 fieldValidator.setValidator(typeValidator);
134 |  |
             }
135 | 9 |
             desc.setValidator(fieldValidator);
136 |  |
             //-- _manageable
137 | 9 |
             desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
138 |  |
                     java.lang.String.class, "_manageable", "manageable",
139 |  |
                     org.exolab.castor.xml.NodeType.Element);
140 | 9 |
             desc.setImmutable(true);
141 | 9 |
             handler = (new org.exolab.castor.xml.XMLFieldHandler() {
142 | 16 |
                 public java.lang.Object getValue(java.lang.Object object)
143 |  |
                         throws IllegalStateException {
144 | 16 |
                     ServiceEntry target = (ServiceEntry) object;
145 | 16 |
                     return target.getManageable();
146 |  |
                 }
147 |  |
148 | 16 |
                 public void setValue(java.lang.Object object, java.lang.Object value)
149 |  |
                         throws IllegalStateException, IllegalArgumentException {
150 | 16 |
                     try {
151 | 16 |
                         ServiceEntry target = (ServiceEntry) object;
152 | 16 |
                         target.setManageable((java.lang.String) value);
153 |  |
                     } catch (java.lang.Exception ex) {
154 | 0 |
                         throw new IllegalStateException(ex.toString());
155 |  |
                     }
156 |  |
                 }
157 |  |
158 | 0 |
                 public java.lang.Object newInstance(java.lang.Object parent) {
159 | 0 |
                     return null;
160 |  |
                 }
161 |  |
             });
162 | 9 |
             desc.setHandler(handler);
163 | 9 |
             desc.setRequired(true);
164 | 9 |
             desc.setMultivalued(false);
165 | 9 |
             addFieldDescriptor(desc);
166 |  |
167 |  |
             //-- validation code for: _manageable
168 | 9 |
             fieldValidator = new org.exolab.castor.xml.FieldValidator();
169 | 9 |
             fieldValidator.setMinOccurs(1);
170 |  |
             { //-- local scope
171 | 9 |
                 StringValidator typeValidator = new StringValidator();
172 | 9 |
                 typeValidator.setWhiteSpace("preserve");
173 | 9 |
                 fieldValidator.setValidator(typeValidator);
174 |  |
             }
175 | 9 |
             desc.setValidator(fieldValidator);
176 |  |
             //-- _interface
177 | 9 |
             desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
178 |  |
                     java.lang.String.class, "_interface", "interface",
179 |  |
                     org.exolab.castor.xml.NodeType.Element);
180 | 9 |
             desc.setImmutable(true);
181 | 9 |
             handler = (new org.exolab.castor.xml.XMLFieldHandler() {
182 | 16 |
                 public java.lang.Object getValue(java.lang.Object object)
183 |  |
                         throws IllegalStateException {
184 | 16 |
                     ServiceEntry target = (ServiceEntry) object;
185 | 16 |
                     return target.getInterface();
186 |  |
                 }
187 |  |
188 | 16 |
                 public void setValue(java.lang.Object object, java.lang.Object value)
189 |  |
                         throws IllegalStateException, IllegalArgumentException {
190 | 16 |
                     try {
191 | 16 |
                         ServiceEntry target = (ServiceEntry) object;
192 | 16 |
                         target.setInterface((java.lang.String) value);
193 |  |
                     } catch (java.lang.Exception ex) {
194 | 0 |
                         throw new IllegalStateException(ex.toString());
195 |  |
                     }
196 |  |
                 }
197 |  |
198 | 0 |
                 public java.lang.Object newInstance(java.lang.Object parent) {
199 | 0 |
                     return null;
200 |  |
                 }
201 |  |
             });
202 | 9 |
             desc.setHandler(handler);
203 | 9 |
             desc.setMultivalued(false);
204 | 9 |
             addFieldDescriptor(desc);
205 |  |
206 |  |
             //-- validation code for: _interface
207 | 9 |
             fieldValidator = new org.exolab.castor.xml.FieldValidator();
208 |  |
             { //-- local scope
209 | 9 |
                 StringValidator typeValidator = new StringValidator();
210 | 9 |
                 typeValidator.setWhiteSpace("preserve");
211 | 9 |
                 fieldValidator.setValidator(typeValidator);
212 |  |
             }
213 | 9 |
             desc.setValidator(fieldValidator);
214 |  |
             //-- _implementation
215 | 9 |
             desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
216 |  |
                     java.lang.String.class, "_implementation", "implementation",
217 |  |
                     org.exolab.castor.xml.NodeType.Element);
218 | 9 |
             desc.setImmutable(true);
219 | 9 |
             handler = (new org.exolab.castor.xml.XMLFieldHandler() {
220 | 16 |
                 public java.lang.Object getValue(java.lang.Object object)
221 |  |
                         throws IllegalStateException {
222 | 16 |
                     ServiceEntry target = (ServiceEntry) object;
223 | 16 |
                     return target.getImplementation();
224 |  |
                 }
225 |  |
226 | 16 |
                 public void setValue(java.lang.Object object, java.lang.Object value)
227 |  |
                         throws IllegalStateException, IllegalArgumentException {
228 | 16 |
                     try {
229 | 16 |
                         ServiceEntry target = (ServiceEntry) object;
230 | 16 |
                         target.setImplementation((java.lang.String) value);
231 |  |
                     } catch (java.lang.Exception ex) {
232 | 0 |
                         throw new IllegalStateException(ex.toString());
233 |  |
                     }
234 |  |
                 }
235 |  |
236 | 0 |
                 public java.lang.Object newInstance(java.lang.Object parent) {
237 | 0 |
                     return null;
238 |  |
                 }
239 |  |
             });
240 | 9 |
             desc.setHandler(handler);
241 | 9 |
             desc.setRequired(true);
242 | 9 |
             desc.setMultivalued(false);
243 | 9 |
             addFieldDescriptor(desc);
244 |  |
245 |  |
             //-- validation code for: _implementation
246 | 9 |
             fieldValidator = new org.exolab.castor.xml.FieldValidator();
247 | 9 |
             fieldValidator.setMinOccurs(1);
248 |  |
             { //-- local scope
249 | 9 |
                 StringValidator typeValidator = new StringValidator();
250 | 9 |
                 typeValidator.setWhiteSpace("preserve");
251 | 9 |
                 fieldValidator.setValidator(typeValidator);
252 |  |
             }
253 | 9 |
             desc.setValidator(fieldValidator);
254 |  |
             //-- _parameterList
255 | 9 |
             desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
256 |  |
                     org.huihoo.jfox.soaf.schema.service.Parameter.class,
257 |  |
                     "_parameterList", "parameter",
258 |  |
                     org.exolab.castor.xml.NodeType.Element);
259 | 9 |
             handler = (new org.exolab.castor.xml.XMLFieldHandler() {
260 | 16 |
                 public java.lang.Object getValue(java.lang.Object object)
261 |  |
                         throws IllegalStateException {
262 | 16 |
                     ServiceEntry target = (ServiceEntry) object;
263 | 16 |
                     return target.getParameter();
264 |  |
                 }
265 |  |
266 | 0 |
                 public void setValue(java.lang.Object object, java.lang.Object value)
267 |  |
                         throws IllegalStateException, IllegalArgumentException {
268 | 0 |
                     try {
269 | 0 |
                         ServiceEntry target = (ServiceEntry) object;
270 | 0 |
                         target
271 |  |
                                 .addParameter((org.huihoo.jfox.soaf.schema.service.Parameter) value);
272 |  |
                     } catch (java.lang.Exception ex) {
273 | 0 |
                         throw new IllegalStateException(ex.toString());
274 |  |
                     }
275 |  |
                 }
276 |  |
277 | 0 |
                 public java.lang.Object newInstance(java.lang.Object parent) {
278 | 0 |
                     return new org.huihoo.jfox.soaf.schema.service.Parameter();
279 |  |
                 }
280 |  |
             });
281 | 9 |
             desc.setHandler(handler);
282 | 9 |
             desc.setMultivalued(true);
283 | 9 |
             addFieldDescriptor(desc);
284 |  |
285 |  |
             //-- validation code for: _parameterList
286 | 9 |
             fieldValidator = new org.exolab.castor.xml.FieldValidator();
287 | 9 |
             fieldValidator.setMinOccurs(0);
288 |  |
             { //-- local scope
289 |  |
             }
290 | 9 |
             desc.setValidator(fieldValidator);
291 |  |
         }
292 |  |
293 |  |
         /**
294 |  |
          * Method getAccessMode
295 |  |
          */
296 | 0 |
         public org.exolab.castor.mapping.AccessMode getAccessMode() {
297 | 0 |
             return null;
298 |  |
         }
299 |  |
300 |  |
         /**
301 |  |
          * Method getExtends
302 |  |
          */
303 | 0 |
         public org.exolab.castor.mapping.ClassDescriptor getExtends() {
304 | 0 |
             return null;
305 |  |
         }
306 |  |
307 |  |
         /**
308 |  |
          * Method getIdentity
309 |  |
          */
310 | 80 |
         public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
311 | 80 |
             return identity;
312 |  |
         }
313 |  |
314 |  |
         /**
315 |  |
          * Method getJavaClass
316 |  |
          */
317 | 32 |
         public java.lang.Class getJavaClass() {
318 | 32 |
             return org.huihoo.jfox.soaf.schema.service.ServiceEntry.class;
319 |  |
         }
320 |  |
321 |  |
         /**
322 |  |
          * Method getNameSpacePrefix
323 |  |
          */
324 | 0 |
         public java.lang.String getNameSpacePrefix() {
325 | 0 |
             return nsPrefix;
326 |  |
         }
327 |  |
328 |  |
         /**
329 |  |
          * Method getNameSpaceURI
330 |  |
          */
331 | 0 |
         public java.lang.String getNameSpaceURI() {
332 | 0 |
             return nsURI;
333 |  |
         }
334 |  |
335 |  |
         /**
336 |  |
          * Method getValidator
337 |  |
          */
338 | 16 |
         public org.exolab.castor.xml.TypeValidator getValidator() {
339 | 16 |
             return this;
340 |  |
         }
341 |  |
342 |  |
         /**
343 |  |
          * Method getXMLName
344 |  |
          */
345 | 0 |
         public java.lang.String getXMLName() {
346 | 0 |
             return xmlName;
347 |  |
         }
348 |  |
349 |  |
     }