gov.nih.nlm.mms.browser
Class WordSearchFinder

java.lang.Object
  extended bygov.nih.nlm.mms.browser.AbstractFinder
      extended bygov.nih.nlm.mms.browser.WordSearchFinder
All Implemented Interfaces:
Comparable, Configurable, Finder, GUIConfigurable

public class WordSearchFinder
extends AbstractFinder

Finds Concepts via word searches.

Author:
Deborah Shapiro

Nested Class Summary
 class WordSearchFinder.BackwardAction
           
 class WordSearchFinder.ForwardAction
           
 class WordSearchFinder.PopupListener
           
 
Field Summary
static String normalized_mode
           
static String regular_mode
           
 
Fields inherited from class gov.nih.nlm.mms.browser.AbstractFinder
clm, font_family, font_point_size, has_data_changed, user_configuration
 
Constructor Summary
WordSearchFinder()
          Instantiates a WordSearchFinder.
 
Method Summary
 void addDataChangeListener(DataChangeListener dcl)
          Adds a DataChangeListener that responds to configuration changes.
 Comparator getComparator()
          Returns the Comparator that will be used for sorting the word search results.
 Language getLanguage()
          Returns the Language of the index that will be searched.
 String getLvgConfigFile()
           
 String getName()
          Returns the name.
 JPanel getPanel()
          Returns a JPanel containing configuration options.
 Properties getProperties()
          Method returns all properties specific to the Finder.
 String getSearchMode()
           
 double getThreshold()
          Returns the rank threshold.
 boolean hasAdvancedOptions()
          Indicates whether or not an options menu item should be supplied for advanced configuration options.
 void highlightText()
          Highlights the text displayed in the word text field.
 void refresh()
          Redraws the text portions of the Finder.
 void removeDataChangeListener(DataChangeListener dcl)
          Removes the specified DataChangeListener.
 void resetToDefaults()
          Resets the configuration back to default values.
 void setComparator(Comparator comparator)
          Sets the Comparator thtat will be used for sorting the word search results.
 void setLanguage(Language lat)
          Sets the Language of the index that will be searched.
 void setLvgConfigFile(String lvg_config_file)
           
 void setProperties(Properties p)
          Sets the finder properties.
 void setSearchMode(String search_mode)
           
 void setThreshold(double threshold)
          Sets the rank threshold.
 void showOptions()
          Presents an advanced options GUI to the user.
 void subsetDirectoryOpened(File source_dir)
          Handles opening of a source directory.
 
Methods inherited from class gov.nih.nlm.mms.browser.AbstractFinder
compareTo, getColor, getConfigurationDetails, getGUIConfigurableForValidationFailure, getHelpPanel, getTabDescription, getValidateMessage, getValidationErrors, getValidationWarnings, hasDataChanged, resetDataChanged, setConceptListManager, setConfiguration, setConfiguration, setDataChanged, setFontFamily, setFontPointSize, setPanelSelections, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

regular_mode

public static String regular_mode

normalized_mode

public static String normalized_mode
Constructor Detail

WordSearchFinder

public WordSearchFinder()
Instantiates a WordSearchFinder.

Method Detail

getPanel

public JPanel getPanel()
Returns a JPanel containing configuration options.

Returns:
a JPanel containing configuration options

getProperties

public Properties getProperties()
Method returns all properties specific to the Finder.

Specified by:
getProperties in interface Configurable
Overrides:
getProperties in class AbstractFinder
Returns:
Properties only those directly related to the finder.

setProperties

public void setProperties(Properties p)
Sets the finder properties.

Specified by:
setProperties in interface Configurable
Overrides:
setProperties in class AbstractFinder
Parameters:
p - Properties

getThreshold

public double getThreshold()
Returns the rank threshold.

Returns:
the rank threshold.

setThreshold

public void setThreshold(double threshold)
Sets the rank threshold.

Parameters:
threshold - the rank threshold

subsetDirectoryOpened

public void subsetDirectoryOpened(File source_dir)
Handles opening of a source directory.

Specified by:
subsetDirectoryOpened in interface Finder
Overrides:
subsetDirectoryOpened in class AbstractFinder
Parameters:
source_dir - the source directory

getLanguage

public Language getLanguage()
Returns the Language of the index that will be searched. The default is "ENG".

Returns:
Language

getComparator

public Comparator getComparator()
Returns the Comparator that will be used for sorting the word search results.

Returns:
Comparator

getSearchMode

public String getSearchMode()

setSearchMode

public void setSearchMode(String search_mode)

getLvgConfigFile

public String getLvgConfigFile()

setLvgConfigFile

public void setLvgConfigFile(String lvg_config_file)

setComparator

public void setComparator(Comparator comparator)
Sets the Comparator thtat will be used for sorting the word search results.

Parameters:
comparator - Comparator

setLanguage

public void setLanguage(Language lat)
Sets the Language of the index that will be searched.

Parameters:
lat - Language

resetToDefaults

public void resetToDefaults()
Resets the configuration back to default values. When used with a GUI this method should change the data model behind the GUI and allow setPanelSelections to actually update the GUI.


highlightText

public void highlightText()
Highlights the text displayed in the word text field.


addDataChangeListener

public void addDataChangeListener(DataChangeListener dcl)
Adds a DataChangeListener that responds to configuration changes. Allows main GUI to record all changes to this gui in the undo/redo mechanism.

Specified by:
addDataChangeListener in interface GUIConfigurable
Overrides:
addDataChangeListener in class AbstractFinder
Parameters:
dcl - the DataChangeListener to add

removeDataChangeListener

public void removeDataChangeListener(DataChangeListener dcl)
Removes the specified DataChangeListener.

Specified by:
removeDataChangeListener in interface GUIConfigurable
Overrides:
removeDataChangeListener in class AbstractFinder
Parameters:
dcl - the DataChangeListener to remove

getName

public String getName()
Returns the name.

Returns:
the name

showOptions

public void showOptions()
Presents an advanced options GUI to the user.


hasAdvancedOptions

public boolean hasAdvancedOptions()
Indicates whether or not an options menu item should be supplied for advanced configuration options.

Returns:
true if so; false otherwise

refresh

public void refresh()
Redraws the text portions of the Finder.

Specified by:
refresh in interface Finder
Overrides:
refresh in class AbstractFinder


Copyright ©2005