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 WebservicesType 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 WEBSERVICE_DESCRIPTION = "WebserviceDescription"; 37 public WebservicesType() { 38 this(Common.USE_DEFAULT_VALUES); 39 } 40 41 public WebservicesType(int options) 42 { 43 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 44 this.createProperty("description", DESCRIPTION, 47 Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY, 48 java.lang.String .class); 49 this.createAttribute(DESCRIPTION, "id", "Id", 50 AttrProp.CDATA | AttrProp.IMPLIED, 51 null, null); 52 this.createAttribute(DESCRIPTION, "xml:lang", "XmlLang", 53 AttrProp.CDATA | AttrProp.IMPLIED, 54 null, null); 55 this.createProperty("display-name", DISPLAY_NAME, 57 Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY, 58 java.lang.String .class); 59 this.createAttribute(DISPLAY_NAME, "id", "Id", 60 AttrProp.CDATA | AttrProp.IMPLIED, 61 null, null); 62 this.createAttribute(DISPLAY_NAME, "xml:lang", "XmlLang", 63 AttrProp.CDATA | AttrProp.IMPLIED, 64 null, null); 65 this.createProperty("icon", ICON, 67 Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 68 IconType.class); 69 this.createAttribute(ICON, "xml:lang", "XmlLang", 70 AttrProp.CDATA | AttrProp.IMPLIED, 71 null, null); 72 this.createAttribute(ICON, "id", "Id", 73 AttrProp.CDATA | AttrProp.IMPLIED, 74 null, null); 75 this.createProperty("webservice-description", WEBSERVICE_DESCRIPTION, 77 Common.TYPE_1_N | Common.TYPE_BEAN | Common.TYPE_KEY, 78 WebserviceDescriptionType.class); 79 this.createAttribute(WEBSERVICE_DESCRIPTION, "id", "Id", 80 AttrProp.CDATA | AttrProp.IMPLIED, 81 null, null); 82 this.initialize(options); 83 } 84 85 void initialize(int options) 87 { 88 89 } 90 91 public void setDescription(int index, java.lang.String value) { 93 this.setValue(DESCRIPTION, index, value); 94 } 95 96 public java.lang.String getDescription(int index) { 98 return (java.lang.String )this.getValue(DESCRIPTION, index); 99 } 100 101 public void setDescription(java.lang.String [] value) { 103 this.setValue(DESCRIPTION, value); 104 } 105 106 public java.lang.String [] getDescription() { 108 return (java.lang.String [])this.getValues(DESCRIPTION); 109 } 110 111 public int sizeDescription() { 113 return this.size(DESCRIPTION); 114 } 115 116 public int addDescription(java.lang.String value) { 118 return this.addValue(DESCRIPTION, value); 119 } 120 121 public int removeDescription(java.lang.String value) { 126 return this.removeValue(DESCRIPTION, value); 127 } 128 129 public void setDisplayName(int index, java.lang.String value) { 131 this.setValue(DISPLAY_NAME, index, value); 132 } 133 134 public java.lang.String getDisplayName(int index) { 136 return (java.lang.String )this.getValue(DISPLAY_NAME, index); 137 } 138 139 public void setDisplayName(java.lang.String [] value) { 141 this.setValue(DISPLAY_NAME, value); 142 } 143 144 public java.lang.String [] getDisplayName() { 146 return (java.lang.String [])this.getValues(DISPLAY_NAME); 147 } 148 149 public int sizeDisplayName() { 151 return this.size(DISPLAY_NAME); 152 } 153 154 public int addDisplayName(java.lang.String value) { 156 return this.addValue(DISPLAY_NAME, value); 157 } 158 159 public int removeDisplayName(java.lang.String value) { 164 return this.removeValue(DISPLAY_NAME, value); 165 } 166 167 public void setIcon(int index, IconType value) { 169 this.setValue(ICON, index, value); 170 } 171 172 public IconType getIcon(int index) { 174 return (IconType)this.getValue(ICON, index); 175 } 176 177 public void setIcon(IconType[] value) { 179 this.setValue(ICON, value); 180 } 181 182 public IconType[] getIcon() { 184 return (IconType[])this.getValues(ICON); 185 } 186 187 public int sizeIcon() { 189 return this.size(ICON); 190 } 191 192 public int addIcon(com.sun.enterprise.tools.common.dd.webservice.IconType value) { 194 return this.addValue(ICON, value); 195 } 196 197 public int removeIcon(com.sun.enterprise.tools.common.dd.webservice.IconType value) { 202 return this.removeValue(ICON, value); 203 } 204 205 public void setWebserviceDescription(int index, WebserviceDescriptionType value) { 207 this.setValue(WEBSERVICE_DESCRIPTION, index, value); 208 } 209 210 public WebserviceDescriptionType getWebserviceDescription(int index) { 212 return (WebserviceDescriptionType)this.getValue(WEBSERVICE_DESCRIPTION, index); 213 } 214 215 public void setWebserviceDescription(WebserviceDescriptionType[] value) { 217 this.setValue(WEBSERVICE_DESCRIPTION, value); 218 } 219 220 public WebserviceDescriptionType[] getWebserviceDescription() { 222 return (WebserviceDescriptionType[])this.getValues(WEBSERVICE_DESCRIPTION); 223 } 224 225 public int sizeWebserviceDescription() { 227 return this.size(WEBSERVICE_DESCRIPTION); 228 } 229 230 public int addWebserviceDescription(com.sun.enterprise.tools.common.dd.webservice.WebserviceDescriptionType value) { 232 return this.addValue(WEBSERVICE_DESCRIPTION, value); 233 } 234 235 public int removeWebserviceDescription(com.sun.enterprise.tools.common.dd.webservice.WebserviceDescriptionType value) { 240 return this.removeValue(WEBSERVICE_DESCRIPTION, value); 241 } 242 243 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 245 comparators.add(c); 246 } 247 248 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 250 comparators.remove(c); 251 } 252 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 253 } 254 255 public void dump(StringBuffer str, String indent){ 257 String s; 258 Object o; 259 org.netbeans.modules.schema2beans.BaseBean n; 260 str.append(indent); 261 str.append("Description["+this.sizeDescription()+"]"); for(int i=0; i<this.sizeDescription(); i++) 263 { 264 str.append(indent+"\t"); 265 str.append("#"+i+":"); 266 str.append(indent+"\t"); str.append("<"); s = this.getDescription(i); 269 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DESCRIPTION, i, str, indent); 272 } 273 274 str.append(indent); 275 str.append("DisplayName["+this.sizeDisplayName()+"]"); for(int i=0; i<this.sizeDisplayName(); i++) 277 { 278 str.append(indent+"\t"); 279 str.append("#"+i+":"); 280 str.append(indent+"\t"); str.append("<"); s = this.getDisplayName(i); 283 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DISPLAY_NAME, i, str, indent); 286 } 287 288 str.append(indent); 289 str.append("Icon["+this.sizeIcon()+"]"); for(int i=0; i<this.sizeIcon(); i++) 291 { 292 str.append(indent+"\t"); 293 str.append("#"+i+":"); 294 n = (org.netbeans.modules.schema2beans.BaseBean) this.getIcon(i); 295 if (n != null) 296 n.dump(str, indent + "\t"); else 298 str.append(indent+"\tnull"); this.dumpAttributes(ICON, i, str, indent); 300 } 301 302 str.append(indent); 303 str.append("WebserviceDescription["+this.sizeWebserviceDescription()+"]"); for(int i=0; i<this.sizeWebserviceDescription(); i++) 305 { 306 str.append(indent+"\t"); 307 str.append("#"+i+":"); 308 n = (org.netbeans.modules.schema2beans.BaseBean) this.getWebserviceDescription(i); 309 if (n != null) 310 n.dump(str, indent + "\t"); else 312 str.append(indent+"\tnull"); this.dumpAttributes(WEBSERVICE_DESCRIPTION, i, str, indent); 314 } 315 316 } 317 public String dumpBeanNode(){ 318 StringBuffer str = new StringBuffer (); 319 str.append("WebservicesType\n"); this.dump(str, "\n "); return str.toString(); 322 }} 323 324 326 327 349 | Popular Tags |