org.getopt.luke
Class Luke

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by thinlet.Thinlet
              extended by org.getopt.luke.Luke
All Implemented Interfaces:
java.awt.datatransfer.ClipboardOwner, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Runnable

public class Luke
extends thinlet.Thinlet
implements java.awt.datatransfer.ClipboardOwner

This class allows you to browse a Lucene index in several ways - by document, by term, by query, and by most frequent terms.

Author:
Andrzej Bialecki
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int THEME_DEFAULT
          Default salmon theme.
static int THEME_GRAY
          Gray theme.
static int THEME_NAVY
          Navy blue reverse theme.
static int THEME_SANDSTONE
          Sandstone theme.
static int THEME_SKY
          Sky blue theme.
 int[][] themes
          Theme color contants.
 
Fields inherited from class thinlet.Thinlet
block
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Luke()
          Default constructor, loads preferences, initializes plugins and GUI.
 
Method Summary
 void _actionCleanup(java.lang.Object filesTable)
           
 void _runExport(java.io.File out, boolean gzip, java.util.Observer obs, java.lang.Object dialog, Ranges ranges)
           
 void _showData(java.lang.Object dialog)
           
 void _showPayloads(java.lang.Object dialog)
           
 void abortExport(java.lang.Object dialog)
           
 void actionAbout()
           
 void actionAddDocument(java.lang.Object docTable)
           
 void actionCheckIndex()
           
 void actionCleanup()
          This method will cleanup the current Directory of any content that is not the part of the index.
 void actionClose()
           
 void actionCommit()
           
 void actionConvert(java.lang.Object method)
          Not implemented yet...
 void actionDeleteDocList(java.lang.Object docList)
           
 void actionDesignSimilarity()
          Switch the view to display the SimilarityDesigner plugin, if present.
 boolean actionEditAdd(java.lang.Object editdoc)
           
 void actionEditAddField(java.lang.Object editdoc)
           
 void actionEditDeleteField(java.lang.Object editfield)
           
 void actionEditReplace(java.lang.Object editdoc)
           
 void actionExit()
           
 void actionExport()
           
 void actionMLT(java.lang.Object docNum, java.lang.Object docTable)
          More Like this query from the current doc (or selected fields)
 void actionOpen()
          Show an "Open Index" dialog.
 void actionOptimize()
          Optimize the current index
 void actionReconstruct(java.lang.Object docNumText)
           
 void actionReopen()
           
 void actionSetDecoder(java.lang.Object fList, java.lang.Object combo)
           
 void actionSetFont(java.lang.Object selfont)
          Set the default font in the UI.
 void actionSetNorm(java.lang.Object table)
           
 void actionShowFonts()
          Pop up a modal font selection dialog.
 void actionTheme(java.lang.Object menu)
          Action handler to select color theme.
 void actionTopTerms(java.lang.Object nTerms)
          Update the list of top terms.
 void actionUndelete()
          Undelete all deleted documents in the current index.
 java.lang.Object addComponent(java.lang.Object parent, java.lang.String compView, java.lang.String handlerStr, java.lang.Object[] argv)
          Add a Thinlet component from XUL file.
 void browseTermDocs(java.lang.Object tTable)
          Switch to a view that shows all documents containing selected term.
 void checkIndex(java.lang.Object dialog)
           
 void clipCopyDoc(java.lang.Object table)
           
 void clipCopyFields(java.lang.Object table)
           
 void clipPositions(java.lang.Object pTable)
           
 void clipTopTerms(java.lang.Object tTable)
           
 void clipTV(java.lang.Object vTable)
           
 void commitUserData(java.lang.Object dialog)
           
 org.apache.lucene.analysis.Analyzer createAnalyzer(java.lang.Object srchOpts)
           
 AccessibleHitCollector createCollector(java.lang.Object srchOpts)
           
 org.apache.lucene.search.Query createQuery(java.lang.String queryString)
          Create a Query instance that corresponds to values selected in the UI, such as analyzer class name and arguments, and default field.
 org.apache.lucene.search.Similarity createSimilarity(java.lang.Object srchOpts)
           
 void deleteDoc(java.lang.Object docNum)
           
 void deleteDocList(java.lang.Object searchTable)
           
 void deleteTermDoc(java.lang.Object fText)
           
 void deleteUserData(java.lang.Object dialog)
           
 boolean destroy()
          Shut down Luke.
 void displayNewNorm(java.lang.Object dialog)
           
 void errorMsg(java.lang.String msg)
          Show a modal error dialog with OK button.
 void explainResult(java.lang.Object sTable)
          Pop up a modal dialog explaining the selected result.
 void explainStructure(java.lang.Object qTabs)
           
 void export(java.lang.Object dialog)
           
 void fixIndex(java.lang.Object dialog)
           
 java.lang.Class[] getAnalyzers()
          Return an array of available Analyzer implementations.
 org.apache.lucene.search.Similarity getCustomSimilarity()
          Returns current custom similarity implementation.
protected  java.lang.String getDefaultField(java.lang.Object srchOptTabs)
           
 org.apache.lucene.store.Directory getDirectory()
           
 java.util.List<java.lang.String> getIndexDeletableNames(org.apache.lucene.store.Directory d)
           
 java.util.List<java.lang.String> getIndexFileNames(org.apache.lucene.store.Directory d)
           
 org.apache.lucene.index.IndexReader getIndexReader()
           
 int getNumTerms()
           
 LukePlugin getPlugin(java.lang.String className)
          Get an already instantiated plugin, or null if such plugin was not loaded on startup.
 java.util.List getPlugins()
          Return the list of active plugin instances.
 void gotoDoc(java.lang.Object sTable)
           
 void goUrl(java.lang.Object url)
          Open URL in the system default browser.
 void infoMsg(java.lang.String msg)
          Show a modal info dialog with OK button.
 void initPlugins()
          Initialize plugins.
 boolean isFSBased(org.apache.lucene.store.Directory dir)
           
 boolean isSlowAccess()
          Indicates whether I/O access should be optimized because the index is on a slow medium (e.g.
 void lostOwnership(java.awt.datatransfer.Clipboard arg0, java.awt.datatransfer.Transferable arg1)
           
static void main(java.lang.String[] args)
          Main method.
 void nextPage(java.lang.Object sTable)
           
 void openBrowse(java.lang.Object path)
          Browse for a directory, and put the selection result in the indicated widget.
 org.apache.lucene.store.FSDirectory openDirectory(java.lang.String dirImpl, java.lang.String file, boolean create)
           
 void openIndex(java.lang.String name, boolean force, java.lang.String dirImpl, boolean ro, boolean ramdir, boolean keepCommits, org.apache.lucene.index.IndexCommit point, int tiiDivisor)
          Open indicated index and re-initialize all GUI and plugins.
 void openOk(java.lang.Object dialog)
          Attempt to load the index with parameters specified in the dialog.
 void optimize(java.lang.Object dialog)
          Optimize the index.
 void populateAnalyzers(java.lang.Object combo)
          Populate a combobox with the current list of analyzers.
 void prevPage(java.lang.Object sTable)
           
 void putUserData(java.lang.Object dialog)
           
 boolean removeFile(java.io.File f)
          Recursively remove files and directories including the indicated root file.
 void saveBrowse(java.lang.Object path, java.lang.Object startButton)
          Select an output file name, and put the selection result in the indicated widget.
 void saveField(java.lang.Object table)
           
 void search(java.lang.Object qField)
          Perform a search.
 void selectFont(java.lang.Object selfont)
          Show preview of the selected font.
 void setCustomSimilarity(org.apache.lucene.search.Similarity s)
          Set the current custom similarity implementation.
 void setIndexReader(org.apache.lucene.index.IndexReader reader, java.lang.String indexName)
           
 void setNorm(java.lang.Object dialog)
           
 void setSlowAccess(boolean slowAccess)
          Set whether the I/O access to this index is costly and should be minimized.
 void setTheme(int which)
          Set color theme for the UI.
 void setupInit(java.lang.Object dialog)
          Initialize MRU list of indexes in the open index dialog.
 void setupSelFont(java.lang.Object selfont)
          Initialize the font selection dialog.
 void showAllTermDoc(java.lang.Object fText)
           
 void showCommitFiles(java.lang.Object commitTable)
           
 void showDoc(java.lang.Object docNum)
           
 void showFirstTerm(java.lang.Object fCombo, java.lang.Object fText)
           
 void showFirstTermDoc(java.lang.Object fText)
           
 void showNextDoc(java.lang.Object docNum)
           
 void showNextTerm(java.lang.Object fCombo, java.lang.Object fText)
           
 void showNextTermDoc(java.lang.Object fText)
           
 void showParsed()
          Update the parsed and rewritten query views.
 void showPositions(java.lang.Object fText)
           
 void showPrevDoc(java.lang.Object docNum)
           
 void showSearchStatus(java.lang.String msg)
          As showStatus(String) but also sets the "Last search time" label.
 void showSlowStatus(java.lang.String msg, long counter)
           
 void showStatus(java.lang.String msg)
          Display a message on the status bar for 5 seconds.
 void showTerm(java.lang.Object fCombo, java.lang.Object fText)
           
 void showTermDocs(java.lang.Object tTable)
           
 void showTField(java.lang.Object table)
           
 void showTV(java.lang.Object table)
           
static Luke startLuke(java.lang.String[] args)
          Start the GUI, and optionally open an index.
 void toggleKeep(java.lang.Object filesTable)
           
static void usage()
           
 
Methods inherited from class thinlet.Thinlet
add, add, add, changeField, characters, create, doLayout, endElement, find, find, get, get, getBoolean, getChoice, getClass, getColor, getComponent, getCount, getDesktop, getDOMAttribute, getDOMCount, getDOMNode, getDOMText, getFont, getIcon, getIcon, getIcon, getIndex, getInteger, getItem, getItems, getLangResource, getLangResourceDefault, getParent, getPreferredSize, getPreferredSize, getProperty, getRectangle, getSelectedIndex, getSelectedItem, getSelectedItems, getSize, getString, getUseVectors, getWidget, handleException, invoke, isFocusTraversable, paint, parse, parse, parse, parse, parseDOM, parseXML, processEvent, putProperty, remove, removeAll, repaint, requestFocus, run, set, setAllI18n, setBoolean, setChoice, setColor, setColors, setComponent, setFocus, setFont, setFont, setFont, setIcon, setInteger, setKeystroke, setLangResource, setLangResourceDefault, setMethod, setResourceBundle, setString, setUseVectors, startElement, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

THEME_DEFAULT

public static final int THEME_DEFAULT
Default salmon theme.

See Also:
Constant Field Values

THEME_GRAY

public static final int THEME_GRAY
Gray theme.

See Also:
Constant Field Values

THEME_SANDSTONE

public static final int THEME_SANDSTONE
Sandstone theme.

See Also:
Constant Field Values

THEME_SKY

public static final int THEME_SKY
Sky blue theme.

See Also:
Constant Field Values

THEME_NAVY

public static final int THEME_NAVY
Navy blue reverse theme.

See Also:
Constant Field Values

themes

public int[][] themes
Theme color contants.

Constructor Detail

Luke

public Luke()
Default constructor, loads preferences, initializes plugins and GUI.

Method Detail

setTheme

public void setTheme(int which)
Set color theme for the UI.

Parameters:
which - one of the predefined themes. For custom themes use Thinlet.setColors(int, int, int, int, int, int, int, int, int).

actionTheme

public void actionTheme(java.lang.Object menu)
Action handler to select color theme.

Parameters:
menu -

populateAnalyzers

public void populateAnalyzers(java.lang.Object combo)
Populate a combobox with the current list of analyzers.

Parameters:
combo -

getAnalyzers

public java.lang.Class[] getAnalyzers()
Return an array of available Analyzer implementations.

Returns:

getPlugins

public java.util.List getPlugins()
Return the list of active plugin instances.

Returns:

getPlugin

public LukePlugin getPlugin(java.lang.String className)
Get an already instantiated plugin, or null if such plugin was not loaded on startup.

Parameters:
className - fully qualified plugin classname
Returns:

showStatus

public void showStatus(java.lang.String msg)
Display a message on the status bar for 5 seconds.

Parameters:
msg - message to display. Too long messages will be truncated by the UI.

showSearchStatus

public void showSearchStatus(java.lang.String msg)
As showStatus(String) but also sets the "Last search time" label.

Parameters:
msg -

showSlowStatus

public void showSlowStatus(java.lang.String msg,
                           long counter)

addComponent

public java.lang.Object addComponent(java.lang.Object parent,
                                     java.lang.String compView,
                                     java.lang.String handlerStr,
                                     java.lang.Object[] argv)
Add a Thinlet component from XUL file.

Parameters:
parent - add the new component to this parent
compView - path to the XUL resource
handlerStr - fully qualified classname of the handler to instantiate, or null if the current class will become the handler
argv - if not null, these arguments will be passed to the appropriate constructor.
Returns:

errorMsg

public void errorMsg(java.lang.String msg)
Show a modal error dialog with OK button.

Parameters:
msg - error message

infoMsg

public void infoMsg(java.lang.String msg)
Show a modal info dialog with OK button.

Parameters:
msg - info message

actionOpen

public void actionOpen()
Show an "Open Index" dialog.


openBrowse

public void openBrowse(java.lang.Object path)
Browse for a directory, and put the selection result in the indicated widget.

Parameters:
path - Thinlet widget to put the result

saveBrowse

public void saveBrowse(java.lang.Object path,
                       java.lang.Object startButton)
Select an output file name, and put the selection result in the indicated widget.

Parameters:
path - Thinlet widget to put the result

setupInit

public void setupInit(java.lang.Object dialog)
Initialize MRU list of indexes in the open index dialog.

Parameters:
dialog -

openOk

public void openOk(java.lang.Object dialog)
Attempt to load the index with parameters specified in the dialog.

NOTE: this method is invoked from the UI. If you need to open an index programmatically, you should use #openIndex(String, boolean, boolean, boolean) instead.

Parameters:
dialog - UI dialog with parameters

actionClose

public void actionClose()

actionCommit

public void actionCommit()

putUserData

public void putUserData(java.lang.Object dialog)

deleteUserData

public void deleteUserData(java.lang.Object dialog)

commitUserData

public void commitUserData(java.lang.Object dialog)

actionReopen

public void actionReopen()

openIndex

public void openIndex(java.lang.String name,
                      boolean force,
                      java.lang.String dirImpl,
                      boolean ro,
                      boolean ramdir,
                      boolean keepCommits,
                      org.apache.lucene.index.IndexCommit point,
                      int tiiDivisor)
Open indicated index and re-initialize all GUI and plugins.

Parameters:
pName - path to index
force - if true, and the index is locked, unlock it first. If false, and the index is locked, an error will be reported.
readOnly - open in read-only mode, and disallow modifications.

openDirectory

public org.apache.lucene.store.FSDirectory openDirectory(java.lang.String dirImpl,
                                                         java.lang.String file,
                                                         boolean create)
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

isSlowAccess

public boolean isSlowAccess()
Indicates whether I/O access should be optimized because the index is on a slow medium (e.g. remote).

Returns:
true if I/O access is costly and should be minimized

setSlowAccess

public void setSlowAccess(boolean slowAccess)
Set whether the I/O access to this index is costly and should be minimized.


initPlugins

public void initPlugins()
Initialize plugins. This method should always be called when a new index is open.


showCommitFiles

public void showCommitFiles(java.lang.Object commitTable)
                     throws java.lang.Exception
Throws:
java.lang.Exception

actionTopTerms

public void actionTopTerms(java.lang.Object nTerms)
Update the list of top terms.

Parameters:
nTerms - Thinlet widget containing the number of top terms to show

clipTopTerms

public void clipTopTerms(java.lang.Object tTable)

browseTermDocs

public void browseTermDocs(java.lang.Object tTable)
Switch to a view that shows all documents containing selected term.

Parameters:
tTable - Thinlet table widget, where selected row contains a property named "term", which is the selected Term instance

showTermDocs

public void showTermDocs(java.lang.Object tTable)

actionUndelete

public void actionUndelete()
Undelete all deleted documents in the current index. This method also updates the overview.


actionConvert

public void actionConvert(java.lang.Object method)
Not implemented yet...


getIndexDeletableNames

public java.util.List<java.lang.String> getIndexDeletableNames(org.apache.lucene.store.Directory d)

getDirectory

public org.apache.lucene.store.Directory getDirectory()

getIndexReader

public org.apache.lucene.index.IndexReader getIndexReader()

setIndexReader

public void setIndexReader(org.apache.lucene.index.IndexReader reader,
                           java.lang.String indexName)

getIndexFileNames

public java.util.List<java.lang.String> getIndexFileNames(org.apache.lucene.store.Directory d)

actionCheckIndex

public void actionCheckIndex()

checkIndex

public void checkIndex(java.lang.Object dialog)

fixIndex

public void fixIndex(java.lang.Object dialog)

isFSBased

public boolean isFSBased(org.apache.lucene.store.Directory dir)

actionCleanup

public void actionCleanup()
This method will cleanup the current Directory of any content that is not the part of the index.


toggleKeep

public void toggleKeep(java.lang.Object filesTable)

_actionCleanup

public void _actionCleanup(java.lang.Object filesTable)

removeFile

public boolean removeFile(java.io.File f)
Recursively remove files and directories including the indicated root file.

Parameters:
f - root file name
Returns:
true if successful, false otherwise. Note that if the result is false the tree may have been partially removed.

actionExport

public void actionExport()

export

public void export(java.lang.Object dialog)

_runExport

public void _runExport(java.io.File out,
                       boolean gzip,
                       java.util.Observer obs,
                       java.lang.Object dialog,
                       Ranges ranges)

abortExport

public void abortExport(java.lang.Object dialog)

actionOptimize

public void actionOptimize()
Optimize the current index

Parameters:
method - Thinlet menuitem widget containing the choice of index format. If the widget name is "optCompound" then the index will be optimized into compound format; otherwise a plain multi-file format will be used.

NOTE: this method is usually invoked from the GUI, and it also re-initializes GUI and plugins.


optimize

public void optimize(java.lang.Object dialog)
Optimize the index.


showPrevDoc

public void showPrevDoc(java.lang.Object docNum)

showNextDoc

public void showNextDoc(java.lang.Object docNum)

showDoc

public void showDoc(java.lang.Object docNum)

actionAddDocument

public void actionAddDocument(java.lang.Object docTable)

actionReconstruct

public void actionReconstruct(java.lang.Object docNumText)

actionEditAdd

public boolean actionEditAdd(java.lang.Object editdoc)

actionEditReplace

public void actionEditReplace(java.lang.Object editdoc)

actionEditAddField

public void actionEditAddField(java.lang.Object editdoc)

actionEditDeleteField

public void actionEditDeleteField(java.lang.Object editfield)

actionMLT

public void actionMLT(java.lang.Object docNum,
                      java.lang.Object docTable)
More Like this query from the current doc (or selected fields)


showTV

public void showTV(java.lang.Object table)

clipTV

public void clipTV(java.lang.Object vTable)

actionSetNorm

public void actionSetNorm(java.lang.Object table)
                   throws java.lang.Exception
Throws:
java.lang.Exception

displayNewNorm

public void displayNewNorm(java.lang.Object dialog)

setNorm

public void setNorm(java.lang.Object dialog)

showTField

public void showTField(java.lang.Object table)

_showData

public void _showData(java.lang.Object dialog)

saveField

public void saveField(java.lang.Object table)

clipCopyFields

public void clipCopyFields(java.lang.Object table)

clipCopyDoc

public void clipCopyDoc(java.lang.Object table)

showFirstTerm

public void showFirstTerm(java.lang.Object fCombo,
                          java.lang.Object fText)

showNextTerm

public void showNextTerm(java.lang.Object fCombo,
                         java.lang.Object fText)

showTerm

public void showTerm(java.lang.Object fCombo,
                     java.lang.Object fText)

showFirstTermDoc

public void showFirstTermDoc(java.lang.Object fText)

showNextTermDoc

public void showNextTermDoc(java.lang.Object fText)

showPositions

public void showPositions(java.lang.Object fText)

_showPayloads

public void _showPayloads(java.lang.Object dialog)

clipPositions

public void clipPositions(java.lang.Object pTable)

showAllTermDoc

public void showAllTermDoc(java.lang.Object fText)

createAnalyzer

public org.apache.lucene.analysis.Analyzer createAnalyzer(java.lang.Object srchOpts)

getDefaultField

protected java.lang.String getDefaultField(java.lang.Object srchOptTabs)

createQuery

public org.apache.lucene.search.Query createQuery(java.lang.String queryString)
                                           throws java.lang.Exception
Create a Query instance that corresponds to values selected in the UI, such as analyzer class name and arguments, and default field.

Returns:
Throws:
java.lang.Exception

createSimilarity

public org.apache.lucene.search.Similarity createSimilarity(java.lang.Object srchOpts)

createCollector

public AccessibleHitCollector createCollector(java.lang.Object srchOpts)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

explainStructure

public void explainStructure(java.lang.Object qTabs)

showParsed

public void showParsed()
Update the parsed and rewritten query views.


search

public void search(java.lang.Object qField)
Perform a search. NOTE: this method is usually invoked from the GUI.

Parameters:
qField - Thinlet widget containing the query

prevPage

public void prevPage(java.lang.Object sTable)

nextPage

public void nextPage(java.lang.Object sTable)

explainResult

public void explainResult(java.lang.Object sTable)
Pop up a modal dialog explaining the selected result.

Parameters:
sTable - Thinlet table widget containing selected search result.

gotoDoc

public void gotoDoc(java.lang.Object sTable)

deleteTermDoc

public void deleteTermDoc(java.lang.Object fText)

deleteDoc

public void deleteDoc(java.lang.Object docNum)

actionDeleteDocList

public void actionDeleteDocList(java.lang.Object docList)

deleteDocList

public void deleteDocList(java.lang.Object searchTable)

actionAbout

public void actionAbout()

actionShowFonts

public void actionShowFonts()
Pop up a modal font selection dialog.


setupSelFont

public void setupSelFont(java.lang.Object selfont)
Initialize the font selection dialog.

Parameters:
selfont - font selection dialog

selectFont

public void selectFont(java.lang.Object selfont)
Show preview of the selected font.

Parameters:
selfont - font selection dialog

actionSetFont

public void actionSetFont(java.lang.Object selfont)
Set the default font in the UI.

Parameters:
selfont - font selection dialog

actionSetDecoder

public void actionSetDecoder(java.lang.Object fList,
                             java.lang.Object combo)

getCustomSimilarity

public org.apache.lucene.search.Similarity getCustomSimilarity()
Returns current custom similarity implementation.

Returns:

setCustomSimilarity

public void setCustomSimilarity(org.apache.lucene.search.Similarity s)
Set the current custom similarity implementation.

Parameters:
s -

actionDesignSimilarity

public void actionDesignSimilarity()
Switch the view to display the SimilarityDesigner plugin, if present.


destroy

public boolean destroy()
Shut down Luke. If exitOnDestroy is true (such as when Luke was started from the main method), invoke also System.exit().

Overrides:
destroy in class thinlet.Thinlet
Returns:
true to exit, and false to keep the frame and continue the application

actionExit

public void actionExit()

goUrl

public void goUrl(java.lang.Object url)
Open URL in the system default browser.

Parameters:
url -

startLuke

public static Luke startLuke(java.lang.String[] args)
Start the GUI, and optionally open an index.

Parameters:
args - index parameters
Returns:
fully initialized Luke instance

main

public static void main(java.lang.String[] args)
Main method. If you just want to instantiate Luke from other classes or scripts, use startLuke(String[]) instead.

Parameters:
args -

usage

public static void usage()

lostOwnership

public void lostOwnership(java.awt.datatransfer.Clipboard arg0,
                          java.awt.datatransfer.Transferable arg1)
Specified by:
lostOwnership in interface java.awt.datatransfer.ClipboardOwner

getNumTerms

public int getNumTerms()
Returns:
the numTerms