本文整理汇总了Java中biweekly.component.VEvent.setSequence方法的典型用法代码示例。如果您正苦于以下问题:Java VEvent.setSequence方法的具体用法?Java VEvent.setSequence怎么用?Java VEvent.setSequence使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类biweekly.component.VEvent
的用法示例。
在下文中一共展示了VEvent.setSequence方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printExam
import biweekly.component.VEvent; //导入方法依赖的package包/类
private void printExam(Exam exam, ICalendar ical) throws IOException {
if (exam.getAssignedPeriod() == null) return;
VEvent vevent = new VEvent();
vevent.setSequence(0);
vevent.setUid(exam.getUniqueId().toString());
DateStart dstart = new DateStart(exam.getAssignedPeriod().getStartTime(), true);
vevent.setDateStart(dstart);
Calendar endTime = Calendar.getInstance(); endTime.setTime(exam.getAssignedPeriod().getStartTime());
endTime.add(Calendar.MINUTE, exam.getLength());
DateEnd dend = new DateEnd(endTime.getTime(), true);
vevent.setDateEnd(dend);
vevent.setSummary(exam.getLabel()+" ("+exam.getExamType().getLabel()+" Exam)");
if (!exam.getAssignedRooms().isEmpty()) {
String rooms = "";
for (Iterator i=new TreeSet(exam.getAssignedRooms()).iterator();i.hasNext();) {
Location location = (Location)i.next();
if (rooms.length()>0) rooms+=", ";
rooms+=location.getLabel();
}
vevent.setLocation(rooms);
}
vevent.setStatus(Status.confirmed());
ical.addEvent(vevent);
}
示例2: example3
import biweekly.component.VEvent; //导入方法依赖的package包/类
@Test
public void example3() throws Throwable {
ICalendar ical = new ICalendar();
ical.getProperties().clear();
ical.setMethod("xyz");
ical.setProductId("-//ABC Corporation//NONSGML My Product//EN");
{
VEvent event = new VEvent();
event.getProperties().clear();
event.setDateTimeStamp(utc("1997-03-24 12:00:00"));
event.setSequence(0);
event.setUid("[email protected]");
event.setOrganizer("[email protected]");
Attendee attendee = new Attendee(null, "[email protected]");
attendee.setRsvp(true);
event.addAttendee(attendee);
event.setDateStart(utc("1997-03-24 12:30:00"));
event.setDateEnd(utc("1997-03-24 21:00:00"));
event.addCategories("MEETING", "PROJECT");
event.setClassification(Classification.public_());
event.setSummary("Calendaring Interoperability Planning Meeting");
event.setDescription("Discuss how we can test c&s interoperability\nusing iCalendar and other IETF standards.");
event.setLocation("LDB Lobby");
Attachment attach = new Attachment("application/postscript", "ftp://example.com/pub/conf/bkgrnd.ps");
event.addAttachment(attach);
ical.addEvent(event);
}
assertValidate(ical).versions(V2_0_DEPRECATED, V2_0).run();
assertExample(ical, "rfc5545-example3.ics", V2_0);
}