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.
-
LabelFinder(String)
- Creates a new LabelFinder for the HTML file filename
-
countLabels()
- Returns the number of labels that were found in the HTML file's header.
-
getLabel(int)
- Returns a String with the contents of an individual label.
-
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.
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.
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.
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.
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