01: /* Generated By:JJTree: Do not edit this line. ASTOrderCondition.java */
02:
03: package org.openrdf.query.parser.sparql.ast;
04:
05: public class ASTOrderCondition extends SimpleNode {
06:
07: private boolean ascending = true;
08:
09: public ASTOrderCondition(int id) {
10: super (id);
11: }
12:
13: public ASTOrderCondition(SyntaxTreeBuilder p, int id) {
14: super (p, id);
15: }
16:
17: @Override
18: public Object jjtAccept(SyntaxTreeBuilderVisitor visitor,
19: Object data) throws VisitorException {
20: return visitor.visit(this , data);
21: }
22:
23: public boolean isAscending() {
24: return ascending;
25: }
26:
27: public void setAscending(boolean ascending) {
28: this .ascending = ascending;
29: }
30:
31: @Override
32: public String toString() {
33: String result = super .toString();
34:
35: if (ascending) {
36: result += " (ASC)";
37: } else {
38: result += " (DESC)";
39: }
40:
41: return result;
42: }
43: }
|