* org.geotools.xml.schema.ElementValue[],
* org.xml.sax.Attributes, java.util.Map)
*/
public Object getValue(Element element, ElementValue[] value,
Attributes attrs, Map hints) throws SAXException{
FilterFactory2 factory = FilterSchema.filterFactory( hints );
// <xsd:extension base="ogc:ComparisonOpsType">
// <xsd:sequence>
// <xsd:element ref="ogc:PropertyName"/>
// <xsd:element ref="ogc:Literal"/>
// </xsd:sequence>
// <xsd:attribute name="wildCard" type="xsd:string" use="required"/>
// <xsd:attribute name="singleChar" type="xsd:string" use="required"/>
// <xsd:attribute name="escape" type="xsd:string" use="required"/>
// </xsd:extension>
try {
Expression expr = (Expression) value[0].getValue();
String wildCard = attrs.getValue( "wildCard" );
String singleChar = attrs.getValue( "singleChar" );
String escape = attrs.getValue( "escape" );
Literal pattern = (Literal) value[1].getValue();
return factory.like(expr, (String) pattern.getValue(), wildCard, singleChar, escape);
}
catch( ClassCastException expressionRequired ){
throw new SAXException("Illegal filter for "+element, expressionRequired );
}
catch (IllegalFilterException e) {