|
|||||||||||
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 IDictionary
public void remove(IDictionary dictionary)
dictionary
- dictionary to be removedpublic void removeAll()
public java.util.List getDictionaries()
IDictionary
public abstract java.util.Iterator translations(java.lang.String word)
IDictionary
The word is retrieved from the dictionary as passed in as parameter. If no translation is found, an empty iterator.
translations
in interface IDictionary
translations
in class Dictionary
public abstract boolean containsKey(java.lang.String key)
IDictionary
containsKey
in interface IDictionary
containsKey
in class Dictionary
public abstract java.util.Iterator keys()
IDictionary
keys
in interface IDictionary
keys
in class Dictionary
public void open()
IBaseDictionary
open
in interface IBaseDictionary
open
in class Dictionary
public void close()
IBaseDictionary
close
in interface IBaseDictionary
close
in class Dictionary
public java.util.Iterator translations()
translations
in interface IDictionary
Translation
public 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 |