source: FCSSimpleEndpoint/trunk/src/main/java/eu/clarin/sru/server/fcs/parser/QueryVisitor.java @ 7159

Last change on this file since 7159 was 7159, checked in by Oliver Schonefeld, 6 years ago
  • fix Visitor to correctly traverse query parse tree
  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1/**
2 * This software is copyright (c) 2013-2016 by
3 *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
4 * This is free software. You can redistribute it
5 * and/or modify it under the terms described in
6 * the GNU General Public License v3 of which you
7 * should have received a copy. Otherwise you can download
8 * it from
9 *
10 *   http://www.gnu.org/licenses/gpl-3.0.txt
11 *
12 * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
13 *
14 * @license http://www.gnu.org/licenses/gpl-3.0.txt
15 *  GNU General Public License v3
16 */
17package eu.clarin.sru.server.fcs.parser;
18
19
20/**
21 * Interface implementing a Visitor pattern for FCS-QL expression trees.
22 */
23public interface QueryVisitor {
24    /**
25     * Visit a <em>segment</em> query node.
26     *
27     * @param node
28     *            the node to visit
29     */
30    public void visit(QuerySegment node);
31
32
33    /**
34     * Visit a <em>group</em> query node.
35     *
36     * @param node
37     *            the node to visit
38     */
39    public void visit(QueryGroup node);
40
41
42    /**
43     * Visit a <em>sequence</em> query node.
44     *
45     * @param node
46     *            the node to visit
47     */
48    public void visit(QuerySequence node);
49
50
51    /**
52     * Visit a <em>or</em> query node.
53     *
54     * @param node
55     *            the node to visit
56     */
57    public void visit(QueryDisjunction node);
58
59
60    /**
61     * Visit a <em>query</em> with within node.
62     *
63     * @param node
64     *            the node to visit
65     */
66    public void visit(QueryWithWithin node);
67
68
69    /**
70     * Visit a <em>simple</em> expression node.
71     *
72     * @param node
73     *            the node to visit
74     */
75    public void visit(Expression node);
76
77
78    /**
79     * Visit a <em>wildcard</em> expression node.
80     *
81     * @param node
82     *            the node to visit
83     */
84    public void visit(ExpressionWildcard node);
85
86
87    /**
88     * Visit a <em>group</em> expression node.
89     *
90     * @param node
91     *            the node to visit
92     */
93    public void visit(ExpressionGroup node);
94
95
96    /**
97     * Visit a <em>or</em> expression node.
98     *
99     * @param node
100     *            the node to visit
101     */
102    public void visit(ExpressionOr node);
103
104
105    /**
106     * Visit a <em>and</em> expression node.
107     *
108     * @param node
109     *            the node to visit
110     */
111    public void visit(ExpressionAnd node);
112
113
114    /**
115     * Visit a <em>not</em> expression node.
116     *
117     * @param node
118     *            the node to visit
119     */
120    public void visit(ExpressionNot node);
121
122
123    /**
124     * Visit a <em>simple within</em> node.
125     *
126     * @param node
127     *            the node to visit
128     */
129    public void visit(SimpleWithin node);
130
131} // interface QueryVisitor
Note: See TracBrowser for help on using the repository browser.