Hi,

I am using geotools 10.4 en I am trying to encode a FES filter to XML. (I never had any problems with v1.1 OGC Filters). For example: encoding a PropertyIsLike filter results in (ValueReference and Literal are missong): <fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0"; xmlns:gml="http://www.opengis.net/gml/3.2";>
   <fes:PropertyIsLike escapeChar="\" singleChar="?" wildCard="*"/>
</fes:Filter>

 [created using :
FilterFactory ff = CommonFactoryFinder.getFilterFactory2();
PropertyIsLikef = ff.like(ff.property("name"), "%piet%");
Configuration configuration = new org.geotools.filter.v2_0.FESConfiguration();
Encoder encoder = new org.geotools.xml.Encoder(configuration);
encoder.encode(filter, org.geotools.filter.v2_0.FES.Filter, os);
etc:]

Creating an AFTER filter (from an XML input) just results in:
<fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0"; xmlns:gml="http://www.opengis.net/gml/3.2"/>

However, surrounding this AFTER with <fes:And> gives the expected result:
<fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0"; xmlns:gml="http://www.opengis.net/gml/3.2";>
   <fes:And>
      <fes:After>
         <fes:ValueReference>date</fes:ValueReference>
         <fes:Literal>1970-01-01T00:00:00Z</fes:Literal>
      </fes:After>
   </fes:And>
</fes:Filter>

Any help would be appreciated!

Regards,
Rob van Swol
--
Signature





******************************************************************************************************************

The NLR disclaimer is valid for NLR e-mail messages.

This message is only meant for providing information. Nothing in this e-mail 
message amounts to a contractual
or legal commitment on the part of the sender.
This message may contain information that is not intended for you. If you are 
not the addressee or if this
message was sent to you by mistake, you are requested to inform the sender and 
delete the message.
Sender accepts no liability for damage of any kind resulting from the risks 
inherent in the electronic
transmission of messages.

******************************************************************************************************************
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to