Package org.dom4j

Examples of org.dom4j.Document.addElement()


       <security-domain>java:/jaas/cts</security-domain>
       <context-root>/ws/ejbN/</context-root>
       <virtual-host>some.domain.com</virtual-host>
       </jboss-web>
       */
      Element jbossWeb = document.addElement("jboss-web");

      if (securityHandler != null)
         securityHandler.addSecurityDomain(jbossWeb, dep);

      // Get the context root for this deployment
View Full Code Here


  private Document createDocument(final Reflections reflections) {
    final Map<String, Multimap<String, String>> map = reflections.getStore().getStoreMap();

    Document document = DocumentFactory.getInstance().createDocument();
    Element root = document.addElement("Reflections");
    for (String indexName : map.keySet()) {
      Element indexElement = root.addElement(indexName);
      for (String key : map.get(indexName).keySet()) {
        Element entryElement = indexElement.addElement("entry");
        entryElement.addElement("key").setText(key);
View Full Code Here

        return new ArrayList(entryList);
    }

    public Document getDocument() {
        Document document = DocumentHelper.createDocument();
        Element root = document.addElement("jboss-deployment-plan");

        root.addElement("deployment-name").addText(deploymentName);

        root.addComment("Note, deployment-entry elements are not used by the DeploymentManager");
        root.addComment("The DeploymentManager relies on the the entry naming convention");
View Full Code Here

            "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml");

    Document doc = DocumentHelper.createDocument();
    Namespace nsWordprocessinML = new Namespace("w",
        "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
    Element elDocument = doc.addElement(new QName("document",
        nsWordprocessinML));
    Element elBody = elDocument.addElement(new QName("body",
        nsWordprocessinML));
    Element elParagraph = elBody.addElement(new QName("p",
        nsWordprocessinML));
View Full Code Here

    // Create a content
    Document doc = DocumentHelper.createDocument();
    Namespace nsWordprocessinML = new Namespace("w",
        "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
    Element elDocument = doc.addElement(new QName("document",
        nsWordprocessinML));
    Element elBody = elDocument.addElement(new QName("body",
        nsWordprocessinML));
    Element elParagraph = elBody.addElement(new QName("p",
        nsWordprocessinML));
View Full Code Here

    // Building xml
    Document xmlOutDoc = DocumentHelper.createDocument();
    // make something like <Relationships
    // xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
    Namespace dfNs = Namespace.get("", PackageNamespaces.RELATIONSHIPS);
    Element root = xmlOutDoc.addElement(new QName(
        PackageRelationship.RELATIONSHIPS_TAG_NAME, dfNs));

    // <Relationship
    // TargetMode="External"
    // Id="rIdx"
View Full Code Here

        return document;
    }

    private Element generateRevisionInfoRelationMapping() {
        Document document = DocumentHelper.createDocument();
        Element rev_rel_mapping = document.addElement("key-many-to-one");
        rev_rel_mapping.addAttribute("type", revisionPropType);
        rev_rel_mapping.addAttribute("class", revisionInfoEntityName);

        if (revisionPropSqlType != null) {
            // Putting a fake name to make Hibernate happy. It will be replaced later anyway.
View Full Code Here

//                </entry>
//
//        </feed>

        Document doc = DocumentFactory.getInstance().createDocument();
        Element root = doc.addElement("feed");
        String NS = "http://www.w3.org/2005/Atom";
        root.add(new Namespace("", NS));

        root.addElement("title", NS).setText("Speakeasy Extensions");
        root.addElement("subtitle", NS).setText("Via " + serverName);
View Full Code Here

        column.addAttribute("name", joinTableValueColumnName);
    }

    private Element generateRevisionInfoRelationMapping() {
        Document document = XMLHelper.getDocumentFactory().createDocument();
        Element rev_rel_mapping = document.addElement("key-many-to-one");
        rev_rel_mapping.addAttribute("type", revisionPropType);
        rev_rel_mapping.addAttribute("class", revisionInfoEntityName);

        if (revisionPropSqlType != null) {
            // Putting a fake name to make Hibernate happy. It will be replaced later anyway.
View Full Code Here

                        "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml");

        Document doc = DocumentHelper.createDocument();
        Namespace nsWordprocessinML = new Namespace("w",
                "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
        Element elDocument = doc.addElement(new QName("document",
                nsWordprocessinML));
        Element elBody = elDocument.addElement(new QName("body",
                nsWordprocessinML));
        Element elParagraph = elBody.addElement(new QName("p",
                nsWordprocessinML));
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.