|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--ar.com.ktulu.dict.Database
|
+--ar.com.ktulu.dict.JDBCDatabase
Support for dictionaries stored in databases. To be able to change the jdbc
driver without the need for recompiling, there is not explicit loading of
the driver. So you must put in the system property jdbc.drivers the
name of the class to load (i.e., the driver class). You also have to set
the name of the user and the password to connecto to the dbms. The system
properties to set are jdbc.user and jdbc.password, respectively.
It was only used with PostgreSQL.
| Field Summary | |
(package private) java.sql.Connection |
con
|
(package private) java.lang.String |
url
|
| Constructor Summary | |
JDBCDatabase(java.lang.String name,
java.lang.String url)
|
|
| Method Summary | |
Matches |
define(java.lang.String word)
Used by the server to process a "DEFINE" command. |
void |
finalize()
|
protected java.sql.Connection |
getConnection()
Creates a connection to url using the user and
password from the system properties jdbc.user and
jdbc.password. |
Definition |
getWordDefinition(Key k)
Returns the definition of the word stored in k. |
int |
keySize()
Returns the number of headwords in the database. |
Matches |
match(java.lang.String word,
Strategy strat)
Used by the server to process a "MATCH" command. |
| Methods inherited from class ar.com.ktulu.dict.Database |
getInfo, getName, getProperty, getProperty, getShortInfo, setInfo, setName, setShortInfo |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
java.lang.String url
java.sql.Connection con
| Constructor Detail |
public JDBCDatabase(java.lang.String name,
java.lang.String url)
throws DatabaseException
| Method Detail |
public void finalize()
finalize in class java.lang.Object
protected java.sql.Connection getConnection()
throws java.sql.SQLException
url using the user and
password from the system properties jdbc.user and
jdbc.password.
java.sql.SQLExceptionurl
public int keySize()
throws DatabaseException
Database
keySize in class DatabaseDatabaseException
public Matches define(java.lang.String word)
throws DatabaseException
Database
define in class DatabaseDatabaseException
public Matches match(java.lang.String word,
Strategy strat)
throws DatabaseException
Database
match in class DatabaseDatabaseException
public Definition getWordDefinition(Key k)
throws DatabaseException
Databasek.
getWordDefinition in class DatabaseDatabaseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||