I'm pleased to announce the first iteration of a Java API for FOAF based around the Jena semantic web toolkit.
The API, which I've dubbed "foaf-beans", is an attempt to provide a number of convenience classes that will allow Java developers to quickly get to grips with reading and writing FOAF data. With this in mind the API provides a thin layer of abstraction which hides much of the RDF processing, instead presenting the user with simple factory classes that create FOAFGraph and FOAFWriter objects for reading and writing respectively. These objects generate and process simple Java Beans that should play nicely with other Java APIs and toolkits (particularly JSP, JSTL, etc).
In this first version of the API, the FOAFGraph interface supports:
foaf:PersonalProfileDocument,
or some guessworkfoaf:Person properties and foaf:knows relationshipsThe FOAFWriter interface supports:
foaf:Person metadata, including foaf:knows relationshipsfoaf:PersonalProfileDocument documents including admin:generatorAgent and other
useful metadataDevelopers familiar with Jena can directly make use of a number of utility classes that provide this functionality, so hopefully there's something for everyone.
The next release of the API will incorporate at least the following:
It's also worth noting that the API doesn't do any inferencing or schema processing. If you dip into the Jena specific classes then you can substitute a model containing schema information, however I want to expose this more explicitly through the API. The basic classes and interfaces also have some basic hooks that will allow me to wire in other RDF toolkits as and when I get time to play with them (Redland is top of my list).
The majority of the code has been reasonably well tested but I don't expect it to be bug free, so tread carefully. In fact in time honoured tradition I expect there's at least one school boy error in there somewhere which'll have me scrabbling to post 0.1.1 sometime tomorrow. The code has mainly evolved from work I originally did on the Java version of the FOAF-a-Matic, and there are a number of JUnit test cases included which should illustrate how the API works.
I'm happy to take suggestions, patches, bug reports, whatever. It's all Public Domain (although attribution would be nice) so do with it what you will.
Download foaf-beans-0.1-src.zip (7.5MB, includes Jena)
Download foaf-beans-0.1-nolibs-src.zip (~200kb, no Jena)
Posted by ldodds at September 6, 2004 10:52 PM | Feedback? | | TrackBackKeep going, nice blog!
Posted by: oreck vacuums on July 25, 2005 10:51 PMThanks for great blog!
Posted by: concert tickets on August 1, 2005 07:13 PMhz2 hz2 hz2 hz2 blog http://www.getfirefox.com , http://www.yahoo.com
Posted by: Keanu Reaves blog on August 3, 2005 01:26 AMI dont want to read this bullshit anymore http://www.yahoo.com/r/sq , http://www.getfirefox.com
Posted by: John Male blog on August 3, 2005 01:27 AMI would recommend to you to shut... http://www.slashdot.org , http://www.peace.org
Posted by: John Male blog on August 3, 2005 01:24 PM