why can't you use a single INSERT query? An INSERT query allows a WHERE part
As mentioned in replies to your your previous mails, look at your data model as a graph, then convert it to triple patterns which make the SPARQL query.
On 14.08.21 10:46, emri mbiemri wrote:
Dear all, In the given RDF model: https://github.com/iliriani/Test/blob/main/Notebook.rdf I am trying to find a way on how to insert with SPARQL a <weight>5</weight> node within an <Association> node where the <class1> is "Notebook" and <class2> is "Evaluation". Same also, I want to add <weight>2</weight> in the <Association> where <class1> is "Student" and <class2> is "Evaluation" (<class1> and <class2> may be interchangeable) and so the process can continue for all classes. The problem is: 1. How to specify exactly the <Association> where <class1> is "X" and <class2> is "Y", and 2. insert within the exact <Association> the node <weight> int </weight> Since I am using Java I need the insert query for one insert then I can loop for all class1 and class2 and add weights. Thanks a lot.
