net.sourceforge.wohenchan.convert
Class CompositeConverterTable

java.lang.Object
  |
  +--net.sourceforge.wohenchan.convert.CompositeConverterTable
All Implemented Interfaces:
ConverterTableInterface

public class CompositeConverterTable
extends java.lang.Object
implements ConverterTableInterface

This ConverterTable simply blindly merges the results from several other ConverterTables.

Version:
$Name: $ $Date: 2003/06/22 20:06:06 $
Author:
$Author: wtanaka $

Field Summary
(package private)  ConverterTableInterface[] m_children
           
 
Constructor Summary
CompositeConverterTable(ConverterTableInterface[] children)
          Constructor
 
Method Summary
 void lookupByEnglishSubstring(java.lang.String str, ConverterListener listener)
          Locates ConverterEntryInterface objects corresponding to a given case insensitive English substring.
 void lookupByPinyin(java.lang.String pinyin, ConverterListener listener)
          Looks up a dictionary entry by pinyin.
 void lookupBySimplifiedChinese(java.lang.String chinese, ConverterListener listener)
          Looks up a converter table entry by simplified chinese characters.
 void lookupByTraditionalChinese(java.lang.String chinese, ConverterListener listener)
          Looks up a converter table entry by traditional chinese characters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_children

ConverterTableInterface[] m_children
Constructor Detail

CompositeConverterTable

public CompositeConverterTable(ConverterTableInterface[] children)
Constructor

Method Detail

lookupByPinyin

public void lookupByPinyin(java.lang.String pinyin,
                           ConverterListener listener)
Description copied from interface: ConverterTableInterface
Looks up a dictionary entry by pinyin.

Specified by:
lookupByPinyin in interface ConverterTableInterface
Parameters:
pinyin - The input string is specified in pinyin. The string may be composed of the letters 'a'-'z' (lower case only), the numbers '1'-'5' and space (' '). The string is composed of at least 1 space-separated pinyin syllables. Syllables are separated with exactly one space. There is no leading or trailing space. Each syllable is composed of at least two letters followed by exactly one digit. The neutral tone is expicitly specified with '5'. u w/ umlaut (as in luu2 (donkey, palm tree), or luu3 (drizzle) is specified with uu.
listener - the ConverterListener to which this object should send its results

lookupBySimplifiedChinese

public void lookupBySimplifiedChinese(java.lang.String chinese,
                                      ConverterListener listener)
Description copied from interface: ConverterTableInterface
Looks up a converter table entry by simplified chinese characters.

Specified by:
lookupBySimplifiedChinese in interface ConverterTableInterface
Returns:
a non-null, possibly empty, array of results for this search.

lookupByTraditionalChinese

public void lookupByTraditionalChinese(java.lang.String chinese,
                                       ConverterListener listener)
Description copied from interface: ConverterTableInterface
Looks up a converter table entry by traditional chinese characters.

Specified by:
lookupByTraditionalChinese in interface ConverterTableInterface
Returns:
a non-null, possibly empty, array of results for this search.

lookupByEnglishSubstring

public void lookupByEnglishSubstring(java.lang.String str,
                                     ConverterListener listener)
Description copied from interface: ConverterTableInterface
Locates ConverterEntryInterface objects corresponding to a given case insensitive English substring.

Specified by:
lookupByEnglishSubstring in interface ConverterTableInterface
Returns:
a non-null, possibly empty, array of results for this search.