From: pmarguerite Date: Fri, 15 Dec 2006 15:47:37 +0000 (+0000) Subject: Added TestSessionURN: to test the creation of a sessionURN and to retrieve a correct... X-Git-Tag: Release_0.2~195 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a579aca161da22d22f4ab8156c908c21325b63f6;p=vamsas.git Added TestSessionURN: to test the creation of a sessionURN and to retrieve a correct file from it. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@325 be28352e-c001-0410-b1a7-c7978e42abec --- diff --git a/src/uk/ac/vamsas/test/simpleclient/TestSessionURN.java b/src/uk/ac/vamsas/test/simpleclient/TestSessionURN.java new file mode 100644 index 0000000..e0759e2 --- /dev/null +++ b/src/uk/ac/vamsas/test/simpleclient/TestSessionURN.java @@ -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()); + } + +}