Added TestSessionURN: to test the creation of a sessionURN and to retrieve a correct...
[vamsas.git] / src / uk / ac / vamsas / test / simpleclient / TestSessionURN.java
diff --git a/src/uk/ac/vamsas/test/simpleclient/TestSessionURN.java b/src/uk/ac/vamsas/test/simpleclient/TestSessionURN.java
new file mode 100644 (file)
index 0000000..e0759e2
--- /dev/null
@@ -0,0 +1,29 @@
+package uk.ac.vamsas.test.simpleclient;
+
+import java.io.File;
+
+import uk.ac.vamsas.client.simpleclient.SessionUrn;
+
+/**
+ * Tests simple client sessionURN creation 
+ * 
+ *
+ */
+public class TestSessionURN {
+  
+  public static void main (String [] arg) throws Exception
+  {
+    String file = null;
+   if (arg == null || arg.length ==0)
+     file = ".";
+     else
+       file = arg[0];
+        File f = new File (file);
+        SessionUrn urn = new SessionUrn(f);
+        System.out.println("urn "+urn.getSessionUrn());
+        System.out.println("urn  file "+ urn.asFile().getAbsolutePath());
+        System.out.println("urn  file  exists?"+ urn.asFile().exists());
+  }
+
+}