/** Builds next element. */ public void build() { while (!done) this.builder.next(); }
/** * Returns the document element. * * @see org.apache.axiom.om.OMDocument#getOMDocumentElement() */ public OMElement getOMDocumentElement() { //We'r sure that only an element can be the first child of a Document if (this.documentElement == null && !this.done) { this.builder.next(); } return this.documentElement; }
public void buildNext() { if (!this.done) builder.next(); }
public OMNode getNextOMSibling() throws OMException { while (!done) { int token = builder.next(); if (token == XMLStreamConstants.END_DOCUMENT) { throw new OMException(); } } return super.getNextOMSibling(); }
public static void buildNext(IParentNode that) { OMXMLParserWrapper builder = that.getBuilder(); if (builder != null) { if (((StAXOMBuilder)builder).isClosed()) { throw new OMException("The builder has already been closed"); } else if (!builder.isCompleted()) { builder.next(); } else { // If the builder is suddenly complete, but the completion status of the node // doesn't change, then this means that we built the wrong nodes throw new IllegalStateException("Builder is already complete"); } } }
public static void build(IContainer container) { OMXMLParserWrapper builder = container.getBuilder(); if (builder != null && builder.isCompleted()) { log.debug("Builder is already complete."); } while (!container.isComplete()) { builder.next(); if (builder.isCompleted() && !container.isComplete()) { log.debug("Builder is complete. Setting OMObject to complete."); container.setComplete(true); } } }
builder.next(); navigator.step(); nextNode = navigator.getNext();
/** Method updateNextNode. */ private void updateNextNode() { if (navigator.isNavigable()) { nextNode = navigator.next(); } else { if (!switchingAllowed) { if (navigator.isCompleted()) { nextNode = null; } else { builder.next(); navigator.step(); nextNode = navigator.next(); } } else { // reset caching (the default is ON so it was not needed in the // earlier case! builder.setCache(false); state = SWITCH_AT_NEXT; } } }
OMSerializerUtil.serializeStartpart(this, writer); builder.setCache(cache); builder.next(); OMSerializerUtil.serializeEndpart(writer);
OMSerializerUtil.serializeStartpart(this, writer); builder.setCache(cache); builder.next(); OMSerializerUtil.serializeEndpart(writer);
OMSerializerUtil.serializeStartpart(this, writer); builder.setCache(cache); builder.next(); OMSerializerUtil.serializeEndpart(writer);