net.sourceforge.pinyin4j.format
Class HanyuPinyinOutputFormat

java.lang.Object
  extended by net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat

public final class HanyuPinyinOutputFormat
extends java.lang.Object

This classes define how the Hanyu Pinyin should be outputted.

The output feature includes:

Default values of these features are listed below:

HanyuPinyinVCharType := WITH_U_AND_COLON
HanyuPinyinCaseType := LOWERCASE
HanyuPinyinToneType := WITH_TONE_NUMBER

Some combinations of output format options are meaningless. For example, WITH_TONE_MARK and WITH_U_AND_COLON.

The combination of different output format options are listed below. For example, '吕'

LOWERCASE
Combination WITH_U_AND_COLON WITH_V WITH_U_UNICODE
WITH_TONE_NUMBER lu:3 lv3 lü3
WITHOUT_TONE lu: lv
WITH_TONE_MARK throw exception throw exception
UPPERCASE
Combination WITH_U_AND_COLON WITH_V WITH_U_UNICODE
WITH_TONE_NUMBER LU:3 LV3 LÜ3
WITHOUT_TONE LU: LV
WITH_TONE_MARK throw exception throw exception

Author:
Li Min (xmlerlimin@gmail.com)
See Also:
HanyuPinyinVCharType, HanyuPinyinCaseType, HanyuPinyinToneType

Field Summary
private  HanyuPinyinCaseType caseType
           
private  HanyuPinyinToneType toneType
           
private  HanyuPinyinVCharType vCharType
           
 
Constructor Summary
HanyuPinyinOutputFormat()
           
 
Method Summary
 HanyuPinyinCaseType getCaseType()
          Returns the output cases of Hanyu Pinyin characters
 HanyuPinyinToneType getToneType()
          Returns the output format of Chinese tones
 HanyuPinyinVCharType getVCharType()
          Returns output format of character 'ü'
 void restoreDefault()
          Restore default variable values for this class Default values are listed below:
 void setCaseType(HanyuPinyinCaseType caseType)
          Define the output cases of Hanyu Pinyin characters
 void setToneType(HanyuPinyinToneType toneType)
          Define the output format of Chinese tones
 void setVCharType(HanyuPinyinVCharType charType)
          Define the output format of character 'ü'
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vCharType

private HanyuPinyinVCharType vCharType

caseType

private HanyuPinyinCaseType caseType

toneType

private HanyuPinyinToneType toneType
Constructor Detail

HanyuPinyinOutputFormat

public HanyuPinyinOutputFormat()
Method Detail

restoreDefault

public void restoreDefault()
Restore default variable values for this class Default values are listed below:

HanyuPinyinVCharType := WITH_U_AND_COLON
HanyuPinyinCaseType := LOWERCASE
HanyuPinyinToneType := WITH_TONE_NUMBER


getCaseType

public HanyuPinyinCaseType getCaseType()
Returns the output cases of Hanyu Pinyin characters

See Also:
HanyuPinyinCaseType

setCaseType

public void setCaseType(HanyuPinyinCaseType caseType)
Define the output cases of Hanyu Pinyin characters

Parameters:
caseType - the output cases of Hanyu Pinyin characters
See Also:
HanyuPinyinCaseType

getToneType

public HanyuPinyinToneType getToneType()
Returns the output format of Chinese tones

See Also:
HanyuPinyinToneType

setToneType

public void setToneType(HanyuPinyinToneType toneType)
Define the output format of Chinese tones

Parameters:
toneType - the output format of Chinese tones
See Also:
HanyuPinyinToneType

getVCharType

public HanyuPinyinVCharType getVCharType()
Returns output format of character 'ü'

See Also:
HanyuPinyinVCharType

setVCharType

public void setVCharType(HanyuPinyinVCharType charType)
Define the output format of character 'ü'

Parameters:
charType - the output format of character 'ü'
See Also:
HanyuPinyinVCharType