01: package org.geotools.demo.xml;
02:
03: import org.geotools.filter.FilterTransformer;
04: import org.geotools.filter.text.cql2.CQL;
05: import org.geotools.gml.producer.GeometryTransformer;
06: import org.opengis.filter.Filter;
07:
08: public class TransformExample {
09:
10: public static void main(String args[]) throws Exception {
11: Filter filter = CQL.toFilter("name = 'fred'");
12: System.out.println(filter);
13:
14: FilterTransformer transform = new FilterTransformer();
15: transform.setIndentation(2);
16:
17: String xml = transform.transform(filter);
18: System.out.println(xml);
19: }
20: }
|