Because of a lapse in government funding, the information on this website may not be up to date, transactions submitted via the website may not be processed, and the agency may not be able to respond to inquiries until appropriations are enacted. The NIH Clinical Center (the research hospital of NIH) is open. For more details about its operating status, please visit cc.nih.gov. Updates regarding government operating status and resumption of normal operations can be found at OPM.gov.

Lexical Tools

LVG - API

Java Class Api - LvgCmdApi( )

command line/text output

  • PreProcess:
    1. To instantiate an LvgCmdApi object
      String optionStr = new String("....");      // define the option string
      LvgCmdApi lvg = new LvgCmdApi(optionStr);   // instantiate the LvgCmdApi
      
      or
      
      String optionStr = new String("....");      // define the option string
      LvgCmdApi lvg = new LvgCmdApi( );           // instantiate the LvgCmdApi
      lvg.SetOption(optionStr);                   // set the option
      	
    2. To use other Api methods
      lvg.SetPromptStr(promptStr);               // Set the prompt string
      lvg.SetQuitStrList(quitStrList);           // Set quit string
      lvg.IsLegalOption( );                      // check if the option is legal
      lvg.PrintLvgHelp( );                       // Print out LVg help menu
      	
  • Process:
    1. In case of using Lvg mutate method with Lvg prompt function:
      lvg.ProcessLine(term);           // Mutate the input term with interface prompt
      	
    2. In case of using Lvg mutate method only:
      lvg.Mutate(term);                // Mutate the input term
      	
  • PostProcess:

    A CleanUp( ) method must be called after using LvgCmdApi to disconnect database and close persistant tries.

    lvg.CleanUp( );	                // Close database and files
    	

Two sample programs were developed to illustrate above usage.

  • LVG Command Line Interface Program - LvgCmdApiTest.java
  • LVG Text Based Interactive Interface Program - LvgTextInterface.java