I want to delete every triple having a given subject but only if the subject is of a given type. The following query works as expected:
delete {?s ?p ?o} where {
?s ?p ?o.
?s a ex:Pizza
filter(?s = ex:Margharita)
}
How can I do that using the java API ? I tried the Remover but I can’t find a way to filter the triples :
connection.begin()
connection.remove().statements(iri(ex, "Margharita"), null, null)
connection.commit()
And I can’t execute the query using Connection.select nor Connection.update
Can anyone tell me the proper way to do that ?