|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.crosswire.jsword.book.filter.thml.CustomHandler
public class CustomHandler
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.
for license details.
The copyright to this program is held by it's authors.| Field Summary | |
|---|---|
private Book |
book
The book containing the data. |
private Key |
key
The key for the data. |
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(Book book,
Key key)
Simple ctor |
|
| Method Summary | |
|---|---|
void |
characters(char[] data,
int offset,
int length)
|
void |
endElement(String uri,
String localname,
String qname)
|
org.jdom.Element |
getRootElement()
|
private Tag |
getTag(String localname,
String qname)
|
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 |
|---|
private Book book
private Key key
private org.jdom.Element rootElement
private LinkedList stack
private static final Map TAG_MAP
private static final Logger log
| Constructor Detail |
|---|
public CustomHandler(Book book,
Key key)
| Method Detail |
|---|
public void startElement(String uri,
String localname,
String qname,
Attributes attrs)
throws SAXException
startElement in interface ContentHandlerstartElement in class DefaultHandlerSAXException
public void characters(char[] data,
int offset,
int length)
characters in interface ContentHandlercharacters in class DefaultHandler
public void endElement(String uri,
String localname,
String qname)
endElement in interface ContentHandlerendElement in class DefaultHandlerpublic org.jdom.Element getRootElement()
private Tag getTag(String localname,
String qname)
|
Copyright ยจ 2003-2007 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||