verson 0.2 LGPL licensed source and jars
[vamsas.git] / src / uk / ac / vamsas / client / simpleclient / SimpleSessionHandle.java
1 /*\r
2  * This file is part of the Vamsas Client version 0.2. \r
3  * Copyright 2010 by Jim Procter, Iain Milne, Pierre Marguerite, \r
4  *  Andrew Waterhouse and Dominik Lindner.\r
5  * \r
6  * Earlier versions have also been incorporated into Jalview version 2.4 \r
7  * since 2008, and TOPALi version 2 since 2007.\r
8  * \r
9  * The Vamsas Client is free software: you can redistribute it and/or modify\r
10  * it under the terms of the GNU Lesser General Public License as published by\r
11  * the Free Software Foundation, either version 3 of the License, or\r
12  * (at your option) any later version.\r
13  *  \r
14  * The Vamsas Client is distributed in the hope that it will be useful,\r
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
17  * GNU Lesser General Public License for more details.\r
18  * \r
19  * You should have received a copy of the GNU Lesser General Public License\r
20  * along with the Vamsas Client.  If not, see <http://www.gnu.org/licenses/>.\r
21  */\r
22 package uk.ac.vamsas.client.simpleclient;\r
23 \r
24 import java.io.File;\r
25 import java.io.Serializable;\r
26 /**\r
27  * SimpleSessionHandle maintains mapping between external vamsas SessionHandles and simpleclient session directory locations.\r
28  * @author JimP\r
29  *\r
30  */\r
31 public class SimpleSessionHandle extends uk.ac.vamsas.client.SessionHandle implements Serializable {\r
32   /**\r
33    * SimpleClient SessionHandle v0.1\r
34    */\r
35   private static final long serialVersionUID = 1L;\r
36   /**\r
37    * Construct urn from logical vamsas session urn for this session\r
38    * @param urn\r
39    */\r
40   public SimpleSessionHandle(String urn) {\r
41     super(urn);\r
42   }\r
43   /**\r
44    * where the session is actually stored\r
45    */\r
46   private String physLoc = null;\r
47   /**\r
48    * Vamsas Session URN and physical location of simplesession vamsas session\r
49    * @param urn\r
50    * @param origDoc\r
51    */\r
52   public SimpleSessionHandle(String urn, File origDoc)\r
53   {\r
54    this(urn);\r
55    setPhysLoc(origDoc.getAbsoluteFile().getAbsolutePath());\r
56   }\r
57   public void setPhysLoc(String physLoc) {\r
58     this.physLoc = physLoc;\r
59   }\r
60   public String getPhysLoc() {\r
61     return physLoc;\r
62   }\r
63 \r
64 }\r