Until now I have been treating Jena and RDF like a database connection.
I retrieved data and immediately converted it to familiar Java objects with
fields, getters, setters and methods.


Recently I have been wondering if it might be better to keep the data as a
Jena Model within the object and use Jena to do the manipulation.

 

Retrieving a property value seems overly complex in syntax however.
Is there a better way to do this?

.

Model m = qe.execConstruct();

m.setNsPrefixes(p);

System.out.println(m.getProperty(null,
m.getProperty(m.expandPrefix("dc:title"))).getObject().asLiteral().toString(
));

.

 

DM

Reply via email to