All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.geolatte.common.cql.package.html Maven / Gradle / Ivy

Go to download

This GeoLatte-common library contains the transformer framework and other common classes used by other GeoLatte modules.

There is a newer version: 0.8
Show newest version









This package contains the implementation of a CQL parser and a number of utility classes. CQL - Common Query Language - is described in the OGC OpenGIS Catalogue Services Specification.

Our implementation does implement the described CQL syntax completely and may deviate in some places. This is mainly because the standard does not seems to be 100% finished and contains a few strange decisions.

CQL Examples

General Comparisons

        A > 1
        B >= 2
        C < 3
        D <= 4
        E = 5
        F <> 6
    

Date Comparisons

(dateformat = yyyy-mm-ddThh:mm:ss)
        DateAttr BEFORE 2010-05-05T12:56:35
        DateAttr AFTER 2010-11-05T12:56:35
    

Text Comparisons

The % sign can be used as a wildcard.
        A LIKE 'geo%tte'
        B NOT LIKE 'something%thing'
    

Existence operations

Check whether a property is present to enable so-called loose queries.
        A EXISTS
        B DOES-NOT-EXIST
    

Boolean Operators

        expr1 AND expr2
        expr1 OR expr2
        NOT expr
    

API

This package contains a SableCC-generated parser. While the parser classes are publicly accessible, most clients will not (want to) use them directly. The most important class is the CQL class. It contains methods to convert a CQL string into an executable filter. For example: import org.geolatte.core.expressions.Filter; Filter myFilter = CQL.toFilter("(A > 42)"); boolean passedFilter = myFilter.evaluate(anObject);

Extension





© 2015 - 2024 Weber Informatics LLC | Privacy Policy