Package org.dom4j

Examples of org.dom4j.QName


        for ( SaslQualityOfProtectionEnum saslQop : serverConfiguration.getSaslQops() )
        {
            switch ( saslQop )
            {
                case AUTH:
                    saslQopElement.addElement( new QName( ServerXmlIOV153.ELEMENT_VALUE, NAMESPACE_SPRINGFRAMEWORK ) )
                        .setText( ServerXmlIOV153.SASL_QOP_AUTH );
                    break;
                case AUTH_INT:
                    saslQopElement.addElement( new QName( ServerXmlIOV153.ELEMENT_VALUE, NAMESPACE_SPRINGFRAMEWORK ) )
                        .setText( ServerXmlIOV153.SASL_QOP_AUTH_INT );
                    break;
                case AUTH_CONF:
                    saslQopElement.addElement( new QName( ServerXmlIOV153.ELEMENT_VALUE, NAMESPACE_SPRINGFRAMEWORK ) )
                        .setText( ServerXmlIOV153.SASL_QOP_AUTH_CONF );
                    break;
            }
        }

        // Adding 'SaslRealms' element
        Element saslRealmsElement = ldapServerElement.addElement( ServerXmlIOV153.ELEMENT_SASL_REALMS );

        // Adding each SaslRealm item
        for ( String saslRealm : serverConfiguration.getSaslRealms() )
        {
            saslRealmsElement.addElement( new QName( ServerXmlIOV153.ELEMENT_VALUE, NAMESPACE_SPRINGFRAMEWORK ) )
                .setText( saslRealm );
        }

        // Adding 'ExtendedOperations' element
        Element extendedOperationsElement = ldapServerElement
View Full Code Here


     *      the server configuration
     */
    private void createCustomEditorConfigurerBean( Element root )
    {
        // Adding the 'bean' element
        Element beanElement = root.addElement( new QName( ServerXmlIOV153.ELEMENT_BEAN, NAMESPACE_XBEAN_SPRING ) );
        beanElement.addAttribute( ServerXmlIOV153.ATTRIBUTE_CLASS,
            "org.springframework.beans.factory.config.CustomEditorConfigurer" ); //$NON-NLS-1$

        // Adding the 'property' element
        Element propertyElement = beanElement.addElement( new QName( ServerXmlIOV153.ELEMENT_PROPERTY,
            NAMESPACE_XBEAN_SPRING ) );
        propertyElement.addAttribute( ServerXmlIOV153.ATTRIBUTE_NAME, ServerXmlIOV153.VALUE_CUSTOM_EDITORS );

        // Adding the 'map' element
        Element mapElement = propertyElement
            .addElement( new QName( ServerXmlIOV153.ELEMENT_MAP, NAMESPACE_XBEAN_SPRING ) );

        // Adding the 'entry' element
        Element entryElement = mapElement
            .addElement( new QName( ServerXmlIOV153.ELEMENT_ENTRY, NAMESPACE_XBEAN_SPRING ) );
        entryElement.addAttribute( ServerXmlIOV153.ATTRIBUTE_KEY, "javax.naming.directory.Attributes" ); //$NON-NLS-1$

        // Adding the inner 'bean' element
        Element innerBeanElement = entryElement.addElement( new QName( ServerXmlIOV153.ELEMENT_BEAN,
            NAMESPACE_XBEAN_SPRING ) );
        innerBeanElement.addAttribute( ServerXmlIOV153.ATTRIBUTE_CLASS,
            "org.apache.directory.server.core.configuration.AttributesPropertyEditor" ); //$NON-NLS-1$
    }
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));
    Element elRun = elParagraph
        .addElement(new QName("r", nsWordprocessinML));
    Element elText = elRun.addElement(new QName("t", nsWordprocessinML));
    elText.setText("Hello Open XML !");

    StreamHelper.saveXmlInStream(doc, corePart.getOutputStream());
    pkg.close();
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));
    Element elRun = elParagraph
        .addElement(new QName("r", nsWordprocessinML));
    Element elText = elRun.addElement(new QName("t", nsWordprocessinML));
    elText.setText("Hello Open XML !");

    StreamHelper.saveXmlInStream(doc, corePart.getOutputStream());

    // Save and close
View Full Code Here

    return coreProps;
  }

  private String loadCategory(Document xmlDoc) {
    Element el = xmlDoc.getRootElement().element(
        new QName(KEYWORD_CATEGORY, namespaceCP));
    if (el != null)
      return el.getStringValue();
    else
      return null;
  }
View Full Code Here

      return null;
  }

  private String loadContentStatus(Document xmlDoc) {
    Element el = xmlDoc.getRootElement().element(
        new QName(KEYWORD_CONTENT_STATUS, namespaceCP));
    if (el != null)
      return el.getStringValue();
    else
      return null;
  }
View Full Code Here

      return null;
  }

  private String loadContentType(Document xmlDoc) {
    Element el = xmlDoc.getRootElement().element(
        new QName(KEYWORD_CONTENT_TYPE, namespaceCP));
    if (el != null)
      return el.getStringValue();
    else
      return null;
  }
View Full Code Here

      return null;
  }

  private String loadCreated(Document xmlDoc) {
    Element el = xmlDoc.getRootElement().element(
        new QName(KEYWORD_CREATED, namespaceDcTerms));
    if (el != null)
      return el.getStringValue();
    else
      return null;
  }
View Full Code Here

      return null;
  }

  private String loadCreator(Document xmlDoc) {
    Element el = xmlDoc.getRootElement().element(
        new QName(KEYWORD_CREATOR, namespaceDC));
    if (el != null)
      return el.getStringValue();
    else
      return null;
  }
View Full Code Here

      return null;
  }

  private String loadDescription(Document xmlDoc) {
    Element el = xmlDoc.getRootElement().element(
        new QName(KEYWORD_DESCRIPTION, namespaceDC));
    if (el != null)
      return el.getStringValue();
    else
      return null;
  }
View Full Code Here

TOP

Related Classes of org.dom4j.QName

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.