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 MessageDestinationType 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 MESSAGE_DESTINATION_NAME = "MessageDestinationName"; 37 public MessageDestinationType() { 38 this(Common.USE_DEFAULT_VALUES); 39 } 40 41 public MessageDestinationType(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("message-destination-name", MESSAGE_DESTINATION_NAME, 77 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 78 java.lang.String .class); 79 this.createAttribute(MESSAGE_DESTINATION_NAME, "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 setMessageDestinationName(java.lang.String value) { 207 this.setValue(MESSAGE_DESTINATION_NAME, value); 208 } 209 210 public java.lang.String getMessageDestinationName() { 212 return (java.lang.String )this.getValue(MESSAGE_DESTINATION_NAME); 213 } 214 215 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 217 comparators.add(c); 218 } 219 220 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 222 comparators.remove(c); 223 } 224 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 225 } 226 227 public void dump(StringBuffer str, String indent){ 229 String s; 230 Object o; 231 org.netbeans.modules.schema2beans.BaseBean n; 232 str.append(indent); 233 str.append("Description["+this.sizeDescription()+"]"); for(int i=0; i<this.sizeDescription(); i++) 235 { 236 str.append(indent+"\t"); 237 str.append("#"+i+":"); 238 str.append(indent+"\t"); str.append("<"); s = this.getDescription(i); 241 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DESCRIPTION, i, str, indent); 244 } 245 246 str.append(indent); 247 str.append("DisplayName["+this.sizeDisplayName()+"]"); for(int i=0; i<this.sizeDisplayName(); i++) 249 { 250 str.append(indent+"\t"); 251 str.append("#"+i+":"); 252 str.append(indent+"\t"); str.append("<"); s = this.getDisplayName(i); 255 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DISPLAY_NAME, i, str, indent); 258 } 259 260 str.append(indent); 261 str.append("Icon["+this.sizeIcon()+"]"); for(int i=0; i<this.sizeIcon(); i++) 263 { 264 str.append(indent+"\t"); 265 str.append("#"+i+":"); 266 n = (org.netbeans.modules.schema2beans.BaseBean) this.getIcon(i); 267 if (n != null) 268 n.dump(str, indent + "\t"); else 270 str.append(indent+"\tnull"); this.dumpAttributes(ICON, i, str, indent); 272 } 273 274 str.append(indent); 275 str.append("MessageDestinationName"); str.append(indent+"\t"); str.append("<"); s = this.getMessageDestinationName(); 279 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(MESSAGE_DESTINATION_NAME, 0, str, indent); 282 283 } 284 public String dumpBeanNode(){ 285 StringBuffer str = new StringBuffer (); 286 str.append("MessageDestinationType\n"); this.dump(str, "\n "); return str.toString(); 289 }} 290 291 293 294 316 | Popular Tags |