Package org.dom4j

Examples of org.dom4j.Element.elementText()


            // Sets the attachment values
            Element attachment = avatar.element("attachment");
            if (attachment != null) {
                avatarCreateParams.addElement("name").setText(attachment.elementText("name"));
                avatarCreateParams.addElement("contentType").setText(attachment.elementText("contentType"));
                avatarCreateParams.addElement("data").setText(attachment.elementText("data"));
            }
        }

        return avatarCreateParams;
    }
View Full Code Here


        vCardValues.put(VCardField.TITLE, vCardElement.elementText("TITLE"));

        // Add the Department
        Element orgElement = vCardElement.element("ORG");
        if (orgElement != null) {
            vCardValues.put(VCardField.ORG_ORGUNIT, orgElement.elementText("ORGUNIT"));
        }

        // Add the home and work address
        List<Element> addressElements = (List<Element>) vCardElement.elements("ADR");
        if (addressElements != null) {
View Full Code Here

        vCardValues.put(VCardField.TZ, vCardElement.elementText("TZ"));

        // Add the photo
        Element photoElement = vCardElement.element("PHOTO");
        if (photoElement != null) {
            vCardValues.put(VCardField.PHOTO_TYPE, photoElement.elementText("TYPE"));
            vCardValues.put(VCardField.PHOTO_BINVAL, photoElement.elementText("BINVAL"));
        }

        // Add the home and work tel
        List<Element> telElements = (List<Element>) vCardElement.elements("TEL");
View Full Code Here

        // Add the photo
        Element photoElement = vCardElement.element("PHOTO");
        if (photoElement != null) {
            vCardValues.put(VCardField.PHOTO_TYPE, photoElement.elementText("TYPE"));
            vCardValues.put(VCardField.PHOTO_BINVAL, photoElement.elementText("BINVAL"));
        }

        // Add the home and work tel
        List<Element> telElements = (List<Element>) vCardElement.elements("TEL");
        if (telElements != null) {
View Full Code Here

    private void translateAvatarInformation(Element avatarResponse, Element vCard) {
        Element avatar = avatarResponse.element("return");
        if (avatar != null) {
            Element attachment = avatar.element("attachment");
            if (attachment != null) {
                String contentType = attachment.elementText("contentType");
                String data = attachment.elementText("data");

                // Add the avatar to the vCard
                Element photo = vCard.addElement("PHOTO");
                photo.addElement("TYPE").setText(contentType);
View Full Code Here

        Element avatar = avatarResponse.element("return");
        if (avatar != null) {
            Element attachment = avatar.element("attachment");
            if (attachment != null) {
                String contentType = attachment.elementText("contentType");
                String data = attachment.elementText("data");

                // Add the avatar to the vCard
                Element photo = vCard.addElement("PHOTO");
                photo.addElement("TYPE").setText(contentType);
                photo.addElement("BINVAL").setText(data);
View Full Code Here

                    message = from + " has left the room";
                }
            }
            else if ("message".equals(name)) {
                from = new JID(packet.attributeValue("from")).getResource();
                message = packet.elementText("body");
                message = StringUtils.escapeHTMLTags(message);
                if(conv1 == null){
                    conv1 = from;
                }
            }
View Full Code Here

                    message = from + " has left the room";
                }
            }
            else if ("message".equals(name)) {
                from = new JID(packet.attributeValue("from")).getResource();
                message = packet.elementText("body");
                message = StringUtils.escapeHTMLTags(message);
            }

            List<Element> el = packet.elements("x");
            for (Element ele : el) {
View Full Code Here

            String phone = null, phone2 = null, fax = null, locationId = null;
            String address1 = null, address2 = null, city = null, region = null, country = null;
            // Get ADUser info
            final Element userList = e.element("aDUserList").element("ADUser");
            if (userList != null) {
                firstname = userList.elementText("firstname");
                lastname = userList.elementText("lastname");
                email = userList.elementText("email");
            }

            // Get BPLocation info
View Full Code Here

            String address1 = null, address2 = null, city = null, region = null, country = null;
            // Get ADUser info
            final Element userList = e.element("aDUserList").element("ADUser");
            if (userList != null) {
                firstname = userList.elementText("firstname");
                lastname = userList.elementText("lastname");
                email = userList.elementText("email");
            }

            // Get BPLocation info
            final Element locationList = e.element(
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.