Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMNode.detach()


            synCtx.getEnvelope().getHeader().addChild(child);
          }

                } else {
                    sourceNode.insertSiblingAfter(result);
                    sourceNode.detach();
                }
            }

        } catch (TransformerException e) {
            handleException("Error performing XSLT transformation using : " + xsltKey, e, synCtx);
View Full Code Here


                                        new StringReader(xqItem.getItemAsString())));
                        OMElement resultOM = builder.getDocumentElement();
                        if (resultOM != null) {
                            //replace the target node from the result
                            destination.insertSiblingAfter(resultOM);
                            destination.detach();
                        }
                    } else if (XQItemType.XQBASETYPE_INTEGER == baseType ||
                            XQItemType.XQBASETYPE_INT == baseType) {
                        //replace the text value of the target node by the result ,If the result is
                        // a basic type
View Full Code Here

    public boolean mediate(MessageContext synCtx) {
        SynapseLog synLog = getLog(synCtx);
        OMNode replacement = (OMNode)synCtx.getProperty(property);
        OMNode node = target.selectOMNode(synCtx, synLog);
        node.insertSiblingAfter(replacement);
        node.detach();
        synCtx.setProperty(property, null);
        return true;
    }
   
    public SynapseXPath getTarget() {
View Full Code Here

    private String property;

    public boolean mediate(MessageContext synCtx) {
        SynapseLog synLog = getLog(synCtx);
        OMNode node = source.selectOMNode(synCtx, synLog);
        node.detach();
        synCtx.setProperty(property, node);
        return true;
    }
   
    public SynapseXPath getSource() {
View Full Code Here

                        synCtx.getEnvelope().getBody().addChild(child);
                    }

                } else {
                    sourceNode.insertSiblingAfter(result);
                    sourceNode.detach();
                }
            }

        } catch (TransformerException e) {
            handleException("Error performing XSLT transformation using : " + xsltKey, e, synCtx);
View Full Code Here

                    Object o = targetXPath.evaluate(synCtx);

                    if (o != null && o instanceof OMElement) {
                        OMNode tgtNode = (OMElement) o;
                        tgtNode.insertSiblingAfter(result);
                        tgtNode.detach();
                    } else if (o != null && o instanceof List && !((List) o).isEmpty()) {
                        // Always fetches *only* the first
                        OMNode tgtNode = (OMElement) ((List) o).get(0);
                        tgtNode.insertSiblingAfter(result);
                        tgtNode.detach();
View Full Code Here

                        tgtNode.detach();
                    } else if (o != null && o instanceof List && !((List) o).isEmpty()) {
                        // Always fetches *only* the first
                        OMNode tgtNode = (OMElement) ((List) o).get(0);
                        tgtNode.insertSiblingAfter(result);
                        tgtNode.detach();
                    } else {
                        handleException("Evaluation of target XPath expression : " +
                            targetXPath.toString() + " did not yeild an OMNode", synCtx);
                    }
                } if (targetKey != null) {
View Full Code Here

                          header.declareNamespace(ns);
                        }
                        Iterator children = element.getChildElements();
                        while (children.hasNext()) {
                          OMNode child = (OMNode)children.next();
                          child.detach();
                          header.addChild(child);
                        }
                       
                        element.detach();
                       
View Full Code Here

    public void setText(String text) {

        OMNode child = this.getFirstOMChild();
        while (child != null) {
            if (child.getType() == OMNode.TEXT_NODE) {
                child.detach();
            }
            child = child.getNextOMSibling();
        }

        OMAbstractFactory.getOMFactory().createOMText(this, text);
View Full Code Here

    public void setText(QName text) {

        OMNode child = this.getFirstOMChild();
        while (child != null) {
            if (child.getType() == OMNode.TEXT_NODE) {
                child.detach();
            }
            child = child.getNextOMSibling();
        }

        OMAbstractFactory.getOMFactory().createOMText(this, text);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.