01: /* Generated By:JJTree: Do not edit this line. ASTSelect.java */
02:
03: package org.openrdf.query.parser.sparql.ast;
04:
05: public class ASTSelect extends SimpleNode {
06:
07: private boolean distinct = false;
08:
09: private boolean reduced = false;
10:
11: private boolean wildcard = false;
12:
13: public ASTSelect(int id) {
14: super (id);
15: }
16:
17: public ASTSelect(SyntaxTreeBuilder p, int id) {
18: super (p, id);
19: }
20:
21: @Override
22: public Object jjtAccept(SyntaxTreeBuilderVisitor visitor,
23: Object data) throws VisitorException {
24: return visitor.visit(this , data);
25: }
26:
27: public boolean isDistinct() {
28: return distinct;
29: }
30:
31: public void setDistinct(boolean distinct) {
32: this .distinct = distinct;
33: }
34:
35: public boolean isReduced() {
36: return reduced;
37: }
38:
39: public void setReduced(boolean reduced) {
40: this .reduced = reduced;
41: }
42:
43: public boolean isWildcard() {
44: return wildcard;
45: }
46:
47: public void setWildcard(boolean wildcard) {
48: this .wildcard = wildcard;
49: }
50:
51: @Override
52: public String toString() {
53: String result = super .toString();
54:
55: if (distinct || wildcard) {
56: result += " (";
57: if (distinct) {
58: result += " distinct";
59: }
60: if (reduced) {
61: result += " reduced";
62: }
63: if (wildcard) {
64: result += " *";
65: }
66: result += " )";
67: }
68:
69: return result;
70: }
71: }
|