added check for 'broken update' - where vamsas document file has been incorrectly...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 28 Jun 2007 14:13:27 +0000 (14:13 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 28 Jun 2007 14:13:27 +0000 (14:13 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@409 be28352e-c001-0410-b1a7-c7978e42abec

src/uk/ac/vamsas/test/ExampleApplication.java

index 3ac5cd3..bfb1425 100644 (file)
@@ -68,6 +68,7 @@ public class ExampleApplication
   private boolean isFinalizing = false;
   private int totalUpdates = 9;
   private uk.ac.vamsas.client.VorbaId recover = null;
+  private int calls=0;
   private void processVamsasDocument(IClientDocument doc)
   {
     if (doc.getVamsasRoots().length<4) {
@@ -114,6 +115,11 @@ public class ExampleApplication
         try
         {
           IClientDocument cdoc = vorbaclient.getClientDocument();
+          if (calls>2 && cdoc.getVamsasRoots().length>0 && !cdoc.getVamsasRoots()[0].is__stored_in_document())
+          {
+            System.err.println("Pathological Update Detected - Document is zeroed!");
+          }
+          calls++;
           uk.ac.vamsas.test.simpleclient.ArchiveReports.rootReport(
               cdoc.getVamsasRoots(), true, System.out);
           // Simple update