From: jprocter Date: Fri, 19 Feb 2010 16:36:15 +0000 (+0000) Subject: added legacy import of version 0.1 SessionLists X-Git-Tag: Release_0.2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=HEAD;p=vamsas.git added legacy import of version 0.1 SessionLists git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@521 be28352e-c001-0410-b1a7-c7978e42abec --- diff --git a/README b/README index 0c12439..38818e5 100644 --- a/README +++ b/README @@ -43,6 +43,7 @@ Changes since version 0.1 * 1.5 and 1.4 build options * SAXTreeViewer * minor bug and information message fixes. +* legacy import of vamsas 0.1 sessions The SAXTreeViewer was added to the uk.ac.vamsas.test.document package - it is a simple debug tool which will monitor a specific VAMSAS document archive, and diff --git a/packages/vamsas-client-j1.5.jar b/packages/vamsas-client-j1.5.jar index 8222280..5c5a3cb 100644 Binary files a/packages/vamsas-client-j1.5.jar and b/packages/vamsas-client-j1.5.jar differ diff --git a/packages/vamsas-client.jar b/packages/vamsas-client.jar index cc96e10..2634954 100644 Binary files a/packages/vamsas-client.jar and b/packages/vamsas-client.jar differ diff --git a/packages/vamsas-schema-and-doc.jar b/packages/vamsas-schema-and-doc.jar index 1c1bad7..701fe73 100644 Binary files a/packages/vamsas-schema-and-doc.jar and b/packages/vamsas-schema-and-doc.jar differ diff --git a/src/uk/ac/vamsas/client/simpleclient/SessionsFile.java b/src/uk/ac/vamsas/client/simpleclient/SessionsFile.java index ab26d20..9871bbf 100644 --- a/src/uk/ac/vamsas/client/simpleclient/SessionsFile.java +++ b/src/uk/ac/vamsas/client/simpleclient/SessionsFile.java @@ -26,6 +26,7 @@ import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.net.URL; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -80,7 +81,30 @@ public class SessionsFile extends ListFile { o = is.readObject(); if (o != null) { try { - sessions = (SimpleSessionHandle[]) o; + if (o instanceof SimpleSessionHandle[]) { + sessions = (SimpleSessionHandle[]) o; + } else { + // legacy support or incorrect path. + if (o instanceof SessionHandle[]) { + log.info("Importing VAMSAS 0.1 clientHandle list."); + SessionHandle[] oldsess = (SessionHandle[]) o; + File sessdir; + sessions = new SimpleSessionHandle[oldsess.length]; + for (int s=0;s