|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.uniba.euromath.tools.xml.sax.SaxEventRecorder
public final class SaxEventRecorder
Each event invoked on this handler gets transferred to the underlying content handler and recorded. These events can be then replayed to any chosen ContentHandler.
| Constructor Summary | |
|---|---|
SaxEventRecorder(boolean suppressDocEvents)
Constructor. |
|
SaxEventRecorder(ContentHandler sink,
boolean suppressDocEvents)
Constructor. |
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(String uri,
String localName,
String qName)
|
void |
endPrefixMapping(String prefix)
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
boolean |
isFinished()
Checks if content handler finished recording events. |
void |
processingInstruction(String target,
String data)
|
void |
replayEvents(ContentHandler handler)
Replays recorded events on given handler. |
void |
reset()
Resets the recorded history - clears all recorded events. |
void |
setDocumentLocator(Locator locator)
|
void |
setHandler(ContentHandler handler)
Sets the underlying handler that receives the events. |
void |
skippedEntity(String name)
|
void |
startDocument()
|
void |
startElement(String uri,
String localName,
String qName,
Attributes atts)
|
void |
startPrefixMapping(String prefix,
String uri)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SaxEventRecorder(boolean suppressDocEvents)
suppressDocEvents - if true then
startDocument() / endDocument() are not
given to sink nor replayed.
public SaxEventRecorder(ContentHandler sink,
boolean suppressDocEvents)
sink - initialize handler to this instance.suppressDocEvents - if true then
startDocument() / endDocument() are not
given to sink nor replayed.| Method Detail |
|---|
public void reset()
public void setHandler(ContentHandler handler)
handler - handler that receives the events.
public void replayEvents(ContentHandler handler)
throws SAXException
handler - the handler.
SAXException - if event processing fails.public boolean isFinished()
true if endDocument() was called.public void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandler
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerSAXException
public void endDocument()
throws SAXException
endDocument in interface ContentHandlerSAXException
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
startPrefixMapping in interface ContentHandlerSAXException
public void endPrefixMapping(String prefix)
throws SAXException
endPrefixMapping in interface ContentHandlerSAXException
public void startElement(String uri,
String localName,
String qName,
Attributes atts)
throws SAXException
startElement in interface ContentHandlerSAXException
public void endElement(String uri,
String localName,
String qName)
throws SAXException
endElement in interface ContentHandlerSAXException
public void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlerSAXException
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerSAXException
public void processingInstruction(String target,
String data)
throws SAXException
processingInstruction in interface ContentHandlerSAXException
public void skippedEntity(String name)
throws SAXException
skippedEntity in interface ContentHandlerSAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||