Clover coverage report - JFox Service-Oriented Application Framework - 1.0-M2
Coverage timestamp: 星期四 十一月 25 2004 17:14:11 PST
file stats: LOC: 335   Methods: 26
NCLOC: 134   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
ServiceEntry.java 12.5% 37.2% 46.2% 37.7%
coverage coverage
 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   
 import java.util.Vector;
 13   
 
 14   
 import org.exolab.castor.xml.Marshaller;
 15   
 import org.exolab.castor.xml.Unmarshaller;
 16   
 
 17   
 /**
 18   
  * <p>
 19   
  * Class ServiceEntry. 
 20   
  * </p>
 21   
  * 
 22   
  * @author <a href="mailto:founder_chen@yahoo.com.cn">Peter Cheng </a>
 23   
  * @version $Revision: 1.4 $ $Date: 2004/10/18 10:26:39 $
 24   
  * @version Revision: 1.0
 25   
  */
 26   
 
 27   
 public class ServiceEntry implements java.io.Serializable,
 28   
         org.huihoo.jfox.soaf.container.ServiceEntry {
 29   
 
 30   
     /**
 31   
      * Field _id
 32   
      */
 33   
     private java.lang.String _id;
 34   
 
 35   
     /**
 36   
      * Field _description
 37   
      */
 38   
     private java.lang.String _description;
 39   
 
 40   
     /**
 41   
      * Field _manageable
 42   
      */
 43   
     private java.lang.String _manageable;
 44   
 
 45   
     /**
 46   
      * Field _interface
 47   
      */
 48   
     private java.lang.String _interface;
 49   
 
 50   
     /**
 51   
      * Field _implementation
 52   
      */
 53   
     private java.lang.String _implementation;
 54   
 
 55   
     /**
 56   
      * Field _parameterList
 57   
      */
 58   
     private java.util.Vector _parameterList;
 59   
 
 60  16
     public ServiceEntry() {
 61  16
         super();
 62  16
         _parameterList = new Vector();
 63   
     } 
 64   
 
 65   
     /**
 66   
      * Method addParameter
 67   
      * 
 68   
      * @param vParameter
 69   
      */
 70  0
     public void addParameter(
 71   
             org.huihoo.jfox.soaf.schema.service.Parameter vParameter)
 72   
             throws java.lang.IndexOutOfBoundsException {
 73  0
         _parameterList.addElement(vParameter);
 74   
     } 
 75   
 
 76   
     /**
 77   
      * Method addParameter
 78   
      * 
 79   
      * @param index
 80   
      * @param vParameter
 81   
      */
 82  0
     public void addParameter(int index,
 83   
             org.huihoo.jfox.soaf.schema.service.Parameter vParameter)
 84   
             throws java.lang.IndexOutOfBoundsException {
 85  0
         _parameterList.insertElementAt(vParameter, index);
 86   
     } 
 87   
 
 88   
     /**
 89   
      * Method enumerateParameter
 90   
      */
 91  0
     public java.util.Enumeration enumerateParameter() {
 92  0
         return _parameterList.elements();
 93   
     } 
 94   
 
 95   
     /**
 96   
      * Method getDescriptionReturns the value of field 'description'.
 97   
      * 
 98   
      * @return the value of field 'description'.
 99   
      */
 100  16
     public java.lang.String getDescription() {
 101  16
         return this._description;
 102   
     } 
 103   
 
 104   
     /**
 105   
      * Method getIdReturns the value of field 'id'.
 106   
      * 
 107   
      * @return the value of field 'id'.
 108   
      */
 109  30
     public java.lang.String getId() {
 110  30
         return this._id;
 111   
     } 
 112   
 
 113   
     /**
 114   
      * Method getImplementationReturns the value of field 'implementation'.
 115   
      * 
 116   
      * @return the value of field 'implementation'.
 117   
      */
 118  59
     public java.lang.String getImplementation() {
 119  59
         return this._implementation;
 120   
     } 
 121   
 
 122   
     /**
 123   
      * Method getInterfaceReturns the value of field 'interface'.
 124   
      * 
 125   
      * @return the value of field 'interface'.
 126   
      */
 127  16
     public java.lang.String getInterface() {
 128  16
         return this._interface;
 129   
     } 
 130   
 
 131   
     /**
 132   
      * Method getManageableReturns the value of field 'manageable'.
 133   
      * 
 134   
      * @return the value of field 'manageable'.
 135   
      */
 136  44
     public java.lang.String getManageable() {
 137  44
         return this._manageable;
 138   
     } 
 139   
 
 140   
     /**
 141   
      * Method getParameter
 142   
      * 
 143   
      * @param index
 144   
      */
 145  0
     public org.huihoo.jfox.soaf.schema.service.Parameter getParameter(int index)
 146   
             throws java.lang.IndexOutOfBoundsException {
 147   
         //-- check bounds for index
 148  0
         if ((index < 0) || (index > _parameterList.size())) {
 149  0
             throw new IndexOutOfBoundsException();
 150   
         }
 151   
 
 152  0
         return (org.huihoo.jfox.soaf.schema.service.Parameter) _parameterList
 153   
                 .elementAt(index);
 154   
     } 
 155   
 
 156   
     /**
 157   
      * Method getParameter
 158   
      */
 159  16
     public org.huihoo.jfox.soaf.schema.service.Parameter[] getParameter() {
 160  16
         int size = _parameterList.size();
 161  16
         org.huihoo.jfox.soaf.schema.service.Parameter[] mArray = new org.huihoo.jfox.soaf.schema.service.Parameter[size];
 162  16
         for (int index = 0; index < size; index++) {
 163  0
             mArray[index] = (org.huihoo.jfox.soaf.schema.service.Parameter) _parameterList
 164   
                     .elementAt(index);
 165   
         }
 166  16
         return mArray;
 167   
     } 
 168   
 
 169   
     /**
 170   
      * Method getParameterCount
 171   
      */
 172  0
     public int getParameterCount() {
 173  0
         return _parameterList.size();
 174   
     } 
 175   
 
 176   
     /**
 177   
      * Method isValid
 178   
      */
 179  0
     public boolean isValid() {
 180  0
         try {
 181  0
             validate();
 182   
         } catch (org.exolab.castor.xml.ValidationException vex) {
 183  0
             return false;
 184   
         }
 185  0
         return true;
 186   
     } 
 187   
 
 188   
     /**
 189   
      * Method marshal
 190   
      * 
 191   
      * @param out
 192   
      */
 193  0
     public void marshal(java.io.Writer out)
 194   
             throws org.exolab.castor.xml.MarshalException,
 195   
             org.exolab.castor.xml.ValidationException {
 196   
 
 197  0
         Marshaller.marshal(this, out);
 198   
     } 
 199   
 
 200   
     /**
 201   
      * Method marshal
 202   
      * 
 203   
      * @param handler
 204   
      */
 205  0
     public void marshal(org.xml.sax.ContentHandler handler)
 206   
             throws java.io.IOException, org.exolab.castor.xml.MarshalException,
 207   
             org.exolab.castor.xml.ValidationException {
 208   
 
 209  0
         Marshaller.marshal(this, handler);
 210   
     } 
 211   
 
 212   
     /**
 213   
      * Method removeAllParameter
 214   
      */
 215  0
     public void removeAllParameter() {
 216  0
         _parameterList.removeAllElements();
 217   
     } 
 218   
 
 219   
     /**
 220   
      * Method removeParameter
 221   
      * 
 222   
      * @param index
 223   
      */
 224  0
     public org.huihoo.jfox.soaf.schema.service.Parameter removeParameter(
 225   
             int index) {
 226  0
         java.lang.Object obj = _parameterList.elementAt(index);
 227  0
         _parameterList.removeElementAt(index);
 228  0
         return (org.huihoo.jfox.soaf.schema.service.Parameter) obj;
 229   
     } 
 230   
 
 231   
     /**
 232   
      * Method setDescriptionSets the value of field 'description'.
 233   
      * 
 234   
      * @param description
 235   
      *            the value of field 'description'.
 236   
      */
 237  16
     public void setDescription(java.lang.String description) {
 238  16
         this._description = description;
 239   
     } 
 240   
 
 241   
     /**
 242   
      * Method setIdSets the value of field 'id'.
 243   
      * 
 244   
      * @param id
 245   
      *            the value of field 'id'.
 246   
      */
 247  16
     public void setId(java.lang.String id) {
 248  16
         this._id = id;
 249   
     } 
 250   
 
 251   
     /**
 252   
      * Method setImplementationSets the value of field 'implementation'.
 253   
      * 
 254   
      * @param implementation
 255   
      *            the value of field 'implementation'.
 256   
      */
 257  16
     public void setImplementation(java.lang.String implementation) {
 258  16
         this._implementation = implementation;
 259   
     } 
 260   
 
 261   
     /**
 262   
      * Method setInterfaceSets the value of field 'interface'.
 263   
      * 
 264   
      * @param _interface
 265   
      * @param interface
 266   
      *            the value of field 'interface'.
 267   
      */
 268  16
     public void setInterface(java.lang.String _interface) {
 269  16
         this._interface = _interface;
 270   
     } 
 271   
 
 272   
     /**
 273   
      * Method setManageableSets the value of field 'manageable'.
 274   
      * 
 275   
      * @param manageable
 276   
      *            the value of field 'manageable'.
 277   
      */
 278  16
     public void setManageable(java.lang.String manageable) {
 279  16
         this._manageable = manageable;
 280   
     } 
 281   
 
 282   
     /**
 283   
      * Method setParameter
 284   
      * 
 285   
      * @param index
 286   
      * @param vParameter
 287   
      */
 288  0
     public void setParameter(int index,
 289   
             org.huihoo.jfox.soaf.schema.service.Parameter vParameter)
 290   
             throws java.lang.IndexOutOfBoundsException {
 291   
         //-- check bounds for index
 292  0
         if ((index < 0) || (index > _parameterList.size())) {
 293  0
             throw new IndexOutOfBoundsException();
 294   
         }
 295  0
         _parameterList.setElementAt(vParameter, index);
 296   
     } 
 297   
 
 298   
     /**
 299   
      * Method setParameter
 300   
      * 
 301   
      * @param parameterArray
 302   
      */
 303  0
     public void setParameter(
 304   
             org.huihoo.jfox.soaf.schema.service.Parameter[] parameterArray) {
 305   
         //-- copy array
 306  0
         _parameterList.removeAllElements();
 307  0
         for (int i = 0; i < parameterArray.length; i++) {
 308  0
             _parameterList.addElement(parameterArray[i]);
 309   
         }
 310   
     } 
 311   
 
 312   
     /**
 313   
      * Method unmarshal
 314   
      * 
 315   
      * @param reader
 316   
      */
 317  0
     public static org.huihoo.jfox.soaf.schema.service.ServiceEntry unmarshal(
 318   
             java.io.Reader reader)
 319   
             throws org.exolab.castor.xml.MarshalException,
 320   
             org.exolab.castor.xml.ValidationException {
 321  0
         return (org.huihoo.jfox.soaf.schema.service.ServiceEntry) Unmarshaller
 322   
                 .unmarshal(
 323   
                         org.huihoo.jfox.soaf.schema.service.ServiceEntry.class,
 324   
                         reader);
 325   
     }
 326   
     
 327   
     /**
 328   
      * Method validate
 329   
      */
 330  0
     public void validate() throws org.exolab.castor.xml.ValidationException {
 331  0
         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
 332  0
         validator.validate(this);
 333   
     } 
 334   
 
 335   
 }