You will need to keep things on the public email lists; I am not the author of 
the CQL code and the level of detail you supply would make a good bug report :-)

Jody

On 27/04/2010, at 4:44 AM, Joseph Wolter wrote:

> Jody,
> 
> I've been to that site and tried that format but it generates an error. 
> 
> This Generates and error:
> http://biomap.wisc.edu:8080/geoserver/wfs?&outputformat=json&request=GetFeature&version=1.1.0&typeName=Biofuels:bm_user&extractfields:true&cql_filter=bm_end
>  AFTER '2010-04-23' AND owner_id<>7
> 
> 
> This works in the URL and returns FIVE records all with the owner id equal to 
> 1 - which is correct.
> http://biomap.wisc.edu:8080/geoserver/wfs?&outputformat=json&request=GetFeature&version=1.1.0&typeName=Biofuels:bm_user&extractfields:true&cql_filter=bm_end>='2010-04-23'
>  AND owner_id<>7
> 
> 
> When I use the same URL for an AjaxRequest in javascript it fails.
>   StartAjaxRequest("loadBiomassVectorLayer");
>   ajaxRequest.open("GET", theWFS + encodeURIComponent(myrequest), true);
>   ajaxRequest.send(null);
> 
> if I display an alert in loadBiomassVectorLayer() for ajaxRequest.readyState 
> == 1 I usually get the exception:
> -->   loadBiomassVectorLayer() parse failed:
> -->      e.message: parseJSON
> -->      ajaxRequest.responseText: Some unexpected error occurred. Error text 
> was: HTTP Error 400: Bad Request
> 
> If I do NOT display the alert then most of the time the parser generates an 
> uncaught exception.  If the parser does succeed the result is only ONE record 
> where owner_id=7 (the filter was owner_id<>7)
> 
> The other problem I'm having is that it gets to loadBiomassVectorLayer() 
> three times where ajaxRequest.readyState == 4
> 
> 
> Do you know what is going on here?
> 
> Thanks,
> Joe
> 
> 
> On 04/26/10, Jody Garnett  <[email protected]> wrote:
> 
>> The implementation is part of the geotools project.
>> 
>> There are some examples here (including dates):
>> - http://udig.refractions.net/confluence/display/EN/Common+Query+Language 
>> (http://udig.refractions.net/confluence/display/EN/Common+Query+Language)
>> 
>> On 24/04/2010, at 12:03 AM, Alex Dean wrote:
>> 
>>> 
>>> On Apr 23, 2010, at 8:49 AM, Joseph Wolter wrote:
>>> 
>>>> 
>>>> I'm trying to use a cql_filter for an Ajax request to access table data.
>>>> 
>>>> var myrequest = 
>>>> "http://xxxxxx.xxxx:8080/geoserver/wfs?&outputformat=json&request=GetFeature&version=1.1.0&typeName=Biofuels:bm_user&extractfields:true&cql_filter=
>>>>  
>>>> (http://xxxxxx.xxxx:8080/geoserver/wfs?&outputformat=json&request=GetFeature&version=1.1.0&typeName=Biofuels:bm_user&extractfields:true&cql_filter=)"+myFilter;
>>>> 
>>>> myFilter attempts
>>>> "bm_end>='2010-04-23'"   OR
>>>> "bm_end>='2010-04-23' && owner_id<>1"   OR
>>>> "bm_end>='2010-04-23' && owner_id!=1"
>>>> 
>>>> Neither of the filters above seem to be working properly - no errors but 
>>>> not the correct results either.
>>>> 
>>>> Is the date format correct?
>>>> 
>>>> Where is this stuff documented including date comparisons?
>>>> 
>>>> What am I doing wrong?
>>>> 
>>>> Thanks,
>>>> Joe
>>> 
>>> 
>>> 
>>> 
>>> I'm not very familiar with GeoServer's implementation of CQL, but there's a 
>>> good description of the basic CQL language itself at 
>>> http://zing.z3950.org/cql/intro.html. 
>>> (http://zing.z3950.org/cql/intro.html.)
>>> 
>>> I think that GeoServer uses CQL-Java, http://zing.z3950.org/cql/java/. 
>>> (http://zing.z3950.org/cql/java/.)  You'd probably have to dig in more 
>>> there to find out about what kinds of date operations it supports.
>>> 
>>> There's also some interesting discussion at 
>>> http://zing.z3950.org/cql/profiles.html 
>>> (http://zing.z3950.org/cql/profiles.html) about extending CQL outside of 
>>> its bibliographic roots.  (CQL originated as a query language for library 
>>> resources.)  Spatial and date searches are mentioned specifically.
>>> 
>>> alex
>>> alex
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> Geoserver-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users 
>>> (https://lists.sourceforge.net/lists/listinfo/geoserver-users)
>> 
>> 
>> 
> -- 
> Joseph Wolter
> Software Development
> Department of Soil Science
> University of Wisconsin-Madison
> 1525 Observatory Dr. Rm S60
> Madison, WI 53706-1299
> 608-265-9354
> 
> 
> <jwolter.vcf>


------------------------------------------------------------------------------
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to