updated client which allows XML validation flags to be controlled (to ensure that...
authorjprocter <Jim Procter>
Fri, 26 Oct 2007 11:13:42 +0000 (11:13 +0000)
committerjprocter <Jim Procter>
Fri, 26 Oct 2007 11:13:42 +0000 (11:13 +0000)
lib/vamsas-client.jar
src/jalview/gui/VamsasApplication.java

index 974d04a..49f71ab 100644 (file)
Binary files a/lib/vamsas-client.jar and b/lib/vamsas-client.jar differ
index 50670a0..d0dbf16 100644 (file)
@@ -149,6 +149,8 @@ public class VamsasApplication
           vclient = clientfactory.getIClient(app, sess);
         }
       }
+      // set some properties for our VAMSAS interaction
+      setVclientConfig();
       user = vclient.getUserHandle();
 
     } catch (Exception e)
@@ -160,6 +162,30 @@ public class VamsasApplication
     return true;
   }
 
+  private void setVclientConfig()
+  {
+    if (vclient==null)
+    {
+      return;
+    }
+    try {
+      if (vclient instanceof uk.ac.vamsas.client.simpleclient.SimpleClient)
+      {
+        uk.ac.vamsas.client.simpleclient.SimpleClientConfig cfg = ((uk.ac.vamsas.client.simpleclient.SimpleClient)  vclient).getSimpleClientConfig();
+        cfg._validatemergedroots = false;
+        cfg._validateupdatedroots= true; //we may write rubbish otherwise. 
+      }
+    }
+    catch (Error e)
+    {
+      Cache.log.warn("Probable SERIOUS VAMSAS client incompatibility - carrying on regardless",e);
+    }
+    catch (Exception e)
+    {
+      Cache.log.warn("Probable VAMSAS client incompatibility - carrying on regardless",e);
+    }
+  }
+
   /**
    * make the appHandle for Jalview
    *