textmaven.dictionaries
Interface IDictionary

All Superinterfaces:
IBaseDictionary, IDictionarySource
All Known Subinterfaces:
IModifiableDictionary
All Known Implementing Classes:
CompositeDictionary, DBDictionary, Dictionary, DictionaryProxy, LuceneDictionary, XMLDictionary

public interface IDictionary
extends IDictionarySource

Represents a data dictionary.

Author:
krebtho

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()
          Returns all translations available in the dictionary.
 java.util.Iterator translations(java.lang.String word)
          Retrieves available translations for a given word.
 
Methods inherited from interface textmaven.dictionaries.IBaseDictionary
close, getDescription, getId, getLanguage, open, setDescription, setId, setLanguage
 

Method Detail

translations

public java.util.Iterator translations(java.lang.String word)
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.

Parameters:
word - word to retrieve
Returns:
Iterator returning translations Translation

translations

public java.util.Iterator translations()
Returns all translations available in the dictionary.

Specified by:
translations in interface IDictionarySource
Returns:
Iterator returning translations Translation

containsKey

public boolean containsKey(java.lang.String key)
Checks whether a key is contained in the dictionary.

Parameters:
key - word to lookup
Returns:
boolean true if key is contained in dictionary

keys

public java.util.Iterator keys()
Returns all keys as specified in dictionary.

Returns:
iterator returning all keys as String

keys

public java.util.Iterator keys(java.lang.String word)
Returns the keys which would be looked up when accessing the dictionary with the specified word.

Parameters:
word - word to be used for lookup
Returns:
Iterator returning all keys (String) associated with the specified word.

keysWithPrefix

public java.util.Iterator keysWithPrefix(java.lang.String prefix)
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.