gov.nih.nlm.mms.browser
Class AbstractBrowserRestrictor

java.lang.Object
  extended by gov.nih.nlm.mms.AbstractGUIConfigurable
      extended by gov.nih.nlm.mms.browser.AbstractBrowserRestrictor
All Implemented Interfaces:
BrowserRestrictor, Configurable, GUIConfigurable, Restrictor, Comparable, Comparator
Direct Known Subclasses:
ContentViewBrowserRestrictor, SemanticTypesBrowserRestrictor, ShowAllBrowserRestrictor, SourceBrowserRestrictor

public abstract class AbstractBrowserRestrictor
extends AbstractGUIConfigurable
implements BrowserRestrictor

Generically represents an object that holds criteria for how to restrict or highlight content in finder searches and/or concept view displays.

Author:
Deborah Shapiro

Field Summary
protected  ConceptDataSelector cds
           
 
Fields inherited from class gov.nih.nlm.mms.AbstractGUIConfigurable
data_changed, default_configuration, listeners, user_configuration
 
Constructor Summary
AbstractBrowserRestrictor()
           
 
Method Summary
 boolean equals(Object o)
          This method returns true if the parameter has the same name as that in this BrowserRestrictor.
 List<Color> getColor(Object o)
          Returns a List of Colors for which the given parameter matches in the BrowserRestrictor's key.
 ConceptDataSelector getConceptDataSelector()
          Returns a ConceptDataSelector.
 Properties getProperties()
          Returns the Properties representing the configuration choices.
 List<String> getStyle(Object o)
          Returns a List of font styles for which the given parameter matches in the BrowserRestrictor's key.
 boolean hasAdvancedOptions()
          Indicates whether or not an options menu item should be supplied for advanced configuration options.
 boolean isBold()
          Indicates if restricted data will be displayed in bold.
 boolean isConceptViewHideModeEnabled()
          Indicates if hide mode is enabled, so restricted data will be hidden from view.
 boolean isConceptViewHighlightModeEnabled()
          Indicates if highlight mode is enabled, so restricted data will be highlighted when viewed.
 boolean isFinderRestrictionEnabled()
          Indicates if restrictions will be enacted on Finders.
 boolean isItalics()
          Indicates if restricted data will be displayed in italics.
 boolean isUnderline()
          Indicates if restricted data will be displayed in underline.
abstract  boolean keep(Object o)
          Indicates if the given Object should be kept according to the restriction rules of this BrowserRestrictor return true if Object should be kept false otherwise
 void setBold(boolean b)
          Sets whether or not the restricted data will be displayed using bold.
 void setConceptViewHideModeEnabled(boolean b)
          Sets hide mode to be enabled, so restricted data will be hidden from view.
 void setConceptViewHighlightModeEnabled(boolean b)
          Sets highlight mode to be enabled, so restricted data will be highlighted when viewed.
 void setFinderRestrictionEnabled(boolean b)
          Sets restrictions to be enacted on Finders.
 void setItalics(boolean b)
          Sets whether or not the restricted data will be displayed using italics.
 void setProperties(Properties props)
          Sets the Properties representing the configuration choices.
 void setUnderline(boolean b)
          Sets whether or not the restricted data will be displayed using underline.
 String toString()
          Indicates the name of the BrowserRestrictor.
 
Methods inherited from class gov.nih.nlm.mms.AbstractGUIConfigurable
addDataChangeListener, addValidationError, addValidationWarning, clearValidationErrors, clearValidationWarnings, compareTo, fireDataChanged, getColor, getConfigurationDetails, getGUIConfigurableForValidationFailure, getHelpPanel, getName, getPanel, getTabDescription, getValidationErrors, getValidationWarnings, hasDataChanged, removeDataChangeListener, resetDataChanged, resetToDefaults, setConfiguration, setConfiguration, setDataChanged, setPanelSelections, showOptions, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.nih.nlm.mms.browser.BrowserRestrictor
getStyleLegend
 
Methods inherited from interface gov.nih.nlm.mms.GUIConfigurable
addDataChangeListener, getColor, getGUIConfigurableForValidationFailure, getHelpPanel, getName, getPanel, getTabDescription, getValidationErrors, getValidationWarnings, hasDataChanged, removeDataChangeListener, resetDataChanged, setDataChanged, setPanelSelections, showOptions, validate
 
Methods inherited from interface gov.nih.nlm.mms.Configurable
getConfigurationDetails, resetToDefaults, setConfiguration, setConfiguration
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface java.util.Comparator
compare
 

Field Detail

cds

protected ConceptDataSelector cds
Constructor Detail

AbstractBrowserRestrictor

public AbstractBrowserRestrictor()
Method Detail

getConceptDataSelector

public ConceptDataSelector getConceptDataSelector()
Returns a ConceptDataSelector.

Specified by:
getConceptDataSelector in interface BrowserRestrictor
Returns:
a ConceptDataSelector

setFinderRestrictionEnabled

public void setFinderRestrictionEnabled(boolean b)
Sets restrictions to be enacted on Finders.

Specified by:
setFinderRestrictionEnabled in interface BrowserRestrictor
Parameters:
b - true if finder restriction is enabled; false otherwise

isFinderRestrictionEnabled

public boolean isFinderRestrictionEnabled()
Indicates if restrictions will be enacted on Finders.

Specified by:
isFinderRestrictionEnabled in interface BrowserRestrictor
Returns:
true if restrictions will be enacted on Finders false otherwise

setConceptViewHideModeEnabled

public void setConceptViewHideModeEnabled(boolean b)
Sets hide mode to be enabled, so restricted data will be hidden from view.

Specified by:
setConceptViewHideModeEnabled in interface BrowserRestrictor
Parameters:
b - true if hide mode should be enabled; false otherwise

isConceptViewHideModeEnabled

public boolean isConceptViewHideModeEnabled()
Indicates if hide mode is enabled, so restricted data will be hidden from view.

Specified by:
isConceptViewHideModeEnabled in interface BrowserRestrictor
Returns:
true if hide mode is enabled false otherwise

setConceptViewHighlightModeEnabled

public void setConceptViewHighlightModeEnabled(boolean b)
Sets highlight mode to be enabled, so restricted data will be highlighted when viewed.

Specified by:
setConceptViewHighlightModeEnabled in interface BrowserRestrictor
Parameters:
b - true if highlight mode is enabled false otherwise

isConceptViewHighlightModeEnabled

public boolean isConceptViewHighlightModeEnabled()
Indicates if highlight mode is enabled, so restricted data will be highlighted when viewed.

Specified by:
isConceptViewHighlightModeEnabled in interface BrowserRestrictor
Returns:
true if highlight mode is enabled false otherwise

toString

public String toString()
Indicates the name of the BrowserRestrictor.

Overrides:
toString in class Object
Returns:
String name

isBold

public boolean isBold()
Indicates if restricted data will be displayed in bold.

Specified by:
isBold in interface BrowserRestrictor
Returns:
true if bold false otherwise

isItalics

public boolean isItalics()
Indicates if restricted data will be displayed in italics.

Specified by:
isItalics in interface BrowserRestrictor
Returns:
true if italics false otherwise

isUnderline

public boolean isUnderline()
Indicates if restricted data will be displayed in underline.

Specified by:
isUnderline in interface BrowserRestrictor
Returns:
true if underline false otherwise

keep

public abstract boolean keep(Object o)
Indicates if the given Object should be kept according to the restriction rules of this BrowserRestrictor return true if Object should be kept false otherwise

Specified by:
keep in interface Restrictor
Returns:
true object will be kept false otherwise

setItalics

public void setItalics(boolean b)
Sets whether or not the restricted data will be displayed using italics.

Specified by:
setItalics in interface BrowserRestrictor
Parameters:
true - if italics will be used; false otherwise

setBold

public void setBold(boolean b)
Sets whether or not the restricted data will be displayed using bold.

Specified by:
setBold in interface BrowserRestrictor
Parameters:
true - if bold will be used; false otherwise

setUnderline

public void setUnderline(boolean b)
Sets whether or not the restricted data will be displayed using underline.

Specified by:
setUnderline in interface BrowserRestrictor
Parameters:
true - if underline will be used; false otherwise

equals

public boolean equals(Object o)
This method returns true if the parameter has the same name as that in this BrowserRestrictor.

Specified by:
equals in interface Comparator
Overrides:
equals in class Object
Parameters:
o - Object to be compared with this BrowserRestrictor
Returns:
boolean true if parameter o equals this BrowserRestrictor false if parameter o is not equal to this BrowserRestrictor

getProperties

public Properties getProperties()
Returns the Properties representing the configuration choices.

Specified by:
getProperties in interface Configurable
Overrides:
getProperties in class AbstractGUIConfigurable
Returns:
the Properties representing the configuration choices

setProperties

public void setProperties(Properties props)
Sets the Properties representing the configuration choices.

Specified by:
setProperties in interface Configurable
Overrides:
setProperties in class AbstractGUIConfigurable
Parameters:
p - the Properties representing the configuration choices

hasAdvancedOptions

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

Specified by:
hasAdvancedOptions in interface GUIConfigurable
Overrides:
hasAdvancedOptions in class AbstractGUIConfigurable
Returns:
true if so; false otherwise

getColor

public List<Color> getColor(Object o)
Returns a List of Colors for which the given parameter matches in the BrowserRestrictor's key.

Specified by:
getColor in interface BrowserRestrictor
Parameters:
o - Object
Returns:
list of colors

getStyle

public List<String> getStyle(Object o)
Returns a List of font styles for which the given parameter matches in the BrowserRestrictor's key.

Specified by:
getStyle in interface BrowserRestrictor
Parameters:
o - Object
Returns:
list of styles, such as bold, underline, italic, regular


Copyright ©2005