|
GXPARSE hosted by | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.gorman.xml.parse.toolkit.AbstractElement ca.gorman.xml.parse.toolkit.CoroutineElement<T>
public class CoroutineElement<T extends Parser>
Invokes
element handler
from the parser thread to run in the application thread.
Constructor Summary | |
---|---|
CoroutineElement(QName qName,
Attribute[] attribute)
Constructor. |
Method Summary | |
---|---|
int |
getDocumentLevel()
Get the nesting level of this element. |
void |
parseContent()
Parse the content of an element (required even if there is no content). |
void |
run()
Execute a callback from the parser thread to run the element handler
in the application thread. |
void |
skipContent()
Unsupported operation, override this method to implement the ability to skip the content of an element. |
Methods inherited from class ca.gorman.xml.parse.toolkit.AbstractElement |
---|
equals, getAttribute, getAttributes, getChildCount, getParent, getQName, getRepeatCount, getSiblingCount, hasAncestor, hashCode, hasParent, newInstance, setAttribute, setAttributes, setParent, setQName |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ca.gorman.xml.parse.Element |
---|
equals, getAttribute, getAttributes, getChildCount, getParent, getQName, getRepeatCount, getSiblingCount, hasAncestor, hashCode, hasParent |
Constructor Detail |
---|
public CoroutineElement(QName qName, Attribute[] attribute)
Constructor.
qName
- name of element, not nullattribute
- zero or more attributes of element, not null
NullPointerException
- if any parameter is nullMethod Detail |
---|
public final void run()
Execute a callback from the parser thread to run the
element handler
in the application thread.
This method is invoked just before the parser starts parsing the actual
DTD, and runs until the parser reaches the end of the DTD.
The parser is suspended until the element handler invokes the
parseContent
method.
run
in interface Runnable
CoroutineTransferException
- if the element handler throws an
exception.public final void parseContent() throws ListenerException, IOException
CurrentElement
Parse the content of an element (required even if there is no content).
This method causes the parser to continue operation, and does not return until the end of the element.
parseContent
in interface CurrentElement
ListenerException
IOException
public void skipContent() throws ListenerException, IOException
Unsupported operation, override this method to implement the ability to skip the content of an element.
skipContent
in interface CurrentElement
UnsupportedOperationException
- when invoked
ListenerException
IOException
public final int getDocumentLevel()
CurrentElement
Get the nesting level of this element.
Top element (the document element) is level 1, child elements have higher numbers.
getDocumentLevel
in interface CurrentElement
|
GXPARSE download | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |