Andrea Aime a écrit :
> johann sorel ha scritto:
>> Hello,
>>
>> Until today I was using Expression only with Features.
>> I'm wondering how it works if I need to using it on something different.
>>
>> Let's say I a have a mathematic operation which return me a double 
>> value : MyVar
>>
>> I would like to use an expression like  2 * MyVar + 15 :
>> How do I give the MyVar value to the expression to evaluate it ?
>
> The model uses a PropertyAccessor to go from the property name to
> the value. So you need to pass in an object (it may be a simple
> hashmap for example) that contains all the properties you might
> want to use, and then build a property accessor that can grab
> MyVar value out of it.
> In particular, you'll have to code a PropertyAccessorFactory,
> a PropertyAccessor, and register them in the SPI.
> Have a lok at SimpleFeaturePropertyAccessor/Factory for
> an inspiration.
>
> Hope this helps
> Cheers
> Andrea
Thanks aaime, this should solve my problem.

-- 
Johann Sorel

Company - Geomatys GIS Developer
Mail - [EMAIL PROTECTED]


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to