On 26/11/12 17:02, Olivier Rossel wrote:
Hi folks!
I have a Model full of triples, and I wish I could "inject" these
data into a remote endpoint. is there a helper class to create a
SPARQL/Insert query from the content of the Model? Otherwise, what is
the best way to create such a query? (Iterating the triples, removing
the blank nodes, appending SPARQL statements to a StringBuffer. And
that's all?
DatasetAccessor (which for silly histroical reasons is in Fuseki) may
help. It is the GSP protocol for Jena. You can POST a model.
And also no need to mess with bNodes in a INSERT DATA operation.
More advanced question: is it possible to monitor the lifecycle of a
Model (add/remove), and create a SPARQL/Update that mimicks that
lifecycle (to be sent on a remote endpoint)? What is the best way to
do that with Jena? ModelChangedListener (and string appending)?
Yes, probably.
We have been discussing simplifying this to just have one "add" and one
"remove" call.
Your points of view are highly welcome.
Andy