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.parser.serql.ast;
07:
08: public class ASTConstructQuery extends ASTGraphQuery {
09:
10: public ASTConstructQuery(int id) {
11: super (id);
12: }
13:
14: public ASTConstructQuery(SyntaxTreeBuilder p, int id) {
15: super (p, id);
16: }
17:
18: @Override
19: public Object jjtAccept(SyntaxTreeBuilderVisitor visitor,
20: Object data) throws VisitorException {
21: return visitor.visit(this , data);
22: }
23:
24: public ASTConstruct getConstructClause() {
25: return (ASTConstruct) children.get(0);
26: }
27:
28: public boolean hasQueryBody() {
29: return getQueryBody() != null;
30: }
31:
32: public ASTQueryBody getQueryBody() {
33: return jjtGetChild(ASTQueryBody.class);
34: }
35:
36: public boolean hasLimit() {
37: return getLimit() != null;
38: }
39:
40: public ASTLimit getLimit() {
41: return jjtGetChild(ASTLimit.class);
42: }
43:
44: public boolean hasOffset() {
45: return getOffset() != null;
46: }
47:
48: public ASTOffset getOffset() {
49: return jjtGetChild(ASTOffset.class);
50: }
51: }
|