From e2773f79b74e2536dd83d8db802cdece4d9567b9 Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 29 Nov 2005 16:33:04 +0000 Subject: [PATCH] probably deprecating this class. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@100 be28352e-c001-0410-b1a7-c7978e42abec --- src/org/vamsas/client/simpleclient/VamsasFile.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/org/vamsas/client/simpleclient/VamsasFile.java b/src/org/vamsas/client/simpleclient/VamsasFile.java index 1c3a224..6ad634b 100644 --- a/src/org/vamsas/client/simpleclient/VamsasFile.java +++ b/src/org/vamsas/client/simpleclient/VamsasFile.java @@ -33,21 +33,32 @@ public class VamsasFile extends SessionFile { * @throws java.io.IOException */ public VamsasFile(File sessionFile) throws java.io.IOException { - + super(sessionFile); } /** * Expand a previously stored session into the sessionDir * @param sessionDir * @param storedSession - */ - public VamsasFile(File sessionDir, JarFile storedSession) throws IOException { + + public VamsasFile(File sessionDir, JarFile storedSession) throws IOException { // check if sessionDir is live or not + if (!sessionDir.exists()) { + sessionDir.mkdir(); + } + { + // check its actually a writable directory + } + + File sfile = new File(sessionDir, "vamsas.jar"); + VamsasFile(sfile); // if live - try to merge storedSession with sessionDir // - will probably fail through duplicate object references needing to be dereferenced. // TODO: think of a way of specifying vorba_id scope for an application's references to allow merging of one vamsasDocument with another. } + */ + /** * gets a locked Reader for the vamsas document. * @return reader for vamsasdocument.xml enrty -- 1.7.10.2