com.kawao.kakasi
Class Kakasi

java.lang.Object
  |
  +--com.kawao.kakasi.Kakasi

public class Kakasi
extends java.lang.Object

This class is the KAKASI/JAVA main class.

Version:
$Revision: 1.15 $ $Date: 2003/03/01 12:52:26 $
Author:
Kawao, Tomoyuki (kawao@kawao.com)

Field Summary
static java.lang.String ASCII
          Character Set ID of ASCII
static int HEPBURN
          Romaji type of Hepburn
static java.lang.String HIRAGANA
          Character Set ID of Hiragana
static java.lang.String KANJI
          Character Set ID of Kanji
static java.lang.String KATAKANA
          Character Set ID of Katakana
static int KUNREI
          Romaji type of Kunrei
 
Constructor Summary
Kakasi()
          Constructs a Kakasi object.
Kakasi(KanwaDictionary kanwaDictionary)
          Constructs a Kakasi object with the specified kanwa dictionary.
 
Method Summary
 java.lang.String doString(java.lang.String string)
          Processes the specified string.
 KanjiInput getInput()
          Gets the input object.
 KanwaDictionary getKanwaDictionary()
          Gets the Kanwa dictionary object.
 KanjiOutput getOutput()
          Gets the output object.
 int getRomajiType()
          Gets the Romaji type property value.
 boolean isFuriganaMode()
          Gets the furigana mode property value.
 boolean isHeikiMode()
          Gets the heiki mode property value.
 boolean isRomajiCapitalizeMode()
          Gets the romaji capitalize mode property value.
 boolean isRomajiUpperCaseMode()
          Gets the romaji upper case mode property value.
 boolean isWakachigakiMode()
          Gets the wakachigaki mode property value.
static void main(java.lang.String[] args)
          Main program of 'kakasi_j'.
 void run()
          Runs the conversion process.
 void setFuriganaMode(boolean newMode)
          Sets the furigana mode property.
 void setHeikiMode(boolean newMode)
          Sets the heiki mode property.
 void setRomajiCapitalizeMode(boolean newMode)
          Sets the romaji capitalize mode property.
 void setRomajiType(int newType)
          Sets the Romaji type property value.
 void setRomajiUpperCaseMode(boolean newMode)
          Sets the romaji upper case mode property.
 void setupHiraganaConverter(java.lang.String characterSet)
          Prepares the hiragana converter.
 void setupKanjiConverter(java.lang.String characterSet)
          Prepares the kanji converter.
 void setupKatakanaConverter(java.lang.String characterSet)
          Prepares the katakana converter.
 void setWakachigakiMode(boolean newMode)
          Sets the wakachigaki mode property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASCII

public static final java.lang.String ASCII
Character Set ID of ASCII

KANJI

public static final java.lang.String KANJI
Character Set ID of Kanji

HIRAGANA

public static final java.lang.String HIRAGANA
Character Set ID of Hiragana

KATAKANA

public static final java.lang.String KATAKANA
Character Set ID of Katakana

HEPBURN

public static final int HEPBURN
Romaji type of Hepburn

KUNREI

public static final int KUNREI
Romaji type of Kunrei
Constructor Detail

Kakasi

public Kakasi()
Constructs a Kakasi object.

Kakasi

public Kakasi(KanwaDictionary kanwaDictionary)
Constructs a Kakasi object with the specified kanwa dictionary.
Parameters:
kanwaDictionary - the KanwaDictionary object.
Method Detail

setupKanjiConverter

public void setupKanjiConverter(java.lang.String characterSet)
Prepares the kanji converter.
Parameters:
characterSet - the destination character set ID.
See Also:
ASCII, KANJI, HIRAGANA, KATAKANA

setupHiraganaConverter

public void setupHiraganaConverter(java.lang.String characterSet)
Prepares the hiragana converter.
Parameters:
characterSet - the destination character set ID.
See Also:
ASCII, HIRAGANA, KATAKANA

setupKatakanaConverter

public void setupKatakanaConverter(java.lang.String characterSet)
Prepares the katakana converter.
Parameters:
characterSet - the destination character set ID.
See Also:
ASCII, HIRAGANA, KATAKANA

getKanwaDictionary

public KanwaDictionary getKanwaDictionary()
Gets the Kanwa dictionary object.

getInput

public KanjiInput getInput()
Gets the input object.

getOutput

public KanjiOutput getOutput()
Gets the output object.

setHeikiMode

public void setHeikiMode(boolean newMode)
Sets the heiki mode property. The default value is false.
Parameters:
newMode - if true, lists all readings with Kanji convertsion.

isHeikiMode

public boolean isHeikiMode()
Gets the heiki mode property value.

setFuriganaMode

public void setFuriganaMode(boolean newMode)
Sets the furigana mode property. The default value is false.
Parameters:
newMode - new furigana mode value.

isFuriganaMode

public boolean isFuriganaMode()
Gets the furigana mode property value.

setWakachigakiMode

public void setWakachigakiMode(boolean newMode)
Sets the wakachigaki mode property. The default value is false.
Parameters:
newMode - new wakachigaki mode value.

isWakachigakiMode

public boolean isWakachigakiMode()
Gets the wakachigaki mode property value.

setRomajiType

public void setRomajiType(int newType)
Sets the Romaji type property value. The default value is HEPBURN.
Parameters:
newType - new romaji type.
See Also:
HEPBURN, KUNREI

getRomajiType

public int getRomajiType()
Gets the Romaji type property value.
See Also:
HEPBURN, KUNREI

setRomajiCapitalizeMode

public void setRomajiCapitalizeMode(boolean newMode)
Sets the romaji capitalize mode property. The default value is false.
Parameters:
newMode - new romaji capitalize mode value.

isRomajiCapitalizeMode

public boolean isRomajiCapitalizeMode()
Gets the romaji capitalize mode property value.

setRomajiUpperCaseMode

public void setRomajiUpperCaseMode(boolean newMode)
Sets the romaji upper case mode property. The default value is false.
Parameters:
newMode - new romaji upper case mode value.

isRomajiUpperCaseMode

public boolean isRomajiUpperCaseMode()
Gets the romaji upper case mode property value.

doString

public java.lang.String doString(java.lang.String string)
                          throws java.io.IOException
Processes the specified string.
Parameters:
string - the input string to process.
Returns:
the result string.
Throws:
java.io.IOException - if an I/O error occurred.

run

public void run()
         throws java.io.IOException
Runs the conversion process.
Throws:
java.io.IOException - if an I/O error occurred.

main

public static void main(java.lang.String[] args)
                 throws java.lang.Throwable
Main program of 'kakasi_j'.
Parameters:
args - command line arguments.


Copyright (c) 2002-2003 Tomoyuki Kawao. All Rights Reserved.