From 18f3cccd416493708352f425317f5861b6ee190d Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 20 Sep 2006 07:46:25 +0000 Subject: [PATCH] jalview alignment titles are preserved. --- src/jalview/gui/VamsasClient.java | 2 +- src/jalview/io/VamsasDatastore.java | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/jalview/gui/VamsasClient.java b/src/jalview/gui/VamsasClient.java index 250fdde..cefa928 100755 --- a/src/jalview/gui/VamsasClient.java +++ b/src/jalview/gui/VamsasClient.java @@ -171,7 +171,7 @@ public class VamsasClient extends ArchiveClient { AlignFrame af = (AlignFrame) frames[i]; // update alignment and root from frame. - vds.storeVAMSAS(af.getViewport()); + vds.storeVAMSAS(af.getViewport(), af.getTitle()); } } } diff --git a/src/jalview/io/VamsasDatastore.java b/src/jalview/io/VamsasDatastore.java index 63a3e52..c9d5994 100755 --- a/src/jalview/io/VamsasDatastore.java +++ b/src/jalview/io/VamsasDatastore.java @@ -145,9 +145,10 @@ public class VamsasDatastore { /** * put the alignment viewed by AlignViewport into cdoc. * - * @param av + * @param av alignViewport to be stored + * @param aFtitle title for alignment */ - public void storeVAMSAS(AlignViewport av) { + public void storeVAMSAS(AlignViewport av, String aFtitle) { try { jalview.datamodel.AlignmentI jal = av.getAlignment(); @@ -292,6 +293,13 @@ public class VamsasDatastore { // sensible source // here dataset.addAlignment(alignment); + { + Property title = new Property(); + title.setName("jalview:AlTitle"); + title.setType("string"); + title.setContent(aFtitle); + alignment.addProperty(title); + } alignment.setGapChar(String.valueOf(av.getGapCharacter())); AlignmentSequence alseq = null; for (int i = 0; i < jal.getHeight(); i++) -- 1.7.10.2