Package org.dom4j.tree

Examples of org.dom4j.tree.DefaultElement.addAttribute()


    DefaultElement resourceElement = new DefaultElement(CPCore.RESOURCE);

    resourceElement.addAttribute(CPCore.IDENTIFIER, identifier);
    resourceElement.addAttribute(CPCore.TYPE, type);
    resourceElement.addAttribute(CPCore.HREF, href);
    if (!xmlbase.equals("")) resourceElement.addAttribute(CPCore.BASE, xmlbase);

    if (metadata != null) {
      metadata.buildDocument(resourceElement);
    }
View Full Code Here


            mainGenerator.getBasicMetadataGenerator().addBasic(orig_id_mapping,
                    getIdPersistentPropertyAuditingData(id_prop),
                    id_prop.getValue(), null, true, true);
        }

        orig_id_mapping.addAttribute("name", mainGenerator.getVerEntCfg().getOriginalIdPropName());

        // Adding a relation to the revision entity (effectively: the "revision number" property)
        mainGenerator.addRevisionInfoRelation(orig_id_mapping);

        return new IdMappingData(mapper, orig_id_mapping, rel_id_mapping);
View Full Code Here

            mainGenerator.getBasicMetadataGenerator().addBasic(orig_id_mapping,
                    getIdPersistentPropertyAuditingData(id_prop),
                    id_prop.getValue(), null, true, true);
        }

        orig_id_mapping.addAttribute("name", mainGenerator.getVerEntCfg().getOriginalIdPropName());

        // Adding a relation to the revision entity (effectively: the "revision number" property)
        mainGenerator.addRevisionInfoRelation(orig_id_mapping);

        return new IdMappingData(mapper, orig_id_mapping, rel_id_mapping);
View Full Code Here

    public void endNode() {
        try {
            if (!children) {
                final Element element = new DefaultElement(elementStack.pop());
                for (int i = 0; i < attributes.getLength(); ++i) {
                    element.addAttribute(attributes.getQName(i), attributes.getValue(i));
                }
                writer.write(element);
                attributes.clear();
                children = true; // node just closed is child of node on top of stack
                started = true;
View Full Code Here

    public void endNode() {
        try {
            if (!children) {
                Element element = new DefaultElement((String)elementStack.pop());
                for (int i = 0; i < attributes.getLength(); ++i) {
                    element.addAttribute(attributes.getQName(i), attributes.getValue(i));
                }
                writer.write(element);
                attributes.clear();
                children = true;   // node just closed is child of node on top of stack
                started = true;
View Full Code Here

    public void endNode() {
        try {
            if (!children) {
                Element element = new DefaultElement((String)elementStack.pop());
                for (int i = 0; i < attributes.getLength(); ++i) {
                    element.addAttribute(attributes.getQName(i), attributes.getValue(i));
                }
                writer.write(element);
                children = true;   // node just closed is child of node on top of stack
                started = true;
            } else {
View Full Code Here

    return "</ExecuteActivityResponse>\n"; //$NON-NLS-1$
  }

  private static Element createActivityResponseElement() {
    Element element = new DefaultElement( "ExecuteActivityResponse" );
    element.addAttribute( "xmlns:m", "http://pentaho.org" );
    return element;
  }

  private static Element createSoapElement( String name, Object value ) {
    if ( value instanceof String ) {
View Full Code Here

    return resultSetElement;
  }

  private static Element createSoapEnvelope() {
    Element envelope = new DefaultElement( "SOAP-ENV:Envelope" );
    envelope.addAttribute( "xmlns:SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/" );
    envelope.addAttribute( "SOAP-ENV:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/" );
    return envelope;
  }

  private static Element createSoapBody() {
View Full Code Here

  }

  private static Element createSoapEnvelope() {
    Element envelope = new DefaultElement( "SOAP-ENV:Envelope" );
    envelope.addAttribute( "xmlns:SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/" );
    envelope.addAttribute( "SOAP-ENV:encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/" );
    return envelope;
  }

  private static Element createSoapBody() {
    return new DefaultElement( "SOAP-ENV:Body" );
View Full Code Here

    public void endNode() {
        try {
            if (!children) {
                Element element = new DefaultElement((String)elementStack.pop());
                for (int i = 0; i < attributes.getLength(); ++i) {
                    element.addAttribute(attributes.getQName(i), attributes.getValue(i));
                }
                writer.write(element);
                attributes.clear();
                children = true;   // node just closed is child of node on top of stack
                started = true;
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.