|
|||||||||||||||||||
| 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 | |||||||||||||||
| ServiceDescriptor.java | - | 75.9% | 50% | 68.3% |
|
||||||||||||||
| 1 |
/**
|
|
| 2 |
* @(#)ServiceDescriptor.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.service;
|
|
| 26 |
|
|
| 27 |
/**
|
|
| 28 |
* Class ServiceDescriptor.
|
|
| 29 |
*
|
|
| 30 |
* @author <a href="mailto:founder_chen@yahoo.com.cn">Peter Cheng </a>
|
|
| 31 |
* @version $Revision: 1.8 $ $Date: 2005/05/22 06:48:07 $
|
|
| 32 |
* @version Revision: 1.0
|
|
| 33 |
*/
|
|
| 34 |
|
|
| 35 |
public class ServiceDescriptor 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 | 71 |
public ServiceDescriptor() {
|
| 59 | 71 |
super();
|
| 60 | 71 |
xmlName = "service";
|
| 61 |
|
|
| 62 |
//-- set grouping compositor
|
|
| 63 | 71 |
setCompositorAsSequence(); |
| 64 | 71 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
|
| 65 | 71 |
org.exolab.castor.xml.XMLFieldHandler handler = null;
|
| 66 | 71 |
org.exolab.castor.xml.FieldValidator fieldValidator = null;
|
| 67 |
//-- initialize attribute descriptors
|
|
| 68 |
|
|
| 69 |
//-- initialize element descriptors
|
|
| 70 |
|
|
| 71 |
//-- _serviceEntryList
|
|
| 72 | 71 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
|
| 73 |
org.huihoo.jfox.soaf.schema.service.ServiceEntry.class,
|
|
| 74 |
"_serviceEntryList", "service-entry", |
|
| 75 |
org.exolab.castor.xml.NodeType.Element); |
|
| 76 | 71 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() {
|
| 77 | 71 |
public java.lang.Object getValue(java.lang.Object object)
|
| 78 |
throws IllegalStateException {
|
|
| 79 | 71 |
Service target = (Service) object; |
| 80 | 71 |
return target.getServiceEntry();
|
| 81 |
} |
|
| 82 |
|
|
| 83 | 131 |
public void setValue(java.lang.Object object, java.lang.Object value) |
| 84 |
throws IllegalStateException, IllegalArgumentException {
|
|
| 85 | 131 |
try {
|
| 86 | 131 |
Service target = (Service) object; |
| 87 | 131 |
target |
| 88 |
.addServiceEntry((org.huihoo.jfox.soaf.schema.service.ServiceEntry) value); |
|
| 89 |
} catch (java.lang.Exception ex) {
|
|
| 90 | 0 |
throw new IllegalStateException(ex.toString()); |
| 91 |
} |
|
| 92 |
} |
|
| 93 |
|
|
| 94 | 131 |
public java.lang.Object newInstance(java.lang.Object parent) {
|
| 95 | 131 |
return new org.huihoo.jfox.soaf.schema.service.ServiceEntry(); |
| 96 |
} |
|
| 97 |
}); |
|
| 98 | 71 |
desc.setHandler(handler); |
| 99 | 71 |
desc.setMultivalued(true);
|
| 100 | 71 |
addFieldDescriptor(desc); |
| 101 |
|
|
| 102 |
//-- validation code for: _serviceEntryList
|
|
| 103 | 71 |
fieldValidator = new org.exolab.castor.xml.FieldValidator();
|
| 104 | 71 |
fieldValidator.setMinOccurs(0); |
| 105 |
{ //-- local scope
|
|
| 106 |
} |
|
| 107 | 71 |
desc.setValidator(fieldValidator); |
| 108 |
} |
|
| 109 |
|
|
| 110 |
/**
|
|
| 111 |
* Method getAccessMode
|
|
| 112 |
*/
|
|
| 113 | 0 |
public org.exolab.castor.mapping.AccessMode getAccessMode() {
|
| 114 | 0 |
return null; |
| 115 |
} |
|
| 116 |
|
|
| 117 |
/**
|
|
| 118 |
* Method getExtends
|
|
| 119 |
*/
|
|
| 120 | 0 |
public org.exolab.castor.mapping.ClassDescriptor getExtends() {
|
| 121 | 0 |
return null; |
| 122 |
} |
|
| 123 |
|
|
| 124 |
/**
|
|
| 125 |
* Method getIdentity
|
|
| 126 |
*/
|
|
| 127 | 0 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
|
| 128 | 0 |
return identity;
|
| 129 |
} |
|
| 130 |
|
|
| 131 |
/**
|
|
| 132 |
* Method getJavaClass
|
|
| 133 |
*/
|
|
| 134 | 71 |
public java.lang.Class getJavaClass() {
|
| 135 | 71 |
return org.huihoo.jfox.soaf.schema.service.Service.class; |
| 136 |
} |
|
| 137 |
|
|
| 138 |
/**
|
|
| 139 |
* Method getNameSpacePrefix
|
|
| 140 |
*/
|
|
| 141 | 0 |
public java.lang.String getNameSpacePrefix() {
|
| 142 | 0 |
return nsPrefix;
|
| 143 |
} |
|
| 144 |
|
|
| 145 |
/**
|
|
| 146 |
* Method getNameSpaceURI
|
|
| 147 |
*/
|
|
| 148 | 0 |
public java.lang.String getNameSpaceURI() {
|
| 149 | 0 |
return nsURI;
|
| 150 |
} |
|
| 151 |
|
|
| 152 |
/**
|
|
| 153 |
* Method getValidator
|
|
| 154 |
*/
|
|
| 155 | 71 |
public org.exolab.castor.xml.TypeValidator getValidator() {
|
| 156 | 71 |
return this; |
| 157 |
} |
|
| 158 |
|
|
| 159 |
/**
|
|
| 160 |
* Method getXMLName
|
|
| 161 |
*/
|
|
| 162 | 0 |
public java.lang.String getXMLName() {
|
| 163 | 0 |
return xmlName;
|
| 164 |
} |
|
| 165 |
|
|
| 166 |
} |
|
||||||||||