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.query.parser.serql;
07:
08: import org.openrdf.query.algebra.TupleExpr;
09: import org.openrdf.query.algebra.ValueExpr;
10:
11: /**
12: * @author Arjohn Kampman
13: */
14: class OptionalTupleExpr {
15:
16: private final TupleExpr tupleExpr;
17:
18: private final ValueExpr constraint;
19:
20: public OptionalTupleExpr(TupleExpr tupleExpr) {
21: this (tupleExpr, null);
22: }
23:
24: public OptionalTupleExpr(TupleExpr tupleExpr, ValueExpr constraint) {
25: this .tupleExpr = tupleExpr;
26: this .constraint = constraint;
27: }
28:
29: public TupleExpr getTupleExpr() {
30: return tupleExpr;
31: }
32:
33: public ValueExpr getConstraint() {
34: return constraint;
35: }
36:
37: public boolean hasConstraint() {
38: return constraint != null;
39: }
40: }
|