Package org.codehaus.staxmate.out
Class SMOutputtable
- java.lang.Object
-
- org.codehaus.staxmate.out.SMOutputtable
-
- Direct Known Subclasses:
SMOutputContainer
,SMSimpleOutput
public abstract class SMOutputtable extends java.lang.Object
Basic building block for all outputtable content within StaxMate. Used as the base for both "active" nodes (elements, fragments; both buffered and unbuffered variations, entities that are created for output scoping, ie. as output containers) and those "passive" nodes that are blocked (ones for which instances are only created when they can not be output right away). It will not be passed for content that can be directly output without buffering (non-blocked text, CDATA, PIs, entity references and so on).Note that parent linkage is not included at this level since it is really only needed for active nodes (output containers; all of them since a non-bufferable container may still contain buffered containers).
-
-
Field Summary
Fields Modifier and Type Field Description protected SMOutputtable
_next
-
Constructor Summary
Constructors Modifier Constructor Description protected
SMOutputtable()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
_forceOutput(SMOutputContext ctxt)
Method similar to_output(org.codehaus.staxmate.out.SMOutputContext, boolean)
, except that this method will always succeed in doing the output.protected void
_linkNext(SMOutputtable next)
protected abstract 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.protected SMOutputtable
getNext()
-
-
-
Field Detail
-
_next
protected SMOutputtable _next
-
-
Method Detail
-
getNext
protected SMOutputtable getNext()
-
_linkNext
protected void _linkNext(SMOutputtable next)
-
_output
protected abstract boolean _output(SMOutputContext ctxt, boolean canClose) throws javax.xml.stream.XMLStreamException
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. In both cases output can fail or be only a partial one: buffered nodes will not be output at all, and nodes with buffered children can only be partially output.- Parameters:
ctxt
- 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.- Returns:
- True if the whole node could be output, ie. neither it nor its children are buffered.
- Throws:
javax.xml.stream.XMLStreamException
-
_forceOutput
protected abstract void _forceOutput(SMOutputContext ctxt) throws javax.xml.stream.XMLStreamException
Method similar to_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.- Throws:
javax.xml.stream.XMLStreamException
-
-