문제

I'm fairly new to everything semantic web related, and I'm having trouble figuring this problem out.

So, I'm uploading RDF data from .trig files to my endpoint using cURL POST requests. For example something like:

<object1> <type> <dog>
<object1> <age> "3"

This is fine, but if I update the data in my trig file to:

<object1> <type> <dog>
<object1> <age> "4"

And then reupload it, it will update the data accordingly

<object1> <type> <dog>
<object1> <age> "3"
<object1> <age> "4"

Is there a way of updating the existing triple without having to delete the entire record?

Thanks!

도움이 되었습니까?

해결책

Yes, the Sesame protocol allows for deleting specific Triples with a HTTP DELETE

See the Repository Statements documentation - be sure to read it carefully, if you don't set the right parameters for your DELETE you can delete an entire context rather than just a specific triple.

Another alternative to consider is that if you do a PUT rather than POST that will overwrite the existing data rather than appending to it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top