1 /* 2 * The MIT License 3 * Copyright © 2004-2014 Fabrizio Giustina 4 * Copyright © 2022-2022 Web-Legacy 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights 9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 * copies of the Software, and to permit persons to whom the Software is 11 * furnished to do so, subject to the following conditions: 12 * 13 * The above copyright notice and this permission notice shall be included in 14 * all copies or substantial portions of the Software. 15 * 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 * THE SOFTWARE. 23 */ 24 package net.sf.maventaglib.checker; 25 26 import org.apache.commons.lang3.builder.ToStringBuilder; 27 import org.apache.commons.lang3.builder.ToStringStyle; 28 29 30 /** 31 * Contains information about a single tag library. 32 * @author Fabrizio Giustina 33 * @version $Revision $ ($Author $) 34 */ 35 public class Tld 36 { 37 38 /** 39 * tag library shortname. 40 */ 41 private String name; 42 43 /** 44 * tag library shortname. 45 */ 46 private String shortname; 47 48 /** 49 * tld file name. 50 */ 51 private String filename; 52 53 /** 54 * tlibversion. 55 */ 56 private String tlibversion; 57 58 /** 59 * taglib uri. 60 */ 61 private String uri; 62 63 /** 64 * info/description. 65 */ 66 private String info; 67 68 /** 69 * List of tags. 70 */ 71 private Tag[] tags; 72 73 /** 74 * List of tagfiles. 75 */ 76 private TagFile[] tagfiles; 77 78 /** 79 * List of EL Functions 80 */ 81 private ELFunction[] functions; 82 83 /** 84 * @return Returns the filename. 85 */ 86 public String getFilename() 87 { 88 return this.filename; 89 } 90 91 /** 92 * @param file The filename to set. 93 */ 94 public void setFilename( String file ) 95 { 96 this.filename = file; 97 } 98 99 /** 100 * Returns the shortname for this library. 101 * @return shortname for this tag library 102 */ 103 public String getName() 104 { 105 return this.name; 106 } 107 108 /** 109 * Sets the shortname for this library. 110 * @param tagLibName shortname for this tag library. 111 */ 112 public void setName( String tagLibName ) 113 { 114 this.name = tagLibName; 115 } 116 117 /** 118 * Returnss the list of tags in this tag library. 119 * @return list of tags in this tag library 120 */ 121 public Tag[] getTags() 122 { 123 return this.tags; 124 } 125 126 /** 127 * Getter for <code>uri</code>. 128 * @return Returns the uri. 129 */ 130 public String getUri() 131 { 132 return this.uri; 133 } 134 135 /** 136 * Setter for <code>uri</code>. 137 * @param uri The uri to set. 138 */ 139 public void setUri( String uri ) 140 { 141 this.uri = uri; 142 } 143 144 /** 145 * Sets the list of tags in this tag library. 146 * @param tagList list of tags in this tag library 147 */ 148 public void setTags( Tag[] tagList ) 149 { 150 this.tags = tagList; 151 } 152 153 /** 154 * @see java.lang.Object#toString() 155 */ 156 @Override 157 public String toString() 158 { 159 return new ToStringBuilder( this, ToStringStyle.SIMPLE_STYLE ).append( "name", this.name ).append( "tags", //$NON-NLS-1$ //$NON-NLS-2$ 160 this.tags ) 161 .toString(); 162 } 163 164 /** 165 * Getter for <code>shortname</code>. 166 * @return Returns the shortname. 167 */ 168 public String getShortname() 169 { 170 return this.shortname; 171 } 172 173 /** 174 * Setter for <code>shortname</code>. 175 * @param shortname The shortname to set. 176 */ 177 public void setShortname( String shortname ) 178 { 179 this.shortname = shortname; 180 } 181 182 /** 183 * Getter for <code>info</code>. 184 * @return Returns the info. 185 */ 186 public String getInfo() 187 { 188 return this.info; 189 } 190 191 /** 192 * Setter for <code>info</code>. 193 * @param info The info to set. 194 */ 195 public void setInfo( String info ) 196 { 197 this.info = info; 198 } 199 200 /** 201 * Getter for <code>tlibversion</code>. 202 * @return Returns the tlibversion. 203 */ 204 public String getTlibversion() 205 { 206 return this.tlibversion; 207 } 208 209 /** 210 * Setter for <code>tlibversion</code>. 211 * @param tlibversion The tlibversion to set. 212 */ 213 public void setTlibversion( String tlibversion ) 214 { 215 this.tlibversion = tlibversion; 216 } 217 218 /** 219 * Returns the functions. 220 * @return the functions 221 */ 222 public ELFunction[] getFunctions() 223 { 224 return functions; 225 } 226 227 /** 228 * Sets the functions. 229 * @param functions the functions to set 230 */ 231 public void setFunctions(ELFunction[] functions) 232 { 233 this.functions = functions; 234 } 235 236 /** 237 * Returns the tagfiles. 238 * @return the tagfiles 239 */ 240 public TagFile[] getTagfiles() 241 { 242 return tagfiles; 243 } 244 245 /** 246 * Sets the tagfiles. 247 * @param tagfiles the tagfiles to set 248 */ 249 public void setTagfiles(TagFile[] tagfiles) 250 { 251 this.tagfiles = tagfiles; 252 } 253 254 }