|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.bootstrep.Utilities.DbMethods
public class DbMethods
This Class contains various methods used to access the BioLexicon database.
| Field Summary | |
|---|---|
(package private) Logger |
Logger
An instance of Logger Class |
private static java.lang.String |
MESSTABLE
Table in database in which messages are recorded |
private static java.lang.String |
mSelect
Select instruction |
private static java.lang.String |
mWhere
Where part of selecting messages |
| Constructor Summary | |
|---|---|
DbMethods()
Creates a new instance of DbMethods |
|
| Method Summary | |
|---|---|
java.sql.Connection |
connect2DB(java.lang.String[] dbParam,
PropertyBean PB,
MainBean MB,
MessageBean mesBn)
This method connects to database. Input dbParam parameter contains the following information: 0, db -> database name 1, host -> database server ipaddress/hostname 2, port -> database server port, usually 3306 3, user -> database user name 4, password -> database user password 5, driver -> used driver to connect to the database via ODBC 6, odbc -> the odbc name |
java.util.ArrayList |
execSingleQuery(MainBean MB,
java.lang.String doQry,
java.lang.Integer numCols)
This method executes the query in input. |
java.util.ArrayList |
extractSynonyms(MainBean MB,
java.lang.String doQryRel,
java.lang.String doQryCls,
java.lang.String doQrySyn)
This method extracts synonyms from the BioLexicon database. This method uses three different queries: doQryRel creates the identifier of relation: namely:SR_isSynomymOf doQryCls selects distinct cluster identifier from STG_USER_SYNCLUSTER doQrySyn selects synomyms from staging tables: USER_CLS_LM, relation between cluster and lemmas; USER_LE_LM, relation between lexical entries and lemmas; STG_SENSE, senses Query to executed in the following order: doQryCls, to extract clusters doQryRel to create the identifier doQryRel to combune previous results |
void |
genericQuery(PropertyBean PB,
MessageBean mesBn,
MainBean MB,
java.lang.String doQry)
This method executes the query in input. |
private java.lang.String |
getMessageText(PropertyBean PB,
MainBean MB,
java.lang.Integer messId,
java.lang.String LANG)
This method retrieves text for a given message. |
MessageBean |
setMessages(PropertyBean PB,
MainBean MB,
MessageBean mesBn)
This method retrieves all messages from database and set the MessageBean values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String MESSTABLE
private static final java.lang.String mSelect
private static final java.lang.String mWhere
Logger Logger
| Constructor Detail |
|---|
public DbMethods()
| Method Detail |
|---|
public java.sql.Connection connect2DB(java.lang.String[] dbParam,
PropertyBean PB,
MainBean MB,
MessageBean mesBn)
throws java.sql.SQLException
dbParam - an array with db ParametersPB - The PropertyBeanMB - The MainBeanmesBn - The MessageBean
java.sql.SQLException - SQL Exception
public MessageBean setMessages(PropertyBean PB,
MainBean MB,
MessageBean mesBn)
PB - The PropertyBeanMB - The MainBeanmesBn - MessageBean as default
private java.lang.String getMessageText(PropertyBean PB,
MainBean MB,
java.lang.Integer messId,
java.lang.String LANG)
PB - The propertyBeanMB - The MainBeanmessId - The message identifierLANG - The language. By default EN
public void genericQuery(PropertyBean PB,
MessageBean mesBn,
MainBean MB,
java.lang.String doQry)
PB - The PropertyBeanmesBn - The MessageBeanMB - The MainBeandoQry - The query to be executed
public java.util.ArrayList execSingleQuery(MainBean MB,
java.lang.String doQry,
java.lang.Integer numCols)
MB - The MainBeandoQry - The input querynumCols - The number of columns of the table selected in the doQry
public java.util.ArrayList extractSynonyms(MainBean MB,
java.lang.String doQryRel,
java.lang.String doQryCls,
java.lang.String doQrySyn)
MB - The MainBeandoQryRel - Query to create the identifier of relationdoQryCls - Query to selects distinct cluster identifierdoQrySyn - Query to selects synomyms from staging tables
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||