com.lowagie.text.pdf.hyphenation

Class SimplePatternParser

public class SimplePatternParser extends Object implements SimpleXMLDocHandler, PatternConsumer

Parses the xml hyphenation pattern.

Author: Paulo Soares (psoares@consiste.pt)

Field Summary
PatternConsumerconsumer
intcurrElement
ArrayListexception
static intELEM_CLASSES
static intELEM_EXCEPTIONS
static intELEM_HYPHEN
static intELEM_PATTERNS
charhyphenChar
SimpleXMLParserparser
StringBuffertoken
Constructor Summary
SimplePatternParser()
Creates a new instance of PatternParser2
Method Summary
voidaddClass(String c)
voidaddException(String w, ArrayList e)
voidaddPattern(String p, String v)
voidendDocument()
voidendElement(String tag)
protected StringgetExceptionWord(ArrayList ex)
protected static StringgetInterletterValues(String pat)
protected static StringgetPattern(String word)
static voidmain(String[] args)
protected ArrayListnormalizeException(ArrayList ex)
voidparse(InputStream stream, PatternConsumer consumer)
voidstartDocument()
voidstartElement(String tag, HashMap h)
voidtext(String str)

Field Detail

consumer

PatternConsumer consumer

currElement

int currElement

exception

ArrayList exception

ELEM_CLASSES

static final int ELEM_CLASSES

ELEM_EXCEPTIONS

static final int ELEM_EXCEPTIONS

ELEM_HYPHEN

static final int ELEM_HYPHEN

ELEM_PATTERNS

static final int ELEM_PATTERNS

hyphenChar

char hyphenChar

parser

SimpleXMLParser parser

token

StringBuffer token

Constructor Detail

SimplePatternParser

public SimplePatternParser()
Creates a new instance of PatternParser2

Method Detail

addClass

public void addClass(String c)

addException

public void addException(String w, ArrayList e)

addPattern

public void addPattern(String p, String v)

endDocument

public void endDocument()

endElement

public void endElement(String tag)

getExceptionWord

protected String getExceptionWord(ArrayList ex)

getInterletterValues

protected static String getInterletterValues(String pat)

getPattern

protected static String getPattern(String word)

main

public static void main(String[] args)

normalizeException

protected ArrayList normalizeException(ArrayList ex)

parse

public void parse(InputStream stream, PatternConsumer consumer)

startDocument

public void startDocument()

startElement

public void startElement(String tag, HashMap h)

text

public void text(String str)