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 tag. 23 * @author Fabrizio Giustina 24 * @version $Revision $ ($Author $) 25 */ 26 public class Tag 27 { 28 29 /*** 30 * tag name. 31 */ 32 private String name; 33 34 /*** 35 * tag class. 36 */ 37 private String tagClass; 38 39 /*** 40 * TEI (tag extra info) class. 41 */ 42 private String teiClass; 43 44 /*** 45 * list of attributes for this tag. 46 */ 47 private TagAttribute[] attributes; 48 49 /*** 50 * Returns the tag name. 51 * @return tag name 52 */ 53 public String getName() 54 { 55 return this.name; 56 } 57 58 /*** 59 * Sets the tag name. 60 * @param tagName tag name 61 */ 62 public void setName(String tagName) 63 { 64 this.name = tagName; 65 } 66 67 /*** 68 * @return Returns the attributes. 69 */ 70 public TagAttribute[] getAttributes() 71 { 72 return this.attributes; 73 } 74 75 /*** 76 * @param tagAttributes The attributes to set. 77 */ 78 public void setAttributes(TagAttribute[] tagAttributes) 79 { 80 this.attributes = tagAttributes; 81 } 82 83 /*** 84 * @return Returns the tagClass. 85 */ 86 public String getTagClass() 87 { 88 return this.tagClass; 89 } 90 91 /*** 92 * @param className The tagClass to set. 93 */ 94 public void setTagClass(String className) 95 { 96 this.tagClass = className; 97 } 98 /*** 99 * @return Returns the teiClass. 100 */ 101 public String getTeiClass() 102 { 103 return this.teiClass; 104 } 105 /*** 106 * @param className The teiClass to set. 107 */ 108 public void setTeiClass(String className) 109 { 110 this.teiClass = className; 111 } 112 113 /*** 114 * @see java.lang.Object#toString() 115 */ 116 public String toString() 117 { 118 return new ToStringBuilder(this, ToStringStyle.SIMPLE_STYLE).append("name", this.name).append( 119 "tagClass", 120 this.tagClass).append("teiClass", this.teiClass).append("attributes", this.attributes).toString(); 121 } 122 }