Thanks Jody for your answers, I will have a look at the updated code. It seems to be a very useful example.
Ben Le 3 mars 09 à 14:23, Jody Garnett a écrit : > Hi Mr Thiébault: > > I am jumping in with a couple answers where I can. >> Do you have any example of code using this listenerManager ? >> > You can find the updated source code in our svn repository: > - http://svn.osgeo.org/geotools/trunk/modules/plugin/property > > I hope that can serve as an example. >> In the old API, to fire a remove event for instance, you just >> needed to pass the removed feature as an argument. To fire a >> change event, you had to pass the old and the new feature. That >> was straightforward and easy to understand. >> > First of all thanks for the list of questions; the above example > should help you and there are some utility methods that take care of > firing the event. With that in mind I will try and answer quickly... >> Now, I need to pass the feature type, > This is the feature type of the feature being added, updated or > removed (feature.getFeatureType() should return the right value) >> the transaction (what is it ? I don't use transactions in my >> feature writer...) > Transactions allow multiple threads to work on the same file at once > (only writing to the file when transaction.commit() is called). This > is handled for you by the superclass; it only actually calls your > writer during that commit() call. You can go over the user guide for > some examples of using a transaction. >> , the referenced envelope (is this the envelope containing the >> feature or does it correspond to the bounds of the whole >> datastore ?) > This is focused on saying where the change is that took place; the > area of a map that should be redrawn based on this change. It is > literally used to update the screen in a desktop application such as > udig > So for delete it will be the area of the feature removed; for add it > will be the area where the feature was created; and for update it > will be a combination of the area before and after the change.. >> and a commitboolean (the javadoc says: true for commit, false to >> rolback... what is this ?). > >> Where is my feature? > Your feature is what you are building in a FeatureReader; or writing > in a FeatureWriter. >> Is it embedded in the transaction? >> > No this is the responsibility of the datastore provider; the example > shows how to implement a FeatureReader and goes on to show how to > implement a FeatureWriter. These classes are like iterators but they > throw exceptions. >> How do I build one ? >> > The user guide has some examples of building a feature by hand. > ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
