public void evaluate(RDFHandler handler) throws QueryEvaluationException, RDFHandlerException { con.loadDataset(sailQuery.getActiveDataset()); ((GraphQuery)sailQuery).evaluate(handler); } }
try { GraphQuery query = prepareGraphQuery(SPARQL, EVERYTHING, ""); query.setIncludeInferred(includeInferred); setBindings(query, subj, pred, obj, contexts); gRes = query.evaluate(); result = new RepositoryResult<Statement>( new ExceptionConvertingIteration<Statement, RepositoryException>(gRes)
query.setBinding("name", nameBob); GraphQueryResult result = query.evaluate();
@Override public GraphQuery prepare(ParsedGraphQuery graphQuery) { GraphQuery query = new SailConnectionGraphQuery(graphQuery, con, vf); query.setIncludeInferred(includeInferred); return query; }
query.setBinding("name", nameBob); GraphQueryResult result = query.evaluate();
@Override public GraphQuery prepare(ParsedGraphQuery graphQuery) { GraphQuery query = new SailConnectionGraphQuery(graphQuery, con, vf); query.setIncludeInferred(includeInferred); return query; }
public GraphQueryResult evaluate() throws QueryEvaluationException { con.loadDataset(sailQuery.getActiveDataset()); return ((GraphQuery)sailQuery).evaluate(); }
try { GraphQuery query = prepareGraphQuery(SPARQL, EVERYTHING, ""); query.setIncludeInferred(includeInferred); setBindings(query, subj, pred, obj, contexts); gRes = query.evaluate(); result = new RepositoryResult<Statement>( new ExceptionConvertingIteration<Statement, RepositoryException>(gRes)
query.setBinding("name", nameBob); GraphQueryResult result = query.evaluate();
@Override public GraphQuery prepare(ParsedGraphQuery graphQuery) { GraphQuery query = new SailGraphQuery(graphQuery, con); query.setIncludeInferred(includeInferred); return query; }
public GraphQueryResult evaluate() throws QueryEvaluationException { con.loadDataset(sailQuery.getActiveDataset()); return ((GraphQuery)sailQuery).evaluate(); }
try { GraphQuery query = prepareGraphQuery(SPARQL, EVERYTHING, ""); query.setIncludeInferred(includeInferred); setBindings(query, subj, pred, obj, contexts); gRes = query.evaluate(); result = new RepositoryResult<Statement>( new ExceptionConvertingIteration<Statement, RepositoryException>(gRes)
public void evaluate(RDFHandler handler) throws QueryEvaluationException, RDFHandlerException { con.loadDataset(sailQuery.getActiveDataset()); ((GraphQuery)sailQuery).evaluate(handler); } }
/** * Evaluate a {@link GraphQuery} in this transaction and return the result. * * @param gQuery * a {@link GraphQuery} prepared on this transaction. * @return a {@link GraphQueryResult} * @throws InterruptedException * if the transaction thread is interrupted * @throws ExecutionException * if an error occurs while executing the operation. */ GraphQueryResult evaluate(GraphQuery gQuery) throws InterruptedException, ExecutionException { Future<GraphQueryResult> result = submit(() -> gQuery.evaluate()); return getFromFuture(result); }
try (GraphQueryResult queryResult = preparedQuery.evaluate();) { return processFunction.apply(queryResult);
try (GraphQueryResult queryResult = preparedQuery.evaluate();) { return processFunction.apply(queryResult);
try (GraphQueryResult queryResult = preparedQuery.evaluate();) { return processFunction.apply(queryResult);
try (GraphQueryResult queryResult = preparedQuery.evaluate();) { return processFunction.apply(queryResult);
/** * Performs a SPARQL Construct or Describe query on the given Repository without opening a transaction and * passes the results to the given {@link RDFHandler}. * * @param repository * The {@link Repository} to open a connection to. * @param query * The SPARQL Construct or Describe query to execute. * @param handler * An {@link RDFHandler} that consumes the results. * @throws RepositoryException * If there was an exception dealing with the Repository. * @throws UnknownTransactionStateException * If the transaction state was not properly recognised. (Optional specific exception) * @throws MalformedQueryException * If the supplied query is malformed * @throws QueryEvaluationException * If there was an error evaluating the query */ public static void graphQueryNoTransaction(Repository repository, String query, RDFHandler handler) throws RepositoryException, UnknownTransactionStateException, MalformedQueryException, QueryEvaluationException { consumeNoTransaction(repository, conn -> { GraphQuery preparedQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, query); preparedQuery.evaluate(handler); }); }
/** * Performs a SPARQL Construct or Describe query on the given Repository without opening a transaction and * passes the results to the given {@link RDFHandler}. * * @param repository * The {@link Repository} to open a connection to. * @param query * The SPARQL Construct or Describe query to execute. * @param handler * An {@link RDFHandler} that consumes the results. * @throws RepositoryException * If there was an exception dealing with the Repository. * @throws UnknownTransactionStateException * If the transaction state was not properly recognised. (Optional specific exception) * @throws MalformedQueryException * If the supplied query is malformed * @throws QueryEvaluationException * If there was an error evaluating the query */ public static void graphQueryNoTransaction(Repository repository, String query, RDFHandler handler) throws RepositoryException, UnknownTransactionStateException, MalformedQueryException, QueryEvaluationException { consumeNoTransaction(repository, conn -> { GraphQuery preparedQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, query); preparedQuery.evaluate(handler); }); }