new URN hold external session URI and internal reference to physical session location
authorjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 8 Jun 2009 12:27:23 +0000 (12:27 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 8 Jun 2009 12:27:23 +0000 (12:27 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@499 be28352e-c001-0410-b1a7-c7978e42abec

src/uk/ac/vamsas/client/simpleclient/SimpleSessionHandle.java [new file with mode: 0644]

diff --git a/src/uk/ac/vamsas/client/simpleclient/SimpleSessionHandle.java b/src/uk/ac/vamsas/client/simpleclient/SimpleSessionHandle.java
new file mode 100644 (file)
index 0000000..b095557
--- /dev/null
@@ -0,0 +1,43 @@
+package uk.ac.vamsas.client.simpleclient;\r
+\r
+import java.io.File;\r
+import java.io.Serializable;\r
+/**\r
+ * SimpleSessionHandle maintains mapping between external vamsas SessionHandles and simpleclient session directory locations.\r
+ * @author JimP\r
+ *\r
+ */\r
+public class SimpleSessionHandle extends uk.ac.vamsas.client.SessionHandle implements Serializable {\r
+  /**\r
+   * SimpleClient SessionHandle v0.1\r
+   */\r
+  private static final long serialVersionUID = 1L;\r
+  /**\r
+   * Construct urn from logical vamsas session urn for this session\r
+   * @param urn\r
+   */\r
+  public SimpleSessionHandle(String urn) {\r
+    super(urn);\r
+  }\r
+  /**\r
+   * where the session is actually stored\r
+   */\r
+  private String physLoc = null;\r
+  /**\r
+   * Vamsas Session URN and physical location of simplesession vamsas session\r
+   * @param urn\r
+   * @param origDoc\r
+   */\r
+  public SimpleSessionHandle(String urn, File origDoc)\r
+  {\r
+   this(urn);\r
+   setPhysLoc(origDoc.getAbsoluteFile().getAbsolutePath());\r
+  }\r
+  public void setPhysLoc(String physLoc) {\r
+    this.physLoc = physLoc;\r
+  }\r
+  public String getPhysLoc() {\r
+    return physLoc;\r
+  }\r
+\r
+}\r