TableHeader.java
1 // HTMLParser Library $Name: v1_6_20060319 $ - A java-based parser for HTML 2 // http://sourceforge.org/projects/htmlparser 3 // Copyright (C) 2004 Pim Schrama 4 // 5 // Revision Control Information 6 // 7 // $Source: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tags/TableHeader.java,v $ 8 // $Author: ian_macfarlane $ 9 // $Date: 2005/10/31 16:26:11 $ 10 // $Revision: 1.3 $ 11 // 12 // This library is free software; you can redistribute it and/or 13 // modify it under the terms of the GNU Lesser General Public 14 // License as published by the Free Software Foundation; either 15 // version 2.1 of the License, or (at your option) any later version. 16 // 17 // This library is distributed in the hope that it will be useful, 18 // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 // Lesser General Public License for more details. 21 // 22 // You should have received a copy of the GNU Lesser General Public 23 // License along with this library; if not, write to the Free Software 24 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 25 // 26 27 package org.htmlparser.tags; 28 29 /** 30 31 * A table header tag. 32 33 */ 34 public class TableHeader extends CompositeTag 35 { 36 /** 37 * The set of names handled by this tag. 38 */ 39 private static final String[] mIds = new String[] {"TH"}; 40 41 /** 42 * The set of tag names that indicate the end of this tag. 43 */ 44 private static final String[] mEnders = new String[] {"TH", "TR", "TBODY", "TFOOT", "THEAD"}; 45 46 /** 47 * The set of end tag names that indicate the end of this tag. 48 */ 49 private static final String[] mEndTagEnders = new String[] {"TR", "TBODY", "TFOOT", "THEAD", "TABLE"}; 50 51 /** 52 * Create a new table header tag. 53 */ 54 public TableHeader () 55 { 56 } 57 58 /** 59 * Return the set of names handled by this tag. 60 * @return The names to be matched that create tags of this type. 61 */ 62 public String[] getIds () 63 { 64 return (mIds); 65 } 66 67 /** 68 * Return the set of tag names that cause this tag to finish. 69 * @return The names of following tags that stop further scanning. 70 */ 71 public String[] getEnders () 72 { 73 return (mEnders); 74 } 75 76 /** 77 * Return the set of end tag names that cause this tag to finish. 78 * @return The names of following end tags that stop further scanning. 79 */ 80 public String[] getEndTagEnders () 81 { 82 return (mEndTagEnders); 83 } 84 }