ECQL { public static Filter toFilter(final String ecqlPredicate) throws CQLException { Filter filter = ECQL.toFilter(ecqlPredicate, null); return filter; } private  ECQL(); static Filter toFilter(final String ecqlPredicate); static Filter toFilter(final String ecqlPredicate, final FilterFactory filterFactory); static Expression toExpression(String ecqlExpression); static Expression toExpression(final String ecqlExpression,
            final FilterFactory filterFactory); static List<Filter> toFilterList(final String ecqlSequencePredicate); static List<Filter> toFilterList(final String ecqlSequencePredicate, FilterFactory filterFactory); static String toCQL( List<Filter> filterList ); static String toCQL( Filter filter ); static String toCQL( Expression expression ); static final void main(String[] args);  }
@Test public void temporalPredicate() throws Exception{ Filter filter = ECQL.toFilter("ATTR1 BEFORE 2006-12-31T01:30:00Z"); Assert.assertTrue( filter instanceof Before); assertFilter("ATTR1 BEFORE 2006-12-31T01:30:00+00:00",Before.class); }
@Test public void testQuotedComparison() throws Exception { Filter filter = ECQL.toFilter("\"a\"=\"b\""); final FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(); final Filter expected = ff.equal(ff.property("a"), ff.property("b"), false); assertEquals(expected, filter); }
@Test public void temporalPredicate() throws Exception{ Filter filter = ECQL.toFilter("ATTR1 BEFORE 2006-12-31T01:30:00Z"); Assert.assertTrue( filter instanceof PropertyIsLessThan); }