From: jprocter Date: Fri, 13 Jan 2006 15:26:52 +0000 (+0000) Subject: package for testing the core objects and their helper classes X-Git-Tag: Release_0.2~404 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=547dc2a830187de7fc745494c552ab39ead79f15;p=vamsas.git 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 --- 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 + + } + +}