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

lemurproject::indri::ui::RetUI Class Reference

List of all members.

Public Member Functions

 RetUI ()
void init ()
void actionPerformed (ActionEvent e)
void removeIndex ()
void openIndex ()
void openServer ()
void runQuestion ()
void altgetDocText ()
void getDocText ()
void getDocHtml ()
void error (String s)

Static Public Member Functions

void main (String[] args)

Static Protected Member Functions

ImageIcon createImageIcon (String path)

Package Attributes

JButton go
JButton stop
JButton scoreDisplay
JLabel status
JLabel progress
JTextField query
JTextField numDocs
JTable answerAll
JFrame docTextFrame
JTextPane docTextPane
JFrame docHtmlFrame
JTextPane docHtmlPane
JTree docQueryTree
QueryEnvironment env
Map annotations = null
QueryAnnotation results = null
ScoredExtentResult[] scored = null
ParsedDocument currentParsedDoc = null
int currentDocId = 0
String[] names = null
String[] titles = null
int[] docids = null
int currentDoc = -1
int maxDocs = 10
boolean envInit = false
String wordProg
String powerpointProg
String acroreadProg
boolean showScores = false
volatile Thread getDocTextThread
volatile Thread getDocHtmlThread
volatile Thread runQuestionThread

Private Member Functions

void clearAll ()
void setPaths ()
void makeHelp ()
void makeDocTextFrame ()
void makeDocHtmlFrame ()
void spawnViewer ()
void highlight (DefaultMutableTreeNode query) throws InterruptedException
void clearHighlight (StyledDocument myDoc, MutableAttributeSet highlight)
void highlight (UIQueryNode q, StyledDocument myDoc, MutableAttributeSet highlight) throws InterruptedException
DefaultTreeModel makeTreeModel (QueryAnnotationNode query)
DefaultMutableTreeNode makeChildNode (QueryAnnotationNode query)
Thread blinker (final String s1, final String s2)
String trim (String s)
JTable makeDocsTable ()
JMenuItem makeMenuItem (String label)

Static Private Member Functions

void createAndShowGUI ()

Private Attributes

final JFileChooser fc
JFrame helpFrame
JList documents
DefaultListModel documentsModel
JList indexes
DefaultListModel indexesModel
volatile boolean blinking = false

Static Private Attributes

final String aboutText
final String helpFile = "properties/IndriRetrieval.html"
final String iconFile = "properties/lemur_head_32.gif"
final Color lightYellow = new Color(255, 255, 224)
final Color navyBlue = new Color(0, 0, 128)
final Color linen = new Color(250, 240, 230)
Cursor wait = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)
Cursor def = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)

Detailed Description

User interface for indri retrieval.
Author:
David Fisher
Version:
1.0


Constructor & Destructor Documentation

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

Initialize the query environment and indexes model.


Member Function Documentation

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

void lemurproject::indri::ui::RetUI::altgetDocText  )  [inline]
 

Populate the document text frame with the selected document. Highlight the document based on query matches.

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

Blink a pair of messages on the status line

Parameters:
s1 The first message to display
s2 The second message to display
Returns:
The Thread doing the blinking

void lemurproject::indri::ui::RetUI::clearAll  )  [inline, private]
 

Clear everything

void lemurproject::indri::ui::RetUI::clearHighlight StyledDocument  myDoc,
MutableAttributeSet  highlight
[inline, private]
 

Clear all highlighting markup in a styled document.

Parameters:
myDoc The StyledDocument to highlight
highlight The highlighting attributes

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

Make the containing frame, menubar, and an instance of RetUI. Initialize.

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

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

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

void lemurproject::indri::ui::RetUI::error String  s  )  [inline]
 

Display an error message in the progress label.

Parameters:
s The error message to display.

void lemurproject::indri::ui::RetUI::getDocHtml  )  [inline]
 

Populate a document text frame with html -- no highlighting.

void lemurproject::indri::ui::RetUI::getDocText  )  [inline]
 

void lemurproject::indri::ui::RetUI::highlight UIQueryNode  q,
StyledDocument  myDoc,
MutableAttributeSet  highlight
throws InterruptedException [inline, private]
 

Highlight the current document in the document text pane with respect to the given query node.

Parameters:
q The query node to highlight extents for
myDoc The StyledDocument to highlight
highlight The highlighting attributes

void lemurproject::indri::ui::RetUI::highlight DefaultMutableTreeNode  query  )  throws InterruptedException [inline, private]
 

Insert highlighting markup into a styled document, starting from the given node of the query tree. If the node is the root of the tree, recurse through the entire tree.

Parameters:
query The query tree node to highlight

void lemurproject::indri::ui::RetUI::init  )  [inline]
 

Create the gui elements, including the help frame.

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

Fire it up.

Parameters:
args ignored

DefaultMutableTreeNode lemurproject::indri::ui::RetUI::makeChildNode QueryAnnotationNode  query  )  [inline, private]
 

Make a DefaultMutableTreeNode out of a QueryAnnotationNode. Recursively insert all children of the query into the tree.

Parameters:
query The QueryAnnotationNode to insert into the tree.
Returns:
a DefaultMutableTreeNode for this query.

void lemurproject::indri::ui::RetUI::makeDocHtmlFrame  )  [inline, private]
 

Make the frame for displaying html documents

JTable lemurproject::indri::ui::RetUI::makeDocsTable  )  [inline, private]
 

Make a JTable and associated DocsTableModel for containing query result sets.

Returns:
The JTable with its model and listener initialized.

void lemurproject::indri::ui::RetUI::makeDocTextFrame  )  [inline, private]
 

Make the frame for displaying highlighted retrieved documents with both document text and the query tree.

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

Create the frame that shows the help file and render the html. Saves time when the user opens the help.

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

Make a menu item with appropriate colors and this as its listener.

Parameters:
label The label for the menu item
Returns:
The menu item

DefaultTreeModel lemurproject::indri::ui::RetUI::makeTreeModel QueryAnnotationNode  query  )  [inline, private]
 

Create a TreeModel from a QueryAnnotationNode.

Parameters:
query The QueryAnnotationNode to use as the root of the tree
Returns:
A DefaultTreeModel rooted in query

void lemurproject::indri::ui::RetUI::openIndex  )  [inline]
 

Present a file chooser to select an index to open. Open the index in the query environment.

void lemurproject::indri::ui::RetUI::openServer  )  [inline]
 

Present an input dialog to obtain a hostname and optional port number. Open the given server in the query environment.

void lemurproject::indri::ui::RetUI::removeIndex  )  [inline]
 

Remove the selected index from the list.

void lemurproject::indri::ui::RetUI::runQuestion  )  [inline]
 

Run the given query in a separate thread.

void lemurproject::indri::ui::RetUI::setPaths  )  [inline, private]
 

Set the paths to the external viewer programs

void lemurproject::indri::ui::RetUI::spawnViewer  )  [inline, private]
 

Spawn an external viewer for pdf, doc, or ppt (Win only)

String lemurproject::indri::ui::RetUI::trim String  s  )  [inline, private]
 

Strip leading pathname, if any.


Member Data Documentation

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

Initial value:

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

String lemurproject::indri::ui::RetUI::acroreadProg [package]
 

external viewers Acrobat.exe or AcroRd32.exe

Map lemurproject::indri::ui::RetUI::annotations = null [package]
 

Map containing query annotations for highlighting.

JTable lemurproject::indri::ui::RetUI::answerAll [package]
 

Retrieved documents table

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

Semaphore for the blinker thread

int lemurproject::indri::ui::RetUI::currentDoc = -1 [package]
 

Index into result holders for the current document

int lemurproject::indri::ui::RetUI::currentDocId = 0 [package]
 

Result holder for currently selected document id

ParsedDocument lemurproject::indri::ui::RetUI::currentParsedDoc = null [package]
 

Result holder for parsed documents

Cursor lemurproject::indri::ui::RetUI::def = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR) [static, private]
 

cursors

JFrame lemurproject::indri::ui::RetUI::docHtmlFrame [package]
 

Frame for showing document html document

JTextPane lemurproject::indri::ui::RetUI::docHtmlPane [package]
 

Document html pane.

int [] lemurproject::indri::ui::RetUI::docids = null [package]
 

Result holder for document internal ids

JTree lemurproject::indri::ui::RetUI::docQueryTree [package]
 

Query tree display

JFrame lemurproject::indri::ui::RetUI::docTextFrame [package]
 

Frame for showing document text and query tree.

JTextPane lemurproject::indri::ui::RetUI::docTextPane [package]
 

Document text pane.

JList lemurproject::indri::ui::RetUI::documents [private]
 

Enable multiple indexes

DefaultListModel lemurproject::indri::ui::RetUI::documentsModel [private]
 

hold the file names

QueryEnvironment lemurproject::indri::ui::RetUI::env [package]
 

Indri query environment for retrieval.

boolean lemurproject::indri::ui::RetUI::envInit = false [package]
 

Flag for whether or not the query environment has been initialized.

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

Initial value:

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

volatile Thread lemurproject::indri::ui::RetUI::getDocHtmlThread [package]
 

getDocHtml Thread

volatile Thread lemurproject::indri::ui::RetUI::getDocTextThread [package]
 

getDocText Thread

JButton lemurproject::indri::ui::RetUI::go [package]
 

Search and Clear buttons

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

Help file for the application

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

Frame for help window

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

Little lemur icon

JList lemurproject::indri::ui::RetUI::indexes [private]
 

Enable multiple indexes

DefaultListModel lemurproject::indri::ui::RetUI::indexesModel [private]
 

hold the file names

final Color lemurproject::indri::ui::RetUI::lightYellow = new Color(255, 255, 224) [static, private]
 

colors

final Color lemurproject::indri::ui::RetUI::linen = new Color(250, 240, 230) [static, private]
 

colors

int lemurproject::indri::ui::RetUI::maxDocs = 10 [package]
 

Maximum number of documents to retrieve for a query

String [] lemurproject::indri::ui::RetUI::names = null [package]
 

Result holder for document external ids

final Color lemurproject::indri::ui::RetUI::navyBlue = new Color(0, 0, 128) [static, private]
 

colors

JTextField lemurproject::indri::ui::RetUI::numDocs [package]
 

Number of documents to retrieve input

String lemurproject::indri::ui::RetUI::powerpointProg [package]
 

external viewers Powerpnt.exe

JLabel lemurproject::indri::ui::RetUI::progress [package]
 

Progress indicator output

JTextField lemurproject::indri::ui::RetUI::query [package]
 

Query input

QueryAnnotation lemurproject::indri::ui::RetUI::results = null [package]
 

Result holder for query retrieval.

volatile Thread lemurproject::indri::ui::RetUI::runQuestionThread [package]
 

runQuestion Thread

ScoredExtentResult [] lemurproject::indri::ui::RetUI::scored = null [package]
 

Result holder for document scored extents

JButton lemurproject::indri::ui::RetUI::scoreDisplay [package]
 

Search and Clear buttons

boolean lemurproject::indri::ui::RetUI::showScores = false [package]
 

Are we showing scores?

JLabel lemurproject::indri::ui::RetUI::status [package]
 

Status line output

JButton lemurproject::indri::ui::RetUI::stop [package]
 

Search and Clear buttons

String [] lemurproject::indri::ui::RetUI::titles = null [package]
 

Result holder for document titles

Cursor lemurproject::indri::ui::RetUI::wait = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR) [static, private]
 

cursors

String lemurproject::indri::ui::RetUI::wordProg [package]
 

external viewers Word.exe


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