textmaven.dictionaries
Class DictionarySequence

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

public class DictionarySequence
extends CompositeDictionary

Composite dictionary implementing a sequential access strategy. All dictionaries are sequential searched until a match was found.

Author:
krebtho

Constructor Summary
DictionarySequence()
           
 
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

DictionarySequence

public DictionarySequence()
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.