package org.vamsas.client.simpleclient;
import java.io.File;
+import java.net.MalformedURLException;
/**
* Vamsas Document URN for files understood by ArchiveReader and
TYPES.put(ArchiveUrn.VAMSASDOCUMENT, ArchiveUrn.class);
}
- public ArchiveUrn(File docLocation) {
- super(VAMSASDOCUMENT, docLocation);
+ 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
}