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: | 151 |  | Methods: | 12
| NCLOC: | 71 |  | 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
ServiceDescriptor.java | - | 75.9% | 50% | 68.3% |

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 |  |
     /**
13 |  |
      * Class ServiceDescriptor.
14 |  |
      *
15 |  |
      * @author <a href="mailto:founder_chen@yahoo.com.cn">Peter Cheng </a>
16 |  |
      * @version $Revision: 1.5 $ $Date: 2004/10/18 10:24:12 $
17 |  |
      * @version Revision: 1.0
18 |  |
      */
19 |  |
20 |  |
     public class ServiceDescriptor extends
21 |  |
             org.exolab.castor.xml.util.XMLClassDescriptorImpl {
22 |  |
23 |  |
         /**
24 |  |
          * Field nsPrefix
25 |  |
          */
26 |  |
         private java.lang.String nsPrefix;
27 |  |
28 |  |
         /**
29 |  |
          * Field nsURI
30 |  |
          */
31 |  |
         private java.lang.String nsURI;
32 |  |
33 |  |
         /**
34 |  |
          * Field xmlName
35 |  |
          */
36 |  |
         private java.lang.String xmlName;
37 |  |
38 |  |
         /**
39 |  |
          * Field identity
40 |  |
          */
41 |  |
         private org.exolab.castor.xml.XMLFieldDescriptor identity;
42 |  |
43 | 9 |
         public ServiceDescriptor() {
44 | 9 |
             super();
45 | 9 |
             xmlName = "service";
46 |  |
47 |  |
             //-- set grouping compositor
48 | 9 |
             setCompositorAsSequence();
49 | 9 |
             org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
50 | 9 |
             org.exolab.castor.xml.XMLFieldHandler handler = null;
51 | 9 |
             org.exolab.castor.xml.FieldValidator fieldValidator = null;
52 |  |
             //-- initialize attribute descriptors
53 |  |
54 |  |
             //-- initialize element descriptors
55 |  |
56 |  |
             //-- _serviceEntryList
57 | 9 |
             desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
58 |  |
                     org.huihoo.jfox.soaf.schema.service.ServiceEntry.class,
59 |  |
                     "_serviceEntryList", "service-entry",
60 |  |
                     org.exolab.castor.xml.NodeType.Element);
61 | 9 |
             handler = (new org.exolab.castor.xml.XMLFieldHandler() {
62 | 9 |
                 public java.lang.Object getValue(java.lang.Object object)
63 |  |
                         throws IllegalStateException {
64 | 9 |
                     Service target = (Service) object;
65 | 9 |
                     return target.getServiceEntry();
66 |  |
                 }
67 |  |
68 | 16 |
                 public void setValue(java.lang.Object object, java.lang.Object value)
69 |  |
                         throws IllegalStateException, IllegalArgumentException {
70 | 16 |
                     try {
71 | 16 |
                         Service target = (Service) object;
72 | 16 |
                         target
73 |  |
                                 .addServiceEntry((org.huihoo.jfox.soaf.schema.service.ServiceEntry) value);
74 |  |
                     } catch (java.lang.Exception ex) {
75 | 0 |
                         throw new IllegalStateException(ex.toString());
76 |  |
                     }
77 |  |
                 }
78 |  |
79 | 16 |
                 public java.lang.Object newInstance(java.lang.Object parent) {
80 | 16 |
                     return new org.huihoo.jfox.soaf.schema.service.ServiceEntry();
81 |  |
                 }
82 |  |
             });
83 | 9 |
             desc.setHandler(handler);
84 | 9 |
             desc.setMultivalued(true);
85 | 9 |
             addFieldDescriptor(desc);
86 |  |
87 |  |
             //-- validation code for: _serviceEntryList
88 | 9 |
             fieldValidator = new org.exolab.castor.xml.FieldValidator();
89 | 9 |
             fieldValidator.setMinOccurs(0);
90 |  |
             { //-- local scope
91 |  |
             }
92 | 9 |
             desc.setValidator(fieldValidator);
93 |  |
         }
94 |  |
95 |  |
         /**
96 |  |
          * Method getAccessMode
97 |  |
          */
98 | 0 |
         public org.exolab.castor.mapping.AccessMode getAccessMode() {
99 | 0 |
             return null;
100 |  |
         }
101 |  |
102 |  |
         /**
103 |  |
          * Method getExtends
104 |  |
          */
105 | 0 |
         public org.exolab.castor.mapping.ClassDescriptor getExtends() {
106 | 0 |
             return null;
107 |  |
         }
108 |  |
109 |  |
         /**
110 |  |
          * Method getIdentity
111 |  |
          */
112 | 0 |
         public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
113 | 0 |
             return identity;
114 |  |
         }
115 |  |
116 |  |
         /**
117 |  |
          * Method getJavaClass
118 |  |
          */
119 | 9 |
         public java.lang.Class getJavaClass() {
120 | 9 |
             return org.huihoo.jfox.soaf.schema.service.Service.class;
121 |  |
         }
122 |  |
123 |  |
         /**
124 |  |
          * Method getNameSpacePrefix
125 |  |
          */
126 | 0 |
         public java.lang.String getNameSpacePrefix() {
127 | 0 |
             return nsPrefix;
128 |  |
         }
129 |  |
130 |  |
         /**
131 |  |
          * Method getNameSpaceURI
132 |  |
          */
133 | 0 |
         public java.lang.String getNameSpaceURI() {
134 | 0 |
             return nsURI;
135 |  |
         }
136 |  |
137 |  |
         /**
138 |  |
          * Method getValidator
139 |  |
          */
140 | 9 |
         public org.exolab.castor.xml.TypeValidator getValidator() {
141 | 9 |
             return this;
142 |  |
         }
143 |  |
144 |  |
         /**
145 |  |
          * Method getXMLName
146 |  |
          */
147 | 0 |
         public java.lang.String getXMLName() {
148 | 0 |
             return xmlName;
149 |  |
         }
150 |  |
151 |  |
     }