Class pmr.cml.IndexTable
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pmr.cml.IndexTable

java.lang.Object
   |
   +----java.util.Dictionary
           |
           +----java.util.Hashtable
                   |
                   +----pmr.cml.IndexTable

public class IndexTable
extends Hashtable
This holds an Index Table as a table of terms.
Author:
(C) P. Murray-Rust, 1996

Constructor Index

 o IndexTable()
 o IndexTable(String)
construct an IndexTable from a file (format is
term/filename
term/filename
...
 o IndexTable(String[])
make an IndexTable from a list of filenames which contain TERMENTRYs

Method Index

 o cml2html(String)
reads an Index Table in CML format and outputs the corresponding HTML
 o getKeywords(String, int)
breaks a string down into 'words' , rather crudely
 o main(String[])
 o markupHTML(StringList)
reads an HTML file as a StringList and outputs a marked up version
 o markupHTMLFile(String, String)
 o outputTermAnalysis(String, String, String)
outputs an analysis of the IndexTable
 o setMarkupGif(String)
the filename of the GIF to be used for markup
 o setMarkupSpacing(int)
set markup spacing - i.e.
 o stemOf(String)
truncate a word to get the stem - assumes upper case; finds first inflection which ends the word.
 o stemString()
the symbol used to represent a word stem (e.g.
 o update(String, Object)
updates an IndexTable (term, objects) where objects is either:

Constructors

 o IndexTable
  public IndexTable()
 o IndexTable
  public IndexTable(String indexFile) throws IOException
construct an IndexTable from a file (format is
term/filename
term/filename
...
 o IndexTable
  public IndexTable(String filenames[])
make an IndexTable from a list of filenames which contain TERMENTRYs

Methods

 o stemString
  public static String stemString()
the symbol used to represent a word stem (e.g. *)
 o stemOf
  public static String stemOf(String s)
truncate a word to get the stem - assumes upper case; finds first inflection which ends the word. if not possible, returns ""
 o update
  public void update(String term,
                     Object referredObject)
updates an IndexTable (term, objects) where objects is either: Each term then references one or more objects. It's up to the user to find out whether the keyedValue is a term or a Hashtable of terms

So far all the members are static - so I haven't got it fully right

Parameters:
term - the term
referredObject - is an Object that the term points to
 o update
  public void update(StringSet terms,
                     Object referredObject)
updates a Hashtable (term, objects) where objects is a Hashtable of the objects that 'term' is involved with. Each term then references a set (Hashtable) of objects
Parameters:
this - the Hashtable of the terms
terms - a StringSet of the terms to be added
referredObject - is an Object that the terms point to
 o outputTermAnalysis
  public void outputTermAnalysis(String filename,
                                 String format,
                                 String title) throws IOException
outputs an analysis of the IndexTable
Parameters:
format - "" for unstructed text, or "CML"
 o getKeywords
  public static StringSet getKeywords(String text,
                                      int minlength)
breaks a string down into 'words' , rather crudely
 o markupHTML
  public StringList markupHTML(StringList raw)
reads an HTML file as a StringList and outputs a marked up version
Parameters:
raw - the input as a StringList
markuptable - the index as prepared by updateMarkup
 o setMarkupGif
  public void setMarkupGif(String g)
the filename of the GIF to be used for markup
 o setMarkupSpacing
  public void setMarkupSpacing(int spacing)
set markup spacing - i.e. the number of tokens before we repeat a link. to the same term. Default is 1000;
 o markupHTMLFile
  public void markupHTMLFile(String infileHTML,
                             String outfileHTML) throws IOException
 o cml2html
  public static void cml2html(String cmlIndexFile)
reads an Index Table in CML format and outputs the corresponding HTML
 o usage
  public static void usage()
 o main
  public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index