jalview alignment titles are preserved.
authorjprocter <Jim Procter>
Wed, 20 Sep 2006 07:46:25 +0000 (07:46 +0000)
committerjprocter <Jim Procter>
Wed, 20 Sep 2006 07:46:25 +0000 (07:46 +0000)
src/jalview/gui/VamsasClient.java
src/jalview/io/VamsasDatastore.java

index 250fdde..cefa928 100755 (executable)
@@ -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());
                 }
             }
         }
index 63a3e52..c9d5994 100755 (executable)
@@ -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++)