Example usage for org.dom4j Branch addElement

List of usage examples for org.dom4j Branch addElement

Introduction

In this page you can find the example usage for org.dom4j Branch addElement.

Prototype

Element addElement(String qualifiedName, String namespaceURI);

Source Link

Document

Adds a new Element node with the given qualified name and namespace URI to this branch and returns a reference to the new node.

Usage

From source file:org.dentaku.gentaku.tools.cgen.xmi.XMIGenTask.java

License:Apache License

private Element createUMLTagDefinition(Branch modelPackage, String tagdefName, String tagdefType) {
    return modelPackage.addElement("UML:TagDefinition", "omg.org/UML/1.4")
            .addAttribute("xmi.id", uuid.generateUUID()).addAttribute("name", tagdefName)
            .addAttribute("tagType", tagdefType);
}

From source file:org.dentaku.gentaku.tools.cgen.xmi.XMIGenTask.java

License:Apache License

private void createTextElement(Branch modelPackage, String elementType, String textValue) {
    modelPackage.addElement("UML:" + elementType, "omg.org/UML/1.4").setText(textValue);
}

From source file:org.dentaku.gentaku.tools.cgen.xmi.XMIGenTask.java

License:Apache License

private Element createEmptyUMLElement(Branch model, String elementType) {
    Element ownedElement = model.addElement("UML:" + elementType, "omg.org/UML/1.4");
    return ownedElement;
}