Package org.geotools.filter.text.ecql

Extended Common Query Language (ECQL)

This package implements the ECQL query language that extend the OGC Common Catalogue Query Language (CQL) capabilities.

ECQL Usage

Below are presented some usage samples. You can find more samples and the BNF with the ECQL syntax in the user guide of Geotools.

Filter filter = ECQL.toFilter("POP_RANK > 6");

Filter filter = ECQL.toFilter("POP_RANK > 3 AND POP_RANK < 6");

Filter filter = ECQL.toFilter("area(the_geom) > 3000");

Filter filter = ECQL.toFilter("Name LIKE '%omer%'");

Filter filter = ECQL.toFilter("DISJOINT(buffer(the_geom, 10) , POINT(1 2))");

Filter filter = ECQL.toFilter("IN ('river.1', 'river.2')");

Filter filter = ECQL.toFilter("LENGHT IN (4100001,4100002, 4100003 )");

List <Filter> list = ECQL.toFilterList("LENGHT = 100; NAME like '%omer%'");

Expression expression = ECQL.toExpression("LENGHT + 100");

Implementation and Design Notes

The ECQL class is the interface of this module. It provides access to all functionalities of the ECQL parser.

The parser was generated using javacc. In ECQLGrammar.jjt file you can see the input grammar for javacc that is required to parse the ECQL syntax rules. The generated class are allocated in the org.geotools.filter.text.generated.parsers package, these classes are not part of the module interface, then the client module shouldn't use them.

The org.geotools.filter.text.commons package encapsulate classes intended as commons utilities used in the ECQL and CQL parsing process. They are not utilities for client modules, they are part of the cql module implementation, so client module shouldn't use them.

  • Class Summary 
    Class Description
    Extended Contextual Query Language (ECQL) is an extension of CQL.