blog community

Welcome to blog community Sign in | Join | Help
in Search

Bert Ertman

My 2 cents on the World, the Web and Java

JavaOne 2006 - Schedule Builder follow up...

Location information in Schedule Builder is available as we speak. So repeat the whole procedure mentioned in the previous post to update your personal (vCal) schedule with location and room information.

I also received a contribution from David Cooper:

Sender: David Cooper
=====================================
Thankyou so much for the 'MySchedule' tool.  A friend found your site and naturally I made use of your application for my scheduling. 

The only trouble I ran into was a strange session title that had a new-line character.  For what it is worth I thought I would pass back my contribution.  I added the following bits to the Session class to get past this:

    private static String escapeQP(String x)
    {
        StringBuffer out = new StringBuffer(x.length());
        for (int i=0; i < x.length(); i++)
        {
            char ch = x.charAt(i);
            if (ch == '\n')
            {
                out.append("=OD=OA");
            }
            else if (Character.isWhitespace(ch))
            {
                out.append(' ');
            }
            else
            {
                out.append(ch);
            }
        }
        return out.toString().trim();
    }

    public String toVCal() {
        StringBuffer sb = new StringBuffer();
       
        sb.append("BEGIN:VEVENT\n");
        sb.append("SUMMARY;ENCODING=QUOTED-PRINTABLE:");
        sb.append("{" + escapeQP(getSessionId()) + "} " + escapeQP(getTitle()) + "\n");
        sb.append("LOCATION;ENCODING=QUOTED-PRINTABLE:" + escapeQP(getRoom()) + "\n");
        sb.append("DTSTART:");
        sb.append(formatDateTime(startDate, startTime));
        sb.append("\n");
        sb.append("DTEND:");
        sb.append(formatDateTime(startDate, endTime));
        sb.append("\n");
        sb.append("END:VEVENT\n");
       
        return sb.toString();
    }

Thanks David!

See you in San Francisco!

Published Friday, May 12, 2006 10:22 AM by berte

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server, by Telligent Systems