On Wed, Oct 3, 2012 at 2:42 PM, Jody Garnett <[email protected]> wrote:
> Only an attribute name, not every expression
> - filter: you mention this as CQL but I expect an actual filter can be
> passed in
>
> Nope, I really meant a CQL formatted string, a Filter cannot be passed
> because
> it's not an Expression, and all filter function params are to be
> Expression objects instead.
> (at least this is my understanding).
>
> Okay, I notice for that many of the relationship functions Dave Blasby has
> made matching functions.
>
> As an idea could we make a function called filter( String, Expression, … )
> in order to keep this above board and not make use of magic strings.
>
>
Quick IRC followup on the topic:
(14:44:56) aaime: a funciton named filter would still have to return a
Filter no?
(14:45:01) jgarnett: no
(14:45:05) jgarnett: it would return true or false
(14:45:07) aaime: what woudl it return
(14:45:15) aaime: ah, that would make it un-encodable though
(14:45:17) jgarnett: dave blasby already did a bunch for the spatial
relatinoships
(14:45:27) jgarnett: call it something else then
(14:45:30) aaime: the whole point of this exercise is to make the KNN
encodable
(14:45:37) jgarnett: test( "greaterThan", category, 12 )
(14:45:45) jgarnett: it would be encodable
(14:45:48) aaime: it's not the name, it's that functions are not encodable
unless the store has special handling for them
(14:46:17) jgarnett: I viewed this the same as dropping in some CQL
(14:46:31) aaime: not the same, as the SDO_NN support would not what to
make it of
(14:46:36) aaime: (make of it)
(14:46:48) aaime: and I need to be abel to pass whatever filter
(14:46:55) aaime: so the only way woudl still be to use a string
(14:47:06) jgarnett: thinking
(14:47:09) aaime: either CQL or a XML literal for OGC filter
(14:47:26) jgarnett: yeah that would end up with "turtles all the way down"
(14:47:39) aaime: yep
(14:47:44) aaime: that's why I suggestd CQL
(14:47:51) aaime: it's compact and can represent whatever filter
(14:47:54) jgarnett: filter( "and", filter( "greaterThan", category, 13 ),
filter( "or, …, …. ) )
(14:47:56) jgarnett: bleah
(14:48:06) aaime: you are stil using strings anyways
(14:48:14) jgarnett: I hate magic strings (in both cases)
(14:48:21) aaime: at that pont what's wrong with "category > 13 and ..."
(14:48:30) jgarnett: I am imagining the escaping issues when the CQL needs
to reference a function that requires CQL etc...
(14:48:32) aaime: CQL is no magic string, it's a well known language :-)
(14:48:59) aaime: not much issues, you just add it between ' ' and escape
the '
(14:49:07) jgarnett: Suppose I can make the Param with a hint saying
CQL="filter" so the UI does not suck
(14:49:26) aaime: Ah, I see what you mean
(14:49:29) jgarnett: yep that will work for me, a hint to mark it
(14:49:35) aaime: you do have GUI for functions in uDig?
(14:49:40) jgarnett: yes
(14:49:43) jgarnett: and in gt-swing
(14:49:47) aaime: ah, never seen it
(14:49:50) jgarnett: indeed
(14:50:04) jgarnett: I need to hook it up to the style editor so more
people will care
(14:50:11) aaime: I see, yes, no problem
(14:50:28) jgarnett: in any case CQL="filter" and CQL="expression" will be
a good way for me to handle the "magic" Strings
(14:50:28) aaime: adding a hint in the param is no problem at all
Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel