Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
GeoTools
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<table class="confluenceTable"><tbody> <tr> <td class="confluenceTd"><p> Module: </p></td> <td class="confluenceTd"><p> CQL Parser </p></td> </tr> <tr> <td class="confluenceTd"><p> Module Maintainer: </p></td> <td class="confluenceTd"><p> <a class="confluence-link confluence-userlink" data-username="mauricio.pazos" href="/display/~mauricio.pazos" data-linked-resource-id="67284" data-linked-resource-type="userinfo" username="mauricio.pazos" data-linked-resource-default-alias="Mauricio Pazos" data-base-url="http://docs.codehaus.org">Mauricio Pazos</a> </p></td> </tr> <tr> <td class="confluenceTd"><p> Email Help: </p></td> <td class="confluenceTd"><p> Geotools-gt2-users@lists.sourceforge.net </p></td> </tr> <tr> <td class="confluenceTd"><p> Volunteer: </p></td> <td class="confluenceTd"><p> geotools-devel@lists.sourceforge.net </p></td> </tr> <tr> <td class="confluenceTd"><p> Status: </p></td> <td class="confluenceTd"><p> <table class="wysiwyg-macro" data-macro-name="excerpt" data-macro-parameters="atlassian-macro-output-type=INLINE" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2V4Y2VycHQ6YXRsYXNzaWFuLW1hY3JvLW91dHB1dC10eXBlPUlOTElORX0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><p> <img class="emoticon emoticon-yellow-star" data-emoticon-name="yellow-star" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/star_yellow.png" alt="(star)" title="(star)" /> <img class="emoticon emoticon-yellow-star" data-emoticon-name="yellow-star" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/star_yellow.png" alt="(star)" title="(star)" /> <img class="emoticon emoticon-yellow-star" data-emoticon-name="yellow-star" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/star_yellow.png" alt="(star)" title="(star)" /> <img class="emoticon emoticon-yellow-star" data-emoticon-name="yellow-star" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/star_yellow.png" alt="(star)" title="(star)" /> <img class="emoticon emoticon-yellow-star" data-emoticon-name="yellow-star" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/star_yellow.png" alt="(star)" title="(star)" /> </p></td></tr></table> </p></td> </tr> <tr> <td class="confluenceTd"><p> Model </p></td> <td class="confluenceTd"><p> <a class="confluence-link" href="/display/GEOTOOLS/CQL+Parser+Design" data-linked-resource-id="67669" data-linked-resource-type="page" data-linked-resource-default-alias="CQL Parser Design" data-base-url="http://docs.codehaus.org">CQL Parser Design</a>; <a class="confluence-link" href="/display/GEOTOOLS/ECQL+Parser+Design" data-linked-resource-id="110493908" data-linked-resource-type="page" data-linked-resource-default-alias="ECQL Parser Design" data-base-url="http://docs.codehaus.org">ECQL Parser Design</a> </p></td> </tr> <tr> <td class="confluenceTd"><p> User doc <br class="atl-forced-newline" /> </p></td> <td class="confluenceTd"><p> <a class="confluence-link unresolved" data-content-title="14 CQL" data-space-key="GEOTDOC" data-linked-resource-default-alias="14 CQL" href="#">14 CQL</a> </p></td> </tr> </tbody></table> <img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e3RvY30&locale=en_GB&version=2" data-macro-name="toc"> <h1>Gold Star Quality Assurance Check:</h1> <p><img class="emoticon emoticon-yellow-star" data-emoticon-name="yellow-star" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/star_yellow.png" alt="(star)" title="(star)" /> IP Check: need to ensure all headers are in place<br /> <img class="emoticon emoticon-yellow-star" data-emoticon-name="yellow-star" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/star_yellow.png" alt="(star)" title="(star)" /> Releasable: no blocking issues<br /> <img class="emoticon emoticon-yellow-star" data-emoticon-name="yellow-star" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/star_yellow.png" alt="(star)" title="(star)" /> Quality Assurance: 84.9% test coverage reported by clover<br /> <img class="emoticon emoticon-yellow-star" data-emoticon-name="yellow-star" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/star_yellow.png" alt="(star)" title="(star)" /> Stability: based on reviewed GeoAPI Filter interfaces and reviewed CSW 2.0.1 BNF for CQL<br /> <img class="emoticon emoticon-yellow-star" data-emoticon-name="yellow-star" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/star_yellow.png" alt="(star)" title="(star)" /> <a class="confluence-link unresolved" data-content-title="14 CQL" data-space-key="GEOTDOC" data-linked-resource-default-alias="14 CQL" href="#">user</a> and design docs. Module maintainer does watches user list, answers email.</p> <h1>Target</h1> <p>A module dedicated to fully support the OGC Common Query Language, version 2.0.1, as a query predicate language inside GeoTools.</p> <h1>Motivation</h1> <p><a href="http://www.axios.es">Axios</a> has developed, for the <a href="http://b5m.gipuzkoa.net">Gipuzkoa Provincial Council</a>, <strong>Mobility and Land Planning Department</strong>, an implementation of the OGC Catalog Service for Web 2.0.1 specification, based on GeoAPI medatada interfaces and Geotools implementation to support the ISO-19115/19139 profile.</p> <p>The <a href="http://portal.opengeospatial.org/files/?artifact_id=5929&version=2">CSW specification</a>, in section 6.2.2 defines the complete BNF for a constraint language to use as query predicates in a CSW implementation, named <strong>OGC Common Query Language</strong>, CQL for short.</p> <p>As the CSW implementation worked on useing exclusively <code>org.opengis.filter.Filter</code>, it was needed a converter from an input query, in <strong>CQL</strong> format, to an equivalent predicate in the form of a <strong>Filter</strong> object.</p> <h1>Target Audience</h1> <p>By being part of the GeoTools library, this little module would just allow for any client code to easily construct a filter using a more human friendly predicate language.</p> <p>In particular, the GeoServer community is currently willing to use it to add friendly filtering capabilities in WMS GetMap requests, and I guess it could be used in WFS GetFeature too.</p> <p>An example usage would be:</p> <table class="wysiwyg-macro" data-macro-name="code" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> http://server/geoserver/ows?service=WMS&request=GetMap&...&CONSTRAINTLANGUAGE=CQL_TEXT&CONSTRAINT="the_geom bbox(0, 0, 180, 90, 'EPSG:4326')" </pre></td></tr></table> <blockquote><p>Ofcourse the quoted text after <code>CONSTRAINT=</code> should be properly encoded for HTTP</p></blockquote> <h1>History</h1> <p>The module is derived from the old <a href="http://svn.geotools.org/geotools/trunk/gt/modules/library/main/src/main/java/org/geotools/filter/ExpressionBuilder.java">org.geotools.filter.ExpressionBuilder</a> parser by Ian Schneider.</p> <p>The focus was to fully support the 2.0.1 version of the BNF as defined in the CSW spec. This implies, among other improvements:</p> <ul class="alternate"> <li>support for nested and prefixed property names (for example, <code>gmd:MD_Metadata.identificationInfo.gmd:MD_DataIdentification.abstract</code>)</li> <li>support for spatial predicates (intersect, touches, etc). Note that the BNF oddly suppressed the trailing 's' from these predicates, so <code>TOUCH(ATTR1, POINT(1 2))</code> instead of <code>TOUCHES(ATTR1, POINT(1 2))</code></li> <li>temporal predicates (BEFORE, AFTER, DURING, etc)</li> </ul> <h1>Design Overview</h1> <p>The diagram presents the cql module <strong>published</strong> interface. The showed classes, <strong>CQL</strong> and <strong>ECQL</strong>, implement the contract with the clients. You can find other public classes in packages such as <strong>common</strong> and <strong>generated</strong>, but they are intended as internal interface (part of the implementation). They are not part of CQL module contract, so you should not use those classes.</p> <p><img class="confluence-embedded-image" src="/download/attachments/231079965/org.geotools.filter.text+-+module+interface.jpg?version=1&modificationDate=1369170831478" data-image-src="/download/attachments/231079965/org.geotools.filter.text+-+module+interface.jpg?version=1&modificationDate=1369170831478" data-linked-resource-id="231374894" data-linked-resource-type="attachment" data-linked-resource-default-alias="org.geotools.filter.text - module interface.jpg" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079965" title="null > org.geotools.filter.text - module interface.jpg"></p> <p>In the below figure are presented the main package relations. The <strong>generated</strong> package maintains all classes generated by <strong>javacc</strong>. The <strong>cql2</strong> and <strong>ecql</strong> packages implement the parsing and filter construction for OGC CQL and ECQL languages, respectively. In the <strong>commons</strong> are encapsulated the utility classes required to implement the module behavior. </p> <p><img class="confluence-embedded-image" src="/download/attachments/231079965/org.geotools.filter.text+-+package+relations.jpg?version=1&modificationDate=1369170831461" data-image-src="/download/attachments/231079965/org.geotools.filter.text+-+package+relations.jpg?version=1&modificationDate=1369170831461" data-linked-resource-id="231374893" data-linked-resource-type="attachment" data-linked-resource-default-alias="org.geotools.filter.text - package relations.jpg" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231079965" title="null > org.geotools.filter.text - package relations.jpg"></p> <p>To know more about CQL module implementation, see the following links:</p> <ul> <li><a class="confluence-link" href="/display/GEOTOOLS/CQL+Parser+Design" data-linked-resource-id="67669" data-linked-resource-type="page" data-linked-resource-default-alias="CQL Parser Design" data-base-url="http://docs.codehaus.org">CQL Parser Design</a></li> <li><a class="confluence-link" href="/display/GEOTOOLS/ECQL+Parser+Design" data-linked-resource-id="110493908" data-linked-resource-type="page" data-linked-resource-default-alias="ECQL Parser Design" data-base-url="http://docs.codehaus.org">ECQL Parser Design</a></li> </ul> <h1>Status</h1> <p>The module is in good health. No self or transient issues preventing it from compiling and passing tests.</p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced