1 19 20 24 25 package org.netbeans.modules.j2ee.sun.validation.samples.simple.beans; 26 27 import org.w3c.dom.*; 28 import org.netbeans.modules.schema2beans.*; 29 import java.beans.*; 30 import java.util.*; 31 32 34 public class ChildObjectThree extends org.netbeans.modules.schema2beans.BaseBean 35 { 36 37 static Vector comparators = new Vector(); 38 39 static public final String PROPERTY_ONE = "PropertyOne"; static public final String PROPERTY_TWO = "PropertyTwo"; 42 public ChildObjectThree() { 43 this(Common.USE_DEFAULT_VALUES); 44 } 45 46 public ChildObjectThree(int options) 47 { 48 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 49 this.createProperty("property-one", PROPERTY_ONE, 52 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 53 String .class); 54 this.createProperty("property-two", PROPERTY_TWO, 56 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 57 String .class); 58 this.initialize(options); 59 } 60 61 void initialize(int options) 63 { 64 65 } 66 67 public void setPropertyOne(String value) { 69 this.setValue(PROPERTY_ONE, value); 70 } 71 72 public String getPropertyOne() { 74 return (String )this.getValue(PROPERTY_ONE); 75 } 76 77 public void setPropertyTwo(String value) { 79 this.setValue(PROPERTY_TWO, value); 80 } 81 82 public String getPropertyTwo() { 84 return (String )this.getValue(PROPERTY_TWO); 85 } 86 87 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 89 comparators.add(c); 90 } 91 92 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 94 comparators.remove(c); 95 } 96 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 97 boolean restrictionFailure = false; 98 if (getPropertyOne() != null) { 100 } 101 if (getPropertyTwo() != null) { 103 } 104 } 105 106 public void dump(StringBuffer str, String indent){ 108 String s; 109 Object o; 110 org.netbeans.modules.schema2beans.BaseBean n; 111 str.append(indent); 112 str.append("PropertyOne"); str.append(indent+"\t"); str.append("<"); s = this.getPropertyOne(); 116 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(PROPERTY_ONE, 0, str, indent); 119 120 str.append(indent); 121 str.append("PropertyTwo"); str.append(indent+"\t"); str.append("<"); s = this.getPropertyTwo(); 125 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(PROPERTY_TWO, 0, str, indent); 128 129 } 130 public String dumpBeanNode(){ 131 StringBuffer str = new StringBuffer (); 132 str.append("ChildObjectThree\n"); this.dump(str, "\n "); return str.toString(); 135 }} 136 137 139 140 233 | Popular Tags |