Package org.camunda.bpm.model.xml.impl.util

Examples of org.camunda.bpm.model.xml.impl.util.XmlQName


      document.appendChild(newDocumentElement);
    }
  }

  public DomElement createElement(String namespaceUri, String localName) {
    XmlQName xmlQName = new XmlQName(this, namespaceUri, localName);
    Element element = document.createElementNS(xmlQName.getNamespaceUri(), xmlQName.getPrefixedName());
    return new DomElementImpl(element);
  }
View Full Code Here


    return getAttribute(null, attributeName);
  }


  public String getAttribute(String namespaceUri, String localName) {
    XmlQName xmlQName = new XmlQName(this, namespaceUri, localName);
    String value;
    if (xmlQName.hasLocalNamespace()) {
      value = element.getAttributeNS(null, xmlQName.getLocalName());
    }
    else {
      value = element.getAttributeNS(xmlQName.getNamespaceUri(), xmlQName.getLocalName());
    }
    if (value.isEmpty()) {
      return null;
    }
    else {
View Full Code Here

  public void setAttribute(String namespaceUri, String localName, String value) {
    setAttribute(namespaceUri, localName, value, false);
  }

  private void setAttribute(String namespaceUri, String localName, String value, boolean isIdAttribute) {
    XmlQName xmlQName = new XmlQName(this, namespaceUri, localName);
    if (xmlQName.hasLocalNamespace()) {
      element.setAttributeNS(null, xmlQName.getLocalName(), value);
      if (isIdAttribute) {
        element.setIdAttributeNS(null, xmlQName.getLocalName(), true);
      }
    }
    else {
      element.setAttributeNS(xmlQName.getNamespaceUri(), xmlQName.getPrefixedName(), value);
      if (isIdAttribute) {
        element.setIdAttributeNS(xmlQName.getNamespaceUri(), xmlQName.getLocalName(), true);
      }
    }
  }
View Full Code Here

  public void removeAttribute(String localName) {
    removeAttribute(getNamespaceURI(), localName);
  }

  public void removeAttribute(String namespaceUri, String localName) {
    XmlQName xmlQName = new XmlQName(this, namespaceUri, localName);
    if (xmlQName.hasLocalNamespace()) {
      element.removeAttributeNS(null, xmlQName.getLocalName());
    }
    else {
      element.removeAttributeNS(xmlQName.getNamespaceUri(), xmlQName.getLocalName());
    }
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.model.xml.impl.util.XmlQName

Copyright © 2018 www.massapicom. 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.