package uk.ac.vamsas.client.simpleclient; import java.io.File; import java.net.MalformedURLException; /** * Vamsas Document URN for files understood by ArchiveReader and * written by VamsasArchive. * vdoc://{Absolute path to file} * @author jimp * */ public class ArchiveUrn extends uk.ac.vamsas.client.SessionUrn { /** * a simple vamsas document urn prefix */ public static String VAMSASDOCUMENT="vdoc"; static { TYPES.put(ArchiveUrn.VAMSASDOCUMENT, ArchiveUrn.class); } public ArchiveUrn(File docLocation) throws MalformedURLException { super(VAMSASDOCUMENT, docLocation.getAbsoluteFile().toURL()); } /** * TODO: LATER: think about this again. * @return File(urn.getPath()) */ public File asFile() { return new File(urn.getPath()); } // TODO: add abstract 'handler' methods for resolving the URN to a particular class }