net.sf.extjwnl.dictionary.database
Class DatabaseManagerImpl
java.lang.Object
net.sf.extjwnl.dictionary.database.DatabaseManagerImpl
- All Implemented Interfaces:
- DatabaseManager, Owned
public class DatabaseManagerImpl
- extends Object
- implements DatabaseManager
Database manager.
- Author:
- John Didion , Aliaksandr Autayeu
Method Summary |
protected Query |
createPOSIdQuery(POS pos,
int id,
String sql)
|
protected Query |
createPOSOffsetQuery(POS pos,
long offset,
String sql)
|
protected Query |
createPOSQuery(POS pos,
String sql)
|
protected Query |
createPOSStringQuery(POS pos,
String str,
String sql)
|
Dictionary |
getDictionary()
Returns the dictionary this object belongs to. |
Query |
getExceptionQuery(POS pos,
String derivation)
|
Query |
getExceptionsQuery(POS pos)
|
Query |
getIndexWordLemmasQuery(POS pos)
|
Query |
getIndexWordLemmasQuery(POS pos,
String substring)
|
Query |
getIndexWordSynsetsQuery(POS pos,
String lemma)
|
Query |
getPointerQuery(POS pos,
long offset)
|
Query |
getRandomIndexWordQuery(POS pos)
|
Query |
getSynsetQuery(POS pos,
long offset)
|
Query |
getSynsetsQuery(POS pos)
|
Query |
getSynsetWordQuery(POS pos,
long offset)
|
Query |
getVerbFrameQuery(POS pos,
long offset)
|
void |
setDictionary(Dictionary dictionary)
Sets the dictionary this object belongs to. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DRIVER
public static final String DRIVER
- See Also:
- Constant Field Values
URL
public static final String URL
- See Also:
- Constant Field Values
USERNAME
public static final String USERNAME
- See Also:
- Constant Field Values
PASSWORD
public static final String PASSWORD
- See Also:
- Constant Field Values
JNDI
public static final String JNDI
- See Also:
- Constant Field Values
LEMMA_FOR_INDEX_WORD_ID_SQL
protected static final String LEMMA_FOR_INDEX_WORD_ID_SQL
- See Also:
- Constant Field Values
SYNSET_IDS_FOR_INDEX_WORD_SQL
protected static final String SYNSET_IDS_FOR_INDEX_WORD_SQL
- SQL query for getting all synsets for an index word.
- See Also:
- Constant Field Values
COUNT_INDEX_WORDS_SQL
protected static final String COUNT_INDEX_WORDS_SQL
- See Also:
- Constant Field Values
ALL_LEMMAS_SQL
protected static final String ALL_LEMMAS_SQL
- See Also:
- Constant Field Values
ALL_LEMMAS_LIKE_SQL
protected static final String ALL_LEMMAS_LIKE_SQL
- See Also:
- Constant Field Values
SYNSET_SQL
protected static final String SYNSET_SQL
- See Also:
- Constant Field Values
SYNSET_WORD_SQL
protected static final String SYNSET_WORD_SQL
- See Also:
- Constant Field Values
SYNSET_POINTER_SQL
protected static final String SYNSET_POINTER_SQL
- See Also:
- Constant Field Values
SYNSET_VERB_FRAME_SQL
protected static final String SYNSET_VERB_FRAME_SQL
- See Also:
- Constant Field Values
ALL_SYNSETS_SQL
protected static final String ALL_SYNSETS_SQL
- See Also:
- Constant Field Values
EXCEPTION_SQL
protected static final String EXCEPTION_SQL
- See Also:
- Constant Field Values
ALL_EXCEPTIONS_SQL
protected static final String ALL_EXCEPTIONS_SQL
- See Also:
- Constant Field Values
rand
protected static final Random rand
connectionManager
protected ConnectionManager connectionManager
minMaxIds
protected Map<POS,net.sf.extjwnl.dictionary.database.DatabaseManagerImpl.MinMax> minMaxIds
dictionary
protected Dictionary dictionary
DatabaseManagerImpl
public DatabaseManagerImpl(Dictionary dictionary,
Map<String,Param> params)
throws JWNLException
- Throws:
JWNLException
getIndexWordSynsetsQuery
public Query getIndexWordSynsetsQuery(POS pos,
String lemma)
throws JWNLException
- Specified by:
getIndexWordSynsetsQuery
in interface DatabaseManager
- Throws:
JWNLException
getIndexWordLemmasQuery
public Query getIndexWordLemmasQuery(POS pos)
throws JWNLException
- Specified by:
getIndexWordLemmasQuery
in interface DatabaseManager
- Throws:
JWNLException
getIndexWordLemmasQuery
public Query getIndexWordLemmasQuery(POS pos,
String substring)
throws JWNLException
- Specified by:
getIndexWordLemmasQuery
in interface DatabaseManager
- Throws:
JWNLException
getRandomIndexWordQuery
public Query getRandomIndexWordQuery(POS pos)
throws JWNLException
- Specified by:
getRandomIndexWordQuery
in interface DatabaseManager
- Throws:
JWNLException
getSynsetQuery
public Query getSynsetQuery(POS pos,
long offset)
throws JWNLException
- Specified by:
getSynsetQuery
in interface DatabaseManager
- Throws:
JWNLException
getSynsetWordQuery
public Query getSynsetWordQuery(POS pos,
long offset)
throws JWNLException
- Specified by:
getSynsetWordQuery
in interface DatabaseManager
- Throws:
JWNLException
getPointerQuery
public Query getPointerQuery(POS pos,
long offset)
throws JWNLException
- Specified by:
getPointerQuery
in interface DatabaseManager
- Throws:
JWNLException
getVerbFrameQuery
public Query getVerbFrameQuery(POS pos,
long offset)
throws JWNLException
- Specified by:
getVerbFrameQuery
in interface DatabaseManager
- Throws:
JWNLException
getSynsetsQuery
public Query getSynsetsQuery(POS pos)
throws JWNLException
- Specified by:
getSynsetsQuery
in interface DatabaseManager
- Throws:
JWNLException
getExceptionQuery
public Query getExceptionQuery(POS pos,
String derivation)
throws JWNLException
- Specified by:
getExceptionQuery
in interface DatabaseManager
- Throws:
JWNLException
getExceptionsQuery
public Query getExceptionsQuery(POS pos)
throws JWNLException
- Specified by:
getExceptionsQuery
in interface DatabaseManager
- Throws:
JWNLException
createPOSQuery
protected Query createPOSQuery(POS pos,
String sql)
throws JWNLException
- Throws:
JWNLException
createPOSStringQuery
protected Query createPOSStringQuery(POS pos,
String str,
String sql)
throws JWNLException
- Throws:
JWNLException
createPOSOffsetQuery
protected Query createPOSOffsetQuery(POS pos,
long offset,
String sql)
throws JWNLException
- Throws:
JWNLException
createPOSIdQuery
protected Query createPOSIdQuery(POS pos,
int id,
String sql)
throws JWNLException
- Throws:
JWNLException
getDictionary
public Dictionary getDictionary()
- Description copied from interface:
Owned
- Returns the dictionary this object belongs to.
- Specified by:
getDictionary
in interface Owned
- Returns:
- the dictionary this object belongs to
setDictionary
public void setDictionary(Dictionary dictionary)
- Description copied from interface:
Owned
- Sets the dictionary this object belongs to.
- Specified by:
setDictionary
in interface Owned
- Parameters:
dictionary
- the dictionary this object belongs to
Copyright © 2011. All Rights Reserved.