|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.extjwnl.dictionary.Dictionary
net.sf.extjwnl.dictionary.AbstractCachingDictionary
net.sf.extjwnl.dictionary.DatabaseBackedDictionary
public class DatabaseBackedDictionary
Database-backed dictionary.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.extjwnl.dictionary.Dictionary |
---|
Dictionary.Version |
Field Summary | |
---|---|
static String |
DATABASE_MANAGER
Database manager install parameter. |
static String |
DICTIONARY_ELEMENT_FACTORY
The class of DatabaseDictionaryElementFactory to use. |
static String |
MORPH
MorphologicalProcessor class install parameter. |
Fields inherited from class net.sf.extjwnl.dictionary.AbstractCachingDictionary |
---|
isCachingEnabled |
Fields inherited from class net.sf.extjwnl.dictionary.Dictionary |
---|
CHECK_LEX_IDS_KEY, maxOffset, params |
Constructor Summary | |
---|---|
DatabaseBackedDictionary(Document doc)
|
Method Summary | |
---|---|
void |
close()
Shut down the dictionary |
Exc |
getException(POS pos,
String derivation)
Lookup derivation in the exceptions file of part-of-speech pos and return an Exc object containing the results. |
Iterator<Exc> |
getExceptionIterator(POS pos)
Return an Iterator over all the Exceptions in the database. |
IndexWord |
getIndexWord(POS pos,
String lemma)
Look up a word in the database. |
Iterator<IndexWord> |
getIndexWordIterator(POS pos)
Return an Iterator over all the IndexWords of part-of-speech pos in the database. |
Iterator<IndexWord> |
getIndexWordIterator(POS pos,
String substring)
Return an Iterator over all the IndexWords of part-of-speech pos whose lemmas contain substring as a substring. |
IndexWord |
getRandomIndexWord(POS pos)
|
Synset |
getSynsetAt(POS pos,
long offset)
Return the Synset at offset offset from the database. |
Iterator<Synset> |
getSynsetIterator(POS pos)
Return an Iterator over all the Synsets of part-of-speech pos in the database. |
Methods inherited from class net.sf.extjwnl.dictionary.AbstractCachingDictionary |
---|
addException, addIndexWord, addSynset, cacheAll, cacheException, cacheIndexWord, cachePOS, cacheSynset, clearCache, clearCache, clearException, clearIndexWord, clearSynset, edit, getCacheCapacity, getCachedException, getCachedIndexWord, getCachedSynset, getCacheSizes, isCachingEnabled, removeException, removeIndexWord, removeSynset, setCacheCapacity, setCacheCapacity, setCachingEnabled |
Methods inherited from class net.sf.extjwnl.dictionary.Dictionary |
---|
addElement, createException, createIndexWord, createSynset, delete, getDatabaseBackedInstance, getFileBackedInstance, getInstance, getInstance, getInstance, getMapBackedInstance, getMorphologicalProcessor, getRestoreDictionary, getVersion, isEditable, lookupAllIndexWords, lookupIndexWord, prepareQueryString, removeElement, save, setInstance, setMorphologicalProcessor, setRestoreDictionary, uninstall |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MORPH
MorphologicalProcessor
class install parameter. The value should be the
class of MorphologicalProcessor
to use.
public static final String DICTIONARY_ELEMENT_FACTORY
public static final String DATABASE_MANAGER
Constructor Detail |
---|
public DatabaseBackedDictionary(Document doc) throws JWNLException
JWNLException
Method Detail |
---|
public IndexWord getIndexWord(POS pos, String lemma) throws JWNLException
Dictionary
Dictionary.lookupIndexWord(POS, String)
.
getIndexWord
in class Dictionary
pos
- The part-of-speech.lemma
- The orthographic representation of the word.
null
if
no such entry exists.
JWNLException
- JWNLExceptionpublic Iterator<IndexWord> getIndexWordIterator(POS pos) throws JWNLException
Dictionary
getIndexWordIterator
in class AbstractCachingDictionary
pos
- The part-of-speech
IndexWord
s
JWNLException
- JWNLExceptionpublic Iterator<IndexWord> getIndexWordIterator(POS pos, String substring) throws JWNLException
Dictionary
getIndexWordIterator
in class AbstractCachingDictionary
pos
- The part-of-speech.substring
- substring
IndexWord
s.
JWNLException
- JWNLExceptionpublic IndexWord getRandomIndexWord(POS pos) throws JWNLException
getRandomIndexWord
in class Dictionary
JWNLException
public Synset getSynsetAt(POS pos, long offset) throws JWNLException
Dictionary
Synset
at offset offset from the database.
getSynsetAt
in class Dictionary
pos
- The part-of-speech file to look inoffset
- The offset of the synset in the file
JWNLException
- JWNLExceptionpublic Iterator<Synset> getSynsetIterator(POS pos) throws JWNLException
Dictionary
getSynsetIterator
in class AbstractCachingDictionary
pos
- The part-of-speech.
Synset
s.
JWNLException
- JWNLExceptionpublic Exc getException(POS pos, String derivation) throws JWNLException
Dictionary
getException
in class Dictionary
pos
- the exception file to look inderivation
- the word to look up
JWNLException
- JWNLExceptionpublic Iterator<Exc> getExceptionIterator(POS pos) throws JWNLException
Dictionary
getExceptionIterator
in class AbstractCachingDictionary
pos
- the part-of-speech
Exc
s
JWNLException
- JWNLExceptionpublic void close()
Dictionary
close
in class Dictionary
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |