//2. ensure any spatial predicate is made against a property
// that is actually special
AbstractFilterVisitor fvisitor = new AbstractFilterVisitor() {
protected Object visit( BinarySpatialOperator filter, Object data ) {
PropertyName name = null;
if ( filter.getExpression1() instanceof PropertyName ) {
name = (PropertyName) filter.getExpression1();
}
else if ( filter.getExpression2() instanceof PropertyName ) {
name = (PropertyName) filter.getExpression2();
}
if ( name != null ) {
//check against fetaure type to make sure its
// a geometric type
AttributeDescriptor att = (AttributeDescriptor) name.evaluate(featureType);
if ( !( att instanceof GeometryDescriptor ) ) {
throw new WFSException("Property " + name + " is not geometric", "InvalidParameterValue");
}
}