Clover coverage report - JFox Service-Oriented Application Framework - 1.0-RC3 Coverage timestamp: 星期三 二月 15 2006 18:10:22 CST FRAMES NO FRAMES |
file stats: | LOC: | 209 |  | Methods: | 15
| NCLOC: | 110 |  | 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
ConfigurationEntryDescriptor.java | - | 83.3% | 53.3% | 76.8% |

1 |  |
     /**
2 |  |
      * @(#)ConfigurationEntryDescriptor.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.config;
26 |  |
27 |  |
     import org.exolab.castor.xml.validators.StringValidator;
28 |  |
29 |  |
     /**
30 |  |
      * Class ConfigurationEntryDescriptor.
31 |  |
      *
32 |  |
      * @version $Revision: 1.6 $ $Date: 2005/01/17 13:29:58 $
33 |  |
      */
34 |  |
35 |  |
     public class ConfigurationEntryDescriptor extends
36 |  |
             org.exolab.castor.xml.util.XMLClassDescriptorImpl {
37 |  |
38 |  |
         /**
39 |  |
          * Field nsPrefix
40 |  |
          */
41 |  |
         private java.lang.String nsPrefix;
42 |  |
43 |  |
         /**
44 |  |
          * Field nsURI
45 |  |
          */
46 |  |
         private java.lang.String nsURI;
47 |  |
48 |  |
         /**
49 |  |
          * Field xmlName
50 |  |
          */
51 |  |
         private java.lang.String xmlName;
52 |  |
53 |  |
         /**
54 |  |
          * Field identity
55 |  |
          */
56 |  |
         private org.exolab.castor.xml.XMLFieldDescriptor identity;
57 |  |
58 | 12 |
         public ConfigurationEntryDescriptor() {
59 | 12 |
             super();
60 | 12 |
             xmlName = "configuration-entry";
61 |  |
62 |  |
             //-- set grouping compositor
63 | 12 |
             setCompositorAsSequence();
64 | 12 |
             org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
65 | 12 |
             org.exolab.castor.xml.XMLFieldHandler handler = null;
66 | 12 |
             org.exolab.castor.xml.FieldValidator fieldValidator = null;
67 |  |
             //-- initialize attribute descriptors
68 |  |
69 |  |
             //-- initialize element descriptors
70 |  |
71 |  |
             //-- _name
72 | 12 |
             desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
73 |  |
                     java.lang.String.class, "_name", "name",
74 |  |
                     org.exolab.castor.xml.NodeType.Element);
75 | 12 |
             desc.setImmutable(true);
76 | 12 |
             handler = (new org.exolab.castor.xml.XMLFieldHandler() {
77 | 84 |
                 public java.lang.Object getValue(java.lang.Object object)
78 |  |
                         throws IllegalStateException {
79 | 84 |
                     ConfigurationEntry target = (ConfigurationEntry) object;
80 | 84 |
                     return target.getName();
81 |  |
                 }
82 |  |
83 | 84 |
                 public void setValue(java.lang.Object object, java.lang.Object value)
84 |  |
                         throws IllegalStateException, IllegalArgumentException {
85 | 84 |
                     try {
86 | 84 |
                         ConfigurationEntry target = (ConfigurationEntry) object;
87 | 84 |
                         target.setName((java.lang.String) value);
88 |  |
                     } catch (java.lang.Exception ex) {
89 | 0 |
                         throw new IllegalStateException(ex.toString());
90 |  |
                     }
91 |  |
                 }
92 |  |
93 | 0 |
                 public java.lang.Object newInstance(java.lang.Object parent) {
94 | 0 |
                     return null;
95 |  |
                 }
96 |  |
             });
97 | 12 |
             desc.setHandler(handler);
98 | 12 |
             desc.setRequired(true);
99 | 12 |
             desc.setMultivalued(false);
100 | 12 |
             addFieldDescriptor(desc);
101 |  |
102 |  |
             //-- validation code for: _name
103 | 12 |
             fieldValidator = new org.exolab.castor.xml.FieldValidator();
104 | 12 |
             fieldValidator.setMinOccurs(1);
105 |  |
             { //-- local scope
106 | 12 |
                 StringValidator typeValidator = new StringValidator();
107 | 12 |
                 typeValidator.setWhiteSpace("preserve");
108 | 12 |
                 fieldValidator.setValidator(typeValidator);
109 |  |
             }
110 | 12 |
             desc.setValidator(fieldValidator);
111 |  |
             //-- _value
112 | 12 |
             desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
113 |  |
                     java.lang.String.class, "_value", "value",
114 |  |
                     org.exolab.castor.xml.NodeType.Element);
115 | 12 |
             desc.setImmutable(true);
116 | 12 |
             handler = (new org.exolab.castor.xml.XMLFieldHandler() {
117 | 84 |
                 public java.lang.Object getValue(java.lang.Object object)
118 |  |
                         throws IllegalStateException {
119 | 84 |
                     ConfigurationEntry target = (ConfigurationEntry) object;
120 | 84 |
                     return target.getValue();
121 |  |
                 }
122 |  |
123 | 84 |
                 public void setValue(java.lang.Object object, java.lang.Object value)
124 |  |
                         throws IllegalStateException, IllegalArgumentException {
125 | 84 |
                     try {
126 | 84 |
                         ConfigurationEntry target = (ConfigurationEntry) object;
127 | 84 |
                         target.setValue((java.lang.String) value);
128 |  |
                     } catch (java.lang.Exception ex) {
129 | 0 |
                         throw new IllegalStateException(ex.toString());
130 |  |
                     }
131 |  |
                 }
132 |  |
133 | 0 |
                 public java.lang.Object newInstance(java.lang.Object parent) {
134 | 0 |
                     return null;
135 |  |
                 }
136 |  |
             });
137 | 12 |
             desc.setHandler(handler);
138 | 12 |
             desc.setRequired(true);
139 | 12 |
             desc.setMultivalued(false);
140 | 12 |
             addFieldDescriptor(desc);
141 |  |
142 |  |
             //-- validation code for: _value
143 | 12 |
             fieldValidator = new org.exolab.castor.xml.FieldValidator();
144 | 12 |
             fieldValidator.setMinOccurs(1);
145 |  |
             { //-- local scope
146 | 12 |
                 StringValidator typeValidator = new StringValidator();
147 | 12 |
                 typeValidator.setWhiteSpace("preserve");
148 | 12 |
                 fieldValidator.setValidator(typeValidator);
149 |  |
             }
150 | 12 |
             desc.setValidator(fieldValidator);
151 |  |
         }
152 |  |
153 |  |
         /**
154 |  |
          * Method getAccessMode
155 |  |
          */
156 | 0 |
         public org.exolab.castor.mapping.AccessMode getAccessMode() {
157 | 0 |
             return null;
158 |  |
         }
159 |  |
160 |  |
         /**
161 |  |
          * Method getExtends
162 |  |
          */
163 | 0 |
         public org.exolab.castor.mapping.ClassDescriptor getExtends() {
164 | 0 |
             return null;
165 |  |
         }
166 |  |
167 |  |
         /**
168 |  |
          * Method getIdentity
169 |  |
          */
170 | 168 |
         public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
171 | 168 |
             return identity;
172 |  |
         }
173 |  |
174 |  |
         /**
175 |  |
          * Method getJavaClass
176 |  |
          */
177 | 168 |
         public java.lang.Class getJavaClass() {
178 | 168 |
             return org.huihoo.jfox.soaf.schema.config.ConfigurationEntry.class;
179 |  |
         }
180 |  |
181 |  |
         /**
182 |  |
          * Method getNameSpacePrefix
183 |  |
          */
184 | 0 |
         public java.lang.String getNameSpacePrefix() {
185 | 0 |
             return nsPrefix;
186 |  |
         }
187 |  |
188 |  |
         /**
189 |  |
          * Method getNameSpaceURI
190 |  |
          */
191 | 0 |
         public java.lang.String getNameSpaceURI() {
192 | 0 |
             return nsURI;
193 |  |
         }
194 |  |
195 |  |
         /**
196 |  |
          * Method getValidator
197 |  |
          */
198 | 84 |
         public org.exolab.castor.xml.TypeValidator getValidator() {
199 | 84 |
             return this;
200 |  |
         }
201 |  |
202 |  |
         /**
203 |  |
          * Method getXMLName
204 |  |
          */
205 | 0 |
         public java.lang.String getXMLName() {
206 | 0 |
             return xmlName;
207 |  |
         }
208 |  |
209 |  |
     }