[Cosmo] Expanding Events
Bobby Rullo
br at osafoundation.org
Fri Jan 20 18:05:35 PST 2006
Cyrus,
In the OSAF vendor branch of ical4j within
net.fortuna.ical4j.model.Calendar you have added the method toString
(OutputFilter). Within that method the following code checks to see
if we need to expand the component, and if so calls createExpanded():
if (filter.getExpand() != null) {
calendar = createExpanded(filter);
}
The first thing that I noticed is that if we have an <expand>
element, all components get "expanded" even if they don't have
recurrence rules. I was thinking of changing that if statement above
to be something like:
if (filter.getExpand() != null && calendar.hasRecurrenceRule
() != null)) {
calendar = createExpanded(filter);
}
Is there any reason not do do this?
The reason I came across this in the first place is because I found
that one of my floating events (with no RRULE) was going through
createExpanded() and coming out stripped of all its VEVENTS - but
only when it was the only event returned by the jcr query, which I
found strange. Which lead me to think, why should it go through
createExpanded() at all?
Thanks,
Bobby
More information about the Cosmo
mailing list