|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.filter.FilterAbstract org.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 | |
java.lang.Object |
accept(org.opengis.filter.FilterVisitor visitor,
java.lang.Object extraData)
Used by FilterVisitors to perform some action on this filter instance. |
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. |
boolean |
evaluate(Feature feature)
Determines whether or not a given feature matches this pattern. |
java.lang.String |
getEscape()
Getter for property escape. |
org.opengis.filter.expression.Expression |
getExpression()
Gets the expression for hte filter. |
java.lang.String |
getLiteral()
Returns the pattern. |
java.lang.String |
getPattern()
Deprecated. use getLiteral() |
java.lang.String |
getSingleChar()
THis method calls getWildcardSingle()() for subclass backwards
compatability.
|
java.lang.String |
getSQL92LikePattern()
see convertToSQL92 |
Expression |
getValue()
Deprecated. use getExpression() . |
java.lang.String |
getWildCard()
THis method calls getWildcardMulti() for subclass backwards
compatability.
|
java.lang.String |
getWildcardMulti()
Deprecated. use getWildCard() . |
java.lang.String |
getWildcardSingle()
Deprecated. use getSingleChar() |
int |
hashCode()
Override of hashCode method. |
void |
setEscape(java.lang.String escape)
|
void |
setExpression(org.opengis.filter.expression.Expression e)
|
void |
setLiteral(java.lang.String literal)
Sets the pattern. |
void |
setPattern(Expression p,
java.lang.String wildcardMulti,
java.lang.String wildcardSingle,
java.lang.String escape)
Deprecated. use one of PropertyIsLike.setExpression(Expression)
PropertyIsLike#setWildCard(String)
{@link PropertyIsLike#setSingleChar(String)}
{@link PropertyIsLike#setEscape(String)} |
void |
setPattern(java.lang.String pattern,
java.lang.String wildcardMulti,
java.lang.String wildcardSingle,
java.lang.String escape)
Deprecated. use one of PropertyIsLike.setLiteral(String)
PropertyIsLike#setWildCard(String)
{@link PropertyIsLike#setSingleChar(String)}
{@link PropertyIsLike#setEscape(String)} |
void |
setSingleChar(java.lang.String singleChar)
|
void |
setValue(Expression attribute)
Sets the expression to be evalutated as being like the pattern |
void |
setWildCard(java.lang.String wildCard)
|
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 |
accept, contains, evaluate, getFilterType, isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter |
Methods inherited from class org.geotools.filter.FilterAbstract |
accepts, comparable, eval, eval |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.geotools.filter.LikeFilter |
contains |
Methods inherited from interface org.geotools.filter.Filter |
accept, and, getFilterType, not, or |
Methods inherited from interface org.opengis.filter.Filter |
evaluate |
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 setWildCard(java.lang.String wildCard)
setWildCard
in interface org.opengis.filter.PropertyIsLike
public void setSingleChar(java.lang.String singleChar)
setSingleChar
in interface org.opengis.filter.PropertyIsLike
public void setEscape(java.lang.String escape)
setEscape
in interface org.opengis.filter.PropertyIsLike
public final void setValue(Expression attribute) throws IllegalFilterException
setValue
in interface LikeFilter
attribute
- The value of the attribute for comparison.
IllegalFilterException
- Filter is illegal.public final Expression getValue()
getExpression()
.
getValue
in interface LikeFilter
public org.opengis.filter.expression.Expression getExpression()
This method calls th deprecated getValue()
for backwards
compatability with subclasses.
getExpression
in interface org.opengis.filter.PropertyIsLike
public void setExpression(org.opengis.filter.expression.Expression e)
setExpression
in interface org.opengis.filter.PropertyIsLike
public final void setPattern(Expression p, java.lang.String wildcardMulti, java.lang.String wildcardSingle, java.lang.String escape)
PropertyIsLike.setExpression(Expression)
PropertyIsLike#setWildCard(String)
{@link PropertyIsLike#setSingleChar(String)}
{@link PropertyIsLike#setEscape(String)}
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 final void setPattern(java.lang.String pattern, java.lang.String wildcardMulti, java.lang.String wildcardSingle, java.lang.String escape)
PropertyIsLike.setLiteral(String)
PropertyIsLike#setWildCard(String)
{@link PropertyIsLike#setSingleChar(String)}
{@link PropertyIsLike#setEscape(String)}
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 final java.lang.String getPattern()
getLiteral()
getPattern
in interface LikeFilter
public java.lang.String getLiteral()
getLiteral
in interface org.opengis.filter.PropertyIsLike
public void setLiteral(java.lang.String literal)
setLiteral
in interface org.opengis.filter.PropertyIsLike
public boolean evaluate(Feature feature)
evaluate
in interface Filter
evaluate
in class FilterAbstract
feature
- Specified feature to examine.
public java.lang.String toString()
public java.lang.String getEscape()
getEscape
in interface LikeFilter
public final java.lang.String getWildcardMulti()
getWildCard()
.
getWildcardMulti
in interface LikeFilter
public java.lang.String getWildCard()
THis method calls getWildcardMulti()
for subclass backwards
compatability.
getWildCard
in interface org.opengis.filter.PropertyIsLike
PropertyIsLike.getWildCard().
public final java.lang.String getWildcardSingle()
getSingleChar()
getWildcardSingle
in interface LikeFilter
public java.lang.String getSingleChar()
THis method calls getWildcardSingle()()
for subclass backwards
compatability.
getSingleChar
in interface org.opengis.filter.PropertyIsLike
PropertyIsLike.getSingleChar()().
public boolean equals(java.lang.Object obj)
obj
- - the object to compare this LikeFilter against.
public int hashCode()
public java.lang.Object accept(org.opengis.filter.FilterVisitor visitor, java.lang.Object extraData)
accept
in interface org.opengis.filter.Filter
accept
in class FilterAbstract
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 |