org.codehaus.staxmate.out
Class SMOAttribute

java.lang.Object
  extended by org.codehaus.staxmate.out.SMOutputtable
      extended by org.codehaus.staxmate.out.SMOAttribute

public class SMOAttribute
extends SMOutputtable

Simple container class for storing definition of a buffered element attribute.


Field Summary
 
Fields inherited from class org.codehaus.staxmate.out.SMOutputtable
mNext
 
Constructor Summary
SMOAttribute(SMNamespace namespace, java.lang.String localName, java.lang.String value)
           
 
Method Summary
protected  boolean doOutput(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  void forceOutput(SMOutputContext ctxt)
          Method similar to SMOutputtable.doOutput(org.codehaus.staxmate.out.SMOutputContext, boolean), except that this method will always succeed in doing the output.
 
Methods inherited from class org.codehaus.staxmate.out.SMOutputtable
getNext, linkNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMOAttribute

public SMOAttribute(SMNamespace namespace,
                    java.lang.String localName,
                    java.lang.String value)
Method Detail

doOutput

protected boolean doOutput(SMOutputContext ctxt,
                           boolean canClose)
                    throws javax.xml.stream.XMLStreamException
Description copied from class: SMOutputtable
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 void forceOutput(SMOutputContext ctxt)
                    throws javax.xml.stream.XMLStreamException
Description copied from class: SMOutputtable
Method similar to SMOutputtable.doOutput(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.

Specified by:
forceOutput in class SMOutputtable
Throws:
javax.xml.stream.XMLStreamException