From 233da7bd1cde9fd8b2818ff575f7746f1956064e Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 8 Jun 2009 12:27:23 +0000 Subject: [PATCH] new URN hold external session URI and internal reference to physical session location git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@499 be28352e-c001-0410-b1a7-c7978e42abec --- .../client/simpleclient/SimpleSessionHandle.java | 43 ++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/uk/ac/vamsas/client/simpleclient/SimpleSessionHandle.java diff --git a/src/uk/ac/vamsas/client/simpleclient/SimpleSessionHandle.java b/src/uk/ac/vamsas/client/simpleclient/SimpleSessionHandle.java new file mode 100644 index 0000000..b095557 --- /dev/null +++ b/src/uk/ac/vamsas/client/simpleclient/SimpleSessionHandle.java @@ -0,0 +1,43 @@ +package uk.ac.vamsas.client.simpleclient; + +import java.io.File; +import java.io.Serializable; +/** + * SimpleSessionHandle maintains mapping between external vamsas SessionHandles and simpleclient session directory locations. + * @author JimP + * + */ +public class SimpleSessionHandle extends uk.ac.vamsas.client.SessionHandle implements Serializable { + /** + * SimpleClient SessionHandle v0.1 + */ + private static final long serialVersionUID = 1L; + /** + * Construct urn from logical vamsas session urn for this session + * @param urn + */ + public SimpleSessionHandle(String urn) { + super(urn); + } + /** + * where the session is actually stored + */ + private String physLoc = null; + /** + * Vamsas Session URN and physical location of simplesession vamsas session + * @param urn + * @param origDoc + */ + public SimpleSessionHandle(String urn, File origDoc) + { + this(urn); + setPhysLoc(origDoc.getAbsoluteFile().getAbsolutePath()); + } + public void setPhysLoc(String physLoc) { + this.physLoc = physLoc; + } + public String getPhysLoc() { + return physLoc; + } + +} -- 1.7.10.2