@Test public void testSPARQLQueryWithResultsHandler() throws Exception { String queryString = "select ?s ?p ?o { ?s ?p ?o } limit 10"; TupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); tupleQuery.evaluate(new TupleQueryResultHandler() { @Override public void startQueryResult(List<String> bindingNames) { Assert.assertEquals(bindingNames.get(0), "s"); Assert.assertEquals(bindingNames.get(1), "p"); Assert.assertEquals(bindingNames.get(2), "o"); } @Override public void handleSolution(BindingSet bindingSet) { Assert.assertEquals(bindingSet.getBinding("o").getValue().stringValue(), "0"); } @Override public void endQueryResult() { } @Override public void handleBoolean(boolean arg0) throws QueryResultHandlerException { } @Override public void handleLinks(List<String> arg0) throws QueryResultHandlerException { } }); }
@Override public TupleQueryResult evaluate() throws QueryEvaluationException { return evaluate(this.start,this.pageLength); }
MarkLogicTupleQuery extends MarkLogicQuery implements TupleQuery,MarkLogicQueryDependent { @Override public TupleQueryResult evaluate() throws QueryEvaluationException { return evaluate(this.start,this.pageLength); } }
MarkLogicTupleQuery extends MarkLogicQuery implements TupleQuery,MarkLogicQueryDependent { @Override public TupleQueryResult evaluate() throws QueryEvaluationException { return evaluate(this.start,this.pageLength); } MarkLogicTupleQuery(MarkLogicClient client, SPARQLQueryBindingSet bindingSet, String baseUri, String queryString, GraphPermissions graphPerms, QueryDefinition queryDef, SPARQLRuleset[] rulesets); }
MarkLogicTupleQuery extends MarkLogicQuery implements TupleQuery,MarkLogicQueryDependent { @Override public TupleQueryResult evaluate() throws QueryEvaluationException { return evaluate(this.start,this.pageLength); } MarkLogicTupleQuery(MarkLogicClient client, SPARQLQueryBindingSet bindingSet, String baseUri, String queryString, GraphPermissions graphPerms, QueryDefinition queryDef, SPARQLRuleset[] rulesets); @Override TupleQueryResult evaluate(); TupleQueryResult evaluate(long start, long pageLength); @Override void evaluate(TupleQueryResultHandler resultHandler); void evaluate(TupleQueryResultHandler resultHandler,long start, long pageLength); }
MarkLogicTupleQuery extends MarkLogicQuery implements TupleQuery,MarkLogicQueryDependent { @Override public TupleQueryResult evaluate() throws QueryEvaluationException { return evaluate(this.start,this.pageLength); } MarkLogicTupleQuery(MarkLogicClient client, SPARQLQueryBindingSet bindingSet, String baseUri, String queryString, GraphPermissions graphPerms, QueryDefinition queryDef, SPARQLRuleset[] rulesets); @Override TupleQueryResult evaluate(); TupleQueryResult evaluate(long start, long pageLength); @Override void evaluate(TupleQueryResultHandler resultHandler); void evaluate(TupleQueryResultHandler resultHandler,long start, long pageLength);  }