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 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()); } }