Clover coverage report - JFox Service-Oriented Application Framework - 1.0-RC1
Coverage timestamp: 星期五 八月 19 2005 13:21:55 CST
file stats: LOC: 225   Methods: 16
NCLOC: 100   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
ServiceConfiguration.java 25% 24.2% 18.8% 22.8%
coverage coverage
 1   
 /**
 2   
  * @(#)ServiceConfiguration.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 java.util.Vector;
 28   
 
 29   
 import org.exolab.castor.xml.Marshaller;
 30   
 import org.exolab.castor.xml.Unmarshaller;
 31   
 
 32   
 /**
 33   
  * Class ServiceConfiguration.
 34   
  * 
 35   
  * @version $Revision: 1.5 $ $Date: 2005/05/22 06:47:43 $
 36   
  */
 37   
 public class ServiceConfiguration implements java.io.Serializable {
 38   
 
 39   
     /**
 40   
      * Field _configurationEntryList
 41   
      */
 42   
     private java.util.Vector _configurationEntryList;
 43   
 
 44  6
     public ServiceConfiguration() {
 45  6
         super();
 46  6
         _configurationEntryList = new Vector();
 47   
     }
 48   
 
 49   
     /**
 50   
      * Method addConfigurationEntry
 51   
      * 
 52   
      * @param vConfigurationEntry
 53   
      */
 54  24
     public void addConfigurationEntry(
 55   
             org.huihoo.jfox.soaf.schema.config.ConfigurationEntry vConfigurationEntry)
 56   
             throws java.lang.IndexOutOfBoundsException {
 57  24
         _configurationEntryList.addElement(vConfigurationEntry);
 58   
     }
 59   
 
 60   
     /**
 61   
      * Method addConfigurationEntry
 62   
      * 
 63   
      * @param index
 64   
      * @param vConfigurationEntry
 65   
      */
 66  0
     public void addConfigurationEntry(
 67   
             int index,
 68   
             org.huihoo.jfox.soaf.schema.config.ConfigurationEntry vConfigurationEntry)
 69   
             throws java.lang.IndexOutOfBoundsException {
 70  0
         _configurationEntryList.insertElementAt(vConfigurationEntry, index);
 71   
     }
 72   
 
 73   
     /**
 74   
      * Method enumerateConfigurationEntry
 75   
      */
 76  0
     public java.util.Enumeration enumerateConfigurationEntry() {
 77  0
         return _configurationEntryList.elements();
 78   
     }
 79   
 
 80   
     /**
 81   
      * Method getConfigurationEntry
 82   
      * 
 83   
      * @param index
 84   
      */
 85  0
     public org.huihoo.jfox.soaf.schema.config.ConfigurationEntry getConfigurationEntry(
 86   
             int index) throws java.lang.IndexOutOfBoundsException {
 87   
         //-- check bounds for index
 88  0
         if ((index < 0) || (index > _configurationEntryList.size())) {
 89  0
             throw new IndexOutOfBoundsException();
 90   
         }
 91   
 
 92  0
         return (org.huihoo.jfox.soaf.schema.config.ConfigurationEntry) _configurationEntryList
 93   
                 .elementAt(index);
 94   
     }
 95   
 
 96   
     /**
 97   
      * Method getConfigurationEntry
 98   
      */
 99  11
     public org.huihoo.jfox.soaf.schema.config.ConfigurationEntry[] getConfigurationEntry() {
 100  11
         int size = _configurationEntryList.size();
 101  11
         org.huihoo.jfox.soaf.schema.config.ConfigurationEntry[] mArray = new org.huihoo.jfox.soaf.schema.config.ConfigurationEntry[size];
 102  11
         for (int index = 0; index < size; index++) {
 103  44
             mArray[index] = (org.huihoo.jfox.soaf.schema.config.ConfigurationEntry) _configurationEntryList
 104   
                     .elementAt(index);
 105   
         }
 106  11
         return mArray;
 107   
     }
 108   
 
 109   
     /**
 110   
      * Method getConfigurationEntryCount
 111   
      */
 112  0
     public int getConfigurationEntryCount() {
 113  0
         return _configurationEntryList.size();
 114   
     }
 115   
 
 116   
     /**
 117   
      * Method isValid
 118   
      */
 119  0
     public boolean isValid() {
 120  0
         try {
 121  0
             validate();
 122   
         } catch (org.exolab.castor.xml.ValidationException vex) {
 123  0
             return false;
 124   
         }
 125  0
         return true;
 126   
     }
 127   
 
 128   
     /**
 129   
      * Method marshal
 130   
      * 
 131   
      * @param out
 132   
      */
 133  0
     public void marshal(java.io.Writer out)
 134   
             throws org.exolab.castor.xml.MarshalException,
 135   
             org.exolab.castor.xml.ValidationException {
 136   
 
 137  0
         Marshaller.marshal(this, out);
 138   
     }
 139   
 
 140   
     /**
 141   
      * Method marshal
 142   
      * 
 143   
      * @param handler
 144   
      */
 145  0
     public void marshal(org.xml.sax.ContentHandler handler)
 146   
             throws java.io.IOException, org.exolab.castor.xml.MarshalException,
 147   
             org.exolab.castor.xml.ValidationException {
 148   
 
 149  0
         Marshaller.marshal(this, handler);
 150   
     }
 151   
 
 152   
     /**
 153   
      * Method removeAllConfigurationEntry
 154   
      */
 155  0
     public void removeAllConfigurationEntry() {
 156  0
         _configurationEntryList.removeAllElements();
 157   
     }
 158   
 
 159   
     /**
 160   
      * Method removeConfigurationEntry
 161   
      * 
 162   
      * @param index
 163   
      */
 164  0
     public org.huihoo.jfox.soaf.schema.config.ConfigurationEntry removeConfigurationEntry(
 165   
             int index) {
 166  0
         java.lang.Object obj = _configurationEntryList.elementAt(index);
 167  0
         _configurationEntryList.removeElementAt(index);
 168  0
         return (org.huihoo.jfox.soaf.schema.config.ConfigurationEntry) obj;
 169   
     }
 170   
 
 171   
     /**
 172   
      * Method setConfigurationEntry
 173   
      * 
 174   
      * @param index
 175   
      * @param vConfigurationEntry
 176   
      */
 177  0
     public void setConfigurationEntry(
 178   
             int index,
 179   
             org.huihoo.jfox.soaf.schema.config.ConfigurationEntry vConfigurationEntry)
 180   
             throws java.lang.IndexOutOfBoundsException {
 181   
         //-- check bounds for index
 182  0
         if ((index < 0) || (index > _configurationEntryList.size())) {
 183  0
             throw new IndexOutOfBoundsException();
 184   
         }
 185  0
         _configurationEntryList.setElementAt(vConfigurationEntry, index);
 186   
     }
 187   
 
 188   
     /**
 189   
      * Method setConfigurationEntry
 190   
      * 
 191   
      * @param configurationEntryArray
 192   
      */
 193  0
     public void setConfigurationEntry(
 194   
             org.huihoo.jfox.soaf.schema.config.ConfigurationEntry[] configurationEntryArray) {
 195   
         //-- copy array
 196  0
         _configurationEntryList.removeAllElements();
 197  0
         for (int i = 0; i < configurationEntryArray.length; i++) {
 198  0
             _configurationEntryList.addElement(configurationEntryArray[i]);
 199   
         }
 200   
     }
 201   
 
 202   
     /**
 203   
      * Method unmarshal
 204   
      * 
 205   
      * @param reader
 206   
      */
 207  0
     public static org.huihoo.jfox.soaf.schema.config.ServiceConfiguration unmarshal(
 208   
             java.io.Reader reader)
 209   
             throws org.exolab.castor.xml.MarshalException,
 210   
             org.exolab.castor.xml.ValidationException {
 211  0
         return (org.huihoo.jfox.soaf.schema.config.ServiceConfiguration) Unmarshaller
 212   
                 .unmarshal(
 213   
                         org.huihoo.jfox.soaf.schema.config.ServiceConfiguration.class,
 214   
                         reader);
 215   
     }
 216   
 
 217   
     /**
 218   
      * Method validate
 219   
      */
 220  0
     public void validate() throws org.exolab.castor.xml.ValidationException {
 221  0
         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
 222  0
         validator.validate(this);
 223   
     }
 224   
 
 225   
 }