new option
[jalview.git] / forester / java / src / org / forester / application / decorator.java
index 8084ee2..acf8c50 100644 (file)
@@ -21,7 +21,7 @@
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 //
 // Contact: phylosoft @ gmail . com
-// WWW: www.phylosoft.org/forester
+// WWW: https://sites.google.com/site/cmzmasek/home/software/forester
 
 package org.forester.application;
 
@@ -69,10 +69,10 @@ public final class decorator {
     final static private String KEY_COLUMN                              = "k";
     final static private String VALUE_COLUMN                            = "v";
     final static private String MAPPING_FILE_SEPARATOR_OPTION           = "s";
-    final static private String MAPPING_FILE_SEPARATOR_DEFAULT          = ": ";
+    final static private char   MAPPING_FILE_SEPARATOR_DEFAULT          = '\t';
     final static private String PRG_NAME                                = "decorator";
-    final static private String PRG_VERSION                             = "1.12";
-    final static private String PRG_DATE                                = "2012.12.21";
+    final static private String PRG_VERSION                             = "1.13";
+    final static private String PRG_DATE                                = "2013.01.19";
 
     public static void main( final String args[] ) {
         ForesterUtil.printProgramInformation( decorator.PRG_NAME, decorator.PRG_VERSION, decorator.PRG_DATE );
@@ -126,12 +126,12 @@ public final class decorator {
             }
         }
         final boolean picky = cla.isOptionSet( decorator.PICKY_OPTION );
-        String separator = decorator.MAPPING_FILE_SEPARATOR_DEFAULT;
+        char separator = decorator.MAPPING_FILE_SEPARATOR_DEFAULT;
         if ( cla.isOptionSet( decorator.MAPPING_FILE_SEPARATOR_OPTION ) ) {
             if ( advanced_table ) {
                 argumentsError();
             }
-            separator = cla.getOptionValue( decorator.MAPPING_FILE_SEPARATOR_OPTION );
+            separator = cla.getOptionValueAsChar( decorator.MAPPING_FILE_SEPARATOR_OPTION );
         }
         int key_column = 0;
         int value_column = 1;
@@ -277,7 +277,7 @@ public final class decorator {
         if ( !advanced_table ) {
             BasicTable<String> mapping_table = null;
             try {
-                mapping_table = BasicTableParser.parse( mapping_infile, separator, false, true );
+                mapping_table = BasicTableParser.parse( mapping_infile, separator, true, false );
             }
             catch ( final Exception e ) {
                 ForesterUtil.fatalError( decorator.PRG_NAME,