inprogress
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Mon, 16 Sep 2013 19:48:34 +0000 (19:48 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Mon, 16 Sep 2013 19:48:34 +0000 (19:48 +0000)
forester/java/src/org/forester/application/simple_node_processor.java
forester/java/src/org/forester/archaeopteryx/AptxUtil.java
forester/java/src/org/forester/archaeopteryx/Configuration.java
forester/java/src/org/forester/archaeopteryx/Constants.java
forester/java/src/org/forester/archaeopteryx/ControlPanel.java
forester/java/src/org/forester/archaeopteryx/TreePanel.java
forester/java/src/org/forester/phylogeny/data/NodeData.java

index 3dac018..7420bc2 100644 (file)
@@ -58,7 +58,7 @@ public class simple_node_processor {
     //            }
     //        }
     //    }
-    private static void processNode( final PhylogenyNode node, final int i, String label ) {
+    private static void processNode( final PhylogenyNode node, final int i, final String label ) {
         //if ( node.isExternal() ) {
         //    final String c = "" + node.getNodeData().getBinaryCharacters().getPresentCount();
         //    final String s = node.getNodeData().getTaxonomy().getScientificName();
@@ -87,7 +87,7 @@ public class simple_node_processor {
                 //    }
                 //}
                 // node.setName( "" );
-                Taxonomy t = node.getNodeData().getTaxonomy();
+                final Taxonomy t = node.getNodeData().getTaxonomy();
                 System.out.println( t.getTaxonomyCode() + "\t" + t.getScientificName() + "\t" + t.getCommonName()
                         + "\t" + label );
             }
index b874665..3ba5102 100644 (file)
@@ -344,6 +344,10 @@ public final class AptxUtil {
                 && !ForesterUtil.isEmpty( node.getNodeData().getTaxonomy().getScientificName() ) ) {
             showExtDescNodeDataUserSelectedHelperHelper( node.getNodeData().getTaxonomy().getScientificName(), sb );
         }
+        if ( cp.isShowTaxonomyCommonNames() && node.getNodeData().isHasTaxonomy()
+                && !ForesterUtil.isEmpty( node.getNodeData().getTaxonomy().getCommonName() ) ) {
+            showExtDescNodeDataUserSelectedHelperHelper( node.getNodeData().getTaxonomy().getCommonName(), sb );
+        }
         if ( ( cp.isShowGeneNames() || cp.isShowGeneSymbols() || cp.isShowSequenceAcc() )
                 && node.getNodeData().isHasSequence()
                 && !ForesterUtil.isEmpty( node.getNodeData().getSequence().getMolecularSequence() ) ) {
@@ -785,6 +789,9 @@ public final class AptxUtil {
                 desc.append( "Distinct external taxonomies: " );
                 desc.append( taxs.size() );
             }
+            for( final Taxonomy t : taxs ) {
+                System.out.println( t.toString() );
+            }
             desc.append( "\n" );
             final DescriptiveStatistics bs = PhylogenyMethods.calculatBranchLengthStatistics( phy );
             if ( bs.getN() > 3 ) {
index 4aa85f2..1398c25 100644 (file)
@@ -1441,6 +1441,9 @@ public final class Configuration {
             else if ( s.equalsIgnoreCase( "taxonomy_code" ) ) {
                 setExtDescNodeDataToReturn( NODE_DATA.TAXONOMY_CODE );
             }
+            else if ( s.equalsIgnoreCase( "taxonomy_common_name" ) ) {
+                setExtDescNodeDataToReturn( NODE_DATA.TAXONOMY_COMM0N_NAME );
+            }
             else if ( s.equalsIgnoreCase( "user_selected" ) ) {
                 setExtDescNodeDataToReturn( NODE_DATA.UNKNOWN );
             }
index d1148d0..697f232 100644 (file)
@@ -43,7 +43,7 @@ public final class Constants {
     public final static boolean ALLOW_DDBJ_BLAST                                              = false;
     public final static String  PRG_NAME                                                      = "Archaeopteryx";
     final static String         VERSION                                                       = "0.9813 A1ST";
-    final static String         PRG_DATE                                                      = "130528";
+    final static String         PRG_DATE                                                      = "130913";
     final static String         DEFAULT_CONFIGURATION_FILE_NAME                               = "_aptx_configuration_file";
     final static String[]       DEFAULT_FONT_CHOICES                                          = { "Arial", "Helvetica",
             "Verdana", "Tahoma", "Dialog", "Lucida Sans", "SansSerif", "Sans-serif", "Sans"  };
index 95a53b4..6df3e33 100644 (file)
@@ -1758,6 +1758,9 @@ final class ControlPanel extends JPanel implements ActionListener {
                     case TAXONOMY_CODE:
                         s = "Taxonomy Codes";
                         break;
+                    case TAXONOMY_COMM0N_NAME:
+                        s = "Taxonomy Common Names";
+                        break;
                     case TAXONOMY_SCIENTIFIC_NAME:
                         s = "Scientific Names";
                         break;
index 559d120..7fc9ac0 100644 (file)
@@ -3243,6 +3243,8 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                 return "Scientific Names";
             case TAXONOMY_CODE:
                 return "Taxonomy Codes";
+            case TAXONOMY_COMM0N_NAME:
+                return "Taxonomy Common Names";
             case UNKNOWN:
                 return "User Selected Data";
             default:
@@ -5119,6 +5121,12 @@ public final class TreePanel extends JPanel implements ActionListener, MouseWhee
                         data.add( n.getNodeData().getTaxonomy().getScientificName() );
                     }
                     break;
+                case TAXONOMY_COMM0N_NAME:
+                    if ( n.getNodeData().isHasTaxonomy()
+                            && !ForesterUtil.isEmpty( n.getNodeData().getTaxonomy().getCommonName() ) ) {
+                        data.add( n.getNodeData().getTaxonomy().getCommonName() );
+                    }
+                    break;
                 case TAXONOMY_CODE:
                     if ( n.getNodeData().isHasTaxonomy()
                             && !ForesterUtil.isEmpty( n.getNodeData().getTaxonomy().getTaxonomyCode() ) ) {
index a40cc74..4591155 100644 (file)
@@ -47,6 +47,7 @@ public class NodeData implements PhylogenyData {
         SEQUENCE_MOL_SEQ_FASTA,
         SEQUENCE_ACC,
         TAXONOMY_SCIENTIFIC_NAME,
+        TAXONOMY_COMM0N_NAME,
         TAXONOMY_CODE,
         UNKNOWN;
     }