1 32 33 package com.sun.enterprise.tools.common.dd.webservice; 34 35 import org.w3c.dom.*; 36 import org.netbeans.modules.schema2beans.*; 37 import java.beans.*; 38 import java.util.*; 39 40 42 public class ResourceRefType extends org.netbeans.modules.schema2beans.BaseBean 43 { 44 45 static Vector comparators = new Vector(); 46 47 static public final String DESCRIPTION = "Description"; static public final String RES_REF_NAME = "ResRefName"; static public final String RES_TYPE = "ResType"; static public final String RES_AUTH = "ResAuth"; static public final String RES_SHARING_SCOPE = "ResSharingScope"; 53 public ResourceRefType() { 54 this(Common.USE_DEFAULT_VALUES); 55 } 56 57 public ResourceRefType(int options) 58 { 59 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 60 this.createProperty("description", DESCRIPTION, 63 Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY, 64 java.lang.String .class); 65 this.createAttribute(DESCRIPTION, "id", "Id", 66 AttrProp.CDATA | AttrProp.IMPLIED, 67 null, null); 68 this.createAttribute(DESCRIPTION, "xml:lang", "XmlLang", 69 AttrProp.CDATA | AttrProp.IMPLIED, 70 null, null); 71 this.createProperty("res-ref-name", RES_REF_NAME, 73 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 74 java.lang.String .class); 75 this.createProperty("res-type", RES_TYPE, 77 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 78 java.lang.String .class); 79 this.createProperty("res-auth", RES_AUTH, 81 Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 82 java.lang.String .class); 83 this.createProperty("res-sharing-scope", RES_SHARING_SCOPE, 85 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 86 java.lang.String .class); 87 this.initialize(options); 88 } 89 90 void initialize(int options) 92 { 93 94 } 95 96 public void setDescription(int index, java.lang.String value) { 98 this.setValue(DESCRIPTION, index, value); 99 } 100 101 public java.lang.String getDescription(int index) { 103 return (java.lang.String )this.getValue(DESCRIPTION, index); 104 } 105 106 public void setDescription(java.lang.String [] value) { 108 this.setValue(DESCRIPTION, value); 109 } 110 111 public java.lang.String [] getDescription() { 113 return (java.lang.String [])this.getValues(DESCRIPTION); 114 } 115 116 public int sizeDescription() { 118 return this.size(DESCRIPTION); 119 } 120 121 public int addDescription(java.lang.String value) { 123 return this.addValue(DESCRIPTION, value); 124 } 125 126 public int removeDescription(java.lang.String value) { 131 return this.removeValue(DESCRIPTION, value); 132 } 133 134 public void setResRefName(java.lang.String value) { 136 this.setValue(RES_REF_NAME, value); 137 } 138 139 public java.lang.String getResRefName() { 141 return (java.lang.String )this.getValue(RES_REF_NAME); 142 } 143 144 public void setResType(java.lang.String value) { 146 this.setValue(RES_TYPE, value); 147 } 148 149 public java.lang.String getResType() { 151 return (java.lang.String )this.getValue(RES_TYPE); 152 } 153 154 public void setResAuth(java.lang.String value) { 156 this.setValue(RES_AUTH, value); 157 } 158 159 public java.lang.String getResAuth() { 161 return (java.lang.String )this.getValue(RES_AUTH); 162 } 163 164 public void setResSharingScope(java.lang.String value) { 166 this.setValue(RES_SHARING_SCOPE, value); 167 } 168 169 public java.lang.String getResSharingScope() { 171 return (java.lang.String )this.getValue(RES_SHARING_SCOPE); 172 } 173 174 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 176 comparators.add(c); 177 } 178 179 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 181 comparators.remove(c); 182 } 183 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 184 } 185 186 public void dump(StringBuffer str, String indent){ 188 String s; 189 Object o; 190 org.netbeans.modules.schema2beans.BaseBean n; 191 str.append(indent); 192 str.append("Description["+this.sizeDescription()+"]"); for(int i=0; i<this.sizeDescription(); i++) 194 { 195 str.append(indent+"\t"); 196 str.append("#"+i+":"); 197 str.append(indent+"\t"); str.append("<"); s = this.getDescription(i); 200 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DESCRIPTION, i, str, indent); 203 } 204 205 str.append(indent); 206 str.append("ResRefName"); str.append(indent+"\t"); str.append("<"); s = this.getResRefName(); 210 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(RES_REF_NAME, 0, str, indent); 213 214 str.append(indent); 215 str.append("ResType"); str.append(indent+"\t"); str.append("<"); s = this.getResType(); 219 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(RES_TYPE, 0, str, indent); 222 223 str.append(indent); 224 str.append("ResAuth"); str.append(indent+"\t"); str.append("<"); s = this.getResAuth(); 228 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(RES_AUTH, 0, str, indent); 231 232 str.append(indent); 233 str.append("ResSharingScope"); str.append(indent+"\t"); str.append("<"); s = this.getResSharingScope(); 237 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(RES_SHARING_SCOPE, 0, str, indent); 240 241 } 242 public String dumpBeanNode(){ 243 StringBuffer str = new StringBuffer (); 244 str.append("ResourceRefType\n"); this.dump(str, "\n "); return str.toString(); 247 }} 248 249 251 252 274 | Popular Tags |