|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.aethersanctum.curlyml.DocumentLoader
public class DocumentLoader
Creates a Document tree by intercepting events from the parsing of a stream. Not threadsafe. Use once to load a single document, from a file or reader then throw away.
| Constructor Summary | |
|---|---|
DocumentLoader()
|
|
| Method Summary | |
|---|---|
void |
handleLeaf(java.lang.String name)
handle leaf node creation events from parser, add them as children to whoever's top of the stack |
void |
handleParentBegin(java.lang.String name)
handle parent node creation events from parser, add them as children to whoever's top of the stack, and push them onto the top of the stack |
void |
handleParentEnd(boolean hasKids)
handle end-of-parent events from parser, just take 'em off the stack |
Document |
load(java.io.Reader s)
load document from anything that reads |
Document |
load(java.lang.String filename)
load Document from a file |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DocumentLoader()
| Method Detail |
|---|
public Document load(java.lang.String filename)
throws java.io.IOException,
SyntaxException
filename -
java.io.IOException
SyntaxException
public Document load(java.io.Reader s)
throws java.io.IOException,
SyntaxException
s -
java.io.IOException
SyntaxExceptionpublic void handleLeaf(java.lang.String name)
handleLeaf in interface ParseEventHandlerpublic void handleParentBegin(java.lang.String name)
handleParentBegin in interface ParseEventHandlerpublic void handleParentEnd(boolean hasKids)
handleParentEnd in interface ParseEventHandlerhasKids - will be true if the parent had any children or false if it was empty
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||