From 0d8d07c7087a1e54114a1ce503ba65f0ede3aac0 Mon Sep 17 00:00:00 2001 From: jprocter Date: Sun, 15 Jan 2006 13:18:21 +0000 Subject: [PATCH] more verbose reports and demo VamsasDocument testing git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@130 be28352e-c001-0410-b1a7-c7978e42abec --- src/org/vamsas/test/objects/Core.java | 38 +++++++--- .../vamsas/test/simpleclient/ArchiveReports.java | 79 ++++++++++++++++++-- 2 files changed, 99 insertions(+), 18 deletions(-) diff --git a/src/org/vamsas/test/objects/Core.java b/src/org/vamsas/test/objects/Core.java index ca3d90d..0bc3db5 100644 --- a/src/org/vamsas/test/objects/Core.java +++ b/src/org/vamsas/test/objects/Core.java @@ -3,24 +3,27 @@ */ package org.vamsas.test.objects; -import org.vamsas.objects.core.Alignment; -import org.vamsas.objects.core.AlignmentSequence; -import org.vamsas.objects.core.DataSet; -import org.vamsas.objects.core.Sequence; -import org.vamsas.objects.core.VAMSAS; -import org.vamsas.objects.utils.Seq; -import org.vamsas.objects.utils.SymbolDictionary; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.vamsas.objects.core.*; +import org.vamsas.objects.utils.*; +import org.vamsas.objects.utils.document.*; +import org.vamsas.test.simpleclient.ArchiveReports; /** * @author jim * test XSD-Java binding classes in org.vamsas.objects.core */ public class Core { + static Log log = LogFactory.getLog("org.vamsas.test.objects.Core"); + /** * * complete any automatically completable entries in the dataset * @param ds */ + public static String user = "org.vamsas.test.objects.Core"; + public static void complete(DataSet ds) { Sequence[] q = ds.getSequence(); for (int i=0,j=q.length; i0 && cascade) + rootReport(document.getVAMSAS(), true); if (document.getApplicationDataCount()>0) { System.out.print("There are "+document.getApplicationDataCount()+" ApplicationData references.\n"); ApplicationData appd[] = document.getApplicationData(); @@ -54,20 +79,62 @@ public class ArchiveReports { /** * summarises all the datasets in a vamsas document. * @param roots + * @param cascade TODO * @return */ - public static boolean rootReport(VAMSAS[] roots) { + public static boolean rootReport(VAMSAS[] roots, boolean cascade) { if (roots!=null) { for (int i=0; i") - +") contains "+r.getDataSetCount()+" DataSets, " - + r.getTreeCount()+" Global trees"); + +") contains "+(ds=r.getDataSetCount())+" DataSets, " + + (tr=r.getTreeCount())+" Global trees\n"); + if (cascade) { + for (int j=0; j0) { + for (int i=0; i