working on issue of collapsed nodes in circular display
[jalview.git] / forester / java / src / org / forester / application / simple_node_processor.java
index 399f9f2..033bd9f 100644 (file)
@@ -5,7 +5,7 @@
 // Copyright (C) 2008-2009 Christian M. Zmasek
 // Copyright (C) 2008-2009 Burnham Institute for Medical Research
 // All rights reserved
-// 
+//
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
@@ -15,7 +15,7 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 // Lesser General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
@@ -28,7 +28,6 @@ package org.forester.application;
 import java.io.File;
 
 import org.forester.io.parsers.phyloxml.PhyloXmlParser;
-import org.forester.io.writers.PhylogenyWriter;
 import org.forester.phylogeny.Phylogeny;
 import org.forester.phylogeny.PhylogenyNode;
 import org.forester.phylogeny.factories.ParserBasedPhylogenyFactory;
@@ -64,8 +63,8 @@ public class simple_node_processor {
                 processNode( node, i );
                 i++;
             }
-            final PhylogenyWriter writer = new PhylogenyWriter();
-            writer.toPhyloXML( out, phylogeny_0, 0 );
+            //  final PhylogenyWriter writer = new PhylogenyWriter();
+            //  writer.toPhyloXML( out, phylogeny_0, 0 );
         }
         catch ( final Exception e ) {
             System.out.println( e.getLocalizedMessage() );
@@ -74,12 +73,19 @@ public class simple_node_processor {
         }
     }
 
+    //    private static void processNode( final PhylogenyNode node, final int i ) {
+    //        node.setDistanceToParent( PhylogenyNode.DISTANCE_DEFAULT );
+    //        if ( !node.isExternal() ) {
+    //            if ( ( node.getName() == null ) || node.getName().isEmpty() ) {
+    //                node.setName( BASE + i );
+    //            }
+    //        }
+    //    }
     private static void processNode( final PhylogenyNode node, final int i ) {
-        node.setDistanceToParent( PhylogenyNode.DISTANCE_DEFAULT );
-        if ( !node.isExternal() ) {
-            if ( ( node.getName() == null ) || node.getName().isEmpty() ) {
-                node.setName( BASE + i );
-            }
+        if ( node.isExternal() ) {
+            final String c = "" + node.getNodeData().getBinaryCharacters().getPresentCount();
+            final String s = node.getNodeData().getTaxonomy().getScientificName();
+            System.out.println( s + "\t" + c );
         }
     }
 }