From eb443719666878cedb73c1ab1f7987d5efe66af0 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 24 Mar 2012 16:49:41 +0000 Subject: Added an organiser to events... --- src/net/cbaines/suca/SotonCalendarParser.java | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/net') diff --git a/src/net/cbaines/suca/SotonCalendarParser.java b/src/net/cbaines/suca/SotonCalendarParser.java index 7473bf8..8feab9a 100644 --- a/src/net/cbaines/suca/SotonCalendarParser.java +++ b/src/net/cbaines/suca/SotonCalendarParser.java @@ -9,7 +9,6 @@ import java.net.URISyntaxException; import java.text.ParseException; import java.util.ArrayList; import java.util.Calendar; -import java.util.GregorianCalendar; import java.util.HashMap; import java.util.Map; @@ -142,6 +141,13 @@ public class SotonCalendarParser implements CalendarParser { handler.propertyValue(event.name); handler.endProperty(Property.SUMMARY); + String[] people = event.lecturer.split(","); + if (people.length > 0) { + handler.startProperty(Property.ORGANIZER); + handler.parameter("CN", people[0]); + handler.endProperty(Property.ORGANIZER); + } + log("Looking at lecture " + event.name); // Time of creation @@ -287,20 +293,10 @@ public class SotonCalendarParser implements CalendarParser { handler.endProperty(Property.RDATE); } - // handler.startProperty(Property.ORGANIZER); - // handler.propertyValue("Organiser"); - // handler.endProperty(Property.ORGANIZER); - - String[] people = event.lecturer.split(","); - for (String person : people) { - // log("Person: " + person); - } - - String[] locationBits = event.location.split("/"); - handler.startProperty(Property.LOCATION); handler.propertyValue(event.location); handler.endProperty(Property.LOCATION); + // The following infomation should be fetched from the // Southampton University Map App, through the content // provider, or from the data.southampton site via a sparqul -- cgit v1.2.3