public class LexAccessCmdApi
extends gov.nih.nlm.nls.lvg.CmdLineSyntax.SystemOption
History:
| Modifier and Type | Field and Description |
|---|---|
protected java.io.BufferedReader |
inReader_ |
protected java.io.BufferedWriter |
outWriter_ |
protected java.util.Vector<java.lang.String> |
quitStrList_ |
protected boolean |
runFlag_ |
| Constructor and Description |
|---|
LexAccessCmdApi()
Creates a LexAccessCmdApi object and initiate related data (default).
|
LexAccessCmdApi(java.util.Hashtable<java.lang.String,java.lang.String> properties)
Creates a LexAccessCmdApi object and initiate related data with
properties to be overwritten in configuration.
|
LexAccessCmdApi(java.lang.String optionStr)
Creates a LexAccessApi object, init related data by a command string.
|
LexAccessCmdApi(java.lang.String optionStr,
java.util.Hashtable<java.lang.String,java.lang.String> properties)
Creates a LexAccessApi object, init related data by a command string
with properties to be overwritten in configuration.
|
LexAccessCmdApi(java.lang.String optionStr,
java.lang.String configFile)
Creates a LexAccessApi object, init related data by a command string
and the path of configuration file.
|
LexAccessCmdApi(java.lang.String optionStr,
java.lang.String configFile,
java.util.Hashtable<java.lang.String,java.lang.String> properties)
Creates a LexAccessApi object, init related data by a command string
and the path of configuration file with properties to be overwritten
in configuration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
CleanUp()
Close LexAccess database connection and persistent tries.
|
protected void |
DefineFlag()
Define the LexAccess system option by defining a string.
|
protected void |
ExecuteCommand(gov.nih.nlm.nls.lvg.CmdLineSyntax.OptionItem optionItem,
gov.nih.nlm.nls.lvg.CmdLineSyntax.Option systemOption,
gov.nih.nlm.nls.lvg.Util.Out out)
Execute lexAccess command for a specified option item in a given system
option.
|
Configuration |
GetConfiguration()
A method to get the configuration object
|
java.sql.Connection |
GetConnection()
Get the Db connection
|
protected void |
GetPrompt()
Get the lexAccess interface prompt and print it out to system output.
|
boolean |
IsLegalOption()
Check if the input command is legal.
|
void |
PrintLexAccessHelp()
Print out the LexAccess help menu.
|
boolean |
Process()
Performs retrieving data by processing the input line (term).
|
java.lang.String |
ProcessToString()
Performs retrieving data by processing the input line (term).
|
void |
SetOption(java.lang.String optionStr)
Set the LexAccess command for retrieving data.
|
void |
SetPromptStr(java.lang.String promptStr)
Set the prompt string.
|
void |
SetQuitStrList(java.util.Vector<java.lang.String> quitStrList)
Set a list for quitting the program while using LexAccess prompt
interface.
|
protected java.util.Vector<java.lang.String> quitStrList_
protected java.io.BufferedReader inReader_
protected java.io.BufferedWriter outWriter_
protected boolean runFlag_
public LexAccessCmdApi()
CleanUp( ) method must be called to close Db connection after using this object
public LexAccessCmdApi(java.lang.String optionStr)
CleanUp( ) method must be called to close Db connection after using this object
optionStr - the initial lexAccess option stringpublic LexAccessCmdApi(java.lang.String optionStr,
java.lang.String configFile)
CleanUp( ) method must be called to close Db connection after using this object
optionStr - the initial lexAccess option stringconfigFile - the absolute path of the configuration filepublic LexAccessCmdApi(java.util.Hashtable<java.lang.String,java.lang.String> properties)
CleanUp( ) method must be called to close Db connection after using this object
properties - properties to be overwrite in configurationpublic LexAccessCmdApi(java.lang.String optionStr,
java.util.Hashtable<java.lang.String,java.lang.String> properties)
CleanUp( ) method must be called to close Db connection after using this object
optionStr - the initial lexAccess option stringproperties - properties to be overwrite in configurationpublic LexAccessCmdApi(java.lang.String optionStr,
java.lang.String configFile,
java.util.Hashtable<java.lang.String,java.lang.String> properties)
CleanUp( ) method must be called to close Db connection after using this object
optionStr - the initial lexAccess option stringconfigFile - the absolute path of the configuration fileproperties - properties to be overwrite in configurationpublic void SetPromptStr(java.lang.String promptStr)
promptStr - the customerized prompt stringpublic void SetQuitStrList(java.util.Vector<java.lang.String> quitStrList)
quitStrList - a collection of quitting optionspublic boolean IsLegalOption()
public void SetOption(java.lang.String optionStr)
optionStr - LexAccess command for flowspublic Configuration GetConfiguration()
public java.sql.Connection GetConnection()
public void CleanUp()
public java.lang.String ProcessToString()
throws java.sql.SQLException,
java.io.IOException
java.sql.SQLException - if there is an database error happensjava.io.IOException - if there is an IO error happenspublic boolean Process()
throws java.sql.SQLException,
java.io.IOException
java.sql.SQLException - if there is an database error happensjava.io.IOException - if there is an IO error happenspublic void PrintLexAccessHelp()
protected void ExecuteCommand(gov.nih.nlm.nls.lvg.CmdLineSyntax.OptionItem optionItem,
gov.nih.nlm.nls.lvg.CmdLineSyntax.Option systemOption,
gov.nih.nlm.nls.lvg.Util.Out out)
ExecuteCommand in class gov.nih.nlm.nls.lvg.CmdLineSyntax.SystemOptionoptionItem - the option to be executedsystemOption - the system option that the option item will be
run onprotected void DefineFlag()
DefineFlag in class gov.nih.nlm.nls.lvg.CmdLineSyntax.SystemOptionprotected void GetPrompt()
throws java.io.IOException
java.io.IOException - if there is an IO error happens