gov.nih.nlm.nls.gspell
Class Cfg

java.lang.Object
  extended bygov.nih.nlm.nls.gspell.Cfg
Direct Known Subclasses:
Options

class Cfg
extends java.lang.Object

Cfg is a class that reads in a properties file and retreives values for them


Constructor Summary
Cfg()
          This is a constructor for Options
 
Method Summary
(package private)  java.lang.String _makeDir(java.lang.String pDirectory)
          Method _makeDir This method creates a dictionaries/dictName dir
 java.lang.String get(java.lang.String pAttribute)
          get retrieves values for an attribute asked for This method will return a null for attributes asked for which do not exist.
(package private)  java.lang.String getDictionaryPath()
          Method getDictionaryPath
(package private)  java.lang.String getDictionaryPath(java.lang.String pDictionaryName)
          Method getDictionaryPath
(package private)  void read(java.lang.String pDictionaryName)
          Method read This method will take an absolute path to the directory where the dictionary resides, or it will look in the classpath for directories labeled dictionaries for the beginning paths to look for dictionary directory and a config file labeled "dictionary".cfg
(package private)  void read(java.lang.String pDictionaryDir, java.lang.String pDictionaryName)
          Method read This method will take an absolute path to the directory where the dictionary resides, or it will look in the classpath for directories labeled dictionaries for the beginning paths to look for dictionary directory and a config file labeled "dictionary".cfg
(package private)  void save(java.lang.String pDictionaryName)
          Save.
(package private)  void set(java.lang.String pKey, java.lang.String pValue)
          Set.
(package private)  void setDictionaryPath(java.lang.String pDictionaryDir)
          Method setDictionaryPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cfg

public Cfg()
    throws GSpellException
This is a constructor for Options

Throws:
java.lang.Exception
GSpellException
Method Detail

read

void read(java.lang.String pDictionaryName)
    throws java.lang.Exception
Method read This method will take an absolute path to the directory where the dictionary resides, or it will look in the classpath for directories labeled dictionaries for the beginning paths to look for dictionary directory and a config file labeled "dictionary".cfg

Parameters:
pDictionaryName -
Throws:
java.lang.Exception

read

void read(java.lang.String pDictionaryDir,
          java.lang.String pDictionaryName)
    throws java.lang.Exception
Method read This method will take an absolute path to the directory where the dictionary resides, or it will look in the classpath for directories labeled dictionaries for the beginning paths to look for dictionary directory and a config file labeled "dictionary".cfg

Parameters:
pDictionaryDir -
pDictionaryName -
Throws:
java.lang.Exception

get

public java.lang.String get(java.lang.String pAttribute)
get retrieves values for an attribute asked for This method will return a null for attributes asked for which do not exist.

Parameters:
pAttribute -
Returns:
String

set

void set(java.lang.String pKey,
         java.lang.String pValue)
Set. This method sets the key=value pair into the properties

Parameters:
pKey -
pValue -

save

void save(java.lang.String pDictionaryName)
    throws java.lang.Exception
Save. This method writes out the properties file back out

Parameters:
pDictionaryName -
Throws:
java.lang.Exception

_makeDir

java.lang.String _makeDir(java.lang.String pDirectory)
                    throws java.lang.Exception
Method _makeDir This method creates a dictionaries/dictName dir

Parameters:
pDirectory -
Returns:
String
Throws:
java.lang.Exception

getDictionaryPath

java.lang.String getDictionaryPath()
                             throws java.lang.Exception
Method getDictionaryPath

Returns:
String
Throws:
java.lang.Exception

getDictionaryPath

java.lang.String getDictionaryPath(java.lang.String pDictionaryName)
                             throws java.lang.Exception
Method getDictionaryPath

Parameters:
pDictionaryName -
Returns:
String
Throws:
java.lang.Exception

setDictionaryPath

void setDictionaryPath(java.lang.String pDictionaryDir)
Method setDictionaryPath

Parameters:
pDictionaryDir -


The use and distribution of this material is subject to the terms and conditions included in the file SPECIALIST_NLP_TOOLS_TERMS_AND_CONDITIONS.TXT, located in the root directory of the distribution.