apptElt.addAttribute(MailService.A_REVISION, appt.getModifiedSequence()); }
    public static Element encodeApptSummary(Element parent, ZimbraContext lc, Appointment appt, int fields) {        Element apptElt = parent.addElement(MailService.E_APPOINTMENT);                apptElt.addAttribute(MailService.A_UID, appt.getUid());        apptElt.addAttribute(MailService.A_ID, lc.formatItemId(appt));        apptElt.addAttribute(MailService.A_FOLDER, lc.formatItemId(appt.getFolderId()));                if (needToOutput(fields, Change.MODIFIED_CONTENT) && appt.getSavedSequence() != 0)            apptElt.addAttribute(MailService.A_REVISION, appt.getSavedSequence());        if (needToOutput(fields, Change.MODIFIED_SIZE))            apptElt.addAttribute(MailService.A_SIZE, appt.getSize());        if (needToOutput(fields, Change.MODIFIED_DATE))            apptElt.addAttribute(MailService.A_DATE, appt.getDate());        if (needToOutput(fields, Change.MODIFIED_FOLDER))            apptElt.addAttribute(MailService.A_FOLDER, lc.formatItemId(appt.getFolderId()));        recordItemTags(apptElt, appt, fields);        if (needToOutput(fields, Change.MODIFIED_CONFLICT))            apptElt.addAttribute(MailService.A_CHANGE_DATE, appt.getChangeDate() / 1000);                                for (int i = 0; i < appt.numInvites(); i++) {            Invite inv = appt.getInvite(i);            Element ie = apptElt.addElement(MailService.E_INVITE);            encodeTimeZoneMap(ie, appt.getTimeZoneMap());            encodeReplies(ie, appt, inv);                        ie.addAttribute(MailService.A_ID, lc.formatItemId(inv.getMailItemId()));            ie.addAttribute(MailService.A_APPT_COMPONENT_NUM, inv.getComponentNum());            if (inv.hasRecurId())                ie.addAttribute(MailService.A_APPT_RECURRENCE_ID, inv.getRecurId().toString());            encodeInvite(ie, lc, appt, inv, NOTIFY_FIELDS, false);        }                return apptElt;    }