|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.filter.FilterAbstract
org.geotools.filter.AbstractFilter
org.geotools.filter.AbstractFilterImpl
org.geotools.filter.LikeFilterImpl
public class 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 class org.geotools.filter.FilterAbstract |
---|
factory |
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 |
Fields inherited from interface org.opengis.filter.PropertyIsLike |
---|
NAME |
Fields inherited from interface org.opengis.filter.Filter |
---|
EXCLUDE, INCLUDE |
Constructor Summary | |
---|---|
protected |
LikeFilterImpl()
Constructor which flags the operator as like. |
|
LikeFilterImpl(org.opengis.filter.expression.Expression expr,
java.lang.String pattern,
java.lang.String wildcardMulti,
java.lang.String wildcardSingle,
java.lang.String escape)
|
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,
boolean matchCase,
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(java.lang.Object 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. |
boolean |
isMatchingCase()
|
void |
setEscape(java.lang.String escape)
|
void |
setExpression(org.opengis.filter.expression.Expression e)
|
void |
setLiteral(java.lang.String literal)
Sets the pattern. |
void |
setMatchCase(boolean matchingCase)
|
void |
setMatchingCase(boolean matchingCase)
|
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)
PropertyIsLike#setSingleChar(String)
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)
PropertyIsLike#setSingleChar(String)
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, getFilterType, isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter |
Methods inherited from class org.geotools.filter.FilterAbstract |
---|
accepts, eval, eval, eval, evaluate |
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, evaluate, getFilterType, not, or |
Constructor Detail |
---|
protected LikeFilterImpl()
public LikeFilterImpl(org.opengis.filter.expression.Expression expr, java.lang.String pattern, java.lang.String wildcardMulti, java.lang.String wildcardSingle, java.lang.String escape)
Method Detail |
---|
public static java.lang.String convertToSQL92(char escape, char multi, char single, boolean matchCase, 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)
public void setSingleChar(java.lang.String singleChar)
public void setEscape(java.lang.String escape)
public void setMatchCase(boolean matchingCase)
public boolean isMatchingCase()
isMatchingCase
in interface org.opengis.filter.PropertyIsLike
public void setMatchingCase(boolean matchingCase)
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)
public final void setPattern(Expression p, java.lang.String wildcardMulti, java.lang.String wildcardSingle, java.lang.String escape)
PropertyIsLike#setExpression(Expression)
PropertyIsLike#setWildCard(String)
PropertyIsLike#setSingleChar(String)
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)
PropertyIsLike#setSingleChar(String)
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)
public boolean evaluate(java.lang.Object feature)
evaluate
in interface org.opengis.filter.Filter
feature
- Specified feature to examine.
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getEscape()
getEscape
in interface LikeFilter
getEscape
in interface org.opengis.filter.PropertyIsLike
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)
equals
in class java.lang.Object
obj
- - the object to compare this LikeFilter against.
public int hashCode()
hashCode
in class java.lang.Object
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 |