1 23 24 29 30 package com.sun.enterprise.tools.common.dd.webapp; 31 32 import org.w3c.dom.*; 33 import org.netbeans.modules.schema2beans.*; 34 import java.beans.*; 35 import java.util.*; 36 37 39 public class LocaleCharsetMap extends com.sun.enterprise.tools.common.dd.SunBaseBean 40 { 41 42 static Vector comparators = new Vector(); 43 44 static public final String LOCALE = "Locale"; static public final String AGENT = "Agent"; static public final String CHARSET = "Charset"; static public final String DESCRIPTION = "Description"; 49 public LocaleCharsetMap() { 50 this(Common.USE_DEFAULT_VALUES); 51 } 52 53 public LocaleCharsetMap(int options) 54 { 55 super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0)); 56 this.createProperty("description", DESCRIPTION, 59 Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 60 String .class); 61 this.initialize(options); 62 } 63 64 void initialize(int options) 66 { 67 68 } 69 70 public void setLocale(java.lang.String value) { 72 setAttributeValue(LOCALE, value); 73 } 74 75 public java.lang.String getLocale() { 77 return getAttributeValue(LOCALE); 78 } 79 80 public void setAgent(java.lang.String value) { 82 setAttributeValue(AGENT, value); 83 } 84 85 public java.lang.String getAgent() { 87 return getAttributeValue(AGENT); 88 } 89 90 public void setCharset(java.lang.String value) { 92 setAttributeValue(CHARSET, value); 93 } 94 95 public java.lang.String getCharset() { 97 return getAttributeValue(CHARSET); 98 } 99 100 public void setDescription(String value) { 102 this.setValue(DESCRIPTION, value); 103 } 104 105 public String getDescription() { 107 return (String )this.getValue(DESCRIPTION); 108 } 109 110 public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 112 comparators.add(c); 113 } 114 115 public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) { 117 comparators.remove(c); 118 } 119 public void validate() throws org.netbeans.modules.schema2beans.ValidateException { 120 boolean restrictionFailure = false; 121 if (getLocale() == null) { 123 throw new org.netbeans.modules.schema2beans.ValidateException("getLocale() == null", "locale", this); } 125 if (getAgent() != null) { 127 } 128 if (getCharset() == null) { 130 throw new org.netbeans.modules.schema2beans.ValidateException("getCharset() == null", "charset", this); } 132 if (getDescription() != null) { 134 } 135 } 136 137 public void dump(StringBuffer str, String indent){ 139 String s; 140 Object o; 141 org.netbeans.modules.schema2beans.BaseBean n; 142 str.append(indent); 143 str.append("Description"); str.append(indent+"\t"); str.append("<"); s = this.getDescription(); 147 str.append((s==null?"null":s.trim())); str.append(">\n"); this.dumpAttributes(DESCRIPTION, 0, str, indent); 150 151 } 152 public String dumpBeanNode(){ 153 StringBuffer str = new StringBuffer (); 154 str.append("LocaleCharsetMap\n"); this.dump(str, "\n "); return str.toString(); 157 }} 158 159 161 162 629 | Popular Tags |