Revision created by MOE tool push_codebase.
[gae.git] / java / src / main / com / google / appengine / api / search / query / QueryTreeVisitor.java
blobb36ae05f910c6b3bb0a40298f26341e6fbbdc7ab
1 // Copyright 2011 Google Inc. All Rights Reserved.
3 package com.google.appengine.api.search.query;
5 import org.antlr.runtime.tree.Tree;
7 /**
8 * Defines an interface of the visitor invoked by the walker.
10 * @param <T> the type of the context object accompanying visited tree nodes.
13 public interface QueryTreeVisitor<T extends QueryTreeContext<T>> {
15 /**
16 * Visits a node that represents a sequence of expressions.
18 void visitSequence(Tree node, T context);
20 /**
21 * Visits a node that represents a conjunction (logical and) of conditions.
23 void visitConjunction(Tree node, T context);
25 /**
26 * Visits a node that represents a disjunction (logical or) of conditions.
28 void visitDisjunction(Tree node, T context);
30 /**
31 * Visits a node that represents a negation of conditions.
33 void visitNegation(Tree node, T context);
35 /**
36 * Visits a node that represents a text field that is subject to query rewrite.
38 void visitFuzzy(Tree node, T context);
40 /**
41 * Visits a node that represents a text field that must not be altered.
43 void visitLiteral(Tree node, T context);
45 /**
46 * Visits a node that represents that a field value must be less than some
47 * specified value.
49 void visitLessThan(Tree node, T context);
51 /**
52 * Visits a node that represents that a field value must be less than or
53 * equal to some specified value.
55 void visitLessOrEqual(Tree node, T context);
57 /**
58 * Visits a node that represents that a field value must be greater than some
59 * specified value.
61 void visitGreaterThan(Tree node, T context);
63 /**
64 * Visits a node that represents an inequality between a field and value.
66 void visitGreaterOrEqual(Tree node, T context);
68 /**
69 * Visits a node that represents that a field value must be greater than
70 * or equal to some specified value.
72 void visitEqual(Tree node, T context);
74 /**
75 * Visits a node that represents that a field must contain a value.
77 void visitContains(Tree node, T context);
79 /**
80 * Visits a node that represents a constant value.
82 void visitValue(Tree node, T context);
84 /**
85 * Visits a node that represents a function computed on some arguments.
87 void visitFunction(Tree node, T context);
89 /**
90 * Visits a node that represents a global field.
92 void visitGlobal(Tree node, T context);
94 /**
95 * Catch-all method for future type of query nodes.
97 void visitOther(Tree node, T context);