|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.filter.AbstractFilter
org.geotools.filter.AbstractFilterImpl
org.geotools.filter.LikeFilterImpl
Defines a like filter, which checks to see if an attribute matches a REGEXP.
Field Summary |
Fields inherited from class org.geotools.filter.AbstractFilter |
filterType, LOGGER, permissiveConstruction |
Fields inherited from interface org.geotools.filter.Filter |
ALL, NONE |
Fields inherited from interface org.geotools.filter.FilterType |
BETWEEN, COMPARE_EQUALS, COMPARE_GREATER_THAN, COMPARE_GREATER_THAN_EQUAL, COMPARE_LESS_THAN, COMPARE_LESS_THAN_EQUAL, COMPARE_NOT_EQUALS, FID, GEOMETRY_BBOX, GEOMETRY_BEYOND, GEOMETRY_CONTAINS, GEOMETRY_CROSSES, GEOMETRY_DISJOINT, GEOMETRY_DWITHIN, GEOMETRY_EQUALS, GEOMETRY_INTERSECTS, GEOMETRY_OVERLAPS, GEOMETRY_TOUCHES, GEOMETRY_WITHIN, LIKE, LOGIC_AND, LOGIC_NOT, LOGIC_OR, NULL |
Constructor Summary | |
protected |
LikeFilterImpl()
Constructor which flags the operator as like. |
Method Summary | |
void |
accept(FilterVisitor visitor)
Used by FilterVisitors to perform some action on this filter instance. |
boolean |
contains(Feature feature)
Determines whether or not a given feature matches this pattern. |
static java.lang.String |
convertToSQL92(char escape,
char multi,
char single,
java.lang.String pattern)
Given OGC PropertyIsLike Filter information, construct an SQL-compatible 'like' pattern. |
boolean |
equals(java.lang.Object obj)
Compares this filter to the specified object. |
java.lang.String |
getEscape()
Getter for property escape. |
java.lang.String |
getPattern()
Accessor method to retrieve the pattern. |
java.lang.String |
getSQL92LikePattern()
see convertToSQL92 |
Expression |
getValue()
Gets the Value (left hand side) of this filter. |
java.lang.String |
getWildcardMulti()
Getter for property wildcardMulti. |
java.lang.String |
getWildcardSingle()
Getter for property wildcardSingle. |
int |
hashCode()
Override of hashCode method. |
void |
setPattern(Expression p,
java.lang.String wildcardMulti,
java.lang.String wildcardSingle,
java.lang.String escape)
Sets the match pattern for this FilterLike. |
void |
setPattern(java.lang.String pattern,
java.lang.String wildcardMulti,
java.lang.String wildcardSingle,
java.lang.String escape)
Sets the match pattern for this FilterLike. |
void |
setValue(Expression attribute)
Sets the expression to be evalutated as being like the pattern |
java.lang.String |
toString()
Return this filter as a string. |
Methods inherited from class org.geotools.filter.AbstractFilterImpl |
and, not, or |
Methods inherited from class org.geotools.filter.AbstractFilter |
getFilterType, isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.geotools.filter.Filter |
and, getFilterType, not, or |
Constructor Detail |
protected LikeFilterImpl()
Method Detail |
public static java.lang.String convertToSQL92(char escape, char multi, char single, java.lang.String pattern) throws java.lang.IllegalArgumentException
escape
- multi
- single
- pattern
-
java.lang.IllegalArgumentException
public java.lang.String getSQL92LikePattern() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void setValue(Expression attribute) throws IllegalFilterException
setValue
in interface LikeFilter
attribute
- The value of the attribute for comparison.
IllegalFilterException
- Filter is illegal.public Expression getValue()
getValue
in interface LikeFilter
public void setPattern(Expression p, java.lang.String wildcardMulti, java.lang.String wildcardSingle, java.lang.String escape)
setPattern
in interface LikeFilter
p
- the expression which evaluates to the match pattern for this
filterwildcardMulti
- the string that represents a mulitple character
(1->n) wildcardwildcardSingle
- the string that represents a single character (1)
wildcardescape
- the string that represents an escape characterpublic void setPattern(java.lang.String pattern, java.lang.String wildcardMulti, java.lang.String wildcardSingle, java.lang.String escape)
setPattern
in interface LikeFilter
pattern
- the string which contains the match pattern for this
filterwildcardMulti
- the string that represents a mulitple character
(1->n) wildcardwildcardSingle
- the string that represents a single character (1)
wildcardescape
- the string that represents an escape characterpublic java.lang.String getPattern()
getPattern
in interface LikeFilter
public boolean contains(Feature feature)
contains
in interface LikeFilter
contains
in class AbstractFilter
feature
- Specified feature to examine.
public java.lang.String toString()
public java.lang.String getEscape()
getEscape
in interface LikeFilter
public java.lang.String getWildcardMulti()
getWildcardMulti
in interface LikeFilter
public java.lang.String getWildcardSingle()
getWildcardSingle
in interface LikeFilter
public boolean equals(java.lang.Object obj)
obj
- - the object to compare this LikeFilter against.
public int hashCode()
public void accept(FilterVisitor visitor)
accept
in interface Filter
accept
in class AbstractFilter
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 |