A JavaOne scheduling aid

by Glenn Vanderburg

Note: as of late Wednesday, 3/20/2002, there's a new version that fixes some reported bugs. See the first comment, below, for notes.


The JavaOne conference starts next Monday. As before, the conference
website has a scheduling application that allows you to choose the
sessions you're interested in before the conference starts. You can
download your schedule in a simple XML format. That's a great
solution, but it does leave us with some work to do if we want to use
the schedule directly in Palms or other handheld devices.


Last year, pressed for time, I did an ad hoc conversion using
The Power of EmacsTM. I
converted the XML file to a vCalendar file that can be imported into
most scheduling programs. This year I started a little earlier, and
wrote a program to do the conversion for me. It turned out to be a
nice afternoon project for learning about the new regular expression
classes in Java 1.4. (I use regexps to implement a
special-purpose readability enhancement that I call LVR. Curious? Use the source. ;-) Another
hour or so and it was good enough that I'm not embarrassed to share it.


You can download the program as a href="http://www.delphis.com/java/J1Sched2002.jar">JAR file. It's
very quick and dirty, and the interface is rough around the edges, but source code is included so you can change
the way it works if you need to.


I've tested it with the Palm desktop program under Windows 2000, and
Microsoft Outlook. If you have a handheld device that synchronizes
with either of those two programs, this should work just fine.


If you don't already have Sun's JDK 1.4, download and install it, and
then run the JAR file (either by double-clicking on it or from the
command line as java -jar J1Sched2002.jar). Import the resulting .vcs file into your scheduling app, and sync with your device.


(Apologies if 1.4
isn't available on your platform yet. It should be easy to get things
running under 1.3 by removing the LVR class and making a few tweaks
elsewhere.)


Let me know if this didn't work for you, or if you enhanced it in an interesting way.


2 Comments

glv
2002-03-20 19:18:37
New version
Naturally, there've been some problems reported. As of Wednesday night, 3/20/2001, there's a new version that fixes nearly everything.


You may have to experiment to get the date imports working right. Apparently there's a lot of inconsistency in the way applications interpret vCalendar files.


Palm correctly imports everything as local time (and doesn't know anything about time zones) so it works fine. Outlook incorrectly assumed that the times in my first version were GMT, so they showed up wrong in Outlook. I added the "-z" command-line option to remap all of the times to GMT.


But then another problem arose. Outlook maintains the time zone info, but when I tried synching to a Nokia 9290 Communicator, there were problems. The Communicator lost the timezone info, so when I changed the timezone on the Communicator (as I expect to do on Saturday when I arrive on the West Coast) it didn't adjust the times. So I added the "-l" option to remap the times *as though* I were already in San Francisco.


This is difficult to picture if you haven't seen it. My recommendation: trim your schedule.xml file down to just two entries, for testing. Run the program with no options, then with just "-z", then with "-z -l", testing after each run. To test, import into your calendaring package, then sync with the device, and then change the time zone or the clock and ensure that the events are at the appropriate time. When they are, that's the process you should use.

anonymous2
2003-06-11 11:36:34
Where?
I'm trying to find the .jar for this file before I end up writing my own HTML <=> VCal conversion tool. The link in the article does not work.