simple VamsasArchive testing class.
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 13 Jan 2006 15:10:15 +0000 (15:10 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 13 Jan 2006 15:10:15 +0000 (15:10 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@113 be28352e-c001-0410-b1a7-c7978e42abec

src/org/vamsas/test/simpleclient/VamsasArchive.java [new file with mode: 0644]

diff --git a/src/org/vamsas/test/simpleclient/VamsasArchive.java b/src/org/vamsas/test/simpleclient/VamsasArchive.java
new file mode 100644 (file)
index 0000000..53103c6
--- /dev/null
@@ -0,0 +1,35 @@
+package org.vamsas.test.simpleclient;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.vamsas.client.simpleclient.*;
+import org.vamsas.objects.core.VAMSAS;
+import org.vamsas.objects.core.VamsasDocument;
+
+public class VamsasArchive {
+  /**
+   * test the org.vamsas.simpleclient.vamsasArchive class
+   */
+  public static void main(String args[]) {
+
+    try {
+      File av = new File(args[0]);
+      org.vamsas.client.simpleclient.VamsasArchive varchive = new org.vamsas.client.simpleclient.VamsasArchive(av, true);
+      File backup = varchive.backupFile();
+      
+      VAMSAS[] roots = (VAMSAS[]) varchive.getOriginalRoots();
+      if (roots!=null)
+        ArchiveReports.rootReport(roots);
+      // do some stuff
+      
+      if (backup!=null) {
+        System.out.println("Backup is : "+backup);
+      }
+    } catch (Exception e) {
+      e.printStackTrace(System.err);
+    }
+  }
+}