01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 2007.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.query.algebra;
07:
08: /**
09: * A semantics-less query model node that is used as the root of query model
10: * trees. This is a placeholder that facilitates modifications to query model
11: * trees, including the replacement of the actual (semantically relevant) root
12: * node with another root node.
13: *
14: * @author Arjohn Kampman
15: */
16: public class QueryRoot extends UnaryTupleOperator {
17:
18: public QueryRoot() {
19: super ();
20: }
21:
22: public QueryRoot(TupleExpr tupleExpr) {
23: super (tupleExpr);
24: }
25:
26: @Override
27: public void setParentNode(QueryModelNode parent) {
28: throw new UnsupportedOperationException(
29: "Not allowed to set a parent on a QueryRoot object");
30: }
31:
32: public <X extends Exception> void visit(QueryModelVisitor<X> visitor)
33: throws X {
34: visitor.meet(this );
35: }
36:
37: @Override
38: public QueryRoot clone() {
39: return (QueryRoot) super.clone();
40: }
41: }
|