Is it possible to have Jena or some other library automatically generate a Javabean for results returned from a SPARQL query? I find accessing the results via Jena’s Resultset to be tiresome so I’m hoping there’s a more object oriented way.
Can JenaBean help here? If I have a RDF file, how would I use Jena in conjunction with JeanBean to generate Javabeans from a Resultset?
Sure you can!
Just instanciate a Jena’s Model interface and write code like the example below. This is scala.
Your code will look something like this:
This is general enough to work with any Jena backend. I’m using SDB with postgresql behind it.