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.model.Value;
09: import org.openrdf.query.BindingSet;
10: import org.openrdf.query.Dataset;
11: import org.openrdf.query.Query;
12: import org.openrdf.repository.sail.SailQuery;
13:
14: /**
15: * @author Arjohn Kampman
16: */
17: abstract class DatasetQuery implements Query {
18:
19: protected final DatasetRepositoryConnection con;
20:
21: protected final SailQuery sailQuery;
22:
23: protected DatasetQuery(DatasetRepositoryConnection con,
24: SailQuery sailQuery) {
25: this .con = con;
26: this .sailQuery = sailQuery;
27: }
28:
29: public final BindingSet getBindings() {
30: return sailQuery.getBindings();
31: }
32:
33: public final Dataset getDataset() {
34: return sailQuery.getDataset();
35: }
36:
37: public final boolean getIncludeInferred() {
38: return sailQuery.getIncludeInferred();
39: }
40:
41: public final void removeBinding(String name) {
42: sailQuery.removeBinding(name);
43: }
44:
45: public final void setBinding(String name, Value value) {
46: sailQuery.setBinding(name, value);
47: }
48:
49: public final void setDataset(Dataset dataset) {
50: sailQuery.setDataset(dataset);
51: }
52:
53: public final void setIncludeInferred(boolean includeInferred) {
54: sailQuery.setIncludeInferred(includeInferred);
55: }
56:
57: @Override
58: public String toString() {
59: return sailQuery.toString();
60: }
61: }
|