01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2006, GeoTools Project Managment Committee (PMC)
05: * (C) 2005, Refractions Research Inc.
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation;
10: * version 2.1 of the License.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: */
17: package org.geotools.catalog.defaults;
18:
19: /**
20: * Use the visitor pattern to traverse the AST
21: *
22: * @author David Zwiers, Refractions Research
23: *
24: * @since 0.6
25: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/main/src/main/java/org/geotools/catalog/defaults/AST.java $
26: */
27: public interface AST {
28: public static final int AND = 1;
29: public static final int OR = 2;
30: public static final int NOT = 4;
31: public static final int LITERAL = 0;
32:
33: public boolean accept(String datum);
34:
35: public int type();
36:
37: /**
38: * may be null
39: *
40: * @return DOCUMENT ME!
41: */
42: public AST getLeft();
43:
44: /**
45: * may be null
46: *
47: * @return DOCUMENT ME!
48: */
49: public AST getRight();
50: }
|