uk.ac.vamsas.client.simpleclient
Class SessionUrn

java.lang.Object
  extended byuk.ac.vamsas.client.SessionUrn
      extended byuk.ac.vamsas.client.simpleclient.SessionUrn

public class SessionUrn
extends SessionUrn

SessionUrn for simpleclient sessions: simpleclient://{Absolute path to session directory} For simpleclient urn, it consideres as on the same machine, using the path to the session directory to generate the session URN

Author:
jimp

Field Summary
static java.lang.String SIMPLECLIENT
          a simple client session urn prefix
static java.lang.String VAMSASDOCUMENT
           
 
Fields inherited from class uk.ac.vamsas.client.SessionUrn
TYPES, urn
 
Constructor Summary
SessionUrn(java.io.File sessionLocation)
          Generates a sessionURN bases on a session directory location
SessionUrn(java.lang.String urnString)
          Creates a SessionUrn object from a String.
SessionUrn(VamsasSession session)
          Generates a sessionURN bases on a vamsas session
 
Method Summary
 java.io.File asFile()
          TODO: LATER: think about this again.
 
Methods inherited from class uk.ac.vamsas.client.SessionUrn
getSessionUrn, setURN
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIMPLECLIENT

public static final java.lang.String SIMPLECLIENT
a simple client session urn prefix

See Also:
Constant Field Values

VAMSASDOCUMENT

public static java.lang.String VAMSASDOCUMENT
Constructor Detail

SessionUrn

public SessionUrn(java.lang.String urnString)
           throws InvalidSessionUrnException
Creates a SessionUrn object from a String. The string must be a string representation of a URI

Parameters:
urnString -
Throws:
InvalidSessionUrnException

SessionUrn

public SessionUrn(java.io.File sessionLocation)
Generates a sessionURN bases on a session directory location

Parameters:
sessionLocation - the file object to the session directory

SessionUrn

public SessionUrn(VamsasSession session)
Generates a sessionURN bases on a vamsas session

Parameters:
session - a VamsasSession Should return the same URN string than the creation with the session directory
Method Detail

asFile

public java.io.File asFile()
TODO: LATER: think about this again. Retrieves the file associated to the current sessionURN. The sessionURN (URI) is based on the session directory absolute path. Use the raw path of the URN and change the scheme to file to generate a new file URI. Then, from the URI create the File object (a File object can be created from an uri)

Returns:
File object representing the session URN // File(urn.getPath())