gov.nih.nlm.mms
Class InstallConfiguration

java.lang.Object
  extended bygov.nih.nlm.mms.InstallConfiguration

public class InstallConfiguration
extends Object

Represents the user's configuration choices up to the point where a configuration file is loaded and MetamorphoSysGUI is instantiated. It is mostly used in InstallationGUI and SubsetGUI.

Author:
Deborah Shapiro

Method Summary
 void clearProgressMonitor()
          Clears the MMSProgressMonitor.
static InstallConfiguration getInstallConfiguration()
          Returns the singleton reference to the InstallConfiguration.
 File getLexiconFile()
          Returns the File that contains the lexicon data.
 File getMetaDestinationDirectory()
          Returns the directory into which the Metathesaurus subset will be made.
 File getMetamorphoSysConfigurationDirectory()
          Returns the File for the MetamorphoSys "config" directory to use.
 File getMetamorphoSysFile()
          Returns the File that contains the MetamorphoSys application.
 MetamorphoSysInputStream getMetamorphoSysInputStream()
          Gets the MetamorphoSysInputStream.
 File[] getMetathesaurusFiles()
          Returns the File that contains the Metathesaurus data.
 boolean getOverrideConfigurationFiles()
          Indicates whether or not settings from this object should override the configuration files
 MMSProgressMonitor getProgressMonitor()
          Returns a MMSProgressMonitor.
 String getReleaseVersion()
          Returns the release version.
 File getSemanticNetworkFile()
          Returns the File that contains the semantic network data.
 File getUmlsDestinationDirectory()
          Returns the directory into which the UMLS will be installed.
 File getUmlsDirectory()
          Returns the File directory that contains the Metathesaurus data.
protected  void initialize()
          Reset the values.
static boolean install(Frame owner)
          Installs the Semantic Network and the Specialist Lexicon and Lexical Tools if they are selected on the InstallationGUI.
 boolean isCopyToHardDriveChecked()
          Returns whether or not the metamorphosys file and nlm files have been chosen for installation.
 boolean isInstallUMLS()
          Indicates whether the user chose the Install UMLS button on the WelcomeGUI.
 boolean isLexiconChecked()
          Returns whether or not the lexicon has been chosen for installation.
 boolean isLvgChecked()
          Returns whether or not LVG has been chosen for installation.
 boolean isMetathesaurusChecked()
          Returns whether or not a directory should be created for the Metathesaurus.
 boolean isNewConfiguration()
          Returns whether or not the user is running with a new configuration file.
 boolean isQueryUserToOpenSavedConfig()
          Indicates whether the user should be queried to open last saved configuration when initializing RRF Browser.
 boolean isSemanticNetworkChecked()
          Returns whether or not the semantic network has been chosen for installation.
 void setCopyToHardDriveChecked(boolean checked)
          Sets whether or not the metamorphosys file and nlm files have been chosen for installation.
 void setInstallUMLS(boolean install_umls)
          Sets whether the user chose the Install UMLS button on the WelcomeGUI.
 void setLexiconChecked(boolean checked)
          Sets whether or not the lexicon has been chosen for installation.
 void setLexiconFile(File file)
          Sets the File that contains the lexicon data.
 void setLvgChecked(boolean checked)
          Sets whether or not LVG has been chosen for installation.
 void setMetaDestinationDirectory(File dir)
          Sets the directory into which the Metathesaurus subset will be made.
 void setMetamorphoSysConfigurationDirectory(File dir)
          Returns the File for the MetamorphoSys "config" directory to use.
 void setMetamorphoSysFile(File file)
          Sets the File that contains the MetamorphoSys application.
 void setMetathesaurusChecked(boolean checked)
          Sets whether or not a directory should be created for the Metathesaurus.
 void setMetathesaurusFiles(File[] files)
          Sets the File that contains the Metathesaurus data.
 void setNewConfiguration(boolean new_config_file)
          Sets whether or not the user is running with a new configuration file.
 void setOverrideConfigurationFiles(boolean override)
          Sets the flag indicating whether or not settings from this object should override the configuration files
 void setQueryUserToOpenSavedConfig(boolean query_to_open)
          Sets whether the user should be queried to open the last saved configuration when initializing the RRF Browser.
 void setReleaseVersion(String version)
          Sets the release version.
 void setSemanticNetworkChecked(boolean checked)
          Sets whether or not the semantic network has been chosen for installation.
 void setSemanticNetworkFile(File file)
          Sets the File that contains the semantic network data.
 void setUmlsDestinationDirectory(File dir)
          Sets the directory into which the UMLS will be installed.
 void setUmlsDirectory(File dir)
          Sets the File directory that contains the Metathesaurus data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initialize

protected void initialize()
Reset the values.


getInstallConfiguration

public static InstallConfiguration getInstallConfiguration()
Returns the singleton reference to the InstallConfiguration.

Returns:
the singleton reference to the InstallConfiguration

isNewConfiguration

public boolean isNewConfiguration()
Returns whether or not the user is running with a new configuration file.

Returns:
true if a new configuration is being made false if a saved configuration is being used

setNewConfiguration

public void setNewConfiguration(boolean new_config_file)
Sets whether or not the user is running with a new configuration file.

Parameters:
new_config_file - true if a new configuration is being made false if a saved configuration is being used

isSemanticNetworkChecked

public boolean isSemanticNetworkChecked()
Returns whether or not the semantic network has been chosen for installation.

Returns:
true if semantic network is chosen false otherwise

setSemanticNetworkChecked

public void setSemanticNetworkChecked(boolean checked)
Sets whether or not the semantic network has been chosen for installation.

Parameters:
checked - according to selection of semantic network

getSemanticNetworkFile

public File getSemanticNetworkFile()
Returns the File that contains the semantic network data.

Returns:
File containing semantic network data

setSemanticNetworkFile

public void setSemanticNetworkFile(File file)
Sets the File that contains the semantic network data.

Parameters:
file - File containing semantic network data

isLexiconChecked

public boolean isLexiconChecked()
Returns whether or not the lexicon has been chosen for installation.

Returns:
true if lexicon is chosen false otherwise

setLexiconChecked

public void setLexiconChecked(boolean checked)
Sets whether or not the lexicon has been chosen for installation.

Parameters:
checked - according to selection of lexicon

isLvgChecked

public boolean isLvgChecked()
Returns whether or not LVG has been chosen for installation.

Returns:
true if LVG is chosen false otherwise

setLvgChecked

public void setLvgChecked(boolean checked)
Sets whether or not LVG has been chosen for installation.

Parameters:
checked - according to selection of LVG

getLexiconFile

public File getLexiconFile()
Returns the File that contains the lexicon data.

Returns:
File containing lexicon data

setLexiconFile

public void setLexiconFile(File file)
Sets the File that contains the lexicon data.

Parameters:
file - File containing lexicon data

getOverrideConfigurationFiles

public boolean getOverrideConfigurationFiles()
Indicates whether or not settings from this object should override the configuration files

Returns:
true if semantic network is chosen false otherwise

setOverrideConfigurationFiles

public void setOverrideConfigurationFiles(boolean override)
Sets the flag indicating whether or not settings from this object should override the configuration files

Parameters:
override - the flag value

isCopyToHardDriveChecked

public boolean isCopyToHardDriveChecked()
Returns whether or not the metamorphosys file and nlm files have been chosen for installation.

Returns:
true if copy to hard drive is chosen false otherwise

setCopyToHardDriveChecked

public void setCopyToHardDriveChecked(boolean checked)
Sets whether or not the metamorphosys file and nlm files have been chosen for installation.

Parameters:
checked - according to selection of copy to hard drive

getMetamorphoSysFile

public File getMetamorphoSysFile()
Returns the File that contains the MetamorphoSys application.

Returns:
File containing MetamorphoSys

getMetamorphoSysConfigurationDirectory

public File getMetamorphoSysConfigurationDirectory()
Returns the File for the MetamorphoSys "config" directory to use.

Returns:
File for the MetamorphoSys "config" directory

setMetamorphoSysConfigurationDirectory

public void setMetamorphoSysConfigurationDirectory(File dir)
Returns the File for the MetamorphoSys "config" directory to use.

Parameters:
dir - File for the MetamorphoSys "config" directory

setMetamorphoSysFile

public void setMetamorphoSysFile(File file)
Sets the File that contains the MetamorphoSys application.

Parameters:
file - File containing MetamorphoSys

isMetathesaurusChecked

public boolean isMetathesaurusChecked()
Returns whether or not a directory should be created for the Metathesaurus.

Returns:
true if metathesaurus is chosen false otherwise

setMetathesaurusChecked

public void setMetathesaurusChecked(boolean checked)
Sets whether or not a directory should be created for the Metathesaurus.

Parameters:
checked - according to selection of metathesaurus

getUmlsDirectory

public File getUmlsDirectory()
Returns the File directory that contains the Metathesaurus data.

Returns:
File containing Metathesaurus data

getMetathesaurusFiles

public File[] getMetathesaurusFiles()
Returns the File that contains the Metathesaurus data.

Returns:
File containing Metathesaurus data

setUmlsDirectory

public void setUmlsDirectory(File dir)
Sets the File directory that contains the Metathesaurus data.

Parameters:
dir - File containing Metathesaurus data

setMetathesaurusFiles

public void setMetathesaurusFiles(File[] files)
Sets the File that contains the Metathesaurus data.

Parameters:
files - File containing Metathesaurus data

getMetaDestinationDirectory

public File getMetaDestinationDirectory()
Returns the directory into which the Metathesaurus subset will be made.

Returns:
File directory into which the subset will be made

setMetaDestinationDirectory

public void setMetaDestinationDirectory(File dir)
Sets the directory into which the Metathesaurus subset will be made.

Parameters:
dir - File directory into which the subsets will be made

getUmlsDestinationDirectory

public File getUmlsDestinationDirectory()
Returns the directory into which the UMLS will be installed.

Returns:
the File directory into which the UMLS will be installed

setUmlsDestinationDirectory

public void setUmlsDestinationDirectory(File dir)
Sets the directory into which the UMLS will be installed.

Parameters:
dir - the File directory into which the UMLS will be installed

setReleaseVersion

public void setReleaseVersion(String version)
Sets the release version.

Parameters:
version - the release version

getReleaseVersion

public String getReleaseVersion()
Returns the release version.

Returns:
the release version

isInstallUMLS

public boolean isInstallUMLS()
Indicates whether the user chose the Install UMLS button on the WelcomeGUI.

Returns:
true if yes no otherwise the user chose the ConfigureSubset button

setInstallUMLS

public void setInstallUMLS(boolean install_umls)
Sets whether the user chose the Install UMLS button on the WelcomeGUI.

Parameters:
install_umls - true if user chose the Install UMLS button no otherwise the user chose the ConfigureSubset button

isQueryUserToOpenSavedConfig

public boolean isQueryUserToOpenSavedConfig()
Indicates whether the user should be queried to open last saved configuration when initializing RRF Browser.

Returns:
true if yes user should be queried no otherwise

setQueryUserToOpenSavedConfig

public void setQueryUserToOpenSavedConfig(boolean query_to_open)
Sets whether the user should be queried to open the last saved configuration when initializing the RRF Browser.

Parameters:
query_to_open - true if user chose the Install UMLS button no otherwise the user chose the ConfigureSubset button

getProgressMonitor

public MMSProgressMonitor getProgressMonitor()
Returns a MMSProgressMonitor. If one doesn't yet exist, it instantiates one.

Returns:
MMSProgressMonitor

clearProgressMonitor

public void clearProgressMonitor()
Clears the MMSProgressMonitor.


getMetamorphoSysInputStream

public MetamorphoSysInputStream getMetamorphoSysInputStream()
Gets the MetamorphoSysInputStream.

Returns:
input stream

install

public static boolean install(Frame owner)
Installs the Semantic Network and the Specialist Lexicon and Lexical Tools if they are selected on the InstallationGUI. Writes the install.log.

Parameters:
owner - parent Component
Returns:
boolean true indicates installation completed false indicates installation failed


Copyright ©2005