You should be able to listen to the FeatureSource for changes; that is
where the edits are happening (sometimes for several threads at once
etc...).

You are correct that CollectionFeatureSource is very simple and more for
staging static data for display. I guess I am surprised, it feels like you
are staging this data in memory ... for interactive feedback on a map?

Can we roll back -  where did you get your data from? Did you copy it out
of something into a DefaultFeatureCollection?


--
Jody Garnett

On 25 January 2017 at 07:07, Marco Peters <[email protected]
> wrote:

> Thanks Jody. Now I have a follow up question.
>
> How can I follow changes in a FeatureCollection.
>
> I can’t add a listener, also not if I wrap it in a DefaultFeatureCollection.
>
> I can put it in a CollectionFeatureSource and add a FeatureListener but 
> CollectionFeatureSource does not fire any event.
>
>
>
> I searched the documentation and the source code repository but haven’t found 
> a solution for it.
>
> But I’m sure it is somewhere. At least, I want to believe…
>
>
>
> Marco
>
>
>
>
>
> *Von:* Jody Garnett [mailto:[email protected]]
> *Gesendet:* Freitag, 20. Januar 2017 23:55
> *An:* Marco Peters <[email protected]>
> *Cc:* GeoTools Users <[email protected]>
> *Betreff:* Re: [Geotools-gt2-users] Lost functionality in FeatureEvent?
>
>
>
> Excellent Marco; and that filter should be an Id filter with a list of
> modified feature ids.
>
>
>
> One reason for this change (which is quite annoying / subtle) is that some
> datastores (like WFS) do not assign a final FeatureID until after commit is
> called. In the WFS client case it needs to send the Transaction request to
> the WFS, get the result back, parse the feature ids out of the result, and
> let you know about them in an event.
>
>
> --
>
> Jody Garnett
>
>
>
> On 20 January 2017 at 03:58, Marco Peters <marco.peters@brockmann-
> consult.de> wrote:
>
> Seems I found the answer myself.
>
> FeatureEvent.getFilter() returns a filter to get the changed features from
> the source.
>
>
>
>
>
> *Von:* Marco Peters [mailto:[email protected]]
> *Gesendet:* Donnerstag, 19. Januar 2017 17:18
> *An:* [email protected]
> *Betreff:* [Geotools-gt2-users] Lost functionality in FeatureEvent?
>
>
>
> Currently I try to update my GeoTools dependencies from 2.7.4 to 16.1.
> Yes, I know I’m late.
>
> However, I noticed a possible loss of functionality. As CollectionEvent is
> replaced FeatureEvent I have no chance anymore to find out which features
> have been removed or added. In CollectionEvent they were available by
> getFeatures(). My question, is there another way of obtaining these
> features?
>
>
>
> By the way, is there may be a changelog which summarises the API changes
> from version to version? This would be helpful now.
>
>
>
> Ciao
>
>   Marco
>
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to