Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

lemurproject::indri::ui::IndexUI Class Reference

List of all members.

Public Member Functions

 IndexUI ()
void actionPerformed (ActionEvent e)
void tableChanged (TableModelEvent e)
void itemStateChanged (ItemEvent e)
void caretUpdate (CaretEvent event)

Static Public Member Functions

void main (String[] args)

Static Protected Member Functions

ImageIcon createImageIcon (String path)

Package Attributes

boolean appendIndex = false

Private Member Functions

void initGUI ()
JMenuBar makeMenuBar ()
JMenuItem makeMenuItem (String label)
JPanel makePanel ()
void makeHelp ()
String encodeRegexp (String regexp)
boolean safeToBuildIndex ()
void deleteDirectory (File dir)
void ensureMessagesVisible ()
void buildIndex ()
String[] formatDataFiles ()
void formatDataFiles (File file, FileFilter f, Vector accum, String offsetFile)
long encodeMem ()
void showException (Exception e)
Thread blinker (final String s1, final String s2)

Static Private Member Functions

void createAndShowGUI ()

Private Attributes

JLabel status
JTextArea messages
JTabbedPane tabbedPane
JCheckBox doRecurse
JCheckBox doStem
JComboBox stemmers
JComboBox memoryLim
JComboBox docFormat
JButton browse
JButton cfbrowse
JButton stopBrowse
JButton cfRemove
JButton go
JButton stop
JTextField iname
JTextField stopwordlist
JTextField colFields
JTextField filterString
JList collectionFiles
DefaultListModel cfModel
final JFileChooser fc
String stopwords
JMenuBar menuBar
JMenu fileMenu
JMenu helpMenu
JMenuItem fOpen
JMenuItem fSave
JMenuItem fPrefs
JMenuItem fQuit
JMenuItem hHelp
JMenuItem hAbout
ImageIcon indriIcon
JFrame helpFrame
JPanel indexFieldPanel
JTable fieldTable
FieldTableModel fieldTableModel
JButton btnAddField
JButton btnRemoveField
JTable offsetAnnotationFileTable
OffsetAnnotationTableModel offsetAnnotationFilesTableModel
JTextField txtPathToHarvestLinks
JButton btnHarvestLinks
Vector dataFilesOffsetFiles = null
volatile boolean blinking = false

Static Private Attributes

final String helpFile = "properties/IndriIndex.html"
final String iconFile = "properties/lemur_head_32.gif"
final String logoFile = null
final String[] formats
final String[] lims
final String[] sTypes = {"krovetz", "porter"}
final String aboutText
String[] fieldColumnTooltips = {"The field name to index", "Is the field numeric?"}
String[] annotationsColumnTooltips = {"The datafile for the annotations", "The path to the annotation file(s)"}

Detailed Description

User interface for building Indri indexes.
David Fisher

Mark J. Hoy

12/3/07 - added fields tab (MJH)

Constructor & Destructor Documentation

lemurproject::indri::ui::IndexUI::IndexUI  )  [inline]

Get the ball rolling.

Member Function Documentation

void lemurproject::indri::ui::IndexUI::actionPerformed ActionEvent  e  )  [inline]

Omnibus for responding to user actions.

Thread lemurproject::indri::ui::IndexUI::blinker final String  s1,
final String  s2
[inline, private]

Make the status line blink while working.

void lemurproject::indri::ui::IndexUI::buildIndex  )  [inline, private]

Ask the IndexEnvironment to add the files.

void lemurproject::indri::ui::IndexUI::caretUpdate CaretEvent  event  )  [inline]

Listens to the index name text field. This enables updating the state of the BuildIndex button when the user types in the name of the index directly.

void lemurproject::indri::ui::IndexUI::createAndShowGUI  )  [inline, static, private]

Create the GUI and show it. For thread safety, this method should be invoked from the event-dispatching thread.

ImageIcon lemurproject::indri::ui::IndexUI::createImageIcon String  path  )  [inline, static, protected]

Returns an ImageIcon, or null if the path was invalid.

path the image file to load.
an ImageIcon, or null if the path was invalid.

void lemurproject::indri::ui::IndexUI::deleteDirectory File  dir  )  [inline, private]

remove a directory and all of its files and subdirectories

long lemurproject::indri::ui::IndexUI::encodeMem  )  [inline, private]

String lemurproject::indri::ui::IndexUI::encodeRegexp String  regexp  )  [inline, private]

Rewrite a shell filename pattern to a regular expression.
* -> .*
? -> .?
Add ^ to beginning
Add $ to end
. -> \.

regexp the filename pattern, eg "*.dat"
a regular expression suitable for use with String.matches(), eg "^.*\.dat$"

void lemurproject::indri::ui::IndexUI::ensureMessagesVisible  )  [inline, private]

Keeps the message pane showing the last line appended.

void lemurproject::indri::ui::IndexUI::formatDataFiles File  file,
FileFilter  f,
Vector  accum,
String  offsetFile
[inline, private]

Accumulate filenames for the input list. If the File is a directory, iterate over all of the files in that directory that satisfy the filter. If recurse into subdirectories is selected and the File is a directory, invoke recursivly on on all directories within the directory.

accum Vector to accumulate file names recusively.
file a File (either a file or directory)
f the filename filter to apply.

String [] lemurproject::indri::ui::IndexUI::formatDataFiles  )  [inline, private]

Create the datafiles list of strings.

The list of files

void lemurproject::indri::ui::IndexUI::initGUI  )  [inline, private]

Initialize the GUI elements, including preloading the help frame.

void lemurproject::indri::ui::IndexUI::itemStateChanged ItemEvent  e  )  [inline]

Listens to the check boxes.

void lemurproject::indri::ui::IndexUI::main String[]  args  )  [inline, static]

Fire it up.

void lemurproject::indri::ui::IndexUI::makeHelp  )  [inline, private]

Create the frame that shows the help file and render the html.

JMenuBar lemurproject::indri::ui::IndexUI::makeMenuBar  )  [inline, private]

Create the applications menu bar.

the JMenuBar.

JMenuItem lemurproject::indri::ui::IndexUI::makeMenuItem String  label  )  [inline, private]

Creates a JMenuItem with this as its ActionListener.

label the label for the item.
the created menu item.

JPanel lemurproject::indri::ui::IndexUI::makePanel  )  [inline, private]

Create a JPanel with BorderLayout.

the Jpanel.

boolean lemurproject::indri::ui::IndexUI::safeToBuildIndex  )  [inline, private]

Tests for likely failure scenarios. If the path to the index doesn't exist, fail. If the named index already exists, offer a choice do either overwrite, append, or abandon. If overwrite is selected, removes all files in the target directory. This is potentially dangerous.

true if it is safe to build the index otherwise false.

void lemurproject::indri::ui::IndexUI::showException Exception  e  )  [inline, private]

Format an exception message in the messages text area.

e the exception

void lemurproject::indri::ui::IndexUI::tableChanged TableModelEvent  e  )  [inline]

Listens for table model changes

Member Data Documentation

final String lemurproject::indri::ui::IndexUI::aboutText [static, private]

Initial value:

 "Indri Indexer UI 1.0\n" +
        "Copyright (c) 2004 University of Massachusetts"
About the indexer.

String [] lemurproject::indri::ui::IndexUI::annotationsColumnTooltips = {"The datafile for the annotations", "The path to the annotation file(s)"} [static, private]

boolean lemurproject::indri::ui::IndexUI::appendIndex = false [package]

are we appending?

volatile boolean lemurproject::indri::ui::IndexUI::blinking = false [private]

Is the blinker running?

JButton lemurproject::indri::ui::IndexUI::browse [private]

Action Buttons

JButton lemurproject::indri::ui::IndexUI::btnAddField [private]

JButton lemurproject::indri::ui::IndexUI::btnHarvestLinks [private]

JButton lemurproject::indri::ui::IndexUI::btnRemoveField [private]

JButton lemurproject::indri::ui::IndexUI::cfbrowse [private]

Action Buttons

DefaultListModel lemurproject::indri::ui::IndexUI::cfModel [private]

hold the file names

JButton lemurproject::indri::ui::IndexUI::cfRemove [private]

Action Buttons

JTextField lemurproject::indri::ui::IndexUI::colFields [private]

field names

JList lemurproject::indri::ui::IndexUI::collectionFiles [private]

browse multiple filenames

Vector lemurproject::indri::ui::IndexUI::dataFilesOffsetFiles = null [private]

JComboBox lemurproject::indri::ui::IndexUI::docFormat [private]

Multiple choices

JCheckBox lemurproject::indri::ui::IndexUI::doRecurse [private]

Single choice

JCheckBox lemurproject::indri::ui::IndexUI::doStem [private]

Single choice

final JFileChooser lemurproject::indri::ui::IndexUI::fc [private]

Initial value:

        new JFileChooser(System.getProperties().getProperty("user.dir"))
File chooser starting in current directory

String [] lemurproject::indri::ui::IndexUI::fieldColumnTooltips = {"The field name to index", "Is the field numeric?"} [static, private]

JTable lemurproject::indri::ui::IndexUI::fieldTable [private]

FieldTableModel lemurproject::indri::ui::IndexUI::fieldTableModel [private]

JMenu lemurproject::indri::ui::IndexUI::fileMenu [private]


JTextField lemurproject::indri::ui::IndexUI::filterString [private]

filename filter

JMenuItem lemurproject::indri::ui::IndexUI::fOpen [private]

Menu Items

final String [] lemurproject::indri::ui::IndexUI::formats [static, private]

Initial value:

 {"trecweb", "trectext", "html",
                                              "doc", "ppt", "pdf", "txt"}
Indri FileClassEnvironments

JMenuItem lemurproject::indri::ui::IndexUI::fPrefs [private]

Menu Items

JMenuItem lemurproject::indri::ui::IndexUI::fQuit [private]

Menu Items

JMenuItem lemurproject::indri::ui::IndexUI::fSave [private]

Menu Items

JButton lemurproject::indri::ui::IndexUI::go [private]

Action Buttons

JMenuItem lemurproject::indri::ui::IndexUI::hAbout [private]

Menu Items

final String lemurproject::indri::ui::IndexUI::helpFile = "properties/IndriIndex.html" [static, private]

Help file for the application

JFrame lemurproject::indri::ui::IndexUI::helpFrame [private]

Frame for help window

JMenu lemurproject::indri::ui::IndexUI::helpMenu [private]


JMenuItem lemurproject::indri::ui::IndexUI::hHelp [private]

Menu Items

final String lemurproject::indri::ui::IndexUI::iconFile = "properties/lemur_head_32.gif" [static, private]

The little icon

JTextField lemurproject::indri::ui::IndexUI::iname [private]

input/browseable filename

JPanel lemurproject::indri::ui::IndexUI::indexFieldPanel [private]

Fields and Metadata items

ImageIcon lemurproject::indri::ui::IndexUI::indriIcon [private]

The Indri Icon.

final String [] lemurproject::indri::ui::IndexUI::lims [static, private]

Initial value:

 {"  64 MB", "  96 MB", " 128 MB", 
                                           " 256 MB", " 512 MB", " 768 MB","1024 MB"}
Memory limit choices

final String lemurproject::indri::ui::IndexUI::logoFile = null [static, private]

The big logo

JComboBox lemurproject::indri::ui::IndexUI::memoryLim [private]

Multiple choices

JMenuBar lemurproject::indri::ui::IndexUI::menuBar [private]


JTextArea lemurproject::indri::ui::IndexUI::messages [private]

Messages pane for prog output

OffsetAnnotationTableModel lemurproject::indri::ui::IndexUI::offsetAnnotationFilesTableModel [private]

JTable lemurproject::indri::ui::IndexUI::offsetAnnotationFileTable [private]

JLabel lemurproject::indri::ui::IndexUI::status [private]

Status line messages visible for all tabs.

JComboBox lemurproject::indri::ui::IndexUI::stemmers [private]

Multiple choices

JButton lemurproject::indri::ui::IndexUI::stop [private]

Action Buttons

JButton lemurproject::indri::ui::IndexUI::stopBrowse [private]

Action Buttons

JTextField lemurproject::indri::ui::IndexUI::stopwordlist [private]

input/browseable filename

String lemurproject::indri::ui::IndexUI::stopwords [private]

data directory paths

final String [] lemurproject::indri::ui::IndexUI::sTypes = {"krovetz", "porter"} [static, private]

Stemmer types

JTabbedPane lemurproject::indri::ui::IndexUI::tabbedPane [private]

Top level container

JTextField lemurproject::indri::ui::IndexUI::txtPathToHarvestLinks [private]

The documentation for this class was generated from the following file:
Generated on Tue Jun 15 11:03:07 2010 for Lemur by doxygen 1.3.4