All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.pics.db.parser.LabelFinder

java.lang.Object
   |
   +----w3c.pics.db.parser.LabelFinder

public class LabelFinder
extends Object
Implements a filter that reads in an HTML file, and locates any labels that are contained in its header.


Constructor Index

 o LabelFinder(String)
Creates a new LabelFinder for the HTML file filename

Method Index

 o countLabels()
Returns the number of labels that were found in the HTML file's header.
 o getLabel(int)
Returns a String with the contents of an individual label.
 o main(String[])
An interactive mode which takes a file name as a command line argument, counts the number of labels found, and then allows the user to request a label by number.

Constructors

 o LabelFinder
 public LabelFinder(String filename)
Creates a new LabelFinder for the HTML file filename

Parameters:
filename - The name of the HTML file to scan for labels.

Methods

 o main
 public static void main(String args[])
An interactive mode which takes a file name as a command line argument, counts the number of labels found, and then allows the user to request a label by number.

 o countLabels
 public int countLabels()
Returns the number of labels that were found in the HTML file's header.

Returns:
An int, the number of labels found.
 o getLabel
 public String getLabel(int i)
Returns a String with the contents of an individual label. This String contains only the PICS label text, and is suitable for passing to the LabelParser.

Parameters:
i - The index of which label is to be returned.
Returns:
A String containing the text of the label.
See Also:
LabelParser

All Packages  Class Hierarchy  This Package  Previous  Next  Index