01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.filter;
17:
18: import org.opengis.filter.PropertyIsBetween;
19: import org.geotools.feature.Feature;
20:
21: /**
22: * Defines a 'between' filter (which is a specialized compare filter). A
23: * between filter is just shorthand for a less-than-or-equal filter ANDed with
24: * a greater-than-or-equal filter. Arguably, this would be better handled
25: * using those constructs, but the OGC filter specification creates its own
26: * object for this, so we do as well. An important note here is that a
27: * between filter is actually a math filter, so its outer (left and right)
28: * expressions must be math expressions. This is enforced by the
29: * FilterAbstract class, which considers a BETWEEN operator to be a math
30: * filter.
31: *
32: * @author Rob Hranac, TOPP
33: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/filter/BetweenFilter.java $
34: * @version $Id: BetweenFilter.java 22294 2006-10-20 00:55:40Z desruisseaux $
35: *
36: * @deprecated use {@link org.opengis.filter.PropertyIsBetween}
37: */
38: public interface BetweenFilter extends CompareFilter, PropertyIsBetween {
39: /**
40: * Determines whether or not a given feature is 'inside' this filter.
41: *
42: * @param feature Specified feature to examine.
43: *
44: * @return Whether or not this feature is inside the filter.
45: *
46: * @deprecated use {@link org.opengis.filter.Filter#evaluate(Feature)}
47: */
48: boolean contains(Feature feature);
49:
50: /**
51: * @deprecated use {@link PropertyIsBetween#getLowerBoundary()}
52: */
53: org.opengis.filter.expression.Expression getExpression1();
54:
55: /**
56: * @deprecated use {@link PropertyIsBetween#getUpperBoundary()()}
57: */
58: org.opengis.filter.expression.Expression getExpression2();
59:
60: /**
61: * @deprecated use {@link PropertyIsBetween#setLowerBoundary(Expression)()}
62: */
63: void setExpression1(
64: org.opengis.filter.expression.Expression expression);
65:
66: /**
67: * @deprecated use {@link PropertyIsBetween#setUpperBoundary(Expression)()}
68: */
69: void setExpression2(
70: org.opengis.filter.expression.Expression expression);
71:
72: /**
73: * Gets the middle value of the between. Should generally be an
74: * AttributeExpression: 1 <= area <= 200 makes sense,
75: * 1 <= 200 <= area should just use a less-than-or-equal filter.
76: *
77: * @return the expression in the middle.
78: *
79: * @deprecated use {@link PropertyIsBetween#getExpression()}
80: */
81: Expression getMiddleValue();
82:
83: /**
84: * Sets the values to be compared as between the left and right values.
85: *
86: * @param middleValue The expression to be compared.
87: * @task REVISIT: rename to setMiddleValue? You can't have more than 1.
88: *
89: * @deprecated use {@link PropertyIsBetween#setExpression(Expression)}
90: */
91: void addMiddleValue(Expression middleValue);
92: }
|