You my find it more helpful to go through the list of properties, thees
methods like getProperty("foo") are syntactic sugar used to make things
easier for the common casual 90% case.

So if you are going through the list of properties, you will simplify find
that <foo/> (represented as foo=null) or <foo>bar</foo> (represented as
foo="bar") does not exist.

And yes our API may not be complete, you may not be able to tell from
getProperty("foo") == null the difference between "foo" not being found vs
foo being present without a value.

So try it out, let us know, and check against the GML spec. It sounds like
we can tighten up these javadocs to be easier to understand.


Jody Garnett

On Fri, Sep 12, 2014 at 12:07 AM, Jody Garnett <jody.garn...@gmail.com>
wrote:

>
> maybe and hopefully someone can help me with the following questions
>> regarding
>> complex features and properties.
>>
>> Question: What is the semantic of: feature.getProperty("foo") == null ?
>>
>> 1.: the property is not initialized
>> 2.: the property is not initialized *or* it does not exist in the type at
>> all
>>
>
> If the property did not exist ... it would not be there. The fact that you
> see a property (with a null value) probably indicates something like
> <foo/> is present in the XML. You could consider that significant for your
> application? I am not sure ...
>
> Keep in mind that not a lot of people do this stuff yet (most of use use
> simple features) - and thus you may find our library inconsistent with the
> GML specification (if so raise a bug) or inconsistent with itself (if so
> raise a bug!).
>
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to