1 17 18 package com.sun.enterprise.tools.common.dd.webservice; 19 20 import org.w3c.dom.*; 21 import org.netbeans.modules.schema2beans.*; 22 import java.beans.*; 23 import java.util.*; 24 25 27 public class ServiceRefType extends org.netbeans.modules.schema2beans.BaseBean 28 { 29 30 static Vector comparators = new Vector(); 31 32 static public final String DESCRIPTION = "Description"; static public final String DISPLAY_NAME = "DisplayName"; static public final String ICON = "Icon"; static public final String SERVICE_REF_NAME = "ServiceRefName"; static public final String SERVICE_INTERFACE = "ServiceInterface"; static public final String WSDL_FILE = "WsdlFile"; static public final String JAXRPC_MAPPING_FILE = "JaxrpcMappingFile"; static public final String SERVICE_QNAME = "ServiceQname"; static public final String PORT_COMPONENT_REF = "PortComponentRef"; static public final String HANDLER = "Handler"; 43 public ServiceRefType() { 44 this(Common.USE_DEFAULT_VALUES); 45 } 46 47 public ServiceRefType(int options) 48 { 49 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 50 this.createProperty("description", DESCRIPTION, 53 Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY, 54 java.lang.String .class); 55 this.createAttribute(DESCRIPTION, "id", "Id", 56 AttrProp.CDATA | AttrProp.IMPLIED, 57 null, null); 58 this.createAttribute(DESCRIPTION, "xml:lang", "XmlLang", 59 AttrProp.CDATA | AttrProp.IMPLIED, 60 null, null); 61 this.createProperty("display-name", DISPLAY_NAME, 63 Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY, 64 java.lang.String .class); 65 this.createAttribute(DISPLAY_NAME, "id", "Id", 66 AttrProp.CDATA | AttrProp.IMPLIED, 67 null, null); 68 this.createAttribute(DISPLAY_NAME, "xml:lang", "XmlLang", 69 AttrProp.CDATA | AttrProp.IMPLIED, 70 null, null); 71 this.createProperty("icon", ICON, 73 Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 74 IconType.class); 75 this.createAttribute(ICON, "xml:lang", "XmlLang", 76 AttrProp.CDATA | AttrProp.IMPLIED, 77 null, null); 78 this.createAttribute(ICON, "id", "Id", 79 AttrProp.CDATA | AttrProp.IMPLIED, 80 null, null); 81 this.createProperty("service-ref-name", SERVICE_REF_NAME, 83 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 84 java.lang.String .class); 85 this.createProperty("service-interface", SERVICE_INTERFACE, 87 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 88 java.lang.String .class); 89 this.createProperty("wsdl-file", WSDL_FILE, 91 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 92 java.net.URI .class); 93 this.createAttribute(WSDL_FILE, "id", "Id", 94 AttrProp.CDATA | AttrProp.IMPLIED, 95 null, null); 96 this.createProperty("jaxrpc-mapping-file", JAXRPC_MAPPING_FILE, 98 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 99 java.lang.String .class); 100 this.createProperty("service-qname", SERVICE_QNAME, 102 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 103 javax.xml.namespace.QName .class); 104 this.createAttribute(SERVICE_QNAME, "id", "Id", 105 AttrProp.CDATA | AttrProp.IMPLIED, 106 null, null); 107 this.createProperty("port-component-ref", PORT_COMPONENT_REF, 109 Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 110 PortComponentRefType.class); 111 this.createAttribute(PORT_COMPONENT_REF, "id", "Id", 112 AttrProp.CDATA | AttrProp.IMPLIED, 113 null, null); 114 this.createProperty("handler", HANDLER, 116 Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 117 ServiceRefHandlerType.class); 118 this.createAttribute(HANDLER, "id", "Id", 119 AttrProp.CDATA | AttrProp.IMPLIED, 120 null, null); 121 this.initialize(options); 122 } 123 124 void initialize(int options) 126 { 127 128 } 129 130 public void setDescription(int index, java.lang.String value) { 132 this.setValue(DESCRIPTION, index, value); 133 } 134 135 public java.lang.String getDescription(int index) { 137 return (java.lang.String )this.getValue(DESCRIPTION, index); 138 } 139 140 public void setDescription(java.lang.String [] value) { 142 this.setValue(DESCRIPTION, value); 143 } 144 145 public java.lang.String [] getDescription() { 147 return (java.lang.String [])this.getValues(DESCRIPTION); 148 } 149 150 public int sizeDescription() { 152 return this.size(DESCRIPTION); 153 } 154 155 public int addDescription(java.lang.String value) { 157 return this.addValue(DESCRIPTION, value); 158 } 159 160 public int removeDescription(java.lang.String value) { 165 return this.removeValue(DESCRIPTION, value); 166 } 167 168 public void setDisplayName(int index, java.lang.String value) { 170 this.setValue(DISPLAY_NAME, index, value); 171 } 172 173 public java.lang.String getDisplayName(int index) { 175 return (java.lang.String )this.getValue(DISPLAY_NAME, index); 176 } 177 178 public void setDisplayName(java.lang.String [] value) { 180 this.setValue(DISPLAY_NAME, value); 181 } 182 183 public java.lang.String [] getDisplayName() { 185 return (java.lang.String [])this.getValues(DISPLAY_NAME); 186 } 187 188 public int sizeDisplayName() { 190 return this.size(DISPLAY_NAME); 191 } 192 193 public int addDisplayName(java.lang.String value) { 195 return this.addValue(DISPLAY_NAME, value); 196 } 197 198 public int removeDisplayName(java.lang.String value) { 203 return this.removeValue(DISPLAY_NAME, value); 204 } 205 206 public void setIcon(int index, IconType value) { 208 this.setValue(ICON, index, value); 209 } 210 211 public IconType getIcon(int index) { 213 return (IconType)this.getValue(ICON, index); 214 } 215 216 public void setIcon(IconType[] value) { 218 this.setValue(ICON, value); 219 } 220 221 public IconType[] getIcon() { 223 return (IconType[])this.getValues(ICON); 224 } 225 226 public int sizeIcon() { 228 return this.size(ICON); 229 } 230 231 public int addIcon(com.sun.enterprise.tools.common.dd.webservice.IconType value) { 233 return this.addValue(ICON, value); 234 } 235 236 public int removeIcon(com.sun.enterprise.tools.common.dd.webservice.IconType value) { 241 return this.removeValue(ICON, value); 242 } 243 244 public void setServiceRefName(java.lang.String value) { 246 this.setValue(SERVICE_REF_NAME, value); 247 } 248 249 public java.lang.String getServiceRefName() { 251 return (java.lang.String )this.getValue(SERVICE_REF_NAME); 252 } 253 254 public void setServiceInterface(java.lang.String value) { 256 this.setValue(SERVICE_INTERFACE, value); 257 } 258 259 public java.lang.String getServiceInterface() { 261 return (java.lang.String )this.getValue(SERVICE_INTERFACE); 262 } 263 264 public void setWsdlFile(java.net.URI value) { 266 this.setValue(WSDL_FILE, value); 267 } 268 269 public java.net.URI getWsdlFile() { 271 return (java.net.URI )this.getValue(WSDL_FILE); 272 } 273 274 public void setJaxrpcMappingFile(java.lang.String value) { 276 this.setValue(JAXRPC_MAPPING_FILE, value); 277 } 278 279 public java.lang.String getJaxrpcMappingFile() { 281 return (java.lang.String )this.getValue(JAXRPC_MAPPING_FILE); 282 } 283 284 public void setServiceQname(javax.xml.namespace.QName value) { 286 this.setValue(SERVICE_QNAME, value); 287 } 288 289 public javax.xml.namespace.QName getServiceQname() { 291 return (javax.xml.namespace.QName )this.getValue(SERVICE_QNAME); 292 } 293 294 public void setPortComponentRef(int index, PortComponentRefType value) { 296 this.setValue(PORT_COMPONENT_REF, index, value); 297 } 298 299 public PortComponentRefType getPortComponentRef(int index) { 301 return (PortComponentRefType)this.getValue(PORT_COMPONENT_REF, index); 302 } 303 304 public void setPortComponentRef(PortComponentRefType[] value) { 306 this.setValue(PORT_COMPONENT_REF, value); 307 } 308 309 public PortComponentRefType[] getPortComponentRef() { 311 return (PortComponentRefType[])this.getValues(PORT_COMPONENT_REF); 312 } 313 314 public int sizePortComponentRef() { 316 return this.size(PORT_COMPONENT_REF); 317 } 318 319 public int addPortComponentRef(com.sun.enterprise.tools.common.dd.webservice.PortComponentRefType value) { 321 return this.addValue(PORT_COMPONENT_REF, value); 322 } 323 324 public int removePortComponentRef(com.sun.enterprise.tools.common.dd.webservice.PortComponentRefType value) { 329 return this.removeValue(PORT_COMPONENT_REF, value); 330 } 331 332 public void setHandler(int index, ServiceRefHandlerType value) { 334 this.setValue(HANDLER, index, value); 335 } 336 337 public ServiceRefHandlerType getHandler(int index) { 339 return (ServiceRefHandlerType)this.getValue(HANDLER, index); 340 } 341 342 public void setHandler(ServiceRefHandlerType[] value) { 344 this.setValue(HANDLER, value); 345 } 346 347 public ServiceRefHandlerType[] getHandler() { 349 return (ServiceRefHandlerType[])this.getValues(HANDLER); 350 } 351 352 public int sizeHandler() { 354 return this.size(HANDLER); 355 } 356 357 public int addHandler(com.sun.enterprise.tools.common.dd.webservice.ServiceRefHandlerType value) { 359 return this.addValue(HANDLER, value); 360 } 361 362 public int removeHandler(com.sun.enterprise.tools.common.dd.webservice.ServiceRefHandlerType value) { 367 return this.removeValue(HANDLER, value); 368 } 369 370 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 372 comparators.add(c); 373 } 374 375 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 377 comparators.remove(c); 378 } 379 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 380 } 381 382 public void dump(StringBuffer str, String indent){ 384 String s; 385 Object o; 386 org.netbeans.modules.schema2beans.BaseBean n; 387 str.append(indent); 388 str.append("Description["+this.sizeDescription()+"]"); for(int i=0; i<this.sizeDescription(); i++) 390 { 391 str.append(indent+"\t"); 392 str.append("#"+i+":"); 393 str.append(indent+"\t"); str.append("<"); s = this.getDescription(i); 396 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DESCRIPTION, i, str, indent); 399 } 400 401 str.append(indent); 402 str.append("DisplayName["+this.sizeDisplayName()+"]"); for(int i=0; i<this.sizeDisplayName(); i++) 404 { 405 str.append(indent+"\t"); 406 str.append("#"+i+":"); 407 str.append(indent+"\t"); str.append("<"); s = this.getDisplayName(i); 410 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DISPLAY_NAME, i, str, indent); 413 } 414 415 str.append(indent); 416 str.append("Icon["+this.sizeIcon()+"]"); for(int i=0; i<this.sizeIcon(); i++) 418 { 419 str.append(indent+"\t"); 420 str.append("#"+i+":"); 421 n = (org.netbeans.modules.schema2beans.BaseBean) this.getIcon(i); 422 if (n != null) 423 n.dump(str, indent + "\t"); else 425 str.append(indent+"\tnull"); this.dumpAttributes(ICON, i, str, indent); 427 } 428 429 str.append(indent); 430 str.append("ServiceRefName"); str.append(indent+"\t"); str.append("<"); s = this.getServiceRefName(); 434 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(SERVICE_REF_NAME, 0, str, indent); 437 438 str.append(indent); 439 str.append("ServiceInterface"); str.append(indent+"\t"); str.append("<"); s = this.getServiceInterface(); 443 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(SERVICE_INTERFACE, 0, str, indent); 446 447 str.append(indent); 448 str.append("WsdlFile"); str.append(indent+"\t"); str.append("<"); o = this.getWsdlFile(); 452 str.append((o==null?"null":o.toString().trim())); str.append(">\n"); this.dumpAttributes(WSDL_FILE, 0, str, indent); 455 456 str.append(indent); 457 str.append("JaxrpcMappingFile"); str.append(indent+"\t"); str.append("<"); s = this.getJaxrpcMappingFile(); 461 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(JAXRPC_MAPPING_FILE, 0, str, indent); 464 465 str.append(indent); 466 str.append("ServiceQname"); str.append(indent+"\t"); str.append("<"); o = this.getServiceQname(); 470 str.append((o==null?"null":o.toString().trim())); str.append(">\n"); this.dumpAttributes(SERVICE_QNAME, 0, str, indent); 473 474 str.append(indent); 475 str.append("PortComponentRef["+this.sizePortComponentRef()+"]"); for(int i=0; i<this.sizePortComponentRef(); i++) 477 { 478 str.append(indent+"\t"); 479 str.append("#"+i+":"); 480 n = (org.netbeans.modules.schema2beans.BaseBean) this.getPortComponentRef(i); 481 if (n != null) 482 n.dump(str, indent + "\t"); else 484 str.append(indent+"\tnull"); this.dumpAttributes(PORT_COMPONENT_REF, i, str, indent); 486 } 487 488 str.append(indent); 489 str.append("Handler["+this.sizeHandler()+"]"); for(int i=0; i<this.sizeHandler(); i++) 491 { 492 str.append(indent+"\t"); 493 str.append("#"+i+":"); 494 n = (org.netbeans.modules.schema2beans.BaseBean) this.getHandler(i); 495 if (n != null) 496 n.dump(str, indent + "\t"); else 498 str.append(indent+"\tnull"); this.dumpAttributes(HANDLER, i, str, indent); 500 } 501 502 } 503 public String dumpBeanNode(){ 504 StringBuffer str = new StringBuffer (); 505 str.append("ServiceRefType\n"); this.dump(str, "\n "); return str.toString(); 508 }} 509 510 512 513 535 | Popular Tags |