public class PropertyIsLike extends Filter
The abstract class of <PropertyIsLike> elements.
Sets the condition that certain property of the result elements conforms to a specified regular expression.
A <PropertyIsLike> element consists of the name of the property field (a <PropertyName> child element) and a regular expression (a <Literal> child element). A <PropertyIsLike> itself has three required properties: wildCard, singleChar, and escapeChar. wildCard represents any string; singleChar represents any single character; escapeChar is used to disable the function of the wildcards, indicating that wildCard, singleChar, and escapeChar represent the string itself.
name, subExpression
Constructor and Description |
---|
PropertyIsLike()
The constructor.
|
PropertyIsLike(Filter exp1, Filter exp2)
Constructs a
PropertyIsLike object by using the name of the property field and a regular expression. |
PropertyIsLike(java.lang.String wildCard, java.lang.String singleChar, java.lang.String escapeChar, PropertyName propertyName, Literal literal)
Constructs a
PropertyIsLike object, using the wildcard, singleChar, escapeChar, as well as the name and the value of the property field. |
Modifier and Type | Method and Description |
---|---|
void |
accept(AbstractFilterVisitor visitor) |
Filter |
copy()
Copies a replication, i.e., generating a new
PropertyIsLike object identical to this object. |
java.lang.String |
getEscapeChar()
Gets the character that disables the wildcard functions.
|
FilterType |
getFilterType()
Gets the Filter element type.
|
Literal |
getliteral()
Gets the regular expression.
|
PropertyName |
getPropertyName()
Gets the name of the property field.
|
java.lang.String |
getSingleChar()
Gets the wildcard which represents any single character.
|
java.lang.String |
getWildCard()
Gets the wildcard which represents any string.
|
getName, getSubExpression, getSubExpressionCount, setSubExpression
public PropertyIsLike(java.lang.String wildCard, java.lang.String singleChar, java.lang.String escapeChar, PropertyName propertyName, Literal literal) throws java.lang.IllegalArgumentException
Constructs a PropertyIsLike
object, using the wildcard, singleChar, escapeChar, as well as the name and the value of the property field.
wildCard
- Represents any string.singleChar
- Represents any single character.escapeChar
- Used to disable the wildcard functions.propertyName
- The name of the property field (a <PropertyName> element).literal
- A regular expression (a <Literal> element).java.lang.IllegalArgumentException
- An illegal argument exception.public PropertyIsLike(Filter exp1, Filter exp2)
Constructs a PropertyIsLike
object by using the name of the property field and a regular expression.
Represents the condition that the property value conforms to the specified regular expression
exp1
- The name of the property field (a <PropertyName> element).exp2
- A regular expression (a <Literal> element).public PropertyIsLike()
The constructor.
public void accept(AbstractFilterVisitor visitor) throws OGCException
accept
in class Filter
OGCException
public FilterType getFilterType()
Filter
Gets the Filter element type.
getFilterType
in class Filter
public java.lang.String getEscapeChar()
Gets the character that disables the wildcard functions.
public Literal getliteral()
Gets the regular expression.
public PropertyName getPropertyName()
Gets the name of the property field.
public java.lang.String getSingleChar()
Gets the wildcard which represents any single character.
public java.lang.String getWildCard()
Gets the wildcard which represents any string.
public Filter copy()
Copies a replication, i.e., generating a new PropertyIsLike
object identical to this object.