1 19 26 27 package org.netbeans.modules.j2ee.sun.share.plan; 28 29 import org.w3c.dom.*; 30 import org.netbeans.modules.schema2beans.*; 31 import java.beans.*; 32 import java.util.*; 33 34 36 public class FileEntry extends org.netbeans.modules.schema2beans.BaseBean 37 { 38 39 static Vector comparators = new Vector(); 40 private static final org.netbeans.modules.schema2beans.Version runtimeVersion = new org.netbeans.modules.schema2beans.Version(3, 6, 1); 41 42 static public final String NAME = "Name"; static public final String CONTENT = "Content"; static public final String URI = "Uri"; 46 public FileEntry() { 47 this(Common.USE_DEFAULT_VALUES); 48 } 49 50 public FileEntry(int options) 51 { 52 super(comparators, runtimeVersion); 53 initPropertyTables(3); 55 this.createProperty("name", NAME, Common.TYPE_VETOABLE | 57 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 58 String .class); 59 this.createProperty("content", CONTENT, Common.TYPE_VETOABLE | 61 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 62 String .class); 63 this.createProperty("uri", URI, Common.TYPE_VETOABLE | 65 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 66 String .class); 67 this.initialize(options); 68 } 69 70 void initialize(int options) { 72 73 } 74 75 public void setName(String value) throws java.beans.PropertyVetoException { 77 try 78 { 79 this.setValue(NAME, value); 80 } 81 catch(BaseProperty.VetoException ve) 82 { 83 throw ve.getPropertyVetoException(); 84 } 85 } 86 87 public String getName() { 89 return (String )this.getValue(NAME); 90 } 91 92 public void setContent(String value) throws java.beans.PropertyVetoException { 94 try 95 { 96 this.setValue(CONTENT, value); 97 } 98 catch(BaseProperty.VetoException ve) 99 { 100 throw ve.getPropertyVetoException(); 101 } 102 } 103 104 public String getContent() { 106 return (String )this.getValue(CONTENT); 107 } 108 109 public void setUri(String value) throws java.beans.PropertyVetoException { 111 try 112 { 113 this.setValue(URI, value); 114 } 115 catch(BaseProperty.VetoException ve) 116 { 117 throw ve.getPropertyVetoException(); 118 } 119 } 120 121 public String getUri() { 123 return (String )this.getValue(URI); 124 } 125 126 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 128 comparators.add(c); 129 } 130 131 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 133 comparators.remove(c); 134 } 135 public void addVetoableChangeListener(String n, java.beans.VetoableChangeListener l) { 137 BeanProp p = this.beanProp(n); 138 if (p != null) 139 p.addVCListener(l); 140 } 141 142 public void removeVetoableChangeListener(String n, java.beans.VetoableChangeListener l) { 144 BeanProp p = this.beanProp(n); 145 if (p != null) 146 p.removeVCListener(l); 147 } 148 149 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 150 } 151 152 public void dump(StringBuffer str, String indent){ 154 String s; 155 Object o; 156 org.netbeans.modules.schema2beans.BaseBean n; 157 str.append(indent); 158 str.append("Name"); str.append(indent+"\t"); str.append("<"); o = this.getName(); 162 str.append((o==null?"null":o.toString().trim())); str.append(">\n"); this.dumpAttributes(NAME, 0, str, indent); 165 166 str.append(indent); 167 str.append("Content"); str.append(indent+"\t"); str.append("<"); o = this.getContent(); 171 str.append((o==null?"null":o.toString().trim())); str.append(">\n"); this.dumpAttributes(CONTENT, 0, str, indent); 174 175 str.append(indent); 176 str.append("Uri"); str.append(indent+"\t"); str.append("<"); o = this.getUri(); 180 str.append((o==null?"null":o.toString().trim())); str.append(">\n"); this.dumpAttributes(URI, 0, str, indent); 183 184 } 185 public String dumpBeanNode(){ 186 StringBuffer str = new StringBuffer (); 187 str.append("FileEntry\n"); this.dump(str, "\n "); return str.toString(); 190 }} 191 192 194 195 217 218 | Popular Tags |