textmaven.configuration
Class DictionaryProxy

java.lang.Object
  extended bytextmaven.configuration.DictionaryProxy
All Implemented Interfaces:
IBaseDictionary, IDictionary, IDictionarySource

public class DictionaryProxy
extends java.lang.Object
implements IDictionary

Dictionary class holding reference to dictionary instance as string id.


Constructor Summary
DictionaryProxy()
           
 
Method Summary
 void close()
          Performs close operations on the source.
 boolean containsKey(java.lang.String key)
          Checks whether a key is contained in the dictionary.
 java.lang.String getDescription()
          Returns description
 java.lang.String getId()
          Returns dictionary id
 java.lang.String getLanguage()
           
 java.lang.String getName()
           
 java.lang.String getRefId()
           
 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
 void open()
          Opens connection to datasource
 void setDescription()
           
 void setDescription(java.lang.String description)
          Sets description
 void setId(java.lang.String id)
          Sets dictionary id
 void setLanguage(java.lang.String language)
          Sets input language
 void setRefId(java.lang.String refId)
           
 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DictionaryProxy

public DictionaryProxy()
Method Detail

getRefId

public java.lang.String getRefId()
Returns:
Returns the refId.

setRefId

public void setRefId(java.lang.String refId)
Parameters:
refId - The refId to set.

getName

public java.lang.String getName()

getId

public java.lang.String getId()
Description copied from interface: IBaseDictionary
Returns dictionary id

Specified by:
getId in interface IBaseDictionary
Returns:
id

open

public void open()
Description copied from interface: IBaseDictionary
Opens connection to datasource

Specified by:
open in interface IBaseDictionary

close

public void close()
Description copied from interface: IBaseDictionary
Performs close operations on the source. The source cannot be used after closing it.

Specified by:
close in interface IBaseDictionary

setDescription

public void setDescription(java.lang.String description)
Description copied from interface: IBaseDictionary
Sets description

Specified by:
setDescription in interface IBaseDictionary
Parameters:
description -

getDescription

public java.lang.String getDescription()
Description copied from interface: IBaseDictionary
Returns description

Specified by:
getDescription in interface IBaseDictionary
Returns:
description

setId

public void setId(java.lang.String id)
Description copied from interface: IBaseDictionary
Sets dictionary id

Specified by:
setId in interface IBaseDictionary
Parameters:
id -

setLanguage

public void setLanguage(java.lang.String language)
Description copied from interface: IBaseDictionary
Sets input language

Specified by:
setLanguage in interface IBaseDictionary
Parameters:
language -

getLanguage

public java.lang.String getLanguage()
Specified by:
getLanguage in interface IBaseDictionary
Returns:
input language

setDescription

public void setDescription()

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
Parameters:
word - word to retrieve
Returns:
Iterator returning translations Translation

translations

public java.util.Iterator translations()
Description copied from interface: IDictionary
Returns all translations available in the dictionary.

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

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
Parameters:
key - word to lookup
Returns:
boolean true if key is contained in dictionary

keys

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

Specified by:
keys in interface IDictionary
Returns:
iterator returning all keys as String

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
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)
Description copied from interface: IDictionary
Returns all keys starting with the specified prefix

Specified by:
keysWithPrefix in interface IDictionary
Parameters:
prefix -
Returns:
Iterator returning all keys (String) starting with prefix


Copyright © 2002-2005 Sourceforge. All Rights Reserved.