applied 2009 GPL license
[jalview.git] / src / jalview / io / vamsas / Tree.java
index eb4af4a..b164767 100644 (file)
@@ -1,3 +1,21 @@
+/*
+ * 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
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+ */
 package jalview.io.vamsas;
 
 import java.io.IOException;
@@ -168,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
@@ -226,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;
 
@@ -292,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)
@@ -430,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 }
    */
@@ -454,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();
@@ -475,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()];
@@ -557,7 +579,7 @@ public class Tree extends DatastoreItem
   {
     try
     {
-      if (ntree==null)
+      if (ntree == null)
       {
         return false;
       }