01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 2007.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.repository.dataset;
07:
08: import org.openrdf.query.BooleanQuery;
09: import org.openrdf.query.QueryEvaluationException;
10: import org.openrdf.repository.sail.SailBooleanQuery;
11:
12: /**
13: *
14: * @author Arjohn Kampman
15: */
16: class DatasetBooleanQuery extends DatasetQuery implements BooleanQuery {
17:
18: protected DatasetBooleanQuery(DatasetRepositoryConnection con,
19: SailBooleanQuery sailQuery) {
20: super (con, sailQuery);
21: }
22:
23: public boolean evaluate() throws QueryEvaluationException {
24: con.loadDataset(sailQuery.getActiveDataset());
25: return ((BooleanQuery) sailQuery).evaluate();
26: }
27: }
|