TC Java
2011 Version

gov.nih.nlm.nls.tc.Api
Class StiApi

java.lang.Object
  extended by gov.nih.nlm.nls.tc.Api.StiApi

public class StiApi
extends java.lang.Object

This class provides Semantic Type Indexing API. It takes a term or ID|term as input.

History:

Version:
V-2011
Author:
NLM Lexical Systems Group

Field Summary
protected  Configuration conf_
           
protected  java.lang.String configFile_
           
protected  SemanticTypes sts_
           
protected  boolean verbose_
           
 
Constructor Summary
StiApi(Configuration conf)
          Creates an StiApi object and initiate related data, using a specified configuration object.
StiApi(Configuration conf, SemanticTypes sts)
          Creates an StiApi object and initiate related data, using a specified configuration object and semantic types object.
StiApi(java.sql.Connection conn)
          Creates an StiApi object and initiate related data, using a specified database connection object.
StiApi(java.sql.Connection conn, SemanticTypes sts)
          Creates an StiApi object and initiate related data, using a specified database connection object and semantic types object.
StiApi(java.util.Hashtable<java.lang.String,java.lang.String> properties)
          Creates an StiApi object and initiate related data, using a specified properties to be overwritten in configuration.
StiApi(java.lang.String configFile)
          Creates an StiApi object and initiate related data, using a specified configuration file.
 
Method Summary
 void Close()
          Close STI database connection.
 java.lang.String GetDetailScoreStrByText(java.lang.String inTextStr, InputFilterOption inputFilterOption, OutputFilterOption outputFilterOption)
          Get ST detail scores in String for words.
 InputFilter GetInputFilter()
          Get the inputFilter Java object.
 SemanticTypes GetSemanticTypes()
          Get the Semantic Types object.
 java.util.Vector<Count2f> GetStiScoresByText(java.lang.String inTextStr, InputFilterOption inputFilterOption)
          Get ST scores by text.
 java.util.Vector<Count2f> GetStiScoresByText(java.lang.String inTextStr, InputFilterOption inputFilterOption, java.util.Vector<java.lang.String> forcedLegalWords)
          Get ST scores by text with forced legal words.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configFile_

protected java.lang.String configFile_

conf_

protected Configuration conf_

verbose_

protected boolean verbose_

sts_

protected SemanticTypes sts_
Constructor Detail

StiApi

public StiApi(Configuration conf)
Creates an StiApi object and initiate related data, using a specified configuration object.

Close( ) method must be called to close Db connection after using a StiApi object.

Parameters:
conf - Configuration object

StiApi

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

Close( ) method must be called to close Db connection after using a StiApi object.

Parameters:
configFile - the absolute path of the configuration file

StiApi

public StiApi(java.sql.Connection conn)
Creates an StiApi object and initiate related data, using a specified database connection object.

Close( ) method must be called to close Db connection after using a StiApi object.

Parameters:
conn - Db connection object

StiApi

public StiApi(java.util.Hashtable<java.lang.String,java.lang.String> properties)
Creates an StiApi object and initiate related data, using a specified properties to be overwritten in configuration.

Close( ) method must be called to close Db connection after using a StiApi object.

Parameters:
properties - properties to be overwrite in configuration

StiApi

public StiApi(Configuration conf,
              SemanticTypes sts)
Creates an StiApi object and initiate related data, using a specified configuration object and semantic types object.

Close( ) method must be called to close Db connection after using a StiApi object.

Parameters:
conf - Configuration object
sts - Semantic types objects

StiApi

public StiApi(java.sql.Connection conn,
              SemanticTypes sts)
Creates an StiApi object and initiate related data, using a specified database connection object and semantic types object.

Close( ) method must be called to close Db connection after using a StiApi object.

Parameters:
conn - Database connection object
sts - Semantic types objects
Method Detail

GetStiScoresByText

public java.util.Vector<Count2f> GetStiScoresByText(java.lang.String inTextStr,
                                                    InputFilterOption inputFilterOption)
Get ST scores by text.

Parameters:
inTextStr - input text (phrase, TI, AB)
inputFilterOption - the inputFilter option java object
Returns:
ST scores, a Vector of Count2f objects

GetStiScoresByText

public java.util.Vector<Count2f> GetStiScoresByText(java.lang.String inTextStr,
                                                    InputFilterOption inputFilterOption,
                                                    java.util.Vector<java.lang.String> forcedLegalWords)
Get ST scores by text with forced legal words. This method is mainly used by WSD Api.

Parameters:
inTextStr - input text (phrase, TI, AB)
inputFilterOption - the inputFilter option java object
Returns:
ST scores, a Vector of Count2f objects

GetDetailScoreStrByText

public java.lang.String GetDetailScoreStrByText(java.lang.String inTextStr,
                                                InputFilterOption inputFilterOption,
                                                OutputFilterOption outputFilterOption)
Get ST detail scores in String for words.

Parameters:
inTextStr - input text (phrase, TI, AB)
inputFilterOption - the inputFilter option java object
outputFilterOption - the output filter option java object
Returns:
ST detail scores in String

GetInputFilter

public InputFilter GetInputFilter()
Get the inputFilter Java object.

Returns:
inputFilter java object

GetSemanticTypes

public SemanticTypes GetSemanticTypes()
Get the Semantic Types object.

Returns:
Semantic Types java object

Close

public void Close()
Close STI database connection. This method must be called before exiting StiApi.


TC Java
2011 Version

Submit a bug or feature

Copyright © 2011 National Library of Medicine