From 547dc2a830187de7fc745494c552ab39ead79f15 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 13 Jan 2006 15:26:52 +0000 Subject: [PATCH] package for testing the core objects and their helper classes git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@116 be28352e-c001-0410-b1a7-c7978e42abec --- src/org/vamsas/test/objects/Core.java | 71 +++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 src/org/vamsas/test/objects/Core.java diff --git a/src/org/vamsas/test/objects/Core.java b/src/org/vamsas/test/objects/Core.java new file mode 100644 index 0000000..de3bd0a --- /dev/null +++ b/src/org/vamsas/test/objects/Core.java @@ -0,0 +1,71 @@ +/** + * + */ +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; + +/** + * @author jim + * test XSD-Java binding classes in org.vamsas.objects.core + */ +public class Core { + /** + * + * complete any automatically completable entries in the dataset + * @param ds + */ + public static void complete(DataSet ds) { + Sequence[] q = ds.getSequence(); + for (int i=0,j=q.length; iend on Sequence object + if ((start-end)!=Sequence.length()) + seq.setEnd(end+Sequence.length()); + } + return seq; + } + public static VAMSAS getDemoVamsas() { + VAMSAS v=new VAMSAS(); + DataSet ds = new DataSet(); + ds.addSequence(Sequence("Dummy1","ASDFLEQ", + seq.setDictionary("info:iubmb.org/aminoacids"); + seq.setName( + ds.addSequence(seq); + seq = new Sequence(); + seq.setDictionary("info:iubmb.org/aminoacids"); + seq.setName("Dummy1"); + seq.setSequence("ASDFLEQ"); + complete(ds); + v.addDataSet(ds); + Alignment al = new Alignment(); + + al.addAlignmentSequence(new AlignmentSequence()); + return v; + } + /** + * @param args + */ + public static void main(String[] args) { + // TODO Auto-generated method stub + + } + +} -- 1.7.10.2