001: /*
002: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2006.
003: *
004: * Licensed under the Aduna BSD-style license.
005: */
006: package org.openrdf.query.parser.sparql;
007:
008: import org.openrdf.query.parser.sparql.ast.ASTAnd;
009: import org.openrdf.query.parser.sparql.ast.ASTAskQuery;
010: import org.openrdf.query.parser.sparql.ast.ASTBaseDecl;
011: import org.openrdf.query.parser.sparql.ast.ASTBasicGraphPattern;
012: import org.openrdf.query.parser.sparql.ast.ASTBlankNode;
013: import org.openrdf.query.parser.sparql.ast.ASTBlankNodePropertyList;
014: import org.openrdf.query.parser.sparql.ast.ASTBound;
015: import org.openrdf.query.parser.sparql.ast.ASTCollection;
016: import org.openrdf.query.parser.sparql.ast.ASTCompare;
017: import org.openrdf.query.parser.sparql.ast.ASTConstraint;
018: import org.openrdf.query.parser.sparql.ast.ASTConstruct;
019: import org.openrdf.query.parser.sparql.ast.ASTConstructQuery;
020: import org.openrdf.query.parser.sparql.ast.ASTDatasetClause;
021: import org.openrdf.query.parser.sparql.ast.ASTDatatype;
022: import org.openrdf.query.parser.sparql.ast.ASTDescribe;
023: import org.openrdf.query.parser.sparql.ast.ASTDescribeQuery;
024: import org.openrdf.query.parser.sparql.ast.ASTFalse;
025: import org.openrdf.query.parser.sparql.ast.ASTFunctionCall;
026: import org.openrdf.query.parser.sparql.ast.ASTGraphGraphPattern;
027: import org.openrdf.query.parser.sparql.ast.ASTGraphPatternGroup;
028: import org.openrdf.query.parser.sparql.ast.ASTIRI;
029: import org.openrdf.query.parser.sparql.ast.ASTIsBlank;
030: import org.openrdf.query.parser.sparql.ast.ASTIsIRI;
031: import org.openrdf.query.parser.sparql.ast.ASTIsLiteral;
032: import org.openrdf.query.parser.sparql.ast.ASTLang;
033: import org.openrdf.query.parser.sparql.ast.ASTLangMatches;
034: import org.openrdf.query.parser.sparql.ast.ASTLimit;
035: import org.openrdf.query.parser.sparql.ast.ASTMath;
036: import org.openrdf.query.parser.sparql.ast.ASTNot;
037: import org.openrdf.query.parser.sparql.ast.ASTNumericLiteral;
038: import org.openrdf.query.parser.sparql.ast.ASTObjectList;
039: import org.openrdf.query.parser.sparql.ast.ASTOffset;
040: import org.openrdf.query.parser.sparql.ast.ASTOptionalGraphPattern;
041: import org.openrdf.query.parser.sparql.ast.ASTOr;
042: import org.openrdf.query.parser.sparql.ast.ASTOrderClause;
043: import org.openrdf.query.parser.sparql.ast.ASTOrderCondition;
044: import org.openrdf.query.parser.sparql.ast.ASTPrefixDecl;
045: import org.openrdf.query.parser.sparql.ast.ASTPropertyList;
046: import org.openrdf.query.parser.sparql.ast.ASTQName;
047: import org.openrdf.query.parser.sparql.ast.ASTQueryContainer;
048: import org.openrdf.query.parser.sparql.ast.ASTRDFLiteral;
049: import org.openrdf.query.parser.sparql.ast.ASTRegexExpression;
050: import org.openrdf.query.parser.sparql.ast.ASTSameTerm;
051: import org.openrdf.query.parser.sparql.ast.ASTSelect;
052: import org.openrdf.query.parser.sparql.ast.ASTSelectQuery;
053: import org.openrdf.query.parser.sparql.ast.ASTStr;
054: import org.openrdf.query.parser.sparql.ast.ASTString;
055: import org.openrdf.query.parser.sparql.ast.ASTTriplesSameSubject;
056: import org.openrdf.query.parser.sparql.ast.ASTTrue;
057: import org.openrdf.query.parser.sparql.ast.ASTUnionGraphPattern;
058: import org.openrdf.query.parser.sparql.ast.ASTVar;
059: import org.openrdf.query.parser.sparql.ast.ASTWhereClause;
060: import org.openrdf.query.parser.sparql.ast.SimpleNode;
061: import org.openrdf.query.parser.sparql.ast.SyntaxTreeBuilderVisitor;
062: import org.openrdf.query.parser.sparql.ast.VisitorException;
063:
064: /**
065: * Base class for visitors of the SPARQL AST.
066: *
067: * @author arjohn
068: */
069: abstract class ASTVisitorBase implements SyntaxTreeBuilderVisitor {
070:
071: public Object visit(SimpleNode node, Object data)
072: throws VisitorException {
073: return node.childrenAccept(this , data);
074: }
075:
076: public Object visit(ASTQueryContainer node, Object data)
077: throws VisitorException {
078: return node.childrenAccept(this , data);
079: }
080:
081: public Object visit(ASTBaseDecl node, Object data)
082: throws VisitorException {
083: return node.childrenAccept(this , data);
084: }
085:
086: public Object visit(ASTPrefixDecl node, Object data)
087: throws VisitorException {
088: return node.childrenAccept(this , data);
089: }
090:
091: public Object visit(ASTSelectQuery node, Object data)
092: throws VisitorException {
093: return node.childrenAccept(this , data);
094: }
095:
096: public Object visit(ASTSelect node, Object data)
097: throws VisitorException {
098: return node.childrenAccept(this , data);
099: }
100:
101: public Object visit(ASTConstructQuery node, Object data)
102: throws VisitorException {
103: return node.childrenAccept(this , data);
104: }
105:
106: public Object visit(ASTConstruct node, Object data)
107: throws VisitorException {
108: return node.childrenAccept(this , data);
109: }
110:
111: public Object visit(ASTDescribeQuery node, Object data)
112: throws VisitorException {
113: return node.childrenAccept(this , data);
114: }
115:
116: public Object visit(ASTDescribe node, Object data)
117: throws VisitorException {
118: return node.childrenAccept(this , data);
119: }
120:
121: public Object visit(ASTAskQuery node, Object data)
122: throws VisitorException {
123: return node.childrenAccept(this , data);
124: }
125:
126: public Object visit(ASTDatasetClause node, Object data)
127: throws VisitorException {
128: return node.childrenAccept(this , data);
129: }
130:
131: public Object visit(ASTWhereClause node, Object data)
132: throws VisitorException {
133: return node.childrenAccept(this , data);
134: }
135:
136: public Object visit(ASTOrderClause node, Object data)
137: throws VisitorException {
138: return node.childrenAccept(this , data);
139: }
140:
141: public Object visit(ASTOrderCondition node, Object data)
142: throws VisitorException {
143: return node.childrenAccept(this , data);
144: }
145:
146: public Object visit(ASTLimit node, Object data)
147: throws VisitorException {
148: return node.childrenAccept(this , data);
149: }
150:
151: public Object visit(ASTOffset node, Object data)
152: throws VisitorException {
153: return node.childrenAccept(this , data);
154: }
155:
156: public Object visit(ASTGraphPatternGroup node, Object data)
157: throws VisitorException {
158: return node.childrenAccept(this , data);
159: }
160:
161: public Object visit(ASTBasicGraphPattern node, Object data)
162: throws VisitorException {
163: return node.childrenAccept(this , data);
164: }
165:
166: public Object visit(ASTOptionalGraphPattern node, Object data)
167: throws VisitorException {
168: return node.childrenAccept(this , data);
169: }
170:
171: public Object visit(ASTGraphGraphPattern node, Object data)
172: throws VisitorException {
173: return node.childrenAccept(this , data);
174: }
175:
176: public Object visit(ASTUnionGraphPattern node, Object data)
177: throws VisitorException {
178: return node.childrenAccept(this , data);
179: }
180:
181: public Object visit(ASTConstraint node, Object data)
182: throws VisitorException {
183: return node.childrenAccept(this , data);
184: }
185:
186: public Object visit(ASTFunctionCall node, Object data)
187: throws VisitorException {
188: return node.childrenAccept(this , data);
189: }
190:
191: public Object visit(ASTTriplesSameSubject node, Object data)
192: throws VisitorException {
193: return node.childrenAccept(this , data);
194: }
195:
196: public Object visit(ASTPropertyList node, Object data)
197: throws VisitorException {
198: return node.childrenAccept(this , data);
199: }
200:
201: public Object visit(ASTObjectList node, Object data)
202: throws VisitorException {
203: return node.childrenAccept(this , data);
204: }
205:
206: public Object visit(ASTIRI node, Object data)
207: throws VisitorException {
208: return node.childrenAccept(this , data);
209: }
210:
211: public Object visit(ASTBlankNodePropertyList node, Object data)
212: throws VisitorException {
213: return node.childrenAccept(this , data);
214: }
215:
216: public Object visit(ASTCollection node, Object data)
217: throws VisitorException {
218: return node.childrenAccept(this , data);
219: }
220:
221: public Object visit(ASTVar node, Object data)
222: throws VisitorException {
223: return node.childrenAccept(this , data);
224: }
225:
226: public Object visit(ASTOr node, Object data)
227: throws VisitorException {
228: return node.childrenAccept(this , data);
229: }
230:
231: public Object visit(ASTAnd node, Object data)
232: throws VisitorException {
233: return node.childrenAccept(this , data);
234: }
235:
236: public Object visit(ASTCompare node, Object data)
237: throws VisitorException {
238: return node.childrenAccept(this , data);
239: }
240:
241: public Object visit(ASTMath node, Object data)
242: throws VisitorException {
243: return node.childrenAccept(this , data);
244: }
245:
246: public Object visit(ASTNot node, Object data)
247: throws VisitorException {
248: return node.childrenAccept(this , data);
249: }
250:
251: public Object visit(ASTNumericLiteral node, Object data)
252: throws VisitorException {
253: return node.childrenAccept(this , data);
254: }
255:
256: public Object visit(ASTStr node, Object data)
257: throws VisitorException {
258: return node.childrenAccept(this , data);
259: }
260:
261: public Object visit(ASTLang node, Object data)
262: throws VisitorException {
263: return node.childrenAccept(this , data);
264: }
265:
266: public Object visit(ASTLangMatches node, Object data)
267: throws VisitorException {
268: return node.childrenAccept(this , data);
269: }
270:
271: public Object visit(ASTDatatype node, Object data)
272: throws VisitorException {
273: return node.childrenAccept(this , data);
274: }
275:
276: public Object visit(ASTBound node, Object data)
277: throws VisitorException {
278: return node.childrenAccept(this , data);
279: }
280:
281: public Object visit(ASTSameTerm node, Object data)
282: throws VisitorException {
283: return node.childrenAccept(this , data);
284: }
285:
286: public Object visit(ASTIsIRI node, Object data)
287: throws VisitorException {
288: return node.childrenAccept(this , data);
289: }
290:
291: public Object visit(ASTIsBlank node, Object data)
292: throws VisitorException {
293: return node.childrenAccept(this , data);
294: }
295:
296: public Object visit(ASTIsLiteral node, Object data)
297: throws VisitorException {
298: return node.childrenAccept(this , data);
299: }
300:
301: public Object visit(ASTRegexExpression node, Object data)
302: throws VisitorException {
303: return node.childrenAccept(this , data);
304: }
305:
306: public Object visit(ASTRDFLiteral node, Object data)
307: throws VisitorException {
308: return node.childrenAccept(this , data);
309: }
310:
311: public Object visit(ASTTrue node, Object data)
312: throws VisitorException {
313: return node.childrenAccept(this , data);
314: }
315:
316: public Object visit(ASTFalse node, Object data)
317: throws VisitorException {
318: return node.childrenAccept(this , data);
319: }
320:
321: public Object visit(ASTString node, Object data)
322: throws VisitorException {
323: return node.childrenAccept(this , data);
324: }
325:
326: public Object visit(ASTQName node, Object data)
327: throws VisitorException {
328: return node.childrenAccept(this , data);
329: }
330:
331: public Object visit(ASTBlankNode node, Object data)
332: throws VisitorException {
333: return node.childrenAccept(this, data);
334: }
335: }
|