refactored org to uk
[vamsas.git] / src / org / vamsas / client / simpleclient / VamsasFile.java
index ffb1485..3dd2581 100644 (file)
@@ -37,6 +37,13 @@ public class VamsasFile extends SessionFile {
     super(sessionFile);
   }
   /**
+   * 
+   * @return the VamsasFile
+   */
+  public File getVamsasFile() {
+    return sessionFile;
+  }
+  /**
    * Expand a previously stored session into the sessionDir
    * @param sessionDir
    * @param storedSession
@@ -54,7 +61,7 @@ public class VamsasFile extends SessionFile {
     File sfile = new File(sessionDir, "vamsas.jar");
     VamsasFile(sfile);
     // if live - try to merge storedSession with sessionDir
-    //  - will probably fail through duplicate object references needing to be dereferenced.
+    //  - will probably fail through duplicate Vobject references needing to be dereferenced.
     // TODO: think of a way of specifying vorba_id scope for an application's references to allow merging of one vamsasDocument with another.
     
   }
@@ -72,6 +79,16 @@ public class VamsasFile extends SessionFile {
     return null;
   }
   /**
+   * 
+   * @param extantLock
+   * @return null, extantLock or new Lock.
+   */
+  public Lock getLock(Lock extantLock) {
+    if (lockFile(extantLock))
+      return fileLock;
+    return null;
+  }
+  /**
    * explicitly unlocks vamsas file.
    * if you have called getLock() you *must* 
    * call this to release the lock.