@Test public void testSPARQLQueryDistinct() throws Exception { try { String queryString = "SELECT DISTINCT ?_ WHERE { GRAPH ?ctx { ?s ?p ?o . } }"; TupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); TupleQueryResult result = tupleQuery.evaluate(); RepositoryResult<Resource> rr = new RepositoryResult<Resource>( new ExceptionConvertingIteration<Resource, RepositoryException>( new ConvertingIteration<BindingSet, Resource, QueryEvaluationException>(result) { @Override protected Resource convert(BindingSet bindings) throws QueryEvaluationException { return (Resource) bindings.getValue("_"); } }) { @Override protected RepositoryException convert(Exception e) { return new RepositoryException(e); } }); Assert.assertTrue(rr.hasNext()); result.close(); } catch (MalformedQueryException e) { throw new RepositoryException(e); } catch (QueryEvaluationException e) { throw new RepositoryException(e); } }
@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);  }