Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

ARQ API and Jena Spatial Queries

$
0
0
Hello,

I'm trying to implement this using ARQ API:

SELECT ?placeName{
?place spatial:nearby (51.46 2.6 10 'km') .
?place rdfs:label ?placeName}

I'm able to create the function as follows:

ExprList args = new ExprList();

NodeValue nodeLatitud = NodeValue.makeDecimal(51.46);
NodeValue nodeLongitud = NodeValue.makeDecimal(2.6);
NodeValue nodeRadius = NodeValue.makeDecimal(10);
NodeValue nodeUnit = NodeValue.makeString("km");

args.add(nodeLatitud);
args.add(nodeLongitud);
args.add(nodeRadius);
args.add(nodeUnit);

Expr function = new E_Function("http://jena.apache.org/spatial#nearby",
args);

But now, I don't know how to insert this function in the main query.

For example, this would include as filter clause, but of course it hasn't
the same effects:

ElementGroup body = new ElementGroup();

ElementFilter emfilter = new ElementFilter(function);
body.addElement(emfilter) ;

Any help would be appreciated!

David

Viewing all articles
Browse latest Browse all 5648

Latest Images

Trending Articles



Latest Images