01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2007.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.query.algebra;
07:
08: import org.openrdf.query.algebra.Compare.CompareOp;
09:
10: /**
11: */
12: public class CompareAny extends CompareSubQueryValueOperator {
13:
14: /*-----------*
15: * Variables *
16: *-----------*/
17:
18: private CompareOp operator;
19:
20: /*--------------*
21: * Constructors *
22: *--------------*/
23:
24: public CompareAny() {
25: }
26:
27: public CompareAny(ValueExpr valueExpr, TupleExpr subQuery,
28: CompareOp operator) {
29: super (valueExpr, subQuery);
30: setOperator(operator);
31: }
32:
33: /*---------*
34: * Methods *
35: *---------*/
36:
37: public CompareOp getOperator() {
38: return operator;
39: }
40:
41: public void setOperator(CompareOp operator) {
42: assert operator != null : "operator must not be null";
43: this .operator = operator;
44: }
45:
46: public <X extends Exception> void visit(QueryModelVisitor<X> visitor)
47: throws X {
48: visitor.meet(this );
49: }
50:
51: @Override
52: public String getSignature() {
53: return super .getSignature() + " (" + operator.getSymbol() + ")";
54: }
55:
56: @Override
57: public CompareAny clone() {
58: return (CompareAny) super.clone();
59: }
60: }
|