From 11a4ea0dc436be9f15b159dd912219d6600a21bb Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 13 Jan 2006 15:10:15 +0000 Subject: [PATCH] simple VamsasArchive testing class. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@113 be28352e-c001-0410-b1a7-c7978e42abec --- .../vamsas/test/simpleclient/VamsasArchive.java | 35 ++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/org/vamsas/test/simpleclient/VamsasArchive.java diff --git a/src/org/vamsas/test/simpleclient/VamsasArchive.java b/src/org/vamsas/test/simpleclient/VamsasArchive.java new file mode 100644 index 0000000..53103c6 --- /dev/null +++ b/src/org/vamsas/test/simpleclient/VamsasArchive.java @@ -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); + } + } +} -- 1.7.10.2