On Mon, Oct 3, 2011 at 1:11 AM, Andrea Aime <[email protected]>wrote:

> On Mon, Oct 3, 2011 at 4:19 AM, Justin Deoliveira <[email protected]>
> wrote:
> >> Read it again, looks good to me.
> >
> >
> > Does this include the patch?
>
> Nope, could not find the time to look at the patch so far.
>
> >>
> >> >
> >> > And here is the issue that has the attached patch:
> >> >   http://jira.codehaus.org/browse/GEOT-3657
> >> > * PropertyIsNil
> >> > Filter (FES) 2.0 adds a new filtering construct named PropertyIsNil.
> To
> >> > be honest I am still a bit fuzzy on what this is actually supposed to
> do.
> >> > However I did get some clarification from wfs-dev list:
> >> >>
> >> >> assume you have a GML feature type which has a property p where the
> >> >> property element is declared with minOccurs="0" and nillable=true.
> >> >> PropertyIsNull results in true, if the WFS would return the feature
> >> >> without any property element <tns:p>.
> >> >> PropertyIsNil results in true, if the WFS would return the feature
> with
> >> >> a property element <tns:p xsi:nil='true'>. This can be refined using
> the
> >> >> nilReason parameter.
> >> >
> >> > And as it turns out i completely misinterpreted the spec... so my
> >> > implementation of PropertyIsNil doesn't match that at all :) However I
> am
> >> > not sure how to implement it property... our filter model doesn't have
> any
> >> > notion of schema like this requires. Anyways, in the end all the
> client
> >> > wanted to click a check box, and not really to do anything with it so
> i
> >> > never went back and revisited.
> >> > Here is the patch I came up with though:
> >> >   http://jira.codehaus.org/browse/GEOT-3870
> >> > I am tempted to simply just have PropertyIsNil be an alias for
> >> > PropertyIsNull at this point... and when someone has a mandate to
> implement
> >> > it properly they can do so. Thoughts?
> >>
> >> Hummm.. I have the impression that this might be solved with a single
> >> null checking operation plus a check on the flag that drives the xml
> >> encoding.
> >> If the encoder is always skipping the elements that have null value:
> >> - PropertyIsNull would behave like today, true if the value is null,
> >> false otherwise
> >> - PropertyIsNil would always return false, it's either not null, and
> >> if it is we are not returning the element anyways
> >> If the encoder is always encoding the element with the nil flag, it's
> >> the opposite.
> >>
> >> So, I have the impression that a filter transformer knowing how a null
> >> value element is going to be encoded can be used
> >> to turn the filter in either what we have today, or Filter.Exclude
> >
> > Not sure I follow 100%. How would we know at the time the filter is
> executed
> > that a property is going to be nil? Are you saying doing the filtering in
> > the encoder?
>
> At the GeoServer level we know how the encoders are configured/behave,
> so what we could do is a filter transformer that picks incoming filters
> and transforms them accordingly.
> If we know, at a certain pont in time, how null element values are to be
> encoded, we can use that knowledge to statically transform the incoming
> filter into the existing PropertyIsNull, or Fitler.Exclude.
> The way I read the spec the behavior of the two filters is 1-1 linked to
> how we'd handle the encoding of a missing value, which is not something
> the filter alone can know.
>

Thanks for the explanation, makes sense. Question is where does the
information of null vs nil come from. Is this something that app-schema
currently does? It would be nice to have the app-schema folks weigh in on
this. So are you advocating now to add the new interface to the filter class
hierarchy?


> Cheers
> Andrea
>
>
> --
> -------------------------------------------------------
> Ing. Andrea Aime
> GeoSolutions S.A.S.
> Tech lead
>
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
>
> phone: +39 0584 962313
> fax:      +39 0584 962313
>
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.youtube.com/user/GeoSolutionsIT
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
>
> -------------------------------------------------------
>



-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to