Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMElement.addAttribute()


        }
       
        OMFactory factory = new OMLinkedListImplFactory();
        OMElement message = factory.createOMElement(SyslogConstants.MESSAGE);
        message.addAttribute(factory.createOMAttribute(SyslogConstants.FACILITY, null, facility));
        message.addAttribute(factory.createOMAttribute(SyslogConstants.SEVERITY, null, severity));
        if (tag != null) {
            message.addAttribute(factory.createOMAttribute(SyslogConstants.TAG, null, tag));
        }
        if (pid != -1) {
            message.addAttribute(factory.createOMAttribute(SyslogConstants.PID, null, String.valueOf(pid)));
View Full Code Here


        OMFactory factory = new OMLinkedListImplFactory();
        OMElement message = factory.createOMElement(SyslogConstants.MESSAGE);
        message.addAttribute(factory.createOMAttribute(SyslogConstants.FACILITY, null, facility));
        message.addAttribute(factory.createOMAttribute(SyslogConstants.SEVERITY, null, severity));
        if (tag != null) {
            message.addAttribute(factory.createOMAttribute(SyslogConstants.TAG, null, tag));
        }
        if (pid != -1) {
            message.addAttribute(factory.createOMAttribute(SyslogConstants.PID, null, String.valueOf(pid)));
        }
        message.setText(content);
View Full Code Here

        message.addAttribute(factory.createOMAttribute(SyslogConstants.SEVERITY, null, severity));
        if (tag != null) {
            message.addAttribute(factory.createOMAttribute(SyslogConstants.TAG, null, tag));
        }
        if (pid != -1) {
            message.addAttribute(factory.createOMAttribute(SyslogConstants.PID, null, String.valueOf(pid)));
        }
        message.setText(content);
       
        return message;
    }
View Full Code Here

            handleException("Unsupported mediator passed in for serialization : " + m.getType());
        }

        TransactionMediator mediator = (TransactionMediator) m;
        OMElement transaction = fac.createOMElement("transaction", synNS);
        transaction.addAttribute(fac.createOMAttribute("action", nullNS, mediator.getAction()));

        saveTracingState(transaction, mediator);

        return transaction;
    }
View Full Code Here

        XQueryMediator queryMediator = (XQueryMediator) m;

        OMElement xquery = fac.createOMElement("xquery", synNS);
        String key = queryMediator.getQueryKey();
        if (key != null) {
            xquery.addAttribute(fac.createOMAttribute(
                    "key", nullNS, key));

        }

        saveTracingState(xquery, queryMediator);
View Full Code Here

                    MediatorBaseVariable variable = (MediatorBaseVariable) o;
                    QName name = variable.getName();
                    Object value = variable.getValue();
                    if (name != null && value != null) {
                        OMElement baseElement = fac.createOMElement("variable", synNS);
                        baseElement.addAttribute(fac.createOMAttribute(
                                "name", nullNS, name.getLocalPart()));
                        baseElement.addAttribute(fac.createOMAttribute(
                                "value", nullNS, (String) value));
                        String type = null;
                        int varibelType = variable.getType();
View Full Code Here

                    Object value = variable.getValue();
                    if (name != null && value != null) {
                        OMElement baseElement = fac.createOMElement("variable", synNS);
                        baseElement.addAttribute(fac.createOMAttribute(
                                "name", nullNS, name.getLocalPart()));
                        baseElement.addAttribute(fac.createOMAttribute(
                                "value", nullNS, (String) value));
                        String type = null;
                        int varibelType = variable.getType();
                        if (XQItemType.XQBASETYPE_INT == varibelType) {
                            type = "INT";
View Full Code Here

                            type = "ELEMENT";
                        } else {
                            handleException("Unknown Type " + varibelType);
                        }
                        if (type != null) {
                            baseElement.addAttribute(fac.createOMAttribute(
                                    "type", nullNS, type));

                        }
                        xquery.addChild(baseElement);
                    }
View Full Code Here

                } else if (o instanceof MediatorCustomVariable) {
                    MediatorCustomVariable variable = (MediatorCustomVariable) o;
                    QName name = variable.getName();
                    if (name != null) {
                        OMElement customElement = fac.createOMElement("variable", synNS);
                        customElement.addAttribute(fac.createOMAttribute(
                                "name", nullNS, name.getLocalPart()));
                        String regkey = variable.getRegKey();
                        if (regkey != null) {
                            customElement.addAttribute(fac.createOMAttribute(
                                    "key", nullNS, regkey));
View Full Code Here

                        OMElement customElement = fac.createOMElement("variable", synNS);
                        customElement.addAttribute(fac.createOMAttribute(
                                "name", nullNS, name.getLocalPart()));
                        String regkey = variable.getRegKey();
                        if (regkey != null) {
                            customElement.addAttribute(fac.createOMAttribute(
                                    "key", nullNS, regkey));
                        }
                        SynapseXPath expression = variable.getExpression();
                        if (expression != null &&
                                !SourceXPathSupport.DEFAULT_XPATH.equals(expression.toString())) {
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.