public QueryIterator build(final QueryIterator input, final ExecutionContext execCxt) { final Graph graph = execCxt.getActiveGraph(); if (!(graph instanceof PelletInfGraph)) throw new UnsupportedOperationException("A Pellet-backed model is required"); final PelletInfGraph pellet = (PelletInfGraph) graph; pellet.prepare(); final Query query = parsePattern(pellet); if (query != null) return new PelletQueryIterator(pellet, query, input, execCxt); else return new StageGeneratorGeneric().execute(_pattern, input, execCxt); }
/** * {@inheritDoc} */ @Override protected QueryIterator nextStage(final Binding binding) { final Query newQuery = _query.apply(convertBinding(binding)); final QueryResult results = QueryEngine.exec(newQuery); final SparqlDLResultSet resultSet = new SparqlDLResultSet(results, null, binding); final QueryIteratorResultSet iter = new QueryIteratorResultSet(resultSet); return iter; } }
public QueryIterator build(final QueryIterator input, final ExecutionContext execCxt) { final Graph graph = execCxt.getActiveGraph(); if (!(graph instanceof PelletInfGraph)) throw new UnsupportedOperationException("A Pellet-backed model is required"); final PelletInfGraph pellet = (PelletInfGraph) graph; pellet.prepare(); final Query query = parsePattern(pellet); if (query != null) return new PelletQueryIterator(pellet, query, input, execCxt); else return new StageGeneratorGeneric().execute(_pattern, input, execCxt); }
/** * {@inheritDoc} */ @Override protected QueryIterator nextStage(final Binding binding) { final Query newQuery = _query.apply(convertBinding(binding)); final QueryResult results = QueryEngine.exec(newQuery); final SparqlDLResultSet resultSet = new SparqlDLResultSet(results, null, binding); final QueryIteratorResultSet iter = new QueryIteratorResultSet(resultSet); return iter; } }
/** * {@inheritDoc} */ @Override protected QueryIterator nextStage(final Binding binding) { final Query newQuery = _query.apply(convertBinding(binding)); final QueryResult results = QueryEngine.exec(newQuery); final SparqlDLResultSet resultSet = new SparqlDLResultSet(results, null, binding); final QueryIteratorResultSet iter = new QueryIteratorResultSet(resultSet); return iter; } }
public QueryIterator build(final QueryIterator input, final ExecutionContext execCxt) { final Graph graph = execCxt.getActiveGraph(); if (!(graph instanceof PelletInfGraph)) throw new UnsupportedOperationException("A Pellet-backed model is required"); final PelletInfGraph pellet = (PelletInfGraph) graph; pellet.prepare(); final Query query = parsePattern(pellet); if (query != null) return new PelletQueryIterator(pellet, query, input, execCxt); else return new StageGeneratorGeneric().execute(_pattern, input, execCxt); }