|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nih.nlm.mms.AbstractGUIConfigurable
gov.nih.nlm.mms.browser.AbstractFinder
gov.nih.nlm.mms.browser.WordSearchFinder
public class WordSearchFinder
Finds Concepts via word searches.
All methods in this class should be called from a separate thread.
| Nested Class Summary | |
|---|---|
class |
WordSearchFinder.BackwardAction
Action provided to display the previous page of word search results. |
class |
WordSearchFinder.ForwardAction
Action provided to display the next page of word search results. |
static class |
WordSearchFinder.Options
Options is the model of the WordSearchFinder.OptionsGUI dialog. |
class |
WordSearchFinder.OptionsGUI
Options GUI for WordSearchFinder. |
class |
WordSearchFinder.PopupListener
Listens to display the JPopupMenu. |
static class |
WordSearchFinder.RadioButtonChoice
Enumerates radio button choices in WordSearchFinder.OptionsGUI. |
| Field Summary | |
|---|---|
protected static String |
DELIM
|
static String |
normalized_mode
Normalized Search Mode |
static String |
regular_mode
Regular Search Mode |
| Fields inherited from class gov.nih.nlm.mms.browser.AbstractFinder |
|---|
clm, conceptDataSelector, fBrowsableInputStream, font_family, font_point_size, has_data_changed, searchOptions |
| Fields inherited from class gov.nih.nlm.mms.AbstractGUIConfigurable |
|---|
data_changed, default_configuration, listeners, user_configuration |
| Constructor Summary | |
|---|---|
WordSearchFinder()
Instantiates a WordSearchFinder. |
|
| Method Summary | |
|---|---|
void |
addDataChangeListener(DataChangeListener dcl)
Adds a DataChangeListener that responds to configuration changes. |
protected double |
estimateCost(String[] searchWords,
WordSearchFinder.RadioButtonChoice radioButtonChoice,
Map wordFrequencyMap)
Estimates the cost of searching for the specified words, given a Map of the word frequency counts within strings. |
protected Concept[] |
findConceptsByWords(String[] words,
Map wordFrequencyMap,
WordSearchFinder.Options options)
Find Concepts that match search words, with results filtered by
WordSearchFinder.Options. |
String |
getLvgConfigFile()
Returns the LVG configuration file. |
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()
Returns the search mode. |
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 |
setLvgConfigFile(String lvg_config_file)
Sets the LVG configuration file. |
void |
setProperties(Properties p)
Sets the finder properties. |
void |
setSearchMode(String search_mode)
Sets the search mode. |
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 |
|---|
getBrowsableInputStream, getConceptDataSelector, getHelpPanel, setBrowsableInputStream, setConceptDataSelector, setConceptListManager, setFontFamily, setFontPointSize, setPanelSelections, setSearchOptions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface gov.nih.nlm.mms.GUIConfigurable |
|---|
getColor, getGUIConfigurableForValidationFailure, getTabDescription, getValidationErrors, getValidationWarnings, hasDataChanged, resetDataChanged, setDataChanged, validate |
| Methods inherited from interface gov.nih.nlm.mms.Configurable |
|---|
getConfigurationDetails, setConfiguration, setConfiguration |
| Field Detail |
|---|
public static String regular_mode
public static String normalized_mode
protected static final String DELIM
| Constructor Detail |
|---|
public WordSearchFinder()
WordSearchFinder.
| Method Detail |
|---|
public JPanel getPanel()
JPanel containing configuration options.
getPanel in interface GUIConfigurablegetPanel in class AbstractGUIConfigurableJPanel containing configuration optionspublic Properties getProperties()
Finder.
getProperties in interface ConfigurablegetProperties in class AbstractGUIConfigurableProperties only those directly related to the finder.public void setProperties(Properties p)
setProperties in interface ConfigurablesetProperties in class AbstractGUIConfigurablep - Propertiespublic void subsetDirectoryOpened(File source_dir)
subsetDirectoryOpened in interface FindersubsetDirectoryOpened in class AbstractFindersource_dir - the source directorypublic String getSearchMode()
public void setSearchMode(String search_mode)
search_mode - public String getLvgConfigFile()
public void setLvgConfigFile(String lvg_config_file)
lvg_config_file - public void resetToDefaults()
setPanelSelections to actually update the GUI.
resetToDefaults in interface ConfigurableresetToDefaults in class AbstractGUIConfigurable
protected Concept[] findConceptsByWords(String[] words,
Map wordFrequencyMap,
WordSearchFinder.Options options)
throws InterruptedException,
IOException
Concepts that match search words, with results filtered by
WordSearchFinder.Options.
words - search wordswordFrequencyMap - Map of search word frequencies.options - WordSearchFinder.Options
Concept matches.
InterruptedException
IOException
protected double estimateCost(String[] searchWords,
WordSearchFinder.RadioButtonChoice radioButtonChoice,
Map wordFrequencyMap)
Map of the word frequency counts within strings.
searchWords - array of words to be searchedradioButtonChoice - (@link RadioButtonChoice} for limiting resultswordFrequencyMap - Map from words to frequencies of those words
within strings
public void highlightText()
public void addDataChangeListener(DataChangeListener dcl)
DataChangeListener that responds to configuration changes.
Allows main GUI to record all changes to this gui in the undo/redo
mechanism.
addDataChangeListener in interface GUIConfigurableaddDataChangeListener in class AbstractGUIConfigurabledcl - the DataChangeListener to addpublic void removeDataChangeListener(DataChangeListener dcl)
DataChangeListener.
removeDataChangeListener in interface GUIConfigurableremoveDataChangeListener in class AbstractGUIConfigurabledcl - the DataChangeListener to removepublic String getName()
getName in interface GUIConfigurablegetName in class AbstractGUIConfigurablepublic void showOptions()
showOptions in interface GUIConfigurableshowOptions in class AbstractGUIConfigurablepublic boolean hasAdvancedOptions()
hasAdvancedOptions in interface GUIConfigurablehasAdvancedOptions in class AbstractGUIConfigurabletrue if so; false otherwisepublic void refresh()
Finder.
refresh in interface Finderrefresh in class AbstractFinder
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||