|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Filter
public interface Filter
Defines an OpenGIS Filter object, with default behaviors for all methods.
Field Summary | |
---|---|
static Filter |
ALL
Deprecated. |
static Filter |
NONE
Deprecated. |
Fields inherited from interface Filter |
---|
EXCLUDE, INCLUDE |
Method Summary | |
---|---|
void |
accept(FilterVisitor visitor)
Deprecated. use Filter.accept(FilterVisitor, Object) . |
Filter |
and(Filter filter)
Deprecated. Implements a logical AND with this filter and returns the merged filter. |
boolean |
contains(SimpleFeature feature)
Deprecated. use #evaluate(Feature) |
boolean |
evaluate(SimpleFeature feature)
Deprecated. Evaluates the filter against an instance of Feature . |
short |
getFilterType()
Deprecated. The enumeration base type system is replaced with a class based type system. An 'instanceof' check should be made instead of calling this method. |
Filter |
not()
Deprecated. Implements a logical NOT with this filter and returns the negated filter |
Filter |
or(Filter filter)
Deprecated. Implements a logical OR with this filter and returns the merged filter. |
Methods inherited from interface Filter |
---|
accept, evaluate |
Field Detail |
---|
static final Filter ALL
static final Filter NONE
Method Detail |
---|
boolean evaluate(SimpleFeature feature)
Feature
.
feature
- The feature being tested.
boolean contains(SimpleFeature feature)
#evaluate(Feature)
This is the core function of any filter. 'Contains' isn't a very good term for this method because it implies some sort of spatial relationship between the feature and the filter that may or may not exist. We name this method 'contains' only because the usage of 'contains' in this context is common and better terms are lacking. However, users of this method should keep in mind the non-spatial nature of this meaning of 'contains.' For example, a feature may be 'contained by' a filter if one of the feature's non-spatial property values is equal to that of the filter's.
Although some filters can be checked for validity when they are
constructed, it is impossible to impose this check on all expressions
because of a special feature of the ExpressionAttribute
class. This class must hold the pointer (in XPath) to an attribute,
but it is not passed the actual attribute (inside a feature) until it
calls the isInside
class.
To avoid a run-time Exception, this class is typed (ie. Double, Integer,
String) when it is created. If the attribute found inside the feature
is found not to conform with its stated type, then a
MalformedExpressionException
is thrown when
contains
is called. Since ExpressionAttribute
classes may be nested inside any filter, all filters must throw this
exception. It is left to callers of this method to deal with it
gracefully.
feature
- Specified feature to examine.
Filter and(Filter filter)
filter
- The filter to AND with this filter.
Filter or(Filter filter)
filter
- The filter to OR with this filter.
Filter not()
short getFilterType()
void accept(FilterVisitor visitor)
Filter.accept(FilterVisitor, Object)
.
visitor
- The visitor which requires access to this filter, the
method must call visitor.visit(this);
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |