If I pass this query:
DELETE
{
?contactInfo abc:hasEmail ?email .
?email ?emailPredicate ?emailObject .
}
WHERE
{
?person abc:name "foobar" .
?person abc:hasContactInfo ?contactInfo .
}
to this example code below, the it doesn't do anything.
UpdateRequest updateRequest = UpdateFactory.create(sparqlUpdateQuery);
for (Update update : updateRequest.getOperations()) {
UpdateAction.parseExecute(update.toString(), graphDataset);
}
The graphDataset above is subclass of Jena's DatasetGraphBase class, where I
override the find, add, delete, deleteAny, and some other methods.
I guess I have to query first using the triples in WHERE clause, and then
populate the query results into bindings, and pass the bindings to
UpdateAction.parseExecute method?
I looked at Jena's code, and still have no idea where to add that code. Perhaps
I was wrong, so any hint, or better if there is already existing sample code
for the case I am looking for?
Thanks,
Z