kit-data-manager / wap-server

Apache License 2.0
4 stars 3 forks source link

isIriDeleted check does not consider boolean value of the checked triple #3

Open GGoetzelmann opened 1 year ago

GGoetzelmann commented 1 year ago

Check for deleted flag only checks if there is a triple with the "deleted"-predicate, but it does not care if the value of the triple is set to true or false.

https://github.com/kit-data-manager/wap-server/blob/0a9e4fd1ef8641f036e43eca31ec814d316111f6/src/main/java/edu/kit/scc/dem/wapsrv/service/AbstractWapService.java#L454

Might be quite safe at the moment because the value is only set to true, but would not work properly if at some point some 'undelete' operation takes place (via code, via sparql), setting the value to false.

ThomasJejkal commented 1 year ago

...unless the idea was that 'deleted' is only checked to be present and is removed to 'undelete' a certain IRI.

GGoetzelmann commented 1 year ago

I think that was the initial idea. Seems a little dangerous and like an idea that might not be shared by all future developers.

Moreover, as stated above, you can 'undelete' the annotation via SPARQL update on the (admin) user side. Haven't checked it yet, but I, therefore, expect that removing the triple with <http://dem.scc.kit.edu/wapserv/ns#deleted> "true"^^xsd:boolean would undo the deletion, but changing the value to "false"^^xsd:boolean would not.