cct.tools
Class FragmentDictionaryParser

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by cct.tools.FragmentDictionaryParser
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class FragmentDictionaryParser
extends org.xml.sax.helpers.DefaultHandler

Title:

Description:

Copyright: Copyright (c) 2006

Company: ANU


Field Summary
(package private)  java.lang.String currentTag
           
(package private) static boolean Debug
           
(package private)  java.util.ArrayList dicStack
           
(package private) static java.lang.String DICTIONARY_TAG
           
(package private)  java.util.LinkedHashMap dictionaryTree
           
(package private)  boolean finish_parsing
           
(package private) static java.lang.String FRAGMENT_TAG
           
(package private)  java.io.StringReader sReader
           
(package private)  java.io.StringWriter sWriter
           
(package private)  boolean unrecoverableError
           
(package private)  boolean yes_dictionary
           
 
Constructor Summary
FragmentDictionaryParser()
           
 
Method Summary
 void characters(char[] buf, int offset, int len)
           
 void endDocument()
           
 void endElement(java.lang.String namespaceURI, java.lang.String sName, java.lang.String qName)
           
 java.util.LinkedHashMap getDictionaryTree()
           
static java.util.LinkedHashMap parseFragmentDictionary(java.lang.Object inputSource)
           
 void startDocument()
           
 void startElement(java.lang.String namespaceURI, java.lang.String lName, java.lang.String qName, org.xml.sax.Attributes attrs)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Debug

static boolean Debug

dictionaryTree

java.util.LinkedHashMap dictionaryTree

dicStack

java.util.ArrayList dicStack

DICTIONARY_TAG

static final java.lang.String DICTIONARY_TAG
See Also:
Constant Field Values

FRAGMENT_TAG

static final java.lang.String FRAGMENT_TAG
See Also:
Constant Field Values

yes_dictionary

boolean yes_dictionary

finish_parsing

boolean finish_parsing

unrecoverableError

boolean unrecoverableError

currentTag

java.lang.String currentTag

sReader

java.io.StringReader sReader

sWriter

java.io.StringWriter sWriter
Constructor Detail

FragmentDictionaryParser

public FragmentDictionaryParser()
Method Detail

parseFragmentDictionary

public static java.util.LinkedHashMap parseFragmentDictionary(java.lang.Object inputSource)

getDictionaryTree

public java.util.LinkedHashMap getDictionaryTree()

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String lName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String sName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] buf,
                       int offset,
                       int len)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException