|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecttextmaven.dictionaries.BaseDictionary
textmaven.dictionaries.Dictionary
textmaven.dictionaries.CompositeDictionary
Dictionary composed of one or more dictionaries. Subclasses have to decide what search strategy the use.
| Constructor Summary | |
CompositeDictionary()
|
|
| Method Summary | |
void |
add(IDictionary dictionary)
Adds the specified dictionary. |
void |
add(java.util.List l)
Adds the specified list of dictionaries. |
java.lang.Object |
clone()
Performs a shallow copy of the instance. |
void |
close()
Performs close operations on the source. |
abstract boolean |
containsKey(java.lang.String key)
Checks whether a key is contained in the dictionary. |
static IDictionary |
createDictionary(java.lang.String str)
Creates a composite dictionary as specified in the input string. |
java.util.List |
getDictionaries()
Returns list of dictionaries composing this instance. |
abstract java.util.Iterator |
keys()
Returns all keys as specified in dictionary. |
void |
open()
Opens connection to datasource |
void |
remove(IDictionary dictionary)
Removes the specified dictionary. |
void |
removeAll()
Removes all dictionaries from this instance. |
java.util.Iterator |
translations()
Returns all translations in all dictionaries aggregated by this instance, no matter what access strategy is implemented by the specific instance. |
abstract java.util.Iterator |
translations(java.lang.String word)
Retrieves available translations for a given word. |
| Methods inherited from class textmaven.dictionaries.Dictionary |
getStemmer, keys, setStemmer |
| Methods inherited from class textmaven.dictionaries.BaseDictionary |
getDescription, getId, getLanguage, setDescription, setId, setLanguage, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface textmaven.dictionaries.IDictionary |
keys, keysWithPrefix |
| Methods inherited from interface textmaven.dictionaries.IBaseDictionary |
getDescription, getId, getLanguage, setDescription, setId, setLanguage |
| Constructor Detail |
public CompositeDictionary()
| Method Detail |
public void add(IDictionary dictionary)
dictionary - dictionary to be addedpublic void add(java.util.List l)
l - List of dictionary instances IDictionarypublic void remove(IDictionary dictionary)
dictionary - dictionary to be removedpublic void removeAll()
public java.util.List getDictionaries()
IDictionarypublic abstract java.util.Iterator translations(java.lang.String word)
IDictionaryThe word is retrieved from the dictionary as passed in as parameter. If no translation is found, an empty iterator.
translations in interface IDictionarytranslations in class Dictionarypublic abstract boolean containsKey(java.lang.String key)
IDictionary
containsKey in interface IDictionarycontainsKey in class Dictionarypublic abstract java.util.Iterator keys()
IDictionary
keys in interface IDictionarykeys in class Dictionarypublic void open()
IBaseDictionary
open in interface IBaseDictionaryopen in class Dictionarypublic void close()
IBaseDictionary
close in interface IBaseDictionaryclose in class Dictionarypublic java.util.Iterator translations()
translations in interface IDictionaryTranslationpublic java.lang.Object clone()
public static final IDictionary createDictionary(java.lang.String str)
throws ParseException
str - dictionary specification as defined.
ParseException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||