minor bug fixes and temporary alignment title setting to vamsas object id. this versi...
authorjprocter <Jim Procter>
Sun, 17 Sep 2006 20:42:21 +0000 (20:42 +0000)
committerjprocter <Jim Procter>
Sun, 17 Sep 2006 20:42:21 +0000 (20:42 +0000)
src/jalview/io/VamsasDatastore.java

index 77189db..cb1a466 100755 (executable)
@@ -636,6 +636,8 @@ public class VamsasDatastore {
     vProperty.setName(name);
     if (type!=null)
       vProperty.setType(type);
+    else
+      vProperty.setType("String");
     vProperty.setContent(content);
     return vProperty;
   }
@@ -1064,8 +1066,16 @@ public class VamsasDatastore {
               // construct alignment view
               alignFrame = new AlignFrame(jal);
               av=alignFrame.getViewport();
+              String title = alignment.getProvenance().getEntry(alignment.getProvenance().getEntryCount()-1).getAction();
+              if (alignment.getPropertyCount()>0) {
+                for (int p=0,pe=alignment.getPropertyCount(); p<pe; p++) {
+                  if (alignment.getProperty(p).getName().equals("jalview:AlTitle")) {
+                    title = alignment.getProperty(p).getContent();
+                  }
+                }
+              }
               // TODO: automatically create meaningful title for a vamsas alignment using its provenance.
-              jalview.gui.Desktop.addInternalFrame(alignFrame, alignment.getProvenance().getEntry(alignment.getProvenance().getEntryCount()-1).getAction(),
+              jalview.gui.Desktop.addInternalFrame(alignFrame, title + "("+alignment.getVorbaId()+")",
                   AlignFrame.NEW_WINDOW_WIDTH,
                   AlignFrame.NEW_WINDOW_HEIGHT);
               bindjvvobj(av, alignment);
@@ -1094,7 +1104,7 @@ public class VamsasDatastore {
                       inputData = (AlignmentView) idata[0];
                     tp = alignFrame.ShowNewickTree(
                         new jalview.io.NewickFile(tree.getNewick(0).getContent()),
-                        tree.getNewick(0).getTitle(),inputData,
+                        tree.getNewick(0).getTitle()+" ("+tree.getVorbaId()+")",inputData,
                         600, 500,
                         t * 20 + 50, t * 20 + 50);
                     bindjvvobj(tp, tree);
@@ -1285,6 +1295,7 @@ public class VamsasDatastore {
         jan = new jalview.datamodel.AlignmentAnnotation(a_label, a_descr, arow, min, max, type);
       } else {
         jan = new jalview.datamodel.AlignmentAnnotation(a_label, a_descr, arow);
+        jan.setThreshold(null);
       }
       if (annotation.getLinkCount()>0) {
         Cache.log.warn("Ignoring "+annotation.getLinkCount()+"links added to AlignmentAnnotation.");