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