CQL { public static Filter toFilter(final String cqlPredicate) throws CQLException { Filter filter = CQL.toFilter(cqlPredicate, null); return filter; } private  CQL(); static Filter toFilter(final String cqlPredicate); static Filter toFilter(final String cqlPredicate, final FilterFactory filterFactory); static Expression toExpression(String cqlExpression); static Expression toExpression(final String cqlExpression,
                                          final FilterFactory filterFactory); static List<Filter> toFilterList(final String cqlFilterList); static String toCQL( List<Filter> filterList ); static String toCQL( Filter filter ); static String toCQL( Expression expression ); static List<Filter> toFilterList(final String cqlSequencePredicate, final FilterFactory filterFactory); static final void main(String[] args);  }
@Test public void relateGeoOperation() throws CQLException{ PropertyIsEqualTo filter = (PropertyIsEqualTo) CQL.toFilter( "RELATE(geometry, LINESTRING (-134.921387 58.687767, -135.303391 59.092838), T*****FF*)"); Assert.assertTrue("Relate Pattern Function was expected", filter.getExpression1() instanceof FilterFunction_relatePattern); Assert.assertTrue("Literal TRUE was expected", filter.getExpression2() instanceof Literal); }
@Test public void dwithinGeometry() throws Exception{ Filter resultFilter; resultFilter = CQL.toFilter("DWITHIN(the_geom, POINT(1 2), 10, kilometers)"); Assert.assertTrue(resultFilter instanceof DistanceBufferOperator); }
@Test public void temporalPredicate() throws Exception{ Filter filter = CQL.toFilter("DATE BEFORE 2006-12-31T01:30:00Z"); Assert.assertTrue( filter instanceof PropertyIsLessThan); }