Hi !
OK great I've been able to make it work ! Thanks !
But I encounter some problems with <http://www.opengis.net/ont/geosparql#geometry> properties and Virtuoso's spatial index.
Whenever I try to modify such a property using Erfurt's deleteMatchingStatements() and addStatement() methods, it seems to spatial index gets messed up (and AFAIK I have to use those methods to use the revision history).
I'm not really sure what's happening, since I don't fully understand how the spatial index works internally, but :
These plain sparql queries work well (but of course, no revision history)
WITH <http://dhlab.epfl.ch/vtm/>
DELETE { ?a ?b ?c }
WHERE{
?a ?b ?c .
<http://mybase/#myressource> <http://www.opengis.net/ont/geosparql#geometry> ?c .
}
INSERT IN GRAPH <http://dhlab.epfl.ch/vtm/>{
<http://mybase/#myressource> <http://www.opengis.net/ont/geosparql#geometry> "POLYGON((12.0 45.0,12.1 45.0,12.1 45.1,12.0 45.1,12.0 45.0))"^^virtrdf:Geometry .
}
This PHP snippet messes up the spatial index (but I have a revision history in Ontowiki)
// code before and after is like here : https://github.com/AKSW/OntoWiki/blob/develop/application/controllers/ResourceController.php#L370-L384
$versioning->startAction($actionSpec);
$store->deleteMatchingStatements('http://mybase', 'http://mybase/#myressource', 'http://www.opengis.net/ont/geosparql#geometry', null);
$store->addStatement('http://mybase', 'http://mybase/#myressource', 'http://www.opengis.net/ont/geosparql#geometry', ['value'=>'POLYGON((12.0 45.0,12.1 45.0,12.1 45.1,12.0 45.1,12.0 45.0))','type'=>"<http://www.openlinksw.com/schemas/virtrdf#Geometry>"]);
$versioning->endAction();
SELECT ?subject
WHERE {
?subject <http://www.opengis.net/ont/geosparql#geometry> ?geom .
FILTER ( bif:st_intersects ( ?geom, bif:st_geomfromtext("BOX(11.0 44.0, 13.0 46.0)") ) )
}
Any idea about what's happening ? And about how to solve it ?
And then, I have some other questions about the versionning :
- Do I have to start one action for every single insert/delete action ? (I'm batch updating the property for tons of triples).
- Am I right that the $actionSpec['type'] is the place where to specify whether I'm updating/deleting statements, and that it's not infered directly from what actually happens in the query ?
- Is there a way to add a kind of "commit message" in the history log, saying what the modification was about and what method was used ?
Thanks in advance for your help !
--
---
You received this message because you are subscribed to the Google Groups "OntoWiki User Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ontowiki-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.