package org.opengis.filter.cql
Common Query Language (CQL)
This package implements the OGC_Common Catalogue Query Language. OGC CQL
is the query language to be supported by all OGC Catalogue Interfaces in order to support search
interoperability.
Catalogue Service Implementation Specification (OGC 04-021r3):
CQL BNF with SQL Extensions
The original BNF was extended thinking in a SQL where expression. The original BNF is reproduced to indicate
the extensions highlighted with bold characters.
Extensions in original BNF
<SequenceOfSearchConditions > ::=
<search condition>
| <SequenceOfSearchConditions> ";" <search condition>
<between predicate> ::=
<attribute name> [ NOT ] BETWEEN <literal> AND < literal >
<routine invocation> ::=
<geoop name><georoutine argument list>
| <relgeoop name><relgeoop argument list>
| <routine name><argument list>
| <BBOX> <bbox argument list>
<geoop name> ::=
EQUAL | DISJOINT | INTERSECT | TOUCH | CROSS |
WITHIN | CONTAINS |OVERLAP | RELATE [1]
<bbox argument list>::=
"(" <attribute> ","<min X> ","<min Y> ","<max X> ","<max Y>["," <crs>] ")"
<min X> ::= <signed numerical literal>
<min Y> ::= <signed numerical literal>
<max X> ::= <signed numerical literal>
<max Y> ::= <signed numerical literal>
<crs> ::= [2]
[1] RELATE is not supported (implementation in GeoTools is required)
[2] If not supplied, the BoundingBox CRS is EPSG:4326.
Implementation Notes
The parser was generated using javacc.
In expr.jjt file you can see the input grammar for javacc required to parse CQL with extensions.
This implementation does not check CRS. The problem can be solved adding tokens (standards
simbols in grammar) or checking in semantic actions consturction (FilterBuilder). The last solution
requires to fix a bug retrieved the correspondent factory for crs (srs).
|