public CloseableIteration<? extends BindingSet, QueryEvaluationException> evaluateByGraphNames( final TupleExpr tupleExpr, final Dataset dataset, final BindingSet bindings, final boolean includeInferred) throws SailException { Dataset d; if (null == dataset) { d = this.readableSet; } else { SimpleDataset di = new SimpleDataset(); d = di; for (IRI r : dataset.getDefaultGraphs()) { if (this.readPermitted(r)) { di.addDefaultGraph(r); } } for (IRI r : dataset.getNamedGraphs()) { if (this.readPermitted(r)) { di.addNamedGraph(r); } } } return super.evaluate(tupleExpr, d, bindings, includeInferred); }