'handleConextUpdate never handles insert requests but only delete request. Bug in GraphDB plugin API
if I register a class as a Plugin service which implements the ContextUpdateHandler and overrides the getUpdateContexts and handleContextUpdate methods like below, SPARQL insert requests will never be handled. Might there be a bug in the Plugin API implementation?
@Override
public Resource[] getUpdateContexts() {
getLogger().info("getUpdateContexts");
Resource[] res = new Resource[1];
res[0] = () -> "";
return res;
}
@Override
public void handleContextUpdate(Resource subject, IRI predicate, Value object, Resource context, boolean isAdded, PluginConnection pluginConnection) {
if (isAdded)
getLogger().info("Handle insert request"); //never reached
else {
getLogger().info("Handle delete request"); //is printed. works fine
}
}
Update statements
insert data {<http://example.com/test/s/insertThis1> <http://example.com/test/p/insertThis1> <http://example.com/test/o/insertThis1}
delete data {<http://example.com/test/s/insertThis1> <http://example.com/test/p/insertThis1> <http://example.com/test/o/insertThis1}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|