@Test public void testSPARQLWithWriter() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); SPARQLResultsXMLWriter sparqlWriter = new SPARQLResultsXMLWriter(out); String expected = "<?xml version='1.0' encoding='UTF-8'?>\n" + "<sparql xmlns='http: "\t<head>\n" + "\t\t<variable name='s'/>\n" + "\t\t<variable name='p'/>\n" + "\t\t<variable name='o'/>\n" + "\t</head>\n" + "\t<results>\n" + "\t\t<result>\n" + "\t\t\t<binding name='s'>\n" + "\t\t\t\t<uri>http: "\t\t\t</binding>\n" + "\t\t\t<binding name='p'>\n" + "\t\t\t\t<uri>http: "\t\t\t</binding>\n" + "\t\t\t<binding name='o'>\n" + "\t\t\t\t<literal datatype='http: "\t\t\t</binding>\n" + "\t\t</result>\n" + "\t</results>\n" + "</sparql>\n"; String queryString = "select * { ?s ?p ?o . } limit 1"; TupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString); tupleQuery.evaluate(sparqlWriter); Assert.assertEquals(expected, out.toString()); }
@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);  }