1.1 --- a/EventAggregatorSupport/Types.py Mon Apr 07 23:16:49 2014 +0200
1.2 +++ b/EventAggregatorSupport/Types.py Tue Apr 08 00:26:33 2014 +0200
1.3 @@ -481,7 +481,7 @@
1.4
1.5 # Accept other textual data as it is.
1.6
1.7 - elif property in ("LOCATION", "SUMMARY", "URL"):
1.8 + elif property in ("LOCATION", "SUMMARY", "URL", "UID"):
1.9 value = value or None
1.10
1.11 # Ignore other properties.
1.12 @@ -525,6 +525,7 @@
1.13 ("categories", "xcal:properties/xcal:categories", "getCollection"),
1.14 ("geo", "xcal:properties/xcal:geo", "getGeo"),
1.15 ("url", "xcal:properties/xcal:url", "getURI"),
1.16 + ("uid", "xcal:properties/xcal:uid", "getText"),
1.17 ]
1.18
1.19 def __init__(self, url, doc, metadata):
1.20 @@ -928,6 +929,18 @@
1.21
1.22 self.page = page
1.23
1.24 + def getEventUID(self):
1.25 +
1.26 + "Return the UID of this event."
1.27 +
1.28 + return self.details.get("uid") or self.getEventURL()
1.29 +
1.30 + def getSequence(self):
1.31 +
1.32 + "Return the sequence number of this event."
1.33 +
1.34 + return self.details.get("sequence") or 0
1.35 +
1.36 def getEventURL(self):
1.37
1.38 "Return the URL of this event."
1.39 @@ -1108,7 +1121,7 @@
1.40 return {
1.41 "created" : self.details.get("created") or self.details.get("dtstamp") or metadata["created"],
1.42 "last-modified" : self.details.get("last-modified") or self.details.get("dtstamp") or metadata["last-modified"],
1.43 - "sequence" : self.details.get("sequence") or 0,
1.44 + "sequence" : self.getSequence(),
1.45 "last-comment" : ""
1.46 }
1.47