|
Lvg Java 2006p Version |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nih.nlm.nls.lvg.CmdLineSyntax.SystemOption
gov.nih.nlm.nls.lvg.Api.LvgCmdApi
public class LvgCmdApi
This class provides an LVG API for users to setup flows by defining a Lvg command. Two methods, ProcessLine( ) and Mutate( ) are used for flow mutation for the case of using interface prompt or not. The input of this API is a term (string). The output is a Vector composes of Lvg ouputs in the string format.
All LVG API consists methods for three phases:
History:
| Field Summary | |
|---|---|
protected int |
catFieldNum_
|
protected java.util.Vector |
flowStrs_
|
protected java.util.Vector |
flowStrsList_
|
protected int |
inflFieldNum_
|
protected static java.io.BufferedReader |
inReader_
|
protected boolean |
promptFlag_
|
protected java.util.Vector |
quitStrList_
|
protected boolean |
runFlag_
|
protected int |
termFieldNum_
|
| Fields inherited from class gov.nih.nlm.nls.lvg.CmdLineSyntax.SystemOption |
|---|
systemOption_ |
| Constructor Summary | |
|---|---|
LvgCmdApi()
Creates an LvgCmdApi object and initiate related data (default). |
|
LvgCmdApi(java.util.Hashtable properties)
Creates an LvgCmdApi object and initiate related data with properties to be overwritten in configuration. |
|
LvgCmdApi(java.lang.String optionStr)
Creates an LvgApi object, initiate related data, using a command string. |
|
LvgCmdApi(java.lang.String optionStr,
java.util.Hashtable properties)
Creates an LvgApi object, initiate related data, using a command string with properties to be overwritten in configuration. |
|
LvgCmdApi(java.lang.String optionStr,
java.lang.String configFile)
Creates an LvgApi object, initiate related data, using a command string and the path of configuration file. |
|
LvgCmdApi(java.lang.String optionStr,
java.lang.String configFile,
java.util.Hashtable properties)
Creates an LvgApi object, initiate related data, using a command string and the path of configuration file with properties to be overwritten in configuration. |
|
| Method Summary | |
|---|---|
void |
CleanUp()
Close Lvg database connection and persistent tries. |
protected void |
DefineFlag()
Define the Lvg system option by defining a string. |
protected void |
ExecuteCommand(OptionItem optionItem,
Option systemOption)
Execute Lvg command for a specified option item in a given system option. |
protected java.util.Vector |
ExecuteFlow(LexItem in,
java.lang.String flowStr)
Execute a specified Lvg flow transformation for a given LexItem. |
java.sql.Connection |
GetConnection()
Get the Db connection |
LvgFlowSpecificOption |
GetFlowSpecificOptions()
Get Lvg Flow Specific Options |
LvgOutputOption |
GetLvgOutputOption()
Get Lvg Output Option. |
protected void |
GetPrompt()
Get the Lvg interface prompt and print it out to system output. |
boolean |
IsLegalOption()
Check if the input command is legal. |
void |
Mutate(java.lang.String inTerm)
Performs flow mutation by processing the input term. |
java.lang.String |
MutateToString(java.lang.String inTerm)
Performs flow mutation by processing the input term and return the result as a string. |
static void |
PrintLvgHelp()
Print out the Lvg help menu. |
boolean |
ProcessLine()
Performs flow mutation by processing the input line (term). |
void |
SetMinTermLength(int minTermLength)
Set minimum Trie Length |
void |
SetOption(java.lang.String optionStr)
Set the Lvg command for flows. |
void |
SetPromptStr(java.lang.String promptStr)
Set the prompt string. |
void |
SetQuitStrList(java.util.Vector quitStrList)
Set a list for quiting the program while using Lvg prompt interface. |
| Methods inherited from class gov.nih.nlm.nls.lvg.CmdLineSyntax.SystemOption |
|---|
CheckOption, CheckSyntax, ExecuteCommands, GetOption, ToBoolean, ToFloatArray, ToIntArray, ToStringArray |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Vector quitStrList_
protected boolean runFlag_
protected static java.io.BufferedReader inReader_
protected java.util.Vector flowStrs_
protected java.util.Vector flowStrsList_
protected int termFieldNum_
protected int catFieldNum_
protected int inflFieldNum_
protected boolean promptFlag_
| Constructor Detail |
|---|
public LvgCmdApi()
CleanUp( ) method must be called to close Db connection after using this object
public LvgCmdApi(java.lang.String optionStr)
CleanUp( ) method must be called to close Db connection after using this object
optionStr - the initial lvg option string
public LvgCmdApi(java.lang.String optionStr,
java.lang.String configFile)
CleanUp( ) method must be called to close Db connection after using this object
optionStr - the initial lvg option stringconfigFile - the absolute path of the configuration filepublic LvgCmdApi(java.util.Hashtable properties)
CleanUp( ) method must be called to close Db connection after using this object
properties - properties to be overwrite in configuration
public LvgCmdApi(java.lang.String optionStr,
java.util.Hashtable properties)
CleanUp( ) method must be called to close Db connection after using this object
optionStr - the initial lvg option stringproperties - properties to be overwrite in configuration
public LvgCmdApi(java.lang.String optionStr,
java.lang.String configFile,
java.util.Hashtable properties)
CleanUp( ) method must be called to close Db connection after using this object
optionStr - the initial lvg option stringconfigFile - the absolute path of the configuration fileproperties - properties to be overwrite in configuration| Method Detail |
|---|
public void SetPromptStr(java.lang.String promptStr)
promptStr - the customerized prompt stringpublic void SetQuitStrList(java.util.Vector quitStrList)
quitStrList - a Vector coposed of string for quiting programpublic boolean IsLegalOption()
public void SetOption(java.lang.String optionStr)
optionStr - Lvg command for flowspublic LvgOutputOption GetLvgOutputOption()
public java.sql.Connection GetConnection()
public void CleanUp()
public boolean ProcessLine()
throws java.sql.SQLException,
java.io.IOException
java.sql.SQLException
java.io.IOExceptionpublic static void PrintLvgHelp()
public void Mutate(java.lang.String inTerm)
throws java.lang.Exception
inTerm - the term to be mutated.
java.lang.Exception
public java.lang.String MutateToString(java.lang.String inTerm)
throws java.lang.Exception
inTerm - the term to be mutated.
java.lang.Exceptionpublic LvgFlowSpecificOption GetFlowSpecificOptions()
public void SetMinTermLength(int minTermLength)
minTermLength - minimum trie term length
protected void ExecuteCommand(OptionItem optionItem,
Option systemOption)
ExecuteCommand in class SystemOptionoptionItem - the option to be executedsystemOption - the system option that the option item will be
run onprotected void DefineFlag()
DefineFlag in class SystemOption
protected void GetPrompt()
throws java.io.IOException
java.io.IOException
protected java.util.Vector ExecuteFlow(LexItem in,
java.lang.String flowStr)
throws java.sql.SQLException
Notes This function needs to be modified if adding a new flow option.
in - the LexItem to be transformedflowStr - the specified flow in a string format
java.sql.SQLException
|
Lvg Java 2006p Version |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||