textmaven.dictionaries
Class DictionaryUnion

java.lang.Object
  extended bytextmaven.dictionaries.BaseDictionary
      extended bytextmaven.dictionaries.Dictionary
          extended bytextmaven.dictionaries.CompositeDictionary
              extended bytextmaven.dictionaries.DictionaryUnion
All Implemented Interfaces:
IBaseDictionary, IDictionary, IDictionarySource

public class DictionaryUnion
extends CompositeDictionary

Composite dictionary implementing a union search strategy, i.e. all dictionaries are searched and included in the result.

Author:
krebtho

Constructor Summary
DictionaryUnion()
           
 
Method Summary
 boolean containsKey(java.lang.String key)
          Checks whether a key is contained in the dictionary.
 java.util.Iterator keys()
          Returns all keys as specified in dictionary.
 java.util.Iterator keys(java.lang.String word)
          Returns the keys which would be looked up when accessing the dictionary with the specified word.
 java.util.Iterator keysWithPrefix(java.lang.String prefix)
          Returns all keys starting with the specified prefix
 java.util.Iterator translations(java.lang.String word)
          Retrieves available translations for a given word.
 
Methods inherited from class textmaven.dictionaries.CompositeDictionary
add, add, clone, close, createDictionary, getDictionaries, open, remove, removeAll, translations
 
Methods inherited from class textmaven.dictionaries.Dictionary
getStemmer, 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.IBaseDictionary
getDescription, getId, getLanguage, setDescription, setId, setLanguage
 

Constructor Detail

DictionaryUnion

public DictionaryUnion()
Method Detail

translations

public java.util.Iterator translations(java.lang.String word)
Description copied from interface: IDictionary
Retrieves available translations for a given word.

The word is retrieved from the dictionary as passed in as parameter. If no translation is found, an empty iterator.

Specified by:
translations in interface IDictionary
Specified by:
translations in class CompositeDictionary

containsKey

public boolean containsKey(java.lang.String key)
Description copied from interface: IDictionary
Checks whether a key is contained in the dictionary.

Specified by:
containsKey in interface IDictionary
Specified by:
containsKey in class CompositeDictionary

keys

public java.util.Iterator keys()
Description copied from interface: IDictionary
Returns all keys as specified in dictionary.

Specified by:
keys in interface IDictionary
Specified by:
keys in class CompositeDictionary

keys

public java.util.Iterator keys(java.lang.String word)
Description copied from interface: IDictionary
Returns the keys which would be looked up when accessing the dictionary with the specified word.

Specified by:
keys in interface IDictionary
Overrides:
keys in class Dictionary

keysWithPrefix

public java.util.Iterator keysWithPrefix(java.lang.String prefix)
Description copied from interface: IDictionary
Returns all keys starting with the specified prefix

Parameters:
prefix -
Returns:
Iterator returning all keys (String) starting with prefix


Copyright © 2002-2005 Sourceforge. All Rights Reserved.