1 21 22 package com.sun.enterprise.tools.common.dd.webservice; 23 24 import org.w3c.dom.*; 25 import org.netbeans.modules.schema2beans.*; 26 import java.beans.*; 27 import java.util.*; 28 29 31 public class WebserviceDescriptionType extends org.netbeans.modules.schema2beans.BaseBean 32 { 33 34 static Vector comparators = new Vector(); 35 36 static public final String DESCRIPTION = "Description"; static public final String DISPLAY_NAME = "DisplayName"; static public final String ICON = "Icon"; static public final String WEBSERVICE_DESCRIPTION_NAME = "WebserviceDescriptionName"; static public final String WSDL_FILE = "WsdlFile"; static public final String JAXRPC_MAPPING_FILE = "JaxrpcMappingFile"; static public final String PORT_COMPONENT = "PortComponent"; 44 public WebserviceDescriptionType() { 45 this(Common.USE_DEFAULT_VALUES); 46 } 47 48 public WebserviceDescriptionType(int options) 49 { 50 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 51 this.createProperty("description", DESCRIPTION, 54 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 55 java.lang.String .class); 56 this.createAttribute(DESCRIPTION, "id", "Id", 57 AttrProp.CDATA | AttrProp.IMPLIED, 58 null, null); 59 this.createAttribute(DESCRIPTION, "xml:lang", "XmlLang", 60 AttrProp.CDATA | AttrProp.IMPLIED, 61 null, null); 62 this.createProperty("display-name", DISPLAY_NAME, 64 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 65 java.lang.String .class); 66 this.createAttribute(DISPLAY_NAME, "id", "Id", 67 AttrProp.CDATA | AttrProp.IMPLIED, 68 null, null); 69 this.createAttribute(DISPLAY_NAME, "xml:lang", "XmlLang", 70 AttrProp.CDATA | AttrProp.IMPLIED, 71 null, null); 72 this.createProperty("icon", ICON, 74 Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 75 IconType.class); 76 this.createAttribute(ICON, "xml:lang", "XmlLang", 77 AttrProp.CDATA | AttrProp.IMPLIED, 78 null, null); 79 this.createAttribute(ICON, "id", "Id", 80 AttrProp.CDATA | AttrProp.IMPLIED, 81 null, null); 82 this.createProperty("webservice-description-name", WEBSERVICE_DESCRIPTION_NAME, 84 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 85 java.lang.String .class); 86 this.createAttribute(WEBSERVICE_DESCRIPTION_NAME, "id", "Id", 87 AttrProp.CDATA | AttrProp.IMPLIED, 88 null, null); 89 this.createProperty("wsdl-file", WSDL_FILE, 91 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 92 java.lang.String .class); 93 this.createProperty("jaxrpc-mapping-file", JAXRPC_MAPPING_FILE, 95 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 96 java.lang.String .class); 97 this.createProperty("port-component", PORT_COMPONENT, 99 Common.TYPE_1_N | Common.TYPE_BEAN | Common.TYPE_KEY, 100 PortComponentType.class); 101 this.createAttribute(PORT_COMPONENT, "id", "Id", 102 AttrProp.CDATA | AttrProp.IMPLIED, 103 null, null); 104 this.initialize(options); 105 } 106 107 void initialize(int options) 109 { 110 111 } 112 113 public void setDescription(java.lang.String value) { 115 this.setValue(DESCRIPTION, value); 116 } 117 118 public java.lang.String getDescription() { 120 return (java.lang.String )this.getValue(DESCRIPTION); 121 } 122 123 public void setDisplayName(java.lang.String value) { 125 this.setValue(DISPLAY_NAME, value); 126 } 127 128 public java.lang.String getDisplayName() { 130 return (java.lang.String )this.getValue(DISPLAY_NAME); 131 } 132 133 public void setIcon(IconType value) { 135 this.setValue(ICON, value); 136 } 137 138 public IconType getIcon() { 140 return (IconType)this.getValue(ICON); 141 } 142 143 public void setWebserviceDescriptionName(java.lang.String value) { 145 this.setValue(WEBSERVICE_DESCRIPTION_NAME, value); 146 } 147 148 public java.lang.String getWebserviceDescriptionName() { 150 return (java.lang.String )this.getValue(WEBSERVICE_DESCRIPTION_NAME); 151 } 152 153 public void setWsdlFile(java.lang.String value) { 155 this.setValue(WSDL_FILE, value); 156 } 157 158 public java.lang.String getWsdlFile() { 160 return (java.lang.String )this.getValue(WSDL_FILE); 161 } 162 163 public void setJaxrpcMappingFile(java.lang.String value) { 165 this.setValue(JAXRPC_MAPPING_FILE, value); 166 } 167 168 public java.lang.String getJaxrpcMappingFile() { 170 return (java.lang.String )this.getValue(JAXRPC_MAPPING_FILE); 171 } 172 173 public void setPortComponent(int index, PortComponentType value) { 175 this.setValue(PORT_COMPONENT, index, value); 176 } 177 178 public PortComponentType getPortComponent(int index) { 180 return (PortComponentType)this.getValue(PORT_COMPONENT, index); 181 } 182 183 public void setPortComponent(PortComponentType[] value) { 185 this.setValue(PORT_COMPONENT, value); 186 } 187 188 public PortComponentType[] getPortComponent() { 190 return (PortComponentType[])this.getValues(PORT_COMPONENT); 191 } 192 193 public int sizePortComponent() { 195 return this.size(PORT_COMPONENT); 196 } 197 198 public int addPortComponent(com.sun.enterprise.tools.common.dd.webservice.PortComponentType value) { 200 return this.addValue(PORT_COMPONENT, value); 201 } 202 203 public int removePortComponent(com.sun.enterprise.tools.common.dd.webservice.PortComponentType value) { 208 return this.removeValue(PORT_COMPONENT, value); 209 } 210 211 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 213 comparators.add(c); 214 } 215 216 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 218 comparators.remove(c); 219 } 220 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 221 } 222 223 public void dump(StringBuffer str, String indent){ 225 String s; 226 Object o; 227 org.netbeans.modules.schema2beans.BaseBean n; 228 str.append(indent); 229 str.append("Description"); str.append(indent+"\t"); str.append("<"); s = this.getDescription(); 233 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DESCRIPTION, 0, str, indent); 236 237 str.append(indent); 238 str.append("DisplayName"); str.append(indent+"\t"); str.append("<"); s = this.getDisplayName(); 242 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DISPLAY_NAME, 0, str, indent); 245 246 str.append(indent); 247 str.append("Icon"); n = (org.netbeans.modules.schema2beans.BaseBean) this.getIcon(); 249 if (n != null) 250 n.dump(str, indent + "\t"); else 252 str.append(indent+"\tnull"); this.dumpAttributes(ICON, 0, str, indent); 254 255 str.append(indent); 256 str.append("WebserviceDescriptionName"); str.append(indent+"\t"); str.append("<"); s = this.getWebserviceDescriptionName(); 260 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(WEBSERVICE_DESCRIPTION_NAME, 0, str, indent); 263 264 str.append(indent); 265 str.append("WsdlFile"); str.append(indent+"\t"); str.append("<"); s = this.getWsdlFile(); 269 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(WSDL_FILE, 0, str, indent); 272 273 str.append(indent); 274 str.append("JaxrpcMappingFile"); str.append(indent+"\t"); str.append("<"); s = this.getJaxrpcMappingFile(); 278 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(JAXRPC_MAPPING_FILE, 0, str, indent); 281 282 str.append(indent); 283 str.append("PortComponent["+this.sizePortComponent()+"]"); for(int i=0; i<this.sizePortComponent(); i++) 285 { 286 str.append(indent+"\t"); 287 str.append("#"+i+":"); 288 n = (org.netbeans.modules.schema2beans.BaseBean) this.getPortComponent(i); 289 if (n != null) 290 n.dump(str, indent + "\t"); else 292 str.append(indent+"\tnull"); this.dumpAttributes(PORT_COMPONENT, i, str, indent); 294 } 295 296 } 297 public String dumpBeanNode(){ 298 StringBuffer str = new StringBuffer (); 299 str.append("WebserviceDescriptionType\n"); this.dump(str, "\n "); return str.toString(); 302 }} 303 304 306 307 329 | Popular Tags |