TC Java
2009 Version

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

java.lang.Object
  extended by gov.nih.nlm.nls.tc.Api.JdiApi
Direct Known Subclasses:
StriApi

public class JdiApi
extends java.lang.Object

This class provides Journal Descriptor Indexing API. It takes a term or ID|term as input.

History:

Version:
V-2009
Author:
NLM Lexical Systems Group

Field Summary
protected  Configuration conf_
           
protected  java.lang.String configFile_
           
protected  java.sql.Connection conn_
           
protected  InputFilter inputFilter_
           
protected  JournalDescriptors jds_
           
protected  LegalWords legalWords_
           
protected  Subheadings shs_
           
protected  boolean verbose_
           
protected  WordExtractionFilter wordExtractionFilter_
           
 
Constructor Summary
JdiApi(Configuration conf)
          Creates an JdiApi object and initiate related data, using a specified configuration object.
JdiApi(Configuration conf, JournalDescriptors jds, Subheadings shs)
          Creates an JdiApi object and initiate related data, using a specified configuration object, journal descritor object, and subheadings object.
JdiApi(java.sql.Connection conn)
          Creates an JdiApi object and initiate related data, using a specified db connection object.
JdiApi(java.sql.Connection conn, JournalDescriptors jds, Subheadings shs)
          Creates an JdiApi object and initiate related data, using a specified db connection object, journal descritor object, and subHeadings object.
JdiApi(java.util.Hashtable<java.lang.String,java.lang.String> properties)
          Creates an JdiApi object and initiate related data, using a specified properties to be overwritten in configuration.
JdiApi(java.lang.String configFile)
          Creates an JdiApi object and initiate related data, using a specified configuration file.
 
Method Summary
 void Close()
          Close JDI database connection.
 java.lang.String GetDetailScoreStrByMesh(java.lang.String inMeshStr, InputFilterOption inputFilterOption, OutputFilterOption outputFilterOption)
          Get JD detail scores in String for Mesh.
 java.lang.String GetDetailScoreStrByText(java.lang.String inTextStr, InputFilterOption inputFilterOption, OutputFilterOption outputFilterOption)
          Get JD detail scores in String for words.
 java.lang.String GetDetailScoreStrByTextMesh(java.lang.String inStr, InputFilterOption inputFilterOption, OutputFilterOption outputFilterOption)
          Get JD detail scores in String for both Text and MeSHs.
 InputFilter GetInputFilter()
          Get the inputFilter Java object.
 java.util.Vector<Count1f> GetJdiScoresByMesh(java.lang.String inMeshStr)
          Get JD scores by MeSHs.
 java.util.Vector<Count1f> GetJdiScoresByMesh(java.lang.String inMeshStr, boolean verbose)
          Get JD scores by MeSHs.
 java.util.Vector<Count2f> GetJdiScoresByText(java.lang.String inTextStr, InputFilterOption inputFilterOption)
          Get JD scores by text.
 java.util.Vector<Count2f> GetJdiScoresByText(java.lang.String inTextStr, InputFilterOption inputFilterOption, boolean verbose)
          Get JD scores by text.
 java.util.Vector<Count2f> GetJdiScoresByTextMesh(java.lang.String inStr, InputFilterOption inputFilterOption)
          Get JD scores by both text and MeSHs.
 java.util.Vector<Count2f> GetJdiScoresByTextMesh(java.lang.String inStr, InputFilterOption inputFilterOption, boolean verbose)
          Get JD scores by both text and MeSHs.
 JournalDescriptors GetJournalDescriptors()
          Get the Journal Descriptor object.
 
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_

jds_

protected JournalDescriptors jds_

legalWords_

protected LegalWords legalWords_

wordExtractionFilter_

protected WordExtractionFilter wordExtractionFilter_

conn_

protected java.sql.Connection conn_

inputFilter_

protected InputFilter inputFilter_

shs_

protected Subheadings shs_
Constructor Detail

JdiApi

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

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

Parameters:
conf - Configuration object

JdiApi

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

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

Parameters:
configFile - the absolute path of the configuration file

JdiApi

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

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

Parameters:
conn - Db connection object

JdiApi

public JdiApi(java.util.Hashtable<java.lang.String,java.lang.String> properties)
Creates an JdiApi 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 JdiApi object.

Parameters:
properties - properties to be overwrite in configuration

JdiApi

public JdiApi(Configuration conf,
              JournalDescriptors jds,
              Subheadings shs)
Creates an JdiApi object and initiate related data, using a specified configuration object, journal descritor object, and subheadings object.

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

Parameters:
conf - Configuration object
jds - Journal descriptor object
shs - MeSH subheading object

JdiApi

public JdiApi(java.sql.Connection conn,
              JournalDescriptors jds,
              Subheadings shs)
Creates an JdiApi object and initiate related data, using a specified db connection object, journal descritor object, and subHeadings object.

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

Parameters:
conn - db connection object
jds - Journal descriptor object
shs - MeSH subHeading object
Method Detail

GetJdiScoresByTextMesh

public java.util.Vector<Count2f> GetJdiScoresByTextMesh(java.lang.String inStr,
                                                        InputFilterOption inputFilterOption)
Get JD scores by both text and MeSHs.

Parameters:
inStr - input string including text (phrase, TI, AB) and starred MeSH (separated by "|")
inputFilterOption - the inputFilter option java object
Returns:
JD scores, a Vector of Count2f objects

GetJdiScoresByTextMesh

public java.util.Vector<Count2f> GetJdiScoresByTextMesh(java.lang.String inStr,
                                                        InputFilterOption inputFilterOption,
                                                        boolean verbose)
Get JD scores by both text and MeSHs.

Parameters:
inStr - input string including text (phrase, TI, AB) and starred MeSH (separated by "|")
inputFilterOption - the inputFilter option java object
verbose - boolean flag for verbose message
Returns:
JD scores, a Vector of Count2f objects

GetJdiScoresByMesh

public java.util.Vector<Count1f> GetJdiScoresByMesh(java.lang.String inMeshStr)
Get JD scores by MeSHs.

Parameters:
inMeshStr - input starred MeSH (separated by "|")
Returns:
JD scores, a Vector of Count1f objects

GetJdiScoresByMesh

public java.util.Vector<Count1f> GetJdiScoresByMesh(java.lang.String inMeshStr,
                                                    boolean verbose)
Get JD scores by MeSHs.

Parameters:
inMeshStr - input starred MeSH (separated by "|")
verbose - boolean flag for verbose message
Returns:
JD scores, a Vector of Count1f objects

GetJdiScoresByText

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

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

GetJdiScoresByText

public java.util.Vector<Count2f> GetJdiScoresByText(java.lang.String inTextStr,
                                                    InputFilterOption inputFilterOption,
                                                    boolean verbose)
Get JD scores by text.

Parameters:
inTextStr - input text str to be processed (phrase, TI, AB)
inputFilterOption - the inputFilter option java object
verbose - boolean flag for verbose message
Returns:
JD scores, a Vector of Count2f objects

GetDetailScoreStrByTextMesh

public java.lang.String GetDetailScoreStrByTextMesh(java.lang.String inStr,
                                                    InputFilterOption inputFilterOption,
                                                    OutputFilterOption outputFilterOption)
Get JD detail scores in String for both Text and MeSHs.

Parameters:
inStr - input string including text (phrase, TI, AB) and starred MeSH (separated by "|")
inputFilterOption - the inputFilter option java object
outputFilterOption - the output filter option java object
Returns:
JD detail scores in String

GetDetailScoreStrByMesh

public java.lang.String GetDetailScoreStrByMesh(java.lang.String inMeshStr,
                                                InputFilterOption inputFilterOption,
                                                OutputFilterOption outputFilterOption)
Get JD detail scores in String for Mesh.

Parameters:
inMeshStr - input starred MeSH (separated by "|")
inputFilterOption - the inputFilter option java object
outputFilterOption - the output filter option java object
Returns:
JD detail scores in String

GetDetailScoreStrByText

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

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

GetInputFilter

public InputFilter GetInputFilter()
Get the inputFilter Java object.

Returns:
inputFilter java object

GetJournalDescriptors

public JournalDescriptors GetJournalDescriptors()
Get the Journal Descriptor object.

Returns:
Journal Descriptor java object

Close

public void Close()
Close JDI database connection. This method must be called before exiting JdiApi.


TC Java
2009 Version

Submit a bug or feature

Copyright © 2009 National Library of Medicine