Lvg Java
2006p Version

gov.nih.nlm.nls.lvg.Api
Class LvgLexItemApi

java.lang.Object
  extended by gov.nih.nlm.nls.lvg.CmdLineSyntax.SystemOption
      extended by gov.nih.nlm.nls.lvg.Api.LvgCmdApi
          extended by gov.nih.nlm.nls.lvg.Api.LvgLexItemApi

public class LvgLexItemApi
extends LvgCmdApi

This class provides an LVG API for users to setup flows by defining a Lvg command. The input of this API are focus on LexItem(s). The output is a Vector composes of Lvg ouputs in the string format.

All LVG API consists methods for three phases:

History:

Version:
V-2006p
Author:
NLM NLS Development Team
See Also:
Design Document

Field Summary
 
Fields inherited from class gov.nih.nlm.nls.lvg.Api.LvgCmdApi
catFieldNum_, flowStrs_, flowStrsList_, inflFieldNum_, inReader_, promptFlag_, quitStrList_, runFlag_, termFieldNum_
 
Fields inherited from class gov.nih.nlm.nls.lvg.CmdLineSyntax.SystemOption
systemOption_
 
Constructor Summary
LvgLexItemApi()
          Creates an LvgLexItemApi object and initiate related data (default).
LvgLexItemApi(java.util.Hashtable properties)
          Creates an LvgLexItemApi object and initiate related data with properties to be overwritten in configuration.
LvgLexItemApi(java.lang.String optionStr)
          Creates an LvgLexItemApi object, initiate related data, using a command string.
LvgLexItemApi(java.lang.String optionStr, java.util.Hashtable properties)
          Creates an LvgLexItemApi object, initiate related data, using a command string with properties to be overwritten in configuration.
LvgLexItemApi(java.lang.String optionStr, java.lang.String configFile)
          Creates an LvgLexItemApi object, initiate related data, using a command string.
LvgLexItemApi(java.lang.String optionStr, java.lang.String configFile, java.util.Hashtable properties)
          Creates an LvgLexItemApi object, initiate related data, using a command string with properties to be overwritten in configuration.
 
Method Summary
 java.util.Vector MutateLexItem(java.lang.String inLine)
          Performs flow mutation by processing the input term.
 java.util.Vector ProcessLexItem(LexItem in)
          Performs flow mutation by processing the input.
 java.util.Vector ProcessLexItems(java.util.Vector ins)
          Performs flow mutation by processing the input.
 java.util.Vector ProcessLexItemsFromFCO(java.util.Vector ins)
          Performs flow mutation by processing the input.
 java.util.Vector ProcessLineLexItem()
          Performs flow mutation by processing the a input from System in.
 
Methods inherited from class gov.nih.nlm.nls.lvg.Api.LvgCmdApi
CleanUp, DefineFlag, ExecuteCommand, ExecuteFlow, GetConnection, GetFlowSpecificOptions, GetLvgOutputOption, GetPrompt, IsLegalOption, Mutate, MutateToString, PrintLvgHelp, ProcessLine, SetMinTermLength, SetOption, SetPromptStr, SetQuitStrList
 
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
 

Constructor Detail

LvgLexItemApi

public LvgLexItemApi()
Creates an LvgLexItemApi object and initiate related data (default). This constructor is considered as a preprocess method.

CleanUp( ) method must be called to close Db connection after using this object


LvgLexItemApi

public LvgLexItemApi(java.lang.String optionStr)
Creates an LvgLexItemApi object, initiate related data, using a command string. This constructor is considered as a preprocess method.

CleanUp( ) method must be called to close Db connection after using this object

Parameters:
optionStr - the initial lvg option string

LvgLexItemApi

public LvgLexItemApi(java.lang.String optionStr,
                     java.lang.String configFile)
Creates an LvgLexItemApi object, initiate related data, using a command string. This constructor is considered as a preprocess method.

CleanUp( ) method must be called to close Db connection after using this object

Parameters:
optionStr - the initial lvg option string
configFile - the absolute path of the configuration file

LvgLexItemApi

public LvgLexItemApi(java.util.Hashtable properties)
Creates an LvgLexItemApi object and initiate related data with properties to be overwritten in configuration. This constructor is considered as a preprocess method.

CleanUp( ) method must be called to close Db connection after using this object

Parameters:
properties - properties to be overwrite in configuration

LvgLexItemApi

public LvgLexItemApi(java.lang.String optionStr,
                     java.util.Hashtable properties)
Creates an LvgLexItemApi object, initiate related data, using a command string with properties to be overwritten in configuration. This constructor is considered as a preprocess method.

CleanUp( ) method must be called to close Db connection after using this object

Parameters:
optionStr - the initial lvg option string
properties - properties to be overwrite in configuration

LvgLexItemApi

public LvgLexItemApi(java.lang.String optionStr,
                     java.lang.String configFile,
                     java.util.Hashtable properties)
Creates an LvgLexItemApi object, initiate related data, using a command string with properties to be overwritten in configuration. This constructor is considered as a preprocess method.

CleanUp( ) method must be called to close Db connection after using this object

Parameters:
optionStr - the initial lvg option string
configFile - the absolute path of the configuration file
properties - properties to be overwrite in configuration
Method Detail

MutateLexItem

public java.util.Vector MutateLexItem(java.lang.String inLine)
                               throws java.lang.Exception
Performs flow mutation by processing the input term.

Parameters:
inLine - the input to be mutated.
Returns:
the Lvg mutation results in a Vector of LexITems
Throws:
java.lang.Exception

ProcessLexItemsFromFCO

public java.util.Vector ProcessLexItemsFromFCO(java.util.Vector ins)
                                        throws java.sql.SQLException,
                                               java.io.IOException
Performs flow mutation by processing the input. The input is the output (a Vector of LexItems) from previous flow component. The output LexItems from the result of a flow component needs to be do some target to source conversion before being sent into next flow component for mutation. This method takes care of such convertion.

Parameters:
ins - a Vector of LexItems (from flow compoment output)
Returns:
mutation result (a vector of LexItems)
Throws:
java.sql.SQLException
java.io.IOException

ProcessLexItems

public java.util.Vector ProcessLexItems(java.util.Vector ins)
                                 throws java.sql.SQLException,
                                        java.io.IOException
Performs flow mutation by processing the input. The input is a Vector of LexItems.

Parameters:
ins - a Vector of LexItems
Returns:
mutation result (a vector of LexItems)
Throws:
java.sql.SQLException
java.io.IOException

ProcessLexItem

public java.util.Vector ProcessLexItem(LexItem in)
                                throws java.sql.SQLException,
                                       java.io.IOException
Performs flow mutation by processing the input. The input is an LexItem.

Parameters:
in - a LexItem for mutation
Returns:
mutation result (a vector of LexItems)
Throws:
java.sql.SQLException
java.io.IOException

ProcessLineLexItem

public java.util.Vector ProcessLineLexItem()
                                    throws java.sql.SQLException,
                                           java.io.IOException
Performs flow mutation by processing the a input from System in. The input is a term (string). This method provide Lvg interface prompt.

Returns:
mutation result (a vector of LexItems)
Throws:
java.sql.SQLException
java.io.IOException

Lvg Java
2006p Version

Submit a bug or feature

Copyright © 2006p National Library of Medicine