applied 2009 GPL license
[jalview.git] / src / jalview / io / vamsas / Tree.java
index 663325c..b164767 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
- * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4.0.b2)
+ * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
  * 
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -186,7 +186,7 @@ public class Tree extends DatastoreItem
       prov.getEntry(0).getParam(0).setName("treeType");
       prov.getEntry(0).getParam(0).setType("utf8");
       prov.getEntry(0).getParam(0).setContent("NJ"); // TODO: type of tree is a
-                                                      // general parameter
+      // general parameter
       int ranges[] = tp.getTree().seqData.getVisibleContigs();
       // VisibleContigs are with respect to alignment coordinates. Still need
       // offsets
@@ -244,21 +244,23 @@ public class Tree extends DatastoreItem
    * 
    * Update jalview newick representation with TreeNode map
    * 
-   * @param tp the treepanel that this tree is bound to.
+   * @param tp
+   *                the treepanel that this tree is bound to.
    */
   public void UpdateSequenceTreeMap(TreePanel tp)
   {
     if (tp == null || tree == null)
       return;
     Vector leaves = new Vector();
-    if (tp.getTree()==null)
+    if (tp.getTree() == null)
     {
-      Cache.log.warn("Not updating SequenceTreeMap for "+tree.getVorbaId());
+      Cache.log.warn("Not updating SequenceTreeMap for "
+              + tree.getVorbaId());
       return;
     }
     tp.getTree().findLeaves(tp.getTree().getTopNode(), leaves);
     Treenode[] tn = tree.getTreenode(); // todo: select nodes for this
-                                        // particular tree
+    // particular tree
     int sz = tn.length;
     int i = 0;
 
@@ -310,7 +312,7 @@ public class Tree extends DatastoreItem
    * construct treenode mappings for mapped sequences
    * 
    * @param ntree
-   * @param newick 
+   * @param newick
    * @return
    */
   public Treenode[] makeTreeNodes(NJTree ntree, Newick newick)
@@ -448,7 +450,7 @@ public class Tree extends DatastoreItem
    * referenced in input data has already been associated with jalview objects.
    * 
    * @param tp
-   * @param alignFrame 
+   * @param alignFrame
    * @return Object[] { AlignmentView, AlignmentI - reference alignment for
    *         input }
    */
@@ -472,7 +474,8 @@ public class Tree extends DatastoreItem
         // is this the whole alignment or a specific set of sequences ?
         if (vInput.getObjRefCount() == 0)
         {
-          if (tree.getV_parent()!=null && tree.getV_parent() instanceof uk.ac.vamsas.objects.core.Alignment)
+          if (tree.getV_parent() != null
+                  && tree.getV_parent() instanceof uk.ac.vamsas.objects.core.Alignment)
           {
             javport = getViewport(tree.getV_parent());
             jal = javport.getAlignment();
@@ -493,7 +496,8 @@ public class Tree extends DatastoreItem
           else if (vInput.getObjRef(0) instanceof uk.ac.vamsas.objects.core.AlignmentSequence)
           {
             // recover an AlignmentView for the input data
-            javport = getViewport(((Vobject) vInput.getObjRef(0)).getV_parent());
+            javport = getViewport(((Vobject) vInput.getObjRef(0))
+                    .getV_parent());
             jal = javport.getAlignment();
             jalview.datamodel.SequenceI[] seqs = new jalview.datamodel.SequenceI[vInput
                     .getObjRefCount()];
@@ -575,7 +579,7 @@ public class Tree extends DatastoreItem
   {
     try
     {
-      if (ntree==null)
+      if (ntree == null)
       {
         return false;
       }