net.sourceforge.wohenchan.convert
Class CedictEntry

java.lang.Object
  |
  +--net.sourceforge.wohenchan.convert.CedictEntry
All Implemented Interfaces:
ConverterEntryInterface

public class CedictEntry
extends java.lang.Object
implements ConverterEntryInterface

This class is the store unit for Cedict dictionary entry.

Version:
$Name: $ $Date: 2003/09/08 20:56:19 $
Author:
$Author: wtanaka $

Field Summary
private  java.lang.String englishDefinition
          The Chinese word and English definition have 1-to-1 mapping.
private  java.lang.String m_chinese
           
private  java.lang.String m_source
           
private  java.lang.String pinyin
           
 
Constructor Summary
CedictEntry()
           
CedictEntry(java.lang.String chinese, java.lang.String pinyinIn, java.lang.String englishIn, java.lang.String source)
           
 
Method Summary
 java.lang.String getChinese()
          Gets the unicode character string for this entry.
 java.lang.String getEnglishDefinition()
          Gets the English Definition for this character.
 java.lang.String getPinyin()
          Gets the Pinyin for this entry.
 java.lang.String getSource()
          Gets the source dictionary where this entry came from.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_chinese

private java.lang.String m_chinese

pinyin

private java.lang.String pinyin

englishDefinition

private java.lang.String englishDefinition
The Chinese word and English definition have 1-to-1 mapping.


m_source

private java.lang.String m_source
Constructor Detail

CedictEntry

public CedictEntry()

CedictEntry

public CedictEntry(java.lang.String chinese,
                   java.lang.String pinyinIn,
                   java.lang.String englishIn,
                   java.lang.String source)
Method Detail

getPinyin

public java.lang.String getPinyin()
Description copied from interface: ConverterEntryInterface
Gets the Pinyin for this entry. 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.

Specified by:
getPinyin in interface ConverterEntryInterface
Returns:
WHERE (self != null) the pinyin romanization for this entry.

getEnglishDefinition

public java.lang.String getEnglishDefinition()
Description copied from interface: ConverterEntryInterface
Gets the English Definition for this character.

Specified by:
getEnglishDefinition in interface ConverterEntryInterface
Returns:
WHERE (self != null) the english definition for this entry.

getChinese

public java.lang.String getChinese()
                            throws UnknownOutputException
Description copied from interface: ConverterEntryInterface
Gets the unicode character string for this entry.

Specified by:
getChinese in interface ConverterEntryInterface
Returns:
WHERE (self != null) the string (of unicode chars) for this entry.
Throws:
UnknownOutputException - if the particular dictionary or character table does have unicode information.

getSource

public java.lang.String getSource()
Description copied from interface: ConverterEntryInterface
Gets the source dictionary where this entry came from.

Specified by:
getSource in interface ConverterEntryInterface
Returns:
WHERE (self != null) a human visible name for this entry's source (e.g. "CEDICT", "unicode.org", "Sunrain").