*/
public VamsasArchive(VamsasFile archive, boolean vamsasdocument, boolean overwrite) throws IOException {
this(archive.sessionFile, overwrite, vamsasdocument, archive);
- log.debug("using non-functional lock-IO stream jar access constructor");
+ // log.debug("using non-functional lock-IO stream jar access constructor");
+ }
+ /**
+ * read and write to archive - will not overwrite original contents, and will always write an up to date vamsas document structure.
+ * @param archive
+ * @throws IOException
+ */
+ public VamsasArchive(VamsasFile archive) throws IOException {
+ this(archive, true, false);
}
/**
*
super(sessionFile);
}
/**
+ *
+ * @return the VamsasFile
+ */
+ public File getVamsasFile() {
+ return sessionFile;
+ }
+ /**
* Expand a previously stored session into the sessionDir
* @param sessionDir
* @param storedSession
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.