Clover coverage report - JFox Service-Oriented Application Framework - 1.0
Coverage timestamp: 星期一 八月 21 2006 22:56:01 CST
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%
coverage coverage
 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  11
     public ConfigurationEntryDescriptor() {
 59  11
         super();
 60  11
         xmlName = "configuration-entry";
 61   
 
 62   
         //-- set grouping compositor
 63  11
         setCompositorAsSequence();
 64  11
         org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
 65  11
         org.exolab.castor.xml.XMLFieldHandler handler = null;
 66  11
         org.exolab.castor.xml.FieldValidator fieldValidator = null;
 67   
         //-- initialize attribute descriptors
 68   
 
 69   
         //-- initialize element descriptors
 70   
 
 71   
         //-- _name
 72  11
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
 73   
                 java.lang.String.class, "_name", "name",
 74   
                 org.exolab.castor.xml.NodeType.Element);
 75  11
         desc.setImmutable(true);
 76  11
         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
 77  88
             public java.lang.Object getValue(java.lang.Object object)
 78   
                     throws IllegalStateException {
 79  88
                 ConfigurationEntry target = (ConfigurationEntry) object;
 80  88
                 return target.getName();
 81   
             }
 82   
 
 83  88
             public void setValue(java.lang.Object object, java.lang.Object value)
 84   
                     throws IllegalStateException, IllegalArgumentException {
 85  88
                 try {
 86  88
                     ConfigurationEntry target = (ConfigurationEntry) object;
 87  88
                     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  11
         desc.setHandler(handler);
 98  11
         desc.setRequired(true);
 99  11
         desc.setMultivalued(false);
 100  11
         addFieldDescriptor(desc);
 101   
 
 102   
         //-- validation code for: _name
 103  11
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
 104  11
         fieldValidator.setMinOccurs(1);
 105   
         { //-- local scope
 106  11
             StringValidator typeValidator = new StringValidator();
 107  11
             typeValidator.setWhiteSpace("preserve");
 108  11
             fieldValidator.setValidator(typeValidator);
 109   
         }
 110  11
         desc.setValidator(fieldValidator);
 111   
         //-- _value
 112  11
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
 113   
                 java.lang.String.class, "_value", "value",
 114   
                 org.exolab.castor.xml.NodeType.Element);
 115  11
         desc.setImmutable(true);
 116  11
         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
 117  88
             public java.lang.Object getValue(java.lang.Object object)
 118   
                     throws IllegalStateException {
 119  88
                 ConfigurationEntry target = (ConfigurationEntry) object;
 120  88
                 return target.getValue();
 121   
             }
 122   
 
 123  88
             public void setValue(java.lang.Object object, java.lang.Object value)
 124   
                     throws IllegalStateException, IllegalArgumentException {
 125  88
                 try {
 126  88
                     ConfigurationEntry target = (ConfigurationEntry) object;
 127  88
                     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  11
         desc.setHandler(handler);
 138  11
         desc.setRequired(true);
 139  11
         desc.setMultivalued(false);
 140  11
         addFieldDescriptor(desc);
 141   
 
 142   
         //-- validation code for: _value
 143  11
         fieldValidator = new org.exolab.castor.xml.FieldValidator();
 144  11
         fieldValidator.setMinOccurs(1);
 145   
         { //-- local scope
 146  11
             StringValidator typeValidator = new StringValidator();
 147  11
             typeValidator.setWhiteSpace("preserve");
 148  11
             fieldValidator.setValidator(typeValidator);
 149   
         }
 150  11
         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  176
     public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
 171  176
         return identity;
 172   
     }
 173   
 
 174   
     /**
 175   
      * Method getJavaClass
 176   
      */
 177  176
     public java.lang.Class getJavaClass() {
 178  176
         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  88
     public org.exolab.castor.xml.TypeValidator getValidator() {
 199  88
         return this;
 200   
     }
 201   
 
 202   
     /**
 203   
      * Method getXMLName
 204   
      */
 205  0
     public java.lang.String getXMLName() {
 206  0
         return xmlName;
 207   
     }
 208   
 
 209   
 }