@Test public void testPrepareGraphQueryWithSingleResult() throws Exception { Resource context1 = conn.getValueFactory().createURI("http: ValueFactory f= conn.getValueFactory(); URI alice = f.createURI("http: URI name = f.createURI("http: Literal alicesName = f.createLiteral("Alice1"); Statement st1 = f.createStatement(alice, name, alicesName); conn.add(st1,context1); String query = " DESCRIBE <http: GraphQuery queryObj = conn.prepareGraphQuery(query); GraphQueryResult result = queryObj.evaluate(); Assert.assertTrue(result != null); Assert.assertTrue(result.hasNext()); @SuppressWarnings("unused") Statement st = result.next(); Assert.assertFalse(result.hasNext()); result.close(); conn.clear(context1); }
@Override public GraphQueryResult evaluate() throws QueryEvaluationException { try { sync(); return getMarkLogicClient().sendGraphQuery(getQueryString(),getBindings(),getIncludeInferred(),getBaseURI()); } catch (IOException e) { throw new QueryEvaluationException(e); } catch (MarkLogicSesameException e) { throw new QueryEvaluationException(e); } }
MarkLogicGraphQuery extends MarkLogicQuery implements GraphQuery,MarkLogicQueryDependent { @Override public GraphQueryResult evaluate() throws QueryEvaluationException { try { sync(); return getMarkLogicClient().sendGraphQuery(getQueryString(),getBindings(),getIncludeInferred(),getBaseURI()); } catch (IOException e) { throw new QueryEvaluationException(e); } catch (MarkLogicSesameException e) { throw new QueryEvaluationException(e); } } }
MarkLogicGraphQuery extends MarkLogicQuery implements GraphQuery,MarkLogicQueryDependent { @Override public GraphQueryResult evaluate() throws QueryEvaluationException { try { sync(); return getMarkLogicClient().sendGraphQuery(getQueryString(),getBindings(),getIncludeInferred(),getBaseURI()); } catch (IOException e) { throw new QueryEvaluationException(e); } catch (MarkLogicSesameException e) { throw new QueryEvaluationException(e); } } MarkLogicGraphQuery(MarkLogicClient client, SPARQLQueryBindingSet bindingSet, String baseUri, String queryString, GraphPermissions graphPerms, QueryDefinition queryDef, SPARQLRuleset[] rulesets); }
MarkLogicGraphQuery extends MarkLogicQuery implements GraphQuery,MarkLogicQueryDependent { @Override public GraphQueryResult evaluate() throws QueryEvaluationException { try { sync(); return getMarkLogicClient().sendGraphQuery(getQueryString(),getBindings(),getIncludeInferred(),getBaseURI()); } catch (IOException e) { throw new QueryEvaluationException(e); } catch (MarkLogicSesameException e) { throw new QueryEvaluationException(e); } } MarkLogicGraphQuery(MarkLogicClient client, SPARQLQueryBindingSet bindingSet, String baseUri, String queryString, GraphPermissions graphPerms, QueryDefinition queryDef, SPARQLRuleset[] rulesets); @Override GraphQueryResult evaluate(); @Override void evaluate(RDFHandler resultHandler); }
MarkLogicGraphQuery extends MarkLogicQuery implements GraphQuery,MarkLogicQueryDependent { @Override public GraphQueryResult evaluate() throws QueryEvaluationException { try { sync(); return getMarkLogicClient().sendGraphQuery(getQueryString(),getBindings(),getIncludeInferred(),getBaseURI()); } catch (IOException e) { throw new QueryEvaluationException(e); } catch (MarkLogicSesameException e) { throw new QueryEvaluationException(e); } } MarkLogicGraphQuery(MarkLogicClient client, SPARQLQueryBindingSet bindingSet, String baseUri, String queryString, GraphPermissions graphPerms, QueryDefinition queryDef, SPARQLRuleset[] rulesets); @Override GraphQueryResult evaluate(); @Override void evaluate(RDFHandler resultHandler);  }