|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An object that wishes to be informed of events during the parsing of a file.
This interface is similar in spirit to the SAX interfaces for parsing XML. Many of the methods will always be called in appropriately nested pairs. Entire records will be bracketed by a startRecord and endRecord pair. Within these, any number of startTag and endTag pairs may be called. Within a tag pair, any number of value invocations may be called. If a value is complex and requires parsing as a sub-entry, then the TagValueContext interface can be used to push a new TagValueParser and listener pair onto the parser stack. This will result in the pushed listener recieving a start/end document notification encapsulating the entire sub-set of events generated by the parser using the pushed TagValueParser to process the sub-document.
Method Summary | |
void |
endRecord()
The current record has ended. |
void |
endTag()
End the current tag. |
void |
startRecord()
A new record is about to start. |
void |
startTag(java.lang.Object tag)
Start a new tag. |
void |
value(TagValueContext ctxt,
java.lang.Object value)
A value has been seen. |
Method Detail |
public void startRecord() throws ParserException
ParserException
- if the record can not be startedpublic void endRecord() throws ParserException
ParserException
- if the record can not be endedpublic void startTag(java.lang.Object tag) throws ParserException
tag
- the Object representing the new tag
ParserException
- if the tag could not be startedpublic void endTag() throws ParserException
ParserException
- if the tag could not be endedpublic void value(TagValueContext ctxt, java.lang.Object value) throws ParserException
ctxt
- a TagValueContext that could be used to push a sub-documentvalue
- the value Object observed
ParserException
- if the value could not be processed
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |