protected static String fromUid(PropertyList propertyList) { Uid iCalObj = (Uid) propertyList.getProperty(Uid.UID); if (iCalObj == null) { return null; } return iCalObj.getValue(); }
public String getIcalUid() { return getEvent().getUid().getValue(); }
public String getIcalUid() { return getEvent().getUid().getValue(); }
private void parseToDo(VToDo toDo) throws RDFParseException, RDFHandlerException, UnsupportedEncodingException { log.debug("parsing todo: {}", toDo.getUid()); Resource r_event; if(toDo.getUid() != null) { r_event = resolveURI(toDo.getUid().getValue()); } else { r_event = resolveURI(UUID.randomUUID().toString()); } Resource t_vevent = createURI(NS_ICAL + "Vtodo"); URI p_type = createURI(NS_RDF + "type"); rdfHandler.handleStatement(createStatement(r_event,p_type,t_vevent)); parseCalendarComponent(toDo,r_event); }
private void parseFreeBusy(VFreeBusy freeBusy) throws RDFParseException, RDFHandlerException, UnsupportedEncodingException { log.debug("parsing free/busy: {}", freeBusy.getUid()); Resource r_event; if(freeBusy.getUid() != null) { r_event = resolveURI(freeBusy.getUid().getValue()); } else { r_event = resolveURI(UUID.randomUUID().toString()); } Resource t_vevent = createURI(NS_ICAL + "Vfreebusy"); URI p_type = createURI(NS_RDF + "type"); rdfHandler.handleStatement(createStatement(r_event,p_type,t_vevent)); parseCalendarComponent(freeBusy,r_event); }
private void parseEvent(VEvent event) throws RDFParseException, RDFHandlerException, UnsupportedEncodingException { log.debug("parsing event: {}", event.getUid()); Resource r_event; String uriBase = ""; if(event.getUid() != null) { uriBase = event.getUid().getValue(); } else { uriBase = UUID.randomUUID().toString(); } if(event.getRecurrenceId() != null) { uriBase += "-" + DF_DIGITS.format(event.getRecurrenceId().getDate()); } if(event.getSequence() != null) { uriBase += "-"+event.getSequence().getSequenceNo(); } r_event = resolveURI(uriBase); Resource t_vevent = createURI(NS_ICAL + "Vevent"); URI p_type = createURI(NS_RDF + "type"); rdfHandler.handleStatement(createStatement(r_event,p_type,t_vevent)); parseCalendarComponent(event,r_event); }
private void parseJournal(VJournal journal) throws RDFParseException, RDFHandlerException, UnsupportedEncodingException { log.debug("parsing journal: {}", journal.getUid()); Resource r_event; String uriBase = ""; if(journal.getUid() != null) { uriBase = journal.getUid().getValue(); } else { uriBase = UUID.randomUUID().toString(); } if(journal.getRecurrenceId() != null) { uriBase += "-" + DF_DIGITS.format(journal.getRecurrenceId().getDate()); } if(journal.getSequence() != null) { uriBase += "-"+journal.getSequence().getSequenceNo(); } r_event = resolveURI(uriBase); Resource t_vevent = createURI(NS_ICAL + "Vjournal"); URI p_type = createURI(NS_RDF + "type"); rdfHandler.handleStatement(createStatement(r_event,p_type,t_vevent)); parseCalendarComponent(journal,r_event); }
/** * Sets calendar attributes. * @param freeBusy The freeBusy. * @param vfb The VFreeBusy. */ private void setCalendarAttributes(FreeBusyItem freeBusy, VFreeBusy vfb) { // UID if(vfb.getUid()!=null) { freeBusy.setIcalUid(vfb.getUid().getValue()); } // look for DTSTAMP if (vfb.getDateStamp() != null) { freeBusy.setClientModifiedDate(vfb.getDateStamp().getDate()); } }
/** * Sets calendar attributes. * @param freeBusy The freeBusy. * @param vfb The VFreeBusy. */ private void setCalendarAttributes(FreeBusyItem freeBusy, VFreeBusy vfb) { // UID if(vfb.getUid()!=null) { freeBusy.setIcalUid(vfb.getUid().getValue()); } // look for DTSTAMP if (vfb.getDateStamp() != null) { freeBusy.setClientModifiedDate(vfb.getDateStamp().getDate()); } }
/** * Sets calendar attributes. * @param note The note item. * @param journal The VJournal. */ private void setCalendarAttributes(NoteItem note, VJournal journal) { // UID if(journal.getUid()!=null) { note.setIcalUid(journal.getUid().getValue()); } // for now displayName is limited to 1024 chars if (journal.getSummary() != null) { note.setDisplayName(StringUtils.substring(journal.getSummary() .getValue(), 0, 1024)); } if (journal.getDescription() != null) { note.setBody(journal.getDescription().getValue()); } // look for DTSTAMP if (journal.getDateStamp() != null) { note.setClientModifiedDate(journal.getDateStamp().getDate()); } }
/** * Sets calendar attributes. * @param note The note item. * @param journal The VJournal. */ private void setCalendarAttributes(NoteItem note, VJournal journal) { // UID if(journal.getUid()!=null) { note.setIcalUid(journal.getUid().getValue()); } // for now displayName is limited to 1024 chars if (journal.getSummary() != null) { note.setDisplayName(StringUtils.substring(journal.getSummary() .getValue(), 0, 1024)); } if (journal.getDescription() != null) { note.setBody(journal.getDescription().getValue()); } // look for DTSTAMP if (journal.getDateStamp() != null) { note.setClientModifiedDate(journal.getDateStamp().getDate()); } }
note.setIcalUid(event.getUid().getValue());
note.setIcalUid(event.getUid().getValue());
note.setIcalUid(task.getUid().getValue());
note.setIcalUid(task.getUid().getValue());