I think I discovered a bug in the wfs implementation of geotools.
I want to get a feature from a wfs server with wfs 2.0 (Web Feature Service 2.0. (ISO 19142)) and fes 2.0 (Filter Encoding Standard (FES) 2.0 (ISO 19143)). But geotools looks in the fes 2.0 conform capabilities (PropertyIsEqualTo) for a ogc filtername (EqualTo). So geotools thinks, the server does not support the requested filter.
The question is, is it already possible to use wfs 2.0 with fes 2.0 in geotools? Or is a special configuration needed, which I forgot?
Here is a code example:
Geotools thinks, this filter is not supported from the wfs server. So geotools just grabs all the features from the Server And than makes the filtering itself. This is the problem, because the Server should to do the filtering itself.
The details of the problematic code:
The created filter from the statement above is org.geotools.filter.IsEqualsToImpl.
The code which desides if the filter is supported or unsupported is in class org.geotools.data.wfs.internal.v2_0.StrictWFS_2_0_Strategy in method createGetFeatureRequestPost.
The splitting between supported filters and unsupported filters is made in class org.geotools.filter.visitor.CapabilitiesFilterSplitter in method visitBinaryOperator.
The comparising happens in class org.geotools.filter.visitor.IsSupportedFilterVisitor:
So for the comparing the code uses the ogc filtername EqualTo and the filternames in the capabilities from fes 2.0 (PropertyIsEqualTo). Obviously the filtername is not found in the capabilities.