[Yanel-commits] rev 21304 -
public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources
michi at wyona.com
michi at wyona.com
Mon Jan 1 19:29:05 CET 2007
Author: michi
Date: 2007-01-01 19:29:04 +0100 (Mon, 01 Jan 2007)
New Revision: 21304
Modified:
public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java
Log:
write data
Modified: public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java 2007-01-01 18:27:54 UTC (rev 21303)
+++ public/yanel/trunk/src/contributions/resources/calendar/src/java/org/wyona/yanel/impl/resources/CalendarResource.java 2007-01-01 18:29:04 UTC (rev 21304)
@@ -167,14 +167,17 @@
if (line.startsWith("BEGIN:VEVENT")) {
event = new CalendarEvent();
} else if (line.startsWith("END:VEVENT")) {
- log.error("DEBUG: Write event " + event);
+ log.error("DEBUG: Write event " + event.getUID() + ", " + event.toXML());
+ Writer out = getRealm().getRepository().getWriter(new org.wyona.yarep.core.Path(getRTI().getProperty("events-path") + "/" + event.getUID() + ".xml"));
+ out.write(event.toXML());
+ out.close();
event = null;
- } else if (line.startsWith("UID:")) {
- if (event != null) event.setUID(line.split(":")[1]);
- } else if (line.startsWith("SUMMARY:")) {
- if (event != null) event.setSummary(line.split(":")[1]);
} else {
- log.warn("Not implemented yet: " + line);
+ if (event != null) {
+ event.setProperty(line);
+ } else {
+ log.warn("Not implemented yet: " + line);
+ }
}
}
}
More information about the Yanel-commits
mailing list