|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.staxmate.out.SMOutputtable
org.codehaus.staxmate.out.SMOutputContainer
org.codehaus.staxmate.out.SMRootFragment
public class SMRootFragment
Concrete non-buffered fragment (== container) class used as the root level output container. Root-level does not necessarily have to mean XML root level; it may also be a child context of a stream writer in which StaxMate is only used to output specific sub-trees. This class is also used as the base for the outputter that models a complete document.
| Field Summary | |
|---|---|
protected boolean |
_active
Simple state flag; children can only be added when root container is still active. |
| Fields inherited from class org.codehaus.staxmate.out.SMOutputtable |
|---|
_next |
| Constructor Summary | |
|---|---|
SMRootFragment(SMOutputContext ctxt)
|
|
| Method Summary | |
|---|---|
boolean |
_canOutputNewChild()
Method called to figure out if we can just output a newly added child, without any buffering. |
protected void |
_childReleased(SMOutputtable child)
Method called by a child, when it is released and neither is or contains any buffered entities. |
protected void |
_forceOutput(SMOutputContext ctxt)
Method similar to SMOutputtable._output(org.codehaus.staxmate.out.SMOutputContext, boolean), except that this method will
always succeed in doing the output. |
protected boolean |
_output(SMOutputContext ctxt,
boolean canClose)
Method called to request that the entity output itself; either as much as it can without closing, or as much as it can if it is to get closed. |
void |
closeRoot()
Method that HAS to be called when all additions have been done via StaxMate API. |
void |
closeRootAndWriter()
|
void |
getPath(java.lang.StringBuilder sb)
Method that can be called to get an XPath like description of the relative location of this output node, starting from root. |
| Methods inherited from class org.codehaus.staxmate.out.SMOutputContainer |
|---|
_closeAllButLastChild, _closeAndOutputChildren, _forceChildOutput, _linkNewChild, _throwClosed, _throwRelinking, _verifyNamespaceArg, addAndReleaseBuffered, addBuffered, addCData, addCData, addCharacters, addCharacters, addComment, addElement, addElement, addElementWithCharacters, addEntityRef, addProcessingInstruction, addValue, addValue, addValue, addValue, createBufferedElement, createBufferedFragment, getContext, getNamespace, getNamespace, getParent, getPath, setIndentation |
| Methods inherited from class org.codehaus.staxmate.out.SMOutputtable |
|---|
_linkNext, getNext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean _active
| Constructor Detail |
|---|
public SMRootFragment(SMOutputContext ctxt)
| Method Detail |
|---|
protected boolean _output(SMOutputContext ctxt,
boolean canClose)
throws javax.xml.stream.XMLStreamException
SMOutputtable
_output in class SMOutputContainerctxt - Output context to use for outputting this node (and
its contents)canClose - If true, indicates that the node can (and should)
be fully closed if possible. This (passing true) is usually done
when a new sibling
is added after a node (element/fragment); if so, current one
should be recursively closed. If false, should only try to output
as much as can be done without forcing closures.
javax.xml.stream.XMLStreamException
protected void _forceOutput(SMOutputContext ctxt)
throws javax.xml.stream.XMLStreamException
SMOutputtableSMOutputtable._output(org.codehaus.staxmate.out.SMOutputContext, boolean), except that this method will
always succeed in doing the output. Specifically, it will force all
buffered nodes to be unbuffered, and then output.
_forceOutput in class SMOutputContainerjavax.xml.stream.XMLStreamException
protected void _childReleased(SMOutputtable child)
throws javax.xml.stream.XMLStreamException
SMOutputContainer
_childReleased in class SMOutputContainerchild - Child node that now neither is nor contains any buffered
nodes.
javax.xml.stream.XMLStreamException
public boolean _canOutputNewChild()
throws javax.xml.stream.XMLStreamException
SMOutputContainer
_canOutputNewChild in class SMOutputContainerjavax.xml.stream.XMLStreamExceptionpublic void getPath(java.lang.StringBuilder sb)
SMOutputContainer
getPath in class SMOutputContainer
public void closeRoot()
throws javax.xml.stream.XMLStreamException
Note that the underlying stream is NOT closed as part of
this call, just this logical outputter object.
If you do want the underlying writer to be closed too, call
closeRootAndWriter() instead.
javax.xml.stream.XMLStreamException
public void closeRootAndWriter()
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||