X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Forg%2Fvamsas%2Fclient%2Fsimpleclient%2FVamsasSession.java;h=365311d8a49bba996e89a0b1ab46e2e69eefeeaf;hb=05cfd5783f5307bbcedb0b9205cebef11dae22df;hp=4e6f4307de99dd30dbaed0f061e6da7ae1830694;hpb=83a284f644324c5c597474e8cfc1cab808a31a3a;p=vamsas.git diff --git a/src/org/vamsas/client/simpleclient/VamsasSession.java b/src/org/vamsas/client/simpleclient/VamsasSession.java index 4e6f430..365311d 100644 --- a/src/org/vamsas/client/simpleclient/VamsasSession.java +++ b/src/org/vamsas/client/simpleclient/VamsasSession.java @@ -278,7 +278,7 @@ public class VamsasSession { } /** - * Creates a VamsasArchive object for accessing and updating document + * Creates a VamsasArchive Vobject for accessing and updating document * Note: this will lock the Vamsas Document for exclusive access to the client. * @return session vamsas document * @throws IOException if locks fail or vamsas document read fails. @@ -292,7 +292,19 @@ public class VamsasSession { return va; } - + /** + * create a uniquely named file in the session Directory + * @see java.io.File.createTempFile + * @param pref Prefix for name + * @param suff Suffix for name + * @return SessionFile object configured for the new file (of length zero) + * @throws IOException + */ + protected SessionFile getTempSessionFile(String pref, String suff) throws IOException { + File tfile = File.createTempFile(pref,suff,sessionDir); + SessionFile tempFile = new SessionFile(tfile); + return tempFile; + } }