Lvg Java
2006p Version

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

java.lang.Object
  extended by gov.nih.nlm.nls.lvg.Api.LvgApi

public class LvgApi
extends java.lang.Object

This class provides an LVG API for users to setup flows by calling Mutate( ) method in flow compoment classes. The input of this API can be either an LexItem or a Vector composes of LexItems. The output is a Vector composes of LexItems.

All LVG API consists methods for three phases:

History:

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

Constructor Summary
LvgApi()
          Creates an LvgApi object and initiate related data (default).
LvgApi(java.util.Hashtable properties)
          Creates an LvgApi object and initiate related data with properties to be overwritten in configuration.
LvgApi(java.lang.String configFile)
          Creates an LvgApi object and initiate related data (default), using a specified configuration file.
LvgApi(java.lang.String configFile, java.util.Hashtable properties)
          Creates an LvgApi object and initiate related data, using a specified configuration file, with properties to be overwritten in configuration
 
Method Summary
 void CleanUp()
          Close Lvg database connection and persistent tries.
 void CloseConnection(java.sql.Connection conn)
          Close the Lvg database connection.
 java.util.Vector GetConjunctionWords()
          Get the list of conjunction words
 java.sql.Connection GetConnection()
          Get the Lvg database connection.
 RamTrie GetDerivationTrie()
          Get the ram trie object for Lvg derivation rules.
 java.util.Hashtable GetDiacriticMap()
          Get the list of diacritics mapping list
 RamTrie GetInflectionTrie()
          Get the ram trie object for Lvg inflection rules.
 int GetMaxCodeLength()
          Get the maximum length for metaphone code.
 int GetMaxTerm()
          Get the maximum terms for permuting uninflection wrods.
 java.util.Vector GetNonInfoWords()
          Get the list of non-info words
 java.util.Vector GetStopWords()
          Get the list of stop words
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LvgApi

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

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


LvgApi

public LvgApi(java.lang.String configFile)
Creates an LvgApi object and initiate related data (default), using a specified configuration file.

This constructor is consider as a preprocess method.

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

Parameters:
configFile - the absolute path of the configuration file

LvgApi

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

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

Parameters:
properties - properties to be overwrite in configuration

LvgApi

public LvgApi(java.lang.String configFile,
              java.util.Hashtable properties)
Creates an LvgApi object and initiate related data, using a specified configuration file, with properties to be overwritten in configuration

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

Parameters:
configFile - the absolute path of the configuration file
properties - properties to be overwrite in configuration
Method Detail

GetConnection

public java.sql.Connection GetConnection()
Get the Lvg database connection. This method is a preprocess method.

Returns:
the JDBC connection to Lvg database

CloseConnection

public void CloseConnection(java.sql.Connection conn)
Close the Lvg database connection.

Parameters:
conn - JDBC connection to Lvg database

GetInflectionTrie

public RamTrie GetInflectionTrie()
Get the ram trie object for Lvg inflection rules. This method is a preprocess method.

Returns:
Lvg inflection ram trie

GetDerivationTrie

public RamTrie GetDerivationTrie()
Get the ram trie object for Lvg derivation rules. This method is a preprocess method.

Returns:
Lvg derivation ram trie

CleanUp

public void CleanUp()
Close Lvg database connection and persistent tries. This methods must be called before exiting LvgApi. It is a method from postprocess.


GetMaxTerm

public int GetMaxTerm()
Get the maximum terms for permuting uninflection wrods.

Returns:
the maximum terms for permuting uninflection wrods

GetMaxCodeLength

public int GetMaxCodeLength()
Get the maximum length for metaphone code.

Returns:
the maximum length for metaphone code

GetStopWords

public java.util.Vector GetStopWords()
Get the list of stop words

Returns:
a Vector of stop words list

GetNonInfoWords

public java.util.Vector GetNonInfoWords()
Get the list of non-info words

Returns:
a Vector of non-info words list

GetConjunctionWords

public java.util.Vector GetConjunctionWords()
Get the list of conjunction words

Returns:
a Vector of conjunction words list

GetDiacriticMap

public java.util.Hashtable GetDiacriticMap()
Get the list of diacritics mapping list

Returns:
a Hast table of diacritics mapping list

Lvg Java
2006p Version

Submit a bug or feature

Copyright © 2006p National Library of Medicine