|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.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 ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
SAXException
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
SAXException
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
public void skippedEntity(String name) throws SAXException
skippedEntity
in interface ContentHandler
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |