1 19 20 package org.netbeans.modules.web.monitor.data; 21 22 import org.w3c.dom.*; 23 import org.netbeans.modules.schema2beans.*; 24 import java.beans.*; 25 import java.util.*; 26 27 public class Dispatches extends BaseBean { 28 29 static Vector comparators = new Vector(); 30 31 static public final String DISPATCHDATA = "DispatchData"; 33 public Dispatches() { 34 this(Common.USE_DEFAULT_VALUES); 35 } 36 37 public Dispatches(int options) { 38 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 0, 8)); 39 this.createProperty("DispatchData", DISPATCHDATA, 42 Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 43 DispatchData.class); 44 this.createAttribute(DISPATCHDATA, "resource", "Resource", AttrProp.CDATA | AttrProp.REQUIRED, 46 null, null); 47 this.initialize(options); 48 } 49 50 void initialize(int options) { } 52 53 public void setDispatchData(int index, DispatchData value) { 55 this.setValue(DISPATCHDATA, index, value); 56 } 57 58 public DispatchData getDispatchData(int index) { 60 return (DispatchData)this.getValue(DISPATCHDATA, index); 61 } 62 63 public void setDispatchData(DispatchData[] value) { 65 this.setValue(DISPATCHDATA, value); 66 } 67 68 public DispatchData[] getDispatchData() { 70 return (DispatchData[])this.getValues(DISPATCHDATA); 71 } 72 73 public int sizeDispatchData() { 75 return this.size(DISPATCHDATA); 76 } 77 78 public int addDispatchData(DispatchData value) { 80 return this.addValue(DISPATCHDATA, value); 81 } 82 83 public int removeDispatchData(DispatchData value) { 86 return this.removeValue(DISPATCHDATA, value); 87 } 88 89 public boolean verify() { 91 return true; 92 } 93 94 static public void addComparator(BeanComparator c) { 96 comparators.add(c); 97 } 98 99 static public void removeComparator(BeanComparator c) { 101 comparators.remove(c); 102 } 103 public void dump(StringBuffer str, String indent) { 105 String s; 106 Object o; 107 BaseBean n; 108 str.append(indent); 109 str.append("DispatchData["+this.sizeDispatchData()+"]"); for(int i=0; i<this.sizeDispatchData(); i++) { 111 str.append(indent+"\t"); str.append("#"+i+":"); n = this.getDispatchData(i); 114 if (n != null) 115 n.dump(str, indent + "\t"); else 117 str.append(indent+"\tnull"); this.dumpAttributes(DISPATCHDATA, i, str, indent); 119 } 120 121 } 122 public String dumpBeanNode() { 123 StringBuffer str = new StringBuffer (); 124 str.append("Dispatches\n"); this.dump(str, "\n "); return str.toString(); 127 } 128 } 129 130 131 132 | Popular Tags |