1 22 23 package org.xquark.xquery.normalize; 24 25 import java.util.ArrayList ; 26 27 import org.xquark.xquery.parser.*; 28 29 public class PutSkolemIDsVisitor extends DefaultParserVisitor { 30 31 private static final String RCSRevision = "$Revision: 1.1 $"; 32 private static final String RCSName = "$Name: $"; 33 34 private ArrayList ids = null; 35 36 public PutSkolemIDsVisitor(ArrayList ids) { this.ids = ids; } 37 38 46 public void visit(Element arg) throws XQueryException { 47 arg.setSkolemIDs(ids); 54 ArrayList subExpressions = arg.getSubExpressions(); 56 if (subExpressions != null) { 57 for (int i=0;i<subExpressions.size();i++) 58 ((XQueryExpression)subExpressions.get(i)).accept(this); 59 } 60 } 62 63 public void visit(ITEExpression arg) throws XQueryException { 69 arg.setSkolemIDs(ids); 70 } 71 public void visit(XQueryBinaryOperatorExpression arg) throws XQueryException { 103 arg.setSkolemIDs(ids); 104 arg.getExpression1().accept(this); 105 arg.getExpression2().accept(this); 106 } 107 110 public void visit(XQueryExpressionSequence arg) throws XQueryException { 111 arg.setSkolemIDs(ids); 112 ArrayList subExpressions = arg.getSubExpressions(); 113 for (int i=0;i<subExpressions.size();i++) 114 ((XQueryExpression)subExpressions.get(i)).accept(this); 115 } 116 117 public void visit(XQueryUnaryOperatorExpression arg) throws XQueryException { 121 arg.setSkolemIDs(ids); 122 arg.getExpression().accept(this); 123 } 124 127 129 } 152 | Popular Tags |