1 22 23 24 package org.xquark.xquery.parser; 25 26 27 public abstract class XQueryUnaryOperatorExpression extends XQueryExpression { 28 private static final String RCSRevision = "$Revision: 1.4 $"; 29 private static final String RCSName = "$Name: $"; 30 31 protected XQueryExpression expression = null; 33 34 38 public void accept(ParserVisitor visitor) throws XQueryException { 39 visitor.visit(this); 40 } 41 42 46 public XQueryUnaryOperatorExpression(XQueryExpression expression) throws XQueryException { 47 setExpression(expression); 48 } 49 50 54 public XQueryExpression getExpression() { return expression; } 55 public void setExpression(XQueryExpression expression) throws XQueryException { 56 if (expression == null) throw new XQueryException("expression of XQueryUnaryOperatorExpression cannot be null"); 57 this.expression = expression; 58 this.expression.setParentExpression(this); 59 } 60 61 public void addParentExpression(XQueryExpression parentExpression) { 65 addParentExpression(parentExpression) ; 66 if (expression != null) expression.addParentExpression(parentExpression); 67 } 68 69 } 70 71 72 73 | Popular Tags |