gov.nih.nlm.mms.filters
Class LanguagesToRemoveFilter

java.lang.Object
  extended bygov.nih.nlm.mms.filters.AbstractFilter
      extended bygov.nih.nlm.mms.filters.LanguagesToRemoveFilter
All Implemented Interfaces:
Comparable, ConceptContentSelector, Configurable, EventListener, Filter, GUIConfigurable, IgnorableListener, ListSelectionListener, SubsetListener, TableSortListener

public class LanguagesToRemoveFilter
extends AbstractFilter
implements TableSortListener, IgnorableListener, ConceptContentSelector

This Filter removes all CUI components with a given language

Author:
Deborah Shapiro

Field Summary
 
Fields inherited from class gov.nih.nlm.mms.filters.AbstractFilter
default_configuration, init_cui, subset_content, user_configuration
 
Constructor Summary
LanguagesToRemoveFilter()
          Every filter is required to have a no-arg constructor.
 
Method Summary
 void addLanguageToRemove(Language language)
          This method adds a Language to the data structure that holds the list of languages to be excluded.
 void applySelections(Concept concept)
          Method determines if a given CUI component will be removed from the release.
 void clearLanguagesToRemove()
          This method clears the data structure that holds the list of languages to be excluded.
 Color getColor()
          Method indicates the Color that should be used to display the name.
 String getConfigurationDetails()
          Method returns a list of the languages that were excluded for display in the configuration file.
 JPanel getHelpPanel()
          Method provides a JPanel that will be added to the main GUI help menu to allow the user to consult a help window that is particular to this filter.
 List getLanguagesToRemove()
          This method returns the List containing all languages to be excluded.
 String getName()
          Returns the name.
 JPanel getPanel()
          Method provides the GUI panel that will display the filter's screen as one of the tabs on the main GUI window.
 Properties getProperties()
          Method returns all properties specific to the filter.
 String getTabDescription()
          Method provides the description of the filter's screen and includes instructions on use.
 boolean ignoreEvents()
          Method returns boolean to indicate whether or not ListSelectionEvents are to be ignored.
 boolean isEfficientEnabled()
          Indicates if Filter can use the efficient mode during the "Initialize Cuis" phase of the subsetting process.
 boolean isLanguageToRemove(String language)
          This method returns true if terms with the specified language should be excluded.
 void removeLanguageToRemove(Language language)
          This method removes a Language from the data structure that holds the list of languages to be excluded.
 void resetToDefaults()
          Provides functionality for a "Reset To Defaults" Menu item.
 void setConfiguration(ApplicationConfiguration c)
          Method provides the filter with values from the default properties file.
 void setIgnoreEvents(boolean b)
          Method that turns off responses to the ListSelectionEvents
 void setPanelSelections()
          This method is responsible for selecting the rows of the table based on the properties for this filter.
 void setProperties(Properties props)
          Method provides the filter with all properties specific to the filter.
 void tableSortFinished(TableSortEvent e)
          Handle finish of table sorting.
 void tableSortStarted(TableSortEvent e)
          Handle start of table sorting.
 void valueChanged(ListSelectionEvent e)
          Sets the list of languages to be excluded when selection changes.
 
Methods inherited from class gov.nih.nlm.mms.filters.AbstractFilter
addDataChangeListener, applyFilter, beginInitializeCuiList, beginSubsetContent, compareTo, endInitializeCuiList, endSubsetContent, fireDataChanged, fireNotUndoableDataChanged, getGUIConfigurableForValidationFailure, getValidateMessage, getValidationErrors, getValidationWarnings, hasAdvancedOptions, hasDataChanged, removeDataChangeListener, resetDataChanged, setConfiguration, setCuiList, setDataChanged, showOptions, validate
 
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.filters.Filter
applyFilter
 
Methods inherited from interface gov.nih.nlm.mms.GUIConfigurable
addDataChangeListener, getGUIConfigurableForValidationFailure, getValidationErrors, getValidationWarnings, hasAdvancedOptions, hasDataChanged, removeDataChangeListener, resetDataChanged, setDataChanged, showOptions, validate
 
Methods inherited from interface gov.nih.nlm.mms.Configurable
setConfiguration
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface gov.nih.nlm.mms.SubsetListener
beginInitializeCuiList, beginSubsetContent, endInitializeCuiList, endSubsetContent, setCuiList
 

Constructor Detail

LanguagesToRemoveFilter

public LanguagesToRemoveFilter()
Every filter is required to have a no-arg constructor.

Method Detail

getPanel

public JPanel getPanel()
Method provides the GUI panel that will display the filter's screen as one of the tabs on the main GUI window. The code can assume that this method is called after setConfiguration(ApplicationConfiguration) and setProperties(Properties). There is no data change as a result of calling this method.

Specified by:
getPanel in interface GUIConfigurable
Returns:
JPanel that displays graphical interface for the filter

setPanelSelections

public void setPanelSelections()
This method is responsible for selecting the rows of the table based on the properties for this filter.

Specified by:
setPanelSelections in interface GUIConfigurable

getTabDescription

public String getTabDescription()
Method provides the description of the filter's screen and includes instructions on use.

Specified by:
getTabDescription in interface GUIConfigurable
Returns:
String text of instructions for use of panel

resetToDefaults

public void resetToDefaults()
Provides functionality for a "Reset To Defaults" Menu item. The implementation sets all rows for selection except for "ENG".

Specified by:
resetToDefaults in interface Configurable

getHelpPanel

public JPanel getHelpPanel()
Method provides a JPanel that will be added to the main GUI help menu to allow the user to consult a help window that is particular to this filter.

Specified by:
getHelpPanel in interface GUIConfigurable
Overrides:
getHelpPanel in class AbstractFilter
Returns:
JPanel to be called from the Options menu

setConfiguration

public void setConfiguration(ApplicationConfiguration c)
Method provides the filter with values from the default properties file. This is the first method called after the class is constructed.

Specified by:
setConfiguration in interface Configurable
Overrides:
setConfiguration in class AbstractFilter
Parameters:
c - ApplicationConfiguration default values

getProperties

public Properties getProperties()
Method returns all properties specific to the filter. They will start with the filter's class name which will be concatenated to the name of the property. Filter.property_name

Specified by:
getProperties in interface Configurable
Returns:
Properties only those directly related to the filter

setProperties

public void setProperties(Properties props)
Method provides the filter with all properties specific to the filter.

Specified by:
setProperties in interface Configurable
Parameters:
props - Properties all properties in the config file

applySelections

public void applySelections(Concept concept)
Method determines if a given CUI component will be removed from the release.

Specified by:
applySelections in interface ConceptContentSelector
Parameters:
concept - Concept

getName

public String getName()
Returns the name.

Specified by:
getName in interface GUIConfigurable
Returns:
String

getConfigurationDetails

public String getConfigurationDetails()
Method returns a list of the languages that were excluded for display in the configuration file.

Specified by:
getConfigurationDetails in interface Configurable
Returns:
String

clearLanguagesToRemove

public void clearLanguagesToRemove()
This method clears the data structure that holds the list of languages to be excluded.


addLanguageToRemove

public void addLanguageToRemove(Language language)
This method adds a Language to the data structure that holds the list of languages to be excluded.

Parameters:
language - Language

removeLanguageToRemove

public void removeLanguageToRemove(Language language)
This method removes a Language from the data structure that holds the list of languages to be excluded.

Parameters:
language - Language

isLanguageToRemove

public boolean isLanguageToRemove(String language)
This method returns true if terms with the specified language should be excluded.

Parameters:
language - String
Returns:
boolean

getLanguagesToRemove

public List getLanguagesToRemove()
This method returns the List containing all languages to be excluded.

Returns:
List

ignoreEvents

public boolean ignoreEvents()
Method returns boolean to indicate whether or not ListSelectionEvents are to be ignored.

Specified by:
ignoreEvents in interface IgnorableListener
Returns:
boolean true to be ignored false otherwise

setIgnoreEvents

public void setIgnoreEvents(boolean b)
Method that turns off responses to the ListSelectionEvents

Specified by:
setIgnoreEvents in interface IgnorableListener
Parameters:
b - boolean

tableSortStarted

public void tableSortStarted(TableSortEvent e)
Handle start of table sorting.

Specified by:
tableSortStarted in interface TableSortListener
Parameters:
e - TableSortEvent

tableSortFinished

public void tableSortFinished(TableSortEvent e)
Handle finish of table sorting.

Specified by:
tableSortFinished in interface TableSortListener
Parameters:
e - TableSortEvent

valueChanged

public void valueChanged(ListSelectionEvent e)
Sets the list of languages to be excluded when selection changes.

Specified by:
valueChanged in interface ListSelectionListener
Parameters:
e - ListSelectionEvent

getColor

public Color getColor()
Method indicates the Color that should be used to display the name.

Specified by:
getColor in interface GUIConfigurable
Overrides:
getColor in class AbstractFilter
Returns:
Color

isEfficientEnabled

public boolean isEfficientEnabled()
Indicates if Filter can use the efficient mode during the "Initialize Cuis" phase of the subsetting process. The efficient mode reads only MRCONSO and MRSTY during the "Initialize Cuis" phase.

Specified by:
isEfficientEnabled in interface Filter
Returns:
true if efficient mode is acceptable false if efficient mode is not acceptable


Copyright ©2005