01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2006.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.query.algebra;
07:
08: import java.util.Set;
09:
10: /**
11: * The MINUS set operator, which returns the result of the left tuple
12: * expression, except for the results that are also returned by the right tuple
13: * expression.
14: */
15: public class Difference extends BinaryTupleOperator {
16:
17: /*--------------*
18: * Constructors *
19: *--------------*/
20:
21: public Difference() {
22: }
23:
24: /**
25: * Creates a new minus operator that operates on the two specified arguments.
26: *
27: * @param leftArg
28: * The left argument of the minus operator.
29: * @param rightArg
30: * The right argument of the minus operator.
31: */
32: public Difference(TupleExpr leftArg, TupleExpr rightArg) {
33: super (leftArg, rightArg);
34: }
35:
36: /*---------*
37: * Methods *
38: *---------*/
39:
40: public Set<String> getBindingNames() {
41: return getLeftArg().getBindingNames();
42: }
43:
44: public <X extends Exception> void visit(QueryModelVisitor<X> visitor)
45: throws X {
46: visitor.meet(this );
47: }
48:
49: @Override
50: public Difference clone() {
51: return (Difference) super.clone();
52: }
53: }
|