当前位置: 首页>>代码示例>>Java>>正文


Java VEvent.setSequence方法代码示例

本文整理汇总了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);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:26,代码来源:CalendarServlet.java

示例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);
}
 
开发者ID:mangstadt,项目名称:biweekly,代码行数:36,代码来源:ICalWriterTest.java


注:本文中的biweekly.component.VEvent.setSequence方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。