gov.nih.nlm.mms
Class ApplicationConfiguration

java.lang.Object
  extended bygov.nih.nlm.mms.UserConfiguration
      extended bygov.nih.nlm.mms.ApplicationConfiguration

public class ApplicationConfiguration
extends UserConfiguration

Represents all application-level configuration data. This is the set of static configuration data that does not change, such as the list of sources present in the current release, as well as the set of default configurations for the user data.

Author:
Deborah Shapiro, Brian Carlsen

Field Summary
 
Fields inherited from class gov.nih.nlm.mms.UserConfiguration
default_subsets, selected_default_subset
 
Constructor Summary
ApplicationConfiguration(File config_file)
          Constructs an ApplicationConfiguration from the specified properties file.
ApplicationConfiguration(Properties p)
          Constructs an ApplicationConfiguration from the specified Properties.
 
Method Summary
 String getConfigDirectory()
          Returns the path to the configuration directory.
 String getHomeDirectory()
          Returns the path to the home directory.
 List getSemanticTypeChildren(String stn)
          Returns the list of HierarchicalSemanticTypes that are children of a specified tree number.
 Set getSemanticTypeChildrenAsSet(String stn)
          Returns the set of HierarchicalSemanticTypes that are children of a specified tree number.
 SourceTermType getSourceTermType(String sab, String tty)
          Returns the SourceTermType for the specified source abbreviation and term type.
 List getSourceTermTypes()
          Returns a List of all SourceTermType objects.
 boolean isSuppressedTerm(Atom a)
          Returns a List of suppressible cui,sui values.
protected  Properties loadProperties(Properties props)
          Configures the class by reading in Properties.
 void setConfigDirectory(String config_d)
          Sets the path to the configuration directory.
 void setHomeDirectory(String home_d)
          Sets the path to the home directory.
 void setSelectedDefaultSubset(DefaultSubset ds)
          Gets called every time opened or changed config file.
 
Methods inherited from class gov.nih.nlm.mms.UserConfiguration
addProperty, addSourcePath, clearFilters, clearProperties, clearSourcePaths, didLoadCauseWarnings, enableFilter, getActiveFilters, getAutomaticSelection, getConceptContentSelectors, getConceptManipulators, getConceptSelectors, getCurrentConfigurationFilename, getDefaultSubsets, getDefaultSubsetsAsList, getInputStream, getLoadWarningsReport, getOldStyleFilters, getOutputStream, getProperties, getProperty, getReleaseDate, getReleaseDescription, getReleaseVersion, getSelectedDefaultSubset, getSourcePaths, getSubsetDirectory, getValidFilters, hasDataChanged, importFilter, isOutputVersioned, load, removeProperty, removeSourcePath, reorderActiveFilters, resetDataChanged, saveState, setAutomaticSelection, setCurrentConfigFile, setInputStream, setOutputStream, setProperties, setPropertiesChanged, setSourcePaths, setSubsetDirectory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationConfiguration

public ApplicationConfiguration(File config_file)
                         throws LocalException
Constructs an ApplicationConfiguration from the specified properties file. Typically, this object is built from one of the METAMSYS/config/mmsys.{a,b,c}.prop files.

Parameters:
config_file - a java properties File
Throws:
LocalException - if there is a problem loading the properties file

ApplicationConfiguration

public ApplicationConfiguration(Properties p)
                         throws LocalException
Constructs an ApplicationConfiguration from the specified Properties.

Parameters:
p - Properties
Throws:
LocalException - if there is a problem loading the properties file
Method Detail

getSemanticTypeChildren

public List getSemanticTypeChildren(String stn)
Returns the list of HierarchicalSemanticTypes that are children of a specified tree number.

Parameters:
stn - a semantic type tree number
Returns:
the List of HierarchicalSemanticTypes that are children of

getSemanticTypeChildrenAsSet

public Set getSemanticTypeChildrenAsSet(String stn)
Returns the set of HierarchicalSemanticTypes that are children of a specified tree number.

Parameters:
stn - a semantic type tree number
Returns:
the Set of HierarchicalSemanticTypes that are children of

getSourceTermTypes

public List getSourceTermTypes()
Returns a List of all SourceTermType objects.

Returns:
a List of all SourceTermType objects.

getSourceTermType

public SourceTermType getSourceTermType(String sab,
                                        String tty)
Returns the SourceTermType for the specified source abbreviation and term type. If the source abbreviation and term type combination is not valid, null is returned.

Parameters:
sab - a source abbreviation, can be root or versioned
tty - a term type
Returns:
the SourceTermType for the specified source abbreviation and term type

isSuppressedTerm

public boolean isSuppressedTerm(Atom a)
Returns a List of suppressible cui,sui values. Each element of the list is a String with the format "cui|sui".

Parameters:
a - Atom
Returns:
a List of suppressible cui,sui values.

loadProperties

protected Properties loadProperties(Properties props)
                             throws LocalException
Configures the class by reading in Properties.

Overrides:
loadProperties in class UserConfiguration
Parameters:
props - default/application-level Properties
Returns:
Properties
Throws:
LocalException

setSelectedDefaultSubset

public void setSelectedDefaultSubset(DefaultSubset ds)
Gets called every time opened or changed config file.

Overrides:
setSelectedDefaultSubset in class UserConfiguration
Parameters:
ds - DefaultSubset

getConfigDirectory

public String getConfigDirectory()
Returns the path to the configuration directory. This is typically the MMSYS/config directory.

Returns:
the path to the configuration directory

setConfigDirectory

public void setConfigDirectory(String config_d)
Sets the path to the configuration directory. This is typically the MMSYS/config directory.

Parameters:
config_d - the path to the configuration directory

setHomeDirectory

public void setHomeDirectory(String home_d)
Sets the path to the home directory. This is typically the current directory, ".".

Parameters:
home_d - the path to the home directory

getHomeDirectory

public String getHomeDirectory()
Returns the path to the home directory. This is typically the current directory, ".".

Returns:
the path to the home directory


Copyright ©2005