Jena 2 Upgrade

Just a quick note to say that I upgraded the FOAF-a-Matic Mark 2 to use Jena 2.0.0-beta1 and found the migration pretty painless. I’d read Shelley’s Jena week articles as preparation so had a good idea about what I needed to do.
For the most part it was just changing imports, and switching to use ModelFactory rather than explicitly creating ModelMem objects. I tweaked my I/O code to use Streams rather than Readers/Writers as described in the I/O Mini HowTo (definitely a must read), and reworked the code to set namespace prefix mapping following Shelley’s recipe.
Took me roughly an hour including reading through the HowTo and skimming the new Javadocs for those bits of the API I was using. And it all worked first time. Congrats to the Jena team.
One item that Shelley didn’t mention, was that the Selector interface has changed. It now has a few extra methods to implement, so if you’ve got custom Selector implementations you’ll need to check that out. In most cases however you can switch to using the new SimpleSelector class (rather than the older SelectorImpl) and get the same behaviour.
Oh, and change to RDFException so that it’s no longer a checked exception is another welcome one!
This is another item ticked off my list for moving Mark 2 into a second beta (long overdue). I’ve already provided a dev snapshot for Phil Wilson so let me know if you’re interested in seeing what I have before then.