Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[rdf4j-dev] Java object as a "view" on a sail

Hi,

I’ve been thinking about the way that spring gives you a java object representing parts of your database that can be used more easily then a bunch of queries and is easier to commit back to the database.

I was wondering if anyone has any good experience with anything similar with RDF4J.

I’ve used Pinto before, but it was annoying to have to write the code to retrieve the model and then commit it back again.

What I would like to achieve is to have a method that retrieves a java object, that can be modified and then committed with transactional support. Where annotations on the object tells the underlying implementation what part of the graph to retrieve. 

So I could do.

Person p1 = repo.getPersonById(1);
p1.setName(“person 1”);
p1.commit();  // or repo.commit(p1);

The reason why I’m posting to the RDF4J dev mailing list is because I would like to write some documentation for how do this with RDF4J. So that when people ask me how to get started with graph and rdf I can point them to this simple “java-esque” way of doing it and show them that they don’t even need to learn SPARQL to get started.

Cheers,
Håvard




Back to the top