Hi, I wonder how it has been done in a new WFS plugin that can do transactions. The transaction icon gets highlighted only if something has been modified, so I think there must be some chance tracking system. And I don't believe really that anybody makes a WFS-T client that sends the whole layer back if only one feature is modified. Deegree folks, how is it?
-Jukka Rahkonen- -----Alkuperäinen viesti----- Lähettäjä: Larry Becker [mailto:becker.la...@gmail.com] Lähetetty: to 2.4.2009 0:01 Vastaanottaja: OpenJump develop and use Aihe: [JPP-Devel] Modifying BasicFeature to track modifications Hi, As I mentioned in the other thread, before the problem of partial database updates can be solved, we must first be able to determine if a Feature has been modified. This is not currently possible in all of the JUMP variants that I am familiar with, although Kosmo may have implemented it. The simplest way of implementing it that I can see is to modify BasicFeature to include: private int[] attributeModCount; //this is a parallel array to Object[] attributes Then it would be necessary to allocate the attributeModCount array when setAttributes(Object[] attributes) is called. In addition each time setAttribute(int attributeIndex, Object newAttribute) is called, add the line of code: attributeModCount[attributeIndex]++ With these modifications we could then define: public boolean isFeatureModified() { for (int i=0; i<attributeModCount.length; i++) { if (attributeModCount[i] > 1) //modified is defined as setting an attribute more than once return true; } return false; } Would this work and does this seem like something we should consider? regards, Larry -- http://amusingprogrammer.blogspot.com/ ------------------------------------------------------------------------------ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel