aboutsummaryrefslogtreecommitdiff
path: root/src/net/cbaines
diff options
context:
space:
mode:
authorChristopher Baines <cbaines8@gmail.com>2012-03-24 16:49:41 +0000
committerChristopher Baines <cbaines8@gmail.com>2012-03-24 16:49:41 +0000
commiteb443719666878cedb73c1ab1f7987d5efe66af0 (patch)
tree5da7eb6ec30f7ddacbe90e70fd5869295dcc8063 /src/net/cbaines
parent18fed94860f17501d95a44f2fb0c372a58c0eaa7 (diff)
downloadsouthampton-university-calendar-applet-eb443719666878cedb73c1ab1f7987d5efe66af0.tar
southampton-university-calendar-applet-eb443719666878cedb73c1ab1f7987d5efe66af0.tar.gz
Added an organiser to events...
Diffstat (limited to 'src/net/cbaines')
-rw-r--r--src/net/cbaines/suca/SotonCalendarParser.java20
1 files changed, 8 insertions, 12 deletions
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