One thing is ical4j, which is basically a utility that wraps the ICS format.
Another thing is the calendar / schedule interface :-)
But we are lucky there is a nice JSF component with Primefaces that you can use if the web interface is right for you.
http://www.primefaces.org/showcase/ui/data/schedule.xhtml
, ICS primfaces ( JSF, bean )
, -
private static final SimpleDateFormat SDF = new SimpleDateFormat("yyyyMMdd");
@PostConstruct
private void loadIcs() {
eventModel = new DefaultScheduleModel();
CalendarBuilder builder = new CalendarBuilder();
try {
net.fortuna.ical4j.model.Calendar calendar = builder.build(this.getClass().getResourceAsStream("canada.ics"));
for (Iterator i = calendar.getComponents().iterator(); i.hasNext();) {
Component component = (Component) i.next();
Date start = SDF.parse(component.getProperty("DTSTART").getValue());
Date end = SDF.parse(component.getProperty("DTEND").getValue());
String summary = component.getProperty("SUMMARY").getValue();
eventModel.addEvent(new DefaultScheduleEvent(summary,
start, end));
System.out.println("added "+start+end+summary);
}
} catch (IOException e) {
e.printStackTrace();
} catch (ParserException e) {
e.printStackTrace();
} catch (ParseException e) {
e.printStackTrace();
}
}