1 22 23 package org.xquark.extractor.algebra; 24 25 import org.xquark.extractor.common.SqlWrapperException; 26 import org.xquark.extractor.xfunctions.*; 27 28 33 public abstract class DefaultAlgebraVisitor implements AlgebraVisitor { 34 private static final String RCSRevision = "$Revision: 1.5 $"; 35 private static final String RCSName = "$Name: $"; 36 37 protected Expression expr = null; 38 39 public void visit(Expression arg) throws SqlWrapperException { 40 expr = arg; 41 } 42 43 public void visit(Attribute arg) throws SqlWrapperException { 44 visit((Expression)arg); 45 } 46 47 public void visit(AttributeExpression arg) throws SqlWrapperException { 48 visit((Expression)arg); 49 } 50 51 public void visit(BinaryOperator arg) throws SqlWrapperException { 52 visit((Expression)arg); 53 } 54 55 public void visit(BinaryAtomicOp arg) throws SqlWrapperException { 56 visit((BinaryOperator)arg); 57 } 58 59 public void visit(BinaryAlgebra arg) throws SqlWrapperException { 60 visit((BinaryOperator)arg); 61 } 62 63 public void visit(BinOpArithmetic arg) throws SqlWrapperException { 64 visit((BinaryAtomicOp)arg); 65 } 66 67 public void visit(BinOpBoolean arg) throws SqlWrapperException { 68 visit((BinaryAtomicOp)arg); 69 } 70 71 public void visit(BinOpCompare arg) throws SqlWrapperException { 72 visit((BinaryAtomicOp)arg); 73 } 74 75 public void visit(BinOpCompareAny arg) throws SqlWrapperException { 76 visit((BinaryAtomicOp)arg); 77 } 78 79 public void visit(BinOpDifference arg) throws SqlWrapperException { 80 visit((BinaryAlgebra)arg); 81 } 82 83 public void visit(BinOpIntersect arg) throws SqlWrapperException { 84 visit((BinaryAlgebra)arg); 85 } 86 87 public void visit(BinOpMerge arg) throws SqlWrapperException { 88 visit((BinaryAlgebra)arg); 89 } 90 91 public void visit(BinOpOuterJoin arg) throws SqlWrapperException { 92 visit((BinaryOperator)arg); 93 } 94 95 public void visit(BinOpUnion arg) throws SqlWrapperException { 96 visit((BinaryAlgebra)arg); 97 } 98 99 public void visit(DummyTable arg) throws SqlWrapperException { 100 visit((Expression)arg); 101 } 102 103 public void visit(FunAggregate arg) throws SqlWrapperException { 104 visit((Expression)arg); 105 } 106 107 public void visit(IfThenElse arg) throws SqlWrapperException { 108 visit((Expression)arg); 109 } 110 111 public void visit(Join arg) throws SqlWrapperException { 112 visit((Expression)arg); 113 } 114 115 public void visit(Literal arg) throws SqlWrapperException { 116 visit((Expression)arg); 117 } 118 119 public void visit(ExternalVariable arg) throws SqlWrapperException { 120 visit((Literal)arg); 121 } 122 123 public void visit(LitBoolean arg) throws SqlWrapperException { 124 visit((Literal)arg); 125 } 126 127 public void visit(LitDate arg) throws SqlWrapperException { 128 visit((Literal)arg); 129 } 130 131 public void visit(LitDecimal arg) throws SqlWrapperException{ 132 visit((Literal)arg); 133 } 134 135 public void visit(LitDouble arg) throws SqlWrapperException { 136 visit((Literal)arg); 137 } 138 139 public void visit(LitFloat arg) throws SqlWrapperException { 140 visit((Literal)arg); 141 } 142 143 public void visit(LitInteger arg) throws SqlWrapperException { 144 visit((Literal)arg); 145 } 146 147 public void visit(LitList arg) throws SqlWrapperException{ 148 visit((Expression)arg); 149 } 150 151 public void visit(LitNull arg) throws SqlWrapperException{ 152 visit((Literal)arg); 153 } 154 155 public void visit(LitString arg) throws SqlWrapperException { 156 visit((Literal)arg); 157 } 158 159 160 public void visit(OuterJoinPredicate arg) throws SqlWrapperException { 161 visit((Expression)arg); 162 } 163 164 public void visit(RenameItem arg) throws SqlWrapperException { 165 visit((UnaryAtomicOp)arg); 166 } 167 168 public void visit(RenameRelation arg) throws SqlWrapperException { 169 visit((UnaryAlgebra)arg); 170 } 171 172 public void visit(SortSpecification arg) throws SqlWrapperException { 173 visit((Expression)arg); 174 } 175 176 public void visit(Table arg) throws SqlWrapperException { 177 visit((Expression)arg); 178 } 179 180 public void visit(TupleExpression arg) throws SqlWrapperException { 181 visit((Expression)arg); 182 } 183 184 public void visit(TempValue arg) throws SqlWrapperException { 185 visit((UnaryOperator)arg); 186 } 187 188 public void visit(ConstantTempTable arg) throws SqlWrapperException { 189 visit((Table)arg); 190 } 191 192 public void visit(UnaryOperator arg) throws SqlWrapperException { 193 visit((Expression)arg); 194 } 195 196 public void visit(UnaryAlgebra arg) throws SqlWrapperException { 197 visit((UnaryOperator)arg); 198 } 199 200 public void visit(UnaryAtomicOp arg) throws SqlWrapperException { 201 visit((UnaryOperator)arg); 202 } 203 204 public void visit(UnOpAggregate arg) throws SqlWrapperException { 205 visit((UnOpProject)arg); 206 } 207 208 public void visit(UnOpExists arg) throws SqlWrapperException { 209 visit((UnaryAtomicOp)arg); 210 } 211 212 public void visit(UnOpGroup arg) throws SqlWrapperException { 213 visit((UnaryAlgebra)arg); 214 } 215 216 public void visit(TempTable arg) throws SqlWrapperException { 217 visit((UnaryAlgebra)arg); 218 } 219 220 public void visit(UnOpIsNull arg) throws SqlWrapperException { 221 visit((UnaryAtomicOp)arg); 222 } 223 224 public void visit(UnOpMinus arg) throws SqlWrapperException { 225 visit((UnaryAtomicOp)arg); 226 } 227 228 public void visit(UnOpNot arg) throws SqlWrapperException { 229 visit((UnaryAtomicOp)arg); 230 } 231 232 public void visit(UnOpProject arg) throws SqlWrapperException { 233 visit((UnaryAlgebra)arg); 234 } 235 236 public void visit(UnOpRestrict arg) throws SqlWrapperException { 237 visit((UnaryAlgebra)arg); 238 } 239 240 public void visit(UnOpSort arg) throws SqlWrapperException { 241 visit((UnaryAlgebra)arg); 242 } 243 244 public void visit(XFunction arg) throws SqlWrapperException { 245 visit((Expression)arg); 246 } 247 248 public void visit(Xfunction_Boolean arg) throws SqlWrapperException { 249 visit((XFunction)arg); 250 } 251 252 public void visit(Xfunction_Date arg) throws SqlWrapperException { 253 visit((XFunction)arg); 254 } 255 256 public void visit(Xfunction_DateTime arg) throws SqlWrapperException { 257 visit((XFunction)arg); 258 } 259 260 public void visit(Xfunction_Integer arg) throws SqlWrapperException { 261 visit((XFunction)arg); 262 } 263 264 public void visit(Xfunction_String arg) throws SqlWrapperException { 265 visit((XFunction)arg); 266 } 267 268 public void visit(AfTrim arg) throws SqlWrapperException { 269 visit((Xfunction_String)arg); 270 } 271 272 public void visit(AfCast arg) throws SqlWrapperException { 273 visit((Expression)arg); 274 } 275 276 public void visit(XfCast arg) throws SqlWrapperException { 277 visit((Expression)arg); 278 } 279 280 public void visit(XfAbs arg) throws SqlWrapperException{ 281 visit((XFunction)arg); 282 } 283 284 public void visit(XfCeiling arg) throws SqlWrapperException { 285 visit((Xfunction_Integer)arg); 286 } 287 288 public void visit(XfConcat arg) throws SqlWrapperException { 289 visit((Xfunction_String)arg); 290 } 291 292 public void visit(XfContains arg) throws SqlWrapperException { 293 visit((Xfunction_Boolean)arg); 294 } 295 296 public void visit(XfCurrentDateTime arg) throws SqlWrapperException { 297 visit((XFunction)arg); 298 } 299 300 public void visit(XfGetCenturyFromDate arg) throws SqlWrapperException { 301 visit((Xfunction_Integer)arg); 302 } 303 304 public void visit(XfGetHourFromTime arg) throws SqlWrapperException { 305 visit((Xfunction_Integer)arg); 306 } 307 308 public void visit(XfGetMinutesFromtime arg) throws SqlWrapperException { 309 visit((Xfunction_Integer)arg); 310 } 311 312 public void visit(XfGetSecondsFromtime arg) throws SqlWrapperException { 313 visit((Xfunction_Integer)arg); 314 } 315 316 public void visit(XfDate arg) throws SqlWrapperException{ 317 visit((XFunction)arg); 318 } 319 320 public void visit(XfDateTime arg) throws SqlWrapperException{ 321 visit((XFunction)arg); 322 } 323 324 public void visit(XfEndsWith arg) throws SqlWrapperException { 325 visit((Xfunction_Boolean)arg); 326 } 327 328 public void visit(XfFloor arg) throws SqlWrapperException { 329 visit((Xfunction_Integer)arg); 330 } 331 332 public void visit(XfLowerCase arg) throws SqlWrapperException { 333 visit((Xfunction_String)arg); 334 } 335 336 public void visit(XfRound arg) throws SqlWrapperException { 337 visit((Xfunction_Integer)arg); 338 } 339 340 public void visit(XfStartsWith arg) throws SqlWrapperException { 341 visit((Xfunction_Boolean)arg); 342 } 343 344 public void visit(XfStringLength arg) throws SqlWrapperException { 345 visit((Xfunction_Integer)arg); 346 } 347 348 public void visit(XfSubString arg) throws SqlWrapperException { 349 visit((Xfunction_String)arg); 350 } 351 352 public void visit(XfTime arg) throws SqlWrapperException{ 353 visit((XFunction)arg); 354 } 355 356 public void visit(XfUpperCase arg) throws SqlWrapperException { 357 visit((Xfunction_String)arg); 358 } 359 360 public Expression getVisitedExpression() { 361 return expr; 362 } 363 } 364 | Popular Tags |