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