Examples of OMElementHelper


Examples of org.wso2.carbon.rulecep.commons.utils.OMElementHelper

                                                  OMElement parent, XPathSerializer xPathSerializer) {

        OMElement serviceElement;
        QNameFactory qNameFactory = QNameFactory.getInstance();
        OMNamespaceFactory omNamespaceFactory = OMNamespaceFactory.getInstance();
        OMElementHelper omElementHelper = OMElementHelper.getInstance();
        if (parent != null) {
            // removes existing rule config information in the service.xml
            serviceElement = parent;
            Iterator iterator = serviceElement.getChildElements();
            while (iterator.hasNext()) {
                Object o = iterator.next();
                if (!(o instanceof OMElement)) {
                    continue;
                }
                OMElement child = (OMElement) o;
                if (CommonsConstants.ELE_DESCRIPTION.equals(child.getLocalName())) {
                    omElementHelper.detachChildren(child);
                    String des = description.getDescription();
                    if (des != null && !"".equals(des.trim())) {
                        child.setText(des);
                    }
                }
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.