I have a question about the deletion of elements from a triplestore (in my case a Virtuoso) using SPARQL. I have stored the following elements in a graph:
@prefix xy: <http://purl.oclc.org/xy/xy#> .
@prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#> .
<point> a xy:Point ;
xy:value "10" ;
ssn:observationResultTime <Rs_b8d4ae44-6083-4140-b4e3-11fcf38a53c8> ;
ssn:observationSamplingTime <St_b8d4ae44-6083-4140-b4e3-11fcf38a53c8> ;
ssn:observedBy <SensorID-b8d4ae44-6083-4140-b4e3-11fcf38a53c8> .
As you can see I have one xy:Point, which has some properties. In my database I have stored dozens of these points. Now my question: How to delete one point and all of its properties (even the possibly linked subproperties of observationSamplingTime, observationResultTime)? Is there any simple solution? By now I am deleting the point and its properties by giving all exact relations like:
@prefix xy: <http://purl.oclc.org/xy/xy#> .
@prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#>
delete {
?observation a xy:Point .
?observation xy:value ?value .
?observation ssn:observationResultTime ?resultTime .
?observation ssn:observationSamplingTime ?samplingTime .
?observation ssn:observedBy ?sensor .
}
WHERE {
?observation xy:value ?value .
?observation ssn:observationResultTime ?resultTime .
?observation ssn:observationSamplingTime ?samplingTime .
?observation ssn:observedBy ?sensor .
}
What I would like to do is "Delete ?observation a xy:Point and all ob its subproperties". Is there any possibility to do that?
Thanks and kind regards
tanktoo