net.ajaest.jdk.tools.parsers
Class StrokeOrderParser

java.lang.Object
  extended by net.ajaest.jdk.tools.parsers.StrokeOrderParser

public class StrokeOrderParser
extends java.lang.Object


Nested Class Summary
 class StrokeOrderParser.ExporterDialog
           
 
Field Summary
private  java.io.BufferedReader fReader
           
private  java.lang.Integer noKanjiReads
           
private  java.util.Map<java.lang.Integer,KanjiGraph> repeated
           
private  java.lang.Integer repeatedInfo
           
private  java.util.Map<java.lang.Integer,KanjiGraph> retrieved
           
private  boolean verbose
           
 
Constructor Summary
StrokeOrderParser(java.lang.String path, boolean verbose)
           
 
Method Summary
 void addExceptions()
           
 void close()
           
 boolean EOF()
           
 void finalize()
           
 java.lang.Integer getNoKanjiReads()
           
 java.util.Map<java.lang.Integer,KanjiGraph> getRepeated()
           
 java.lang.Integer getRepeatedInfo()
           
 java.util.Map<java.lang.Integer,KanjiGraph> getRetrieved()
           
static void main(java.lang.String... args)
           
 java.util.Map<java.lang.Integer,KanjiGraph> parse()
           
private  java.util.Set<KanjiStrokeClue> parseClues(java.lang.String trim, java.lang.Integer unicodeRef)
           
private  java.util.List<KanjiStroke> parseStrokes(java.lang.String s, java.lang.Integer unicodeRef)
           
private  KanjiGraph readKanji()
           
private  int readKanjiLiteral()
           
private  java.lang.String[] removeVoidString(java.lang.String[] ss)
           
private  void skipStrokeCountChar()
           
private  AllowedStrokeClueEnum solveStrokeClue(java.lang.String first, java.lang.String clue, java.lang.String second)
           
private  java.lang.Integer solveStrokeOrder(java.lang.String string)
           
private  AllowedStrokePointEnum solveStrokePoint(java.lang.String string)
           
private  AllowedStrokeLineEnum solveStrokeType(char c)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

retrieved

private java.util.Map<java.lang.Integer,KanjiGraph> retrieved

repeated

private java.util.Map<java.lang.Integer,KanjiGraph> repeated

fReader

private java.io.BufferedReader fReader

noKanjiReads

private java.lang.Integer noKanjiReads

repeatedInfo

private java.lang.Integer repeatedInfo

verbose

private boolean verbose
Constructor Detail

StrokeOrderParser

public StrokeOrderParser(java.lang.String path,
                         boolean verbose)
                  throws java.io.FileNotFoundException,
                         java.io.UnsupportedEncodingException
Throws:
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
Method Detail

getRepeated

public java.util.Map<java.lang.Integer,KanjiGraph> getRepeated()

getRepeatedInfo

public java.lang.Integer getRepeatedInfo()

getNoKanjiReads

public java.lang.Integer getNoKanjiReads()

parse

public java.util.Map<java.lang.Integer,KanjiGraph> parse()
                                                  throws java.io.IOException
Throws:
java.io.IOException

EOF

public boolean EOF()

skipStrokeCountChar

private void skipStrokeCountChar()
                          throws CorruptedFormatException,
                                 java.io.IOException
Throws:
CorruptedFormatException
java.io.IOException

readKanjiLiteral

private int readKanjiLiteral()
                      throws CorruptedFormatException,
                             java.io.IOException
Throws:
CorruptedFormatException
java.io.IOException

readKanji

private KanjiGraph readKanji()
                      throws java.io.IOException,
                             CorruptedFormatException
Throws:
java.io.IOException
CorruptedFormatException

parseClues

private java.util.Set<KanjiStrokeClue> parseClues(java.lang.String trim,
                                                  java.lang.Integer unicodeRef)
                                           throws CorruptedFormatException
Throws:
CorruptedFormatException

solveStrokeOrder

private java.lang.Integer solveStrokeOrder(java.lang.String string)
                                    throws CorruptedFormatException
Throws:
CorruptedFormatException

solveStrokeClue

private AllowedStrokeClueEnum solveStrokeClue(java.lang.String first,
                                              java.lang.String clue,
                                              java.lang.String second)
                                       throws CorruptedFormatException
Throws:
CorruptedFormatException

solveStrokePoint

private AllowedStrokePointEnum solveStrokePoint(java.lang.String string)
                                         throws CorruptedFormatException
Throws:
CorruptedFormatException

parseStrokes

private java.util.List<KanjiStroke> parseStrokes(java.lang.String s,
                                                 java.lang.Integer unicodeRef)
                                          throws CorruptedFormatException
Throws:
CorruptedFormatException

solveStrokeType

private AllowedStrokeLineEnum solveStrokeType(char c)
                                       throws CorruptedFormatException
Throws:
CorruptedFormatException

removeVoidString

private java.lang.String[] removeVoidString(java.lang.String[] ss)

addExceptions

public void addExceptions()

getRetrieved

public java.util.Map<java.lang.Integer,KanjiGraph> getRetrieved()

finalize

public void finalize()
              throws java.io.IOException
Overrides:
finalize in class java.lang.Object
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

main

public static void main(java.lang.String... args)
                 throws java.io.IOException
Throws:
java.io.IOException