|
The following snippet of code produce an XML with missing parts (propertyIsLike without the nested exceptions in the first case, a completely empty filter in the second case)
FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(); PropertyIsLike filter1 = ff.like(ff.property("name"), "%piet%"); Filter filter2 = ff.after(ff.property("date"), ff.literal(new Date())); org.geotools.filter.v2_0.FESConfiguration configuration = new org.geotools.filter.v2_0.FESConfiguration();
org.geotools.xml.Encoder encoder = new org.geotools.xml.Encoder(configuration); encoder.encode(filter1, org.geotools.filter.v2_0.FES.Filter, os);
org.geotools.xml.Encoder encoder = new org.geotools.xml.Encoder(configuration); encoder.encode(filter1, org.geotools.filter.v2_0.FES.Filter, os);
|