Changed map parser to ignore " in lines like "x y z" (at ComPhy 2012 Moscow)
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 8 Aug 2012 07:40:54 +0000 (07:40 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Wed, 8 Aug 2012 07:40:54 +0000 (07:40 +0000)
forester/java/src/org/forester/application/decorator.java
forester/java/src/org/forester/archaeopteryx/Constants.java
forester/java/src/org/forester/tools/PhylogenyDecorator.java
forester/java/src/org/forester/util/BasicTableParser.java
forester/java/src/org/forester/util/ForesterConstants.java

index 241ddaf..be44f67 100644 (file)
@@ -71,8 +71,8 @@ public final class decorator {
     final static private String  MAPPING_FILE_SEPARATOR_DEFAULT         = ":";
     final static private boolean USE_FIRST_SEPARATOR_ONLY               = true;
     final static private String  PRG_NAME                               = "decorator";
-    final static private String  PRG_VERSION                            = "1.10";
-    final static private String  PRG_DATE                               = "2009.10.08";
+    final static private String  PRG_VERSION                            = "1.11";
+    final static private String  PRG_DATE                               = "2012.08.08";
 
     private static void argumentsError() {
         System.out.println();
index 75bae3d..6f98cf5 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.972+ 9M";
-    final static String         PRG_DATE                                                      = "2012.06.29";
+    final static String         PRG_DATE                                                      = "120808";
     final static String         DEFAULT_CONFIGURATION_FILE_NAME                               = "_aptx_configuration_file";
     final static String[]       DEFAULT_FONT_CHOICES                                          = { "Verdana", "Tahoma",
             "Arial", "Helvetica", "Dialog", "Lucida Sans", "SansSerif", "Sans-serif", "Sans" };
index e67ae8e..f01701a 100644 (file)
@@ -154,9 +154,10 @@ public final class PhylogenyDecorator {
                         if ( new_values.containsKey( TP_NODE_NAME ) ) {
                             node.setName( new_values.get( TP_NODE_NAME ) );
                         }
-                    }
-                }
+                    } // if ( new_values != null ) 
+                } // if ( map.containsKey( name ) || ( numbers_of_chars_allowed_to_remove_if_not_found_in_map > 0 ) )
                 else if ( picky ) {
+                    System.out.println( map.toString() );
                     throw new IllegalArgumentException( "\"" + name + "\" not found in name map" );
                 }
             }
index 8ab9622..59e5cd2 100644 (file)
@@ -67,6 +67,18 @@ public class BasicTableParser {
         final boolean use_start_of_comment_line = !( ForesterUtil.isEmpty( start_of_comment_line ) );
         while ( ( line = reader.readLine() ) != null ) {
             line = line.trim();
+            if ( !ForesterUtil.isEmpty( line) && 
+                    
+                    
+                     (( line.charAt( 0 ) == '"' && line.charAt( line.length() -1 ) == '"' && ForesterUtil.countChars( line, '"' ) == 2 ) 
+                             
+                             ||
+                             
+                             
+                      ( line.charAt( 0 ) == '\'' && line.charAt( line.length() -1 ) == '\'' && ForesterUtil.countChars( line, '\'' ) == 2  ) ) ) {
+                line = line.substring( 1, line.length() -1  ).trim();
+            }
+            
             if ( saw_first_table
                     && ( ForesterUtil.isEmpty( line ) || ( tables_separated_by_single_string_line && ( line
                             .indexOf( column_delimiter ) < 0 ) ) ) ) {
index c39a50d..5e8813d 100644 (file)
@@ -28,7 +28,7 @@ package org.forester.util;
 public final class ForesterConstants {
 
     public final static String  FORESTER_VERSION            = "1.005+";
-    public final static String  FORESTER_DATE               = "120629";
+    public final static String  FORESTER_DATE               = "120808";
     public final static String  PHYLO_XML_VERSION           = "1.10";
     public final static String  PHYLO_XML_LOCATION          = "http://www.phyloxml.org";
     public final static String  PHYLO_XML_XSD               = "phyloxml.xsd";