All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.pics.parser.LabelFinder

java.lang.Object
   |
   +----w3c.pics.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 getLabels()
Returns the number of labels that were found in the HTML file's header and stores the labels it finds in a vector.
 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.
 o replaceEscaped(String)
Returns a String with escaped characters replaced Replaces  , ", ', &, > with nonbreaking space, ", ', &, >, respectively
 o showLabel(int)
Returns a String with the contents of an individual label.

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 getLabels
 public int getLabels()
Returns the number of labels that were found in the HTML file's header and stores the labels it finds in a vector.

Returns:
An int, the number of labels found.
 o replaceEscaped
 public String replaceEscaped(String original)
Returns a String with escaped characters replaced Replaces  , ", ', &, > with nonbreaking space, ", ', &, >, respectively

Parameters:
original - The input String to be unescaped.
Returns:
A String with the escaped characters replaced
 o showLabel
 public String showLabel(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