Clover coverage report - JFox Service-Oriented Application Framework - 1.0-M2 Coverage timestamp: 星期四 十一月 25 2004 17:14:11 PST FRAMES NO FRAMES |
file stats: | LOC: | 212 |  | Methods: | 16
| NCLOC: | 97 |  | 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
Service.java | 25% | 27.3% | 25% | 26.3% |

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 Service.
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:21:49 $
24 |  |
      * @version Revision: 1.0
25 |  |
      */
26 |  |
27 |  |
     public class Service implements java.io.Serializable {
28 |  |
29 |  |
         /**
30 |  |
          * Field _serviceEntryList
31 |  |
          */
32 |  |
         private java.util.Vector _serviceEntryList;
33 |  |
34 | 9 |
         public Service() {
35 | 9 |
             super();
36 | 9 |
             _serviceEntryList = new Vector();
37 |  |
         }
38 |  |
39 |  |
         /**
40 |  |
          * Method addServiceEntry
41 |  |
          *
42 |  |
          * @param vServiceEntry
43 |  |
          */
44 | 16 |
         public void addServiceEntry(
45 |  |
                 org.huihoo.jfox.soaf.schema.service.ServiceEntry vServiceEntry)
46 |  |
                 throws java.lang.IndexOutOfBoundsException {
47 | 16 |
             _serviceEntryList.addElement(vServiceEntry);
48 |  |
         }
49 |  |
50 |  |
         /**
51 |  |
          * Method addServiceEntry
52 |  |
          *
53 |  |
          * @param index
54 |  |
          * @param vServiceEntry
55 |  |
          */
56 | 0 |
         public void addServiceEntry(int index,
57 |  |
                 org.huihoo.jfox.soaf.schema.service.ServiceEntry vServiceEntry)
58 |  |
                 throws java.lang.IndexOutOfBoundsException {
59 | 0 |
             _serviceEntryList.insertElementAt(vServiceEntry, index);
60 |  |
         }
61 |  |
62 |  |
         /**
63 |  |
          * Method enumerateServiceEntry
64 |  |
          */
65 | 0 |
         public java.util.Enumeration enumerateServiceEntry() {
66 | 0 |
             return _serviceEntryList.elements();
67 |  |
         }
68 |  |
69 |  |
         /**
70 |  |
          * Method getServiceEntry
71 |  |
          *
72 |  |
          * @param index
73 |  |
          */
74 | 0 |
         public org.huihoo.jfox.soaf.schema.service.ServiceEntry getServiceEntry(
75 |  |
                 int index) throws java.lang.IndexOutOfBoundsException {
76 |  |
             //-- check bounds for index
77 | 0 |
             if ((index < 0) || (index > _serviceEntryList.size())) {
78 | 0 |
                 throw new IndexOutOfBoundsException();
79 |  |
             }
80 |  |
81 | 0 |
             return (org.huihoo.jfox.soaf.schema.service.ServiceEntry) _serviceEntryList
82 |  |
                     .elementAt(index);
83 |  |
         }
84 |  |
85 |  |
         /**
86 |  |
          * Method getServiceEntry
87 |  |
          */
88 | 18 |
         public org.huihoo.jfox.soaf.schema.service.ServiceEntry[] getServiceEntry() {
89 | 18 |
             int size = _serviceEntryList.size();
90 | 18 |
             org.huihoo.jfox.soaf.schema.service.ServiceEntry[] mArray = new org.huihoo.jfox.soaf.schema.service.ServiceEntry[size];
91 | 18 |
             for (int index = 0; index < size; index++) {
92 | 32 |
                 mArray[index] = (org.huihoo.jfox.soaf.schema.service.ServiceEntry) _serviceEntryList
93 |  |
                         .elementAt(index);
94 |  |
             }
95 | 18 |
             return mArray;
96 |  |
         }
97 |  |
98 |  |
         /**
99 |  |
          * Method getServiceEntryCount
100 |  |
          */
101 | 0 |
         public int getServiceEntryCount() {
102 | 0 |
             return _serviceEntryList.size();
103 |  |
         }
104 |  |
105 |  |
         /**
106 |  |
          * Method isValid
107 |  |
          */
108 | 0 |
         public boolean isValid() {
109 | 0 |
             try {
110 | 0 |
                 validate();
111 |  |
             } catch (org.exolab.castor.xml.ValidationException vex) {
112 | 0 |
                 return false;
113 |  |
             }
114 | 0 |
             return true;
115 |  |
         }
116 |  |
117 |  |
         /**
118 |  |
          * Method marshal
119 |  |
          *
120 |  |
          * @param out
121 |  |
          */
122 | 0 |
         public void marshal(java.io.Writer out)
123 |  |
                 throws org.exolab.castor.xml.MarshalException,
124 |  |
                 org.exolab.castor.xml.ValidationException {
125 |  |
126 | 0 |
             Marshaller.marshal(this, out);
127 |  |
         }
128 |  |
129 |  |
         /**
130 |  |
          * Method marshal
131 |  |
          *
132 |  |
          * @param handler
133 |  |
          */
134 | 0 |
         public void marshal(org.xml.sax.ContentHandler handler)
135 |  |
                 throws java.io.IOException, org.exolab.castor.xml.MarshalException,
136 |  |
                 org.exolab.castor.xml.ValidationException {
137 |  |
138 | 0 |
             Marshaller.marshal(this, handler);
139 |  |
         }
140 |  |
141 |  |
         /**
142 |  |
          * Method removeAllServiceEntry
143 |  |
          */
144 | 0 |
         public void removeAllServiceEntry() {
145 | 0 |
             _serviceEntryList.removeAllElements();
146 |  |
         }
147 |  |
148 |  |
         /**
149 |  |
          * Method removeServiceEntry
150 |  |
          *
151 |  |
          * @param index
152 |  |
          */
153 | 0 |
         public org.huihoo.jfox.soaf.schema.service.ServiceEntry removeServiceEntry(
154 |  |
                 int index) {
155 | 0 |
             java.lang.Object obj = _serviceEntryList.elementAt(index);
156 | 0 |
             _serviceEntryList.removeElementAt(index);
157 | 0 |
             return (org.huihoo.jfox.soaf.schema.service.ServiceEntry) obj;
158 |  |
         }
159 |  |
160 |  |
         /**
161 |  |
          * Method setServiceEntry
162 |  |
          *
163 |  |
          * @param index
164 |  |
          * @param vServiceEntry
165 |  |
          */
166 | 0 |
         public void setServiceEntry(int index,
167 |  |
                 org.huihoo.jfox.soaf.schema.service.ServiceEntry vServiceEntry)
168 |  |
                 throws java.lang.IndexOutOfBoundsException {
169 |  |
             //-- check bounds for index
170 | 0 |
             if ((index < 0) || (index > _serviceEntryList.size())) {
171 | 0 |
                 throw new IndexOutOfBoundsException();
172 |  |
             }
173 | 0 |
             _serviceEntryList.setElementAt(vServiceEntry, index);
174 |  |
         }
175 |  |
176 |  |
         /**
177 |  |
          * Method setServiceEntry
178 |  |
          *
179 |  |
          * @param serviceEntryArray
180 |  |
          */
181 | 0 |
         public void setServiceEntry(
182 |  |
                 org.huihoo.jfox.soaf.schema.service.ServiceEntry[] serviceEntryArray) {
183 |  |
             //-- copy array
184 | 0 |
             _serviceEntryList.removeAllElements();
185 | 0 |
             for (int i = 0; i < serviceEntryArray.length; i++) {
186 | 0 |
                 _serviceEntryList.addElement(serviceEntryArray[i]);
187 |  |
             }
188 |  |
         }
189 |  |
190 |  |
         /**
191 |  |
          * Method unmarshal
192 |  |
          *
193 |  |
          * @param reader
194 |  |
          */
195 | 9 |
         public static org.huihoo.jfox.soaf.schema.service.Service unmarshal(
196 |  |
                 java.io.Reader reader)
197 |  |
                 throws org.exolab.castor.xml.MarshalException,
198 |  |
                 org.exolab.castor.xml.ValidationException {
199 | 9 |
             return (org.huihoo.jfox.soaf.schema.service.Service) Unmarshaller
200 |  |
                     .unmarshal(org.huihoo.jfox.soaf.schema.service.Service.class,
201 |  |
                             reader);
202 |  |
         }
203 |  |
204 |  |
         /**
205 |  |
          * Method validate
206 |  |
          */
207 | 0 |
         public void validate() throws org.exolab.castor.xml.ValidationException {
208 | 0 |
             org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
209 | 0 |
             validator.validate(this);
210 |  |
         }
211 |  |
212 |  |
     }