|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFilterAbstract
AbstractFilter
AbstractFilterImpl
LikeFilterImpl
public class LikeFilterImpl
Defines a like filter, which checks to see if an attribute matches a REGEXP.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface MultiValuedFilter |
|---|
MultiValuedFilter.MatchAction |
| Field Summary | |
|---|---|
protected MultiValuedFilter.MatchAction |
matchAction
Used to indicate action with multiple values |
| Fields inherited from class AbstractFilter |
|---|
filterType, LOGGER, permissiveConstruction |
| Fields inherited from class FilterAbstract |
|---|
factory |
| Fields inherited from interface Filter |
|---|
ALL, NONE |
| Fields inherited from interface PropertyIsLike |
|---|
NAME |
| Fields inherited from interface Filter |
|---|
EXCLUDE, INCLUDE |
| Constructor Summary | |
|---|---|
protected |
LikeFilterImpl()
Constructor which flags the operator as like. |
|
LikeFilterImpl(Expression expr,
String pattern,
String wildcardMulti,
String wildcardSingle,
String escape)
|
|
LikeFilterImpl(Expression expr,
String pattern,
String wildcardMulti,
String wildcardSingle,
String escape,
MultiValuedFilter.MatchAction matchAction)
|
protected |
LikeFilterImpl(MultiValuedFilter.MatchAction matchAction)
|
| Method Summary | |
|---|---|
Object |
accept(FilterVisitor visitor,
Object extraData)
Used by FilterVisitors to perform some action on this filter instance. |
static String |
convertToSQL92(char escape,
char multi,
char single,
boolean matchCase,
String pattern)
Given OGC PropertyIsLike Filter information, construct an SQL-compatible 'like' pattern. |
boolean |
equals(Object obj)
Compares this filter to the specified object. |
boolean |
evaluate(Object feature)
Determines whether or not a given feature matches this pattern. |
String |
getEscape()
Getter for property escape. |
Expression |
getExpression()
Gets the expression for hte filter. |
String |
getLiteral()
Returns the pattern. |
MultiValuedFilter.MatchAction |
getMatchAction()
Flag Controlling MatchAction property When one or more of the operands evaluates to multiple values rather than a single value, which action should be taken? |
String |
getPattern()
Deprecated. use getLiteral() |
String |
getSingleChar()
THis method calls getWildcardSingle()() for subclass backwards
compatability. |
String |
getSQL92LikePattern()
see convertToSQL92 |
Expression |
getValue()
Deprecated. use getExpression(). |
String |
getWildCard()
THis method calls getWildcardMulti() for subclass backwards
compatability. |
String |
getWildcardMulti()
Deprecated. use getWildCard(). |
String |
getWildcardSingle()
Deprecated. use getSingleChar() |
int |
hashCode()
Override of hashCode method. |
boolean |
isMatchingCase()
Flag controlling wither comparisons are case sensitive. |
void |
setEscape(String escape)
|
void |
setExpression(Expression e)
|
void |
setLiteral(String literal)
Sets the pattern. |
void |
setMatchCase(boolean matchingCase)
|
void |
setMatchingCase(boolean matchingCase)
|
void |
setPattern(Expression p,
String wildcardMulti,
String wildcardSingle,
String escape)
Deprecated. use one of PropertyIsLike#setExpression(Expression)
PropertyIsLike#setWildCard(String)
PropertyIsLike#setSingleChar(String)
PropertyIsLike#setEscape(String) |
void |
setPattern(String pattern,
String wildcardMulti,
String wildcardSingle,
String escape)
Deprecated. use one of PropertyIsLike#setLiteral(String)
PropertyIsLike#setWildCard(String)
PropertyIsLike#setSingleChar(String)
PropertyIsLike#setEscape(String) |
void |
setSingleChar(String singleChar)
|
void |
setValue(Expression attribute)
Sets the expression to be evalutated as being like the pattern |
void |
setWildCard(String wildCard)
|
String |
toString()
Return this filter as a string. |
| Methods inherited from class AbstractFilterImpl |
|---|
and, not, or |
| Methods inherited from class AbstractFilter |
|---|
accept, contains, getFilterType, isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter |
| Methods inherited from class FilterAbstract |
|---|
accepts, eval, eval, eval, evaluate |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface LikeFilter |
|---|
contains |
| Methods inherited from interface Filter |
|---|
accept, and, evaluate, getFilterType, not, or |
| Field Detail |
|---|
protected MultiValuedFilter.MatchAction matchAction
| Constructor Detail |
|---|
protected LikeFilterImpl()
public LikeFilterImpl(Expression expr,
String pattern,
String wildcardMulti,
String wildcardSingle,
String escape)
protected LikeFilterImpl(MultiValuedFilter.MatchAction matchAction)
public LikeFilterImpl(Expression expr,
String pattern,
String wildcardMulti,
String wildcardSingle,
String escape,
MultiValuedFilter.MatchAction matchAction)
| Method Detail |
|---|
public static String convertToSQL92(char escape,
char multi,
char single,
boolean matchCase,
String pattern)
throws IllegalArgumentException
escape - multi - single - pattern -
IllegalArgumentException
public String getSQL92LikePattern()
throws IllegalArgumentException
IllegalArgumentExceptionpublic void setWildCard(String wildCard)
public void setSingleChar(String singleChar)
public void setEscape(String escape)
public void setMatchCase(boolean matchingCase)
public boolean isMatchingCase()
PropertyIsLikeThe ability to match case is pending the Filter 2.0 specification.
isMatchingCase in interface PropertyIsLiketrue if the comparison is case sensetive, otherwise false.public MultiValuedFilter.MatchAction getMatchAction()
MultiValuedFilter
getMatchAction in interface MultiValuedFilterpublic void setMatchingCase(boolean matchingCase)
public final void setValue(Expression attribute)
throws IllegalFilterException
setValue in interface LikeFilterattribute - The value of the attribute for comparison.
IllegalFilterException - Filter is illegal.public final Expression getValue()
getExpression().
getValue in interface LikeFilterpublic Expression getExpression()
This method calls th deprecated getValue() for backwards
compatability with subclasses.
getExpression in interface PropertyIsLikepublic void setExpression(Expression e)
public final void setPattern(Expression p,
String wildcardMulti,
String wildcardSingle,
String escape)
PropertyIsLike#setExpression(Expression)
PropertyIsLike#setWildCard(String)
PropertyIsLike#setSingleChar(String)
PropertyIsLike#setEscape(String)
setPattern in interface LikeFilterp - 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 character
public final void setPattern(String pattern,
String wildcardMulti,
String wildcardSingle,
String escape)
PropertyIsLike#setLiteral(String)
PropertyIsLike#setWildCard(String)
PropertyIsLike#setSingleChar(String)
PropertyIsLike#setEscape(String)
setPattern in interface LikeFilterpattern - 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 String getPattern()
getLiteral()
getPattern in interface LikeFilterpublic String getLiteral()
getLiteral in interface PropertyIsLikepublic void setLiteral(String literal)
public boolean evaluate(Object feature)
evaluate in interface Filterfeature - Specified feature to examine.
public String toString()
toString in class Objectpublic String getEscape()
getEscape in interface LikeFiltergetEscape in interface PropertyIsLikepublic final String getWildcardMulti()
getWildCard().
getWildcardMulti in interface LikeFilterpublic String getWildCard()
THis method calls getWildcardMulti() for subclass backwards
compatability.
getWildCard in interface PropertyIsLikePropertyIsLike.getWildCard().public final String getWildcardSingle()
getSingleChar()
getWildcardSingle in interface LikeFilterpublic String getSingleChar()
THis method calls getWildcardSingle()() for subclass backwards
compatability.
getSingleChar in interface PropertyIsLikePropertyIsLike.getSingleChar()().public boolean equals(Object obj)
equals in class Objectobj - - the object to compare this LikeFilter against.
public int hashCode()
hashCode in class Object
public Object accept(FilterVisitor visitor,
Object extraData)
accept in interface Filteraccept in class FilterAbstractvisitor - 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 | |||||||||