Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.jsword.book.filter.thml
Class CustomHandler

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          org.crosswire.jsword.book.filter.thml.CustomHandler

All Implemented Interfaces:
  ContentHandler, DTDHandler, EntityResolver, ErrorHandler

    public class CustomHandler

extends DefaultHandler

To convert SAX events into OSIS events.

I used the THML ref page: http://www.ccel.org/ThML/ThML1.04.htm to work out what the tags meant.

Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors.

Version:
  $Id: CustomHandler.java,v 1.10 2004/09/02 17:43:10 joe Exp $
Author:
  Joe Walker [joe at eireneh dot com]
See Also:
  `Licence`

Field Summary
`private static Logger` | `log` The log stream
`private org.jdom.Element` | `rootElement` When the document is parsed, this is the last element popped off the stack.
`private LinkedList` | `stack` The stack of elements that we have created
`private static Map` | `TAG_MAP` The known tag types

Constructor Summary
`CustomHandler()` Simple ctor

Method Summary
`void` | `characters(char[] data, int offset, int length)`
`void` | `endElement(String uri, String localname, String qname)`
`org.jdom.Element` | `getRootElement()`
`void` | `startElement(String uri, String localname, String qname, Attributes attrs)`

Methods inherited from class org.xml.sax.helpers.DefaultHandler
`endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### rootElement

    private org.jdom.Element rootElement

  When the document is parsed, this is the last element popped off the stack.

### stack

    private LinkedList stack

  The stack of elements that we have created

### TAG_MAP

    private static final Map TAG_MAP

  The known tag types

### log

    private static final Logger log

  The log stream

Constructor Detail

### CustomHandler

    public CustomHandler()

  Simple ctor

Method Detail

### startElement

    public void startElement(String uri,
                             String localname,
                             String qname,
                             Attributes attrs)
                      throws SAXException

  Specified by:
    `startElement` in interface `ContentHandler`
  Overrides:
    `startElement` in class `DefaultHandler`
  Throws:
    `SAXException`

### characters

    public void characters(char[] data,
                           int offset,
                           int length)

  Specified by:
    `characters` in interface `ContentHandler`
  Overrides:
    `characters` in class `DefaultHandler`

### endElement

    public void endElement(String uri,
                           String localname,
                           String qname)

  Specified by:
    `endElement` in interface `ContentHandler`
  Overrides:
    `endElement` in class `DefaultHandler`

### getRootElement

    public org.jdom.Element getRootElement()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ? 2003-2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD