Hi,
You'll need to think in triples to decide what triple to add or delete
using SPARQL Update - as in previous email, printing the data out in a
clear triples format will help.
And set the datatype of the literals if you want weight to be a number,
not a string.
Andy
On 14/08/2021 09: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.