Sommer: Semantic Web (Metadata) Mapper

Hi,

I just started an open source project called Sommer at https:// 
sommer.dev.java.net under a BSD licence. The code is just being  
forged right now, but feedback and ideas are welcome on the users  
mailing list.

The idea is simply to use java annotations with simple Aspect  
Oriented Programing to map java object graphs to and from an RDF Graph.
All a java programmer will need to do is annotate his classes and its  
fields like this:

@RDF(Person.foaf+"Person")
class Person {
      static final String foaf = "http://xmlns.com/foaf/0.1/";
      @RDF(foaf+"knows") @Multiple Collection<Person> knows;
      @RDF(foaf+"name") String name;                      //assuming  
we only have 1 name
      @RDF(foaf+"mbox") @Multiple Collection<URI> mboxes;
     ...

     boolean knows(Person p) {
       if (knows == null) knows = new ArrayList<Person>();
       return knows.contains(p);
     }
     ...
}

The rest will be taken care of by AOP.

Currently I am developing this using Sesame. Though it should of  
course be possible to map this to Jena or any other Semantic Web  
library. I am developing this with the Javassist [1] AOP framework,  
though others could and should be able to use any other framework as  
well (I just had to start with something!).

Hopefully I will have something solid enough for me to develop a new  
version of BlogEd [2] in a couple of weeks.  I'll report back here as  
soon as I get there. The more I work on this the more surprised I am  
at how well Java OO programming and RDF fit together.


Henry Story

I have written a little more about it here:
http://blogs.sun.com/roller/page/ 
bblfish#sommer_semantic_object_metadata_mapper

[1] http://www-128.ibm.com/developerworks/java/library/j-dyn0610/
[2] https://bloged.dev.java.net/

Received on Tuesday, 9 May 2006 22:03:02 UTC