Qizx/db 2.1 API

com.qizx.api.util
Class PushNodeBuilder

java.lang.Object
  extended bycom.qizx.xdm.AttributeList
      extended bycom.qizx.xdm.XMLPushStreamBase
          extended bycom.qizx.xdm.CorePushBuilder
              extended bycom.qizx.api.util.PushNodeBuilder
All Implemented Interfaces:
Attributes, XMLPushStream

public class PushNodeBuilder
extends com.qizx.xdm.CorePushBuilder

An implementation of XMLPushStream that builds an in-memory Node tree and returns the top Node.

Nodes are built by calling methods of XMLPushStream like putElementStart, putAttribute, putText, putElementEnd etc. in the proper order, or the method putNodeCopy, or both. Finally the reap() method returns the top-level node built.

The reset() method should be called before reusing this object for building another tree.

Since:
2.1

Field Summary
 
Fields inherited from class com.qizx.xdm.CorePushBuilder
current, dm, orderStamp, previous, root
 
Fields inherited from class com.qizx.xdm.XMLPushStreamBase
baseURI, contextualMappings, docStarted, dtdInternalSubset, dtdName, dtdPublicId, dtdSystemid, elementName, elementStarted, endDocumentDone, maxVolume, spaceNeeded, startDocumentDone, trace, volume, VOLUME_LIMIT
 
Fields inherited from class com.qizx.xdm.AttributeList
attrCnt, attrNames, attrTypes, attrValues, nsContext
 
Fields inherited from interface com.qizx.api.XMLPushStream
NSCOPY_NOPRESERVE_INHERIT, NSCOPY_NOPRESERVE_NOINHERIT, NSCOPY_PRESERVE_INHERIT, NSCOPY_PRESERVE_NOINHERIT
 
Constructor Summary
PushNodeBuilder()
           
 
Method Summary
 Node reap()
          Returns the top-level node built with this object.
 
Methods inherited from class com.qizx.xdm.CorePushBuilder
addNSMapping, flush, flushElementStart, harvest, putAttribute, putComment, putDocumentEnd, putDocumentStart, putElementEnd, putElementStart, putNamespace, putProcessingInstruction, putText, reset, resolvePrefix
 
Methods inherited from class com.qizx.xdm.XMLPushStreamBase
abort, checkCommentValue, checkNameMapping, checkPIValue, completeNameMappings, defineContextMappings, isAtRoot, maxVolumeReached, noSpace, putAtom, putAtomText, putChars, putDTD, putLongAtom, putNamespaces, putNodeCopy, putNodeCopy, setMaxVolume, setTrace
 
Methods inherited from class com.qizx.xdm.AttributeList
addAttribute, getAttributeCount, getIndex, getIndex, getIndex, getLength, getLocalName, getNamespaceContext, getNamespaceCount, getNamespacePrefix, getNamespaceURI, getQName, getType, getType, getType, getURI, getValue, getValue, getValue, rawAddAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PushNodeBuilder

public PushNodeBuilder()
Method Detail

reap

public Node reap()
Returns the top-level node built with this object. If CorePushBuilder.putDocumentStart() has been used first, this will be a document node, else an element.

Returns:
the top-level Node built with this object.

© 2008 Axyana Software