    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.

##

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

##

getLabels()
  Returns the number of labels that were found in the HTML file's header and stores the labels it finds in a vector.
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.
replaceEscaped(String)
  Returns a String with escaped characters replaced Replaces &nbsp;, &quot;, &#39;, &amp;, &gt; with nonbreaking space, ", ', &, >, respectively
showLabel(int)
  Returns a String with the contents of an individual label.

##

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.

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.

replaceEscaped

     public String replaceEscaped(String original)

  Returns a String with escaped characters replaced Replaces &nbsp;, &quot;, &#39;, &amp;, &gt; with nonbreaking space, ", ', &, >, respectively

  Parameters:
    original - The input String to be unescaped.
  Returns:
    A String with the escaped characters replaced

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