1 /*** 2 * Copyright 2004 Fabrizio Giustina. 3 * 4 * Licensed under the Artistic License; you may not use this file 5 * except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://maven-taglib.sourceforge.net/license.html 9 * 10 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR 11 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 12 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 13 */ 14 package net.sf.maventaglib.checker; 15 16 17 import org.apache.commons.lang.builder.ToStringBuilder; 18 import org.apache.commons.lang.builder.ToStringStyle; 19 20 21 /*** 22 * Contains information about a single tag library. 23 * @author Fabrizio Giustina 24 * @version $Revision $ ($Author $) 25 */ 26 public class Tld 27 { 28 29 /*** 30 * tag library shortname. 31 */ 32 private String name; 33 34 /*** 35 * tld file name. 36 */ 37 private String filename; 38 39 /*** 40 * List of tags. 41 */ 42 private Tag[] tags; 43 44 /*** 45 * @return Returns the filename. 46 */ 47 public String getFilename() 48 { 49 return this.filename; 50 } 51 52 /*** 53 * @param file The filename to set. 54 */ 55 public void setFilename(String file) 56 { 57 this.filename = file; 58 } 59 60 /*** 61 * Returns the shortname for this library. 62 * @return shortname for this tag library 63 */ 64 public String getName() 65 { 66 return this.name; 67 } 68 69 /*** 70 * Sets the shortname for this library. 71 * @param tagLibName shortname for this tag library. 72 */ 73 public void setName(String tagLibName) 74 { 75 this.name = tagLibName; 76 } 77 78 /*** 79 * Returnss the list of tags in this tag library. 80 * @return list of tags in this tag library 81 */ 82 public Tag[] getTags() 83 { 84 return this.tags; 85 } 86 87 /*** 88 * Sets the list of tags in this tag library. 89 * @param tagList list of tags in this tag library 90 */ 91 public void setTags(Tag[] tagList) 92 { 93 this.tags = tagList; 94 } 95 96 /*** 97 * @see java.lang.Object#toString() 98 */ 99 public String toString() 100 { 101 return new ToStringBuilder(this, ToStringStyle.SIMPLE_STYLE) 102 .append("name", this.name) 103 .append("tags", this.tags) 104 .toString(); 105 } 106 }