How would one create an Expr in order to add an expression like this: SPARQLParser p = SPARQLParser.createParser(Syntax.syntaxSPARQL_11); Query query = new Query(); p.parse(query, "select ?year where {?s :Year ?year; :Fruit ?fruit} group by ?year order by ?year"); query.addResultVar("fruits","(count(?fruit))");
query. addResultVar doesn't have a (String,String) but a (String,Expr) SelectHandler has a private function "parseExpr" which I pulled out a copy and modified it to (Query, String) to allow passing of an external Query rather than the SelectHandler class variable query and it worked, but, is there an already built in function that does the same or is there an easier way to achieve the same result? - Erich