views:

646

answers:

3

My project is building a Java web application on top of the AllegroGraph RDF store. I would like to find a good solution to map between the triples that come out of the store and our domain objects. I have looked into Topaz, an Object/Triple mapping API being developed in the spirit of Hibernate. The trouble is that they don't currently have a connector to AllegroGraph.

Has anyone come up with a good scheme for Object/Triple mapping in Java, in light of the limited API support out there? One issue that makes this question more difficult is that unlike SQL, the SPARQL standard only supports read operations, so writes are done via the RDF store's proprietary API, and I'd really like to abstract away those details in our application.

A: 

I like the redland RDF libraries. RDF parsing, storage, SPARQL/RDQL queries, fairly complete, but modular enough to use only what you want. They have Java bindings, but I have only used the C API (and also wrote a (partial) Lua binding)

Javier
Looks like the Java binding is no longer supported (http://librdf.org/docs/java.html), unless you want to build it from source control (http://svn.librdf.org/view/java/trunk/).
Julie
+1  A: 

Hi, For the OO-RDF mapping in general, you might want to have a look at:

  • OpenRDF Elmo http://www.openrdf.org/ (works only with sesame but designed to be extensible and extending sesame to work on top of allegrograph(look at the sail (Storage and inference Layer) architecture)
  • Sommer https://sommer.dev.java.net/ with some explanation of how it works here http://blogs.sun.com/bblfish/
  • There is also RDFReactor http://semanticweb.org/wiki/RDFReactor which works on top of RDF2go. RDF2go is an abstraction layer with implementation for jena or sesame. Again nothing about AllegroGraph so you would need an implementation of the binding.

I don't know for RDFReactor but i know that sommer and elmo are both based on annotation of POJO and allows the updates via direct triple-based-API or the queries using SPARQL.

As for AllegroGraph itself, I'm not aware of anything specific but they seems to support Sesame and to interface with it, so you might be able to work this way.

florent
A: 

One issue that makes this question more difficult is that unlike SQL, the SPARQL standard only supports read operations, so writes are done via the RDF store's proprietary API, and I'd really like to abstract away those details in our application.details in our application.

AllegroGraph supports the open-source Jena API, through which you can perform write operations. It's cool; it works. Maybe that's abstraction enough for your purposes.

David