|
LexAccess Java 2008 Version |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nih.nlm.nls.lexAccess.Api.LexAccessApi
public class LexAccessApi
This class provides an API for LexAccess.
History:
| Field Summary | |
|---|---|
static int |
B_BEGIN
|
static int |
B_CONTAIN
|
static int |
B_END
|
static int |
B_EXACT
|
static int |
B_NONE
|
static int |
BASE
|
static int |
BASE_DETAILS
|
static int |
INFL_VAR
|
static int |
INFL_VAR_DETAILS
|
static java.lang.String |
LS_STR
|
static int |
SPELL_VAR
|
static int |
SPELL_VAR_DETAILS
|
static int |
TEXT
|
static int |
TEXT_XML
|
static int |
XML
|
| Constructor Summary | |
|---|---|
LexAccessApi()
Creates a LexAccessApi object and initiate related data (default). |
|
LexAccessApi(java.sql.Connection conn)
Creates a LexAccessApi object and initiate related data using a specified database connection. |
|
LexAccessApi(java.util.Hashtable<java.lang.String,java.lang.String> properties)
Creates a LexAccessApi object and initiate related data with properties needs to be overwritten |
|
LexAccessApi(java.lang.String configFile)
Creates a LexAccessApi object and initiate related data using a specified configuration file. |
|
LexAccessApi(java.lang.String configFile,
java.util.Hashtable<java.lang.String,java.lang.String> properties)
Creates a LexAccessApi object and initiate related data using a specified configuration file with properties to be wverwritten |
|
| Method Summary | |
|---|---|
void |
CleanUp()
A method to close the established database connection |
void |
CloseConnection(java.sql.Connection conn)
A method to close the specified database connection |
java.lang.String |
FormatResultToStr(LexAccessApiResult lexAccessApiResult,
java.lang.String inputTerm,
boolean showQuery,
java.lang.String query,
boolean noOutputFlag,
java.lang.String noOutputMsg,
boolean showTotalRecNum,
int lexRecordFormat,
java.lang.String fieldSep)
Format the result to a String by sepcifying options. |
Configuration |
GetConfiguration()
A method to get the configuration object |
java.sql.Connection |
GetConnection()
A method to get the established database connection |
LexAccessApiResult |
GetLexRecords(java.lang.String input)
A method to get the Lexical records of an input (term or Eui). |
LexAccessApiResult |
GetLexRecordsByBase(java.lang.String input,
int baseBy)
A method to get the Lexical records of an input (term or Eui). |
LexAccessApiResult |
GetLexRecordsByCat(long category)
A method to get the Lexical records by specified category. |
java.lang.String |
GetResultStrByBase(java.lang.String base,
int baseBy,
long category,
boolean showQuery,
java.lang.String query,
boolean noOutputFlag,
java.lang.String noOutputMsg,
boolean showTotalRecNum,
int lexRecordFormat,
java.lang.String fieldSep)
Get result in String by specifying base and it's criteria. |
java.lang.String |
GetResultStrByCategory(long category,
boolean showQuery,
java.lang.String query,
boolean noOutputFlag,
java.lang.String noOutputMsg,
boolean showTotalRecNum,
int lexRecordFormat,
java.lang.String fieldSep)
Get result in String by specifying category in a long value. |
java.lang.String |
GetResultStrByTerm(java.lang.String inputTerm,
long category,
boolean showQuery,
java.lang.String query,
boolean noOutputFlag,
java.lang.String noOutputMsg,
boolean showTotalRecNum,
int lexRecordFormat,
java.lang.String fieldSep)
Get result in String by specifying an input term. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String LS_STR
public static final int TEXT
public static final int XML
public static final int TEXT_XML
public static final int BASE
public static final int BASE_DETAILS
public static final int SPELL_VAR
public static final int SPELL_VAR_DETAILS
public static final int INFL_VAR
public static final int INFL_VAR_DETAILS
public static final int B_NONE
public static final int B_BEGIN
public static final int B_CONTAIN
public static final int B_END
public static final int B_EXACT
| Constructor Detail |
|---|
public LexAccessApi()
CleanUp( ) method must be called to close Db connection after using this object
public LexAccessApi(java.lang.String configFile)
CleanUp( ) method must be called to close Db connection after using this object
configFile - the absolute path of the configuration filepublic LexAccessApi(java.sql.Connection conn)
CleanUp( ) method must be called to close Db connection after using this object
conn - database connectionpublic LexAccessApi(java.util.Hashtable<java.lang.String,java.lang.String> properties)
CleanUp( ) method must be called to close Db connection after using this object
public LexAccessApi(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
configFile - the absolute path of the configuration fileproperties - properties to be overwrite in config| Method Detail |
|---|
public java.lang.String GetResultStrByTerm(java.lang.String inputTerm,
long category,
boolean showQuery,
java.lang.String query,
boolean noOutputFlag,
java.lang.String noOutputMsg,
boolean showTotalRecNum,
int lexRecordFormat,
java.lang.String fieldSep)
throws java.sql.SQLException
CleanUp( ) method must be called to close Db connection after using this object
inputTerm - a String for term or Euicategory - a long vlaue for the output category filtershowQuery - a boolean flag for showing input queryquery - a String of input querynoOutputFlag - a boolean flag for showing message if no outputnoOutputMsg - a String of no output messageshowTotalRecNum - a boolean flag for showing total retrieval numlexRecordFormat - an int value for Text(0), Xml(1), TextXml(2),
base(3), baseDetail(4), spellingVars(5), SpellingVarsDetail(6),
inflectionalVars(7), inflectionalVarsDetail(8)fieldSep - a String of field separator
java.sql.SQLException
public java.lang.String GetResultStrByBase(java.lang.String base,
int baseBy,
long category,
boolean showQuery,
java.lang.String query,
boolean noOutputFlag,
java.lang.String noOutputMsg,
boolean showTotalRecNum,
int lexRecordFormat,
java.lang.String fieldSep)
throws java.sql.SQLException
CleanUp( ) method must be called to close Db connection after using this object
base - a String for basebaseBy - base retrieve criteria, none, begin, contain, endcategory - a long vlaue for the output category filtershowQuery - a boolean flag for showing input queryquery - a String of input querynoOutputFlag - a boolean flag for showing message if no outputnoOutputMsg - a String of no output messageshowTotalRecNum - a boolean flag for showing total retrieval numlexRecordFormat - an int value for Text(0), Xml(1), TextXml(2),
base(3), baseDetail(4), spellingVars(5), SpellingVarsDetail(6),
inflectionalVars(7), inflectionalVarsDetail(8)fieldSep - a String of field separator
java.sql.SQLException
public java.lang.String GetResultStrByCategory(long category,
boolean showQuery,
java.lang.String query,
boolean noOutputFlag,
java.lang.String noOutputMsg,
boolean showTotalRecNum,
int lexRecordFormat,
java.lang.String fieldSep)
throws java.sql.SQLException
CleanUp( ) method must be called to close Db connection after using this object
category - a long vlaue for the input categoryshowQuery - a boolean flag for showing input queryquery - a String of input querynoOutputFlag - a boolean flag for showing message if no outputnoOutputMsg - a String of no output messageshowTotalRecNum - a boolean flag for showing total retrieval numlexRecordFormat - an int value for Text(0), Xml(1), TextXml(2),
base(3), baseDetail(4), spellingVars(5), SpellingVarsDetail(6),
inflectionalVars(7), inflectionalVarsDetail(8)fieldSep - a String of field separator
java.sql.SQLException
public java.lang.String FormatResultToStr(LexAccessApiResult lexAccessApiResult,
java.lang.String inputTerm,
boolean showQuery,
java.lang.String query,
boolean noOutputFlag,
java.lang.String noOutputMsg,
boolean showTotalRecNum,
int lexRecordFormat,
java.lang.String fieldSep)
throws java.sql.SQLException
lexAccessApiResult - the result from LexAccessApiinputTerm - a String for term or EuishowQuery - a boolean flag for showing input queryquery - a String of input querynoOutputFlag - a boolean flag for showing message if no outputnoOutputMsg - a String of no output messageshowTotalRecNum - a boolean flag for showing total retrieval numlexRecordFormat - an int value for Text(0), Xml(1), TextXml(2),
base(3), baseDetail(4), spellingVars(5), SpellingVarsDetail(6),
inflectionalVars(7), inflectionalVarsDetail(8)fieldSep - a String of field separator
java.sql.SQLException
public LexAccessApiResult GetLexRecords(java.lang.String input)
throws java.sql.SQLException
input - an inflected term or Eui
java.sql.SQLException
public LexAccessApiResult GetLexRecordsByBase(java.lang.String input,
int baseBy)
throws java.sql.SQLException
input - an inflected termbaseBy - base retrieve criteria
java.sql.SQLException
public LexAccessApiResult GetLexRecordsByCat(long category)
throws java.sql.SQLException
category - specified category
java.sql.SQLExceptionpublic Configuration GetConfiguration()
public java.sql.Connection GetConnection()
public void CleanUp()
public void CloseConnection(java.sql.Connection conn)
conn - the specified database connection to be closed
|
LexAccess Java 2008 Version |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||