1 17 18 package javax.servlet.jsp.tagext; 19 20 import javax.servlet.jsp.tagext.TagInfo ; 21 import javax.servlet.jsp.tagext.TagFileInfo ; 22 23 32 33 abstract public class TagLibraryInfo { 34 35 44 protected TagLibraryInfo(String prefix, String uri) { 45 this.prefix = prefix; 46 this.uri = uri; 47 } 48 49 51 57 58 public String getURI() { 59 return uri; 60 } 61 62 67 68 public String getPrefixString() { 69 return prefix; 70 } 71 72 74 81 public String getShortName() { 82 return shortname; 83 } 84 85 92 public String getReliableURN() { 93 return urn; 94 } 95 96 97 102 103 public String getInfoString() { 104 return info; 105 } 106 107 108 114 115 public String getRequiredVersion() { 116 return jspversion; 117 } 118 119 120 127 public TagInfo [] getTags() { 128 return tags; 129 } 130 131 139 public TagFileInfo [] getTagFiles() { 140 return tagFiles; 141 } 142 143 144 152 153 public TagInfo getTag(String shortname) { 154 TagInfo tags[] = getTags(); 155 156 if (tags == null || tags.length == 0) { 157 return null; 158 } 159 160 for (int i=0; i < tags.length; i++) { 161 if (tags[i].getTagName().equals(shortname)) { 162 return tags[i]; 163 } 164 } 165 return null; 166 } 167 168 177 public TagFileInfo getTagFile(String shortname) { 178 TagFileInfo tagFiles[] = getTagFiles(); 179 180 if (tagFiles == null || tagFiles.length == 0) { 181 return null; 182 } 183 184 for (int i=0; i < tagFiles.length; i++) { 185 if (tagFiles[i].getName().equals(shortname)) { 186 return tagFiles[i]; 187 } 188 } 189 return null; 190 } 191 192 199 public FunctionInfo [] getFunctions() { 200 return functions; 201 } 202 203 204 213 public FunctionInfo getFunction(String name) { 214 215 if (functions == null || functions.length == 0) { 216 System.err.println("No functions"); 217 return null; 218 } 219 220 for (int i=0; i < functions.length; i++) { 221 if (functions[i].getName().equals(name)) { 222 return functions[i]; 223 } 224 } 225 return null; 226 } 227 228 229 242 public abstract javax.servlet.jsp.tagext.TagLibraryInfo [] getTagLibraryInfos(); 243 244 245 247 250 protected String prefix; 251 252 256 protected String uri; 257 258 261 protected TagInfo [] tags; 262 263 268 protected TagFileInfo [] tagFiles; 269 270 275 protected FunctionInfo [] functions; 276 277 279 282 protected String tlibversion; 284 287 protected String jspversion; 289 292 protected String shortname; 294 297 protected String urn; 299 302 protected String info; } 304 | Popular Tags |