GeoKnow / Jassa

JAvascript Suite for Sparql Access
25 stars 3 forks source link

[FEATURE-REQUEST] jassa.sparql.ElementFilterNotExists #8

Closed leipert closed 10 years ago

leipert commented 10 years ago

It would be nice if you could set a FILTER NOT EXISTS (...) with the sparql module.

For example:

var s = rdf.NodeFactory.createVar("s");
var p = rdf.NodeFactory.createVar("p");
var o = rdf.NodeFactory.createVar("o");
filter = new sparql.ElementFilterNotExists(new rdf.Triple(s, p, o));
console.log(filter.toString()); // logs FILTER NOT EXISTS (?s ?p ?o)
Aklakan commented 10 years ago

It would have to work like this: new sparql.ElementFilter(new sparql.E_NotExists(someElement))

See: https://jena.apache.org/documentation/javadoc/arq/com/hp/hpl/jena/sparql/expr/E_NotExists.html