Checking further there are more questions and I'm quite confused now. Consider 
the following:

feature.getProperty("foo").getValue() == null
     --> property is not yet initialized (?)

feature.getProperties("foo") == ???
     --> does this return an empty Collection or null?

The documentation of getProperty() says that it returns the first element from 
getProperties() in no special order. So getProperty() should return null if 
there are no values/properties yet (property is not initialized). But this in 
turn would mean that 2. is right. Right?

Thanks for any help!

-Falko

Am 10.09.2014 16:30, schrieb Falko Bräutigam:
> Hi all,
>
> 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
>
> Until today I was assuming that 1. is the correct answer. That is, I always 
> get
> a Property instance back if this property exists in the type. In case the 
> value
> is not initialized then getValue() returns null.
>
> But what is the semantantic for complex property containing other properties
> then? If 1. is true then a complex property always returns child Property
> instances (even if they are not initialized and getValue() returns null).
>
> So, what is the proper way to determine if a complex Property is "not
> initialized" (null)?
>
> Thanks for any help!
>
> -Falko
>

-- 
Falko Bräutigam
http://polymap.org/polymap3

------------------------------------------------------------------------------
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