From c5a00522faf7be1083984798be2c72d3acbdf084 Mon Sep 17 00:00:00 2001 From: cmzmasek Date: Thu, 30 Aug 2012 07:33:28 +0000 Subject: [PATCH] in progress --- .../src/org/forester/tools/PhylogenyDecorator.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/forester/java/src/org/forester/tools/PhylogenyDecorator.java b/forester/java/src/org/forester/tools/PhylogenyDecorator.java index 90959dc..acf6b39 100644 --- a/forester/java/src/org/forester/tools/PhylogenyDecorator.java +++ b/forester/java/src/org/forester/tools/PhylogenyDecorator.java @@ -68,6 +68,7 @@ public final class PhylogenyDecorator { .compile( "^([a-fA-Z0-9]{1,5})_([A-Z0-9]{2,4}[A-Z])(\\d{1,4})$" ); public final static boolean SANITIZE = false; public final static boolean VERBOSE = true; + private static final boolean CUT = true; private PhylogenyDecorator() { // Not needed. @@ -239,6 +240,24 @@ public final class PhylogenyDecorator { if ( intermediate_map != null ) { name = PhylogenyDecorator.extractIntermediate( intermediate_map, name ); } + // int space_index = name.indexOf( " " ); + // if ( CUT && space_index > 0 ) { + // int y = name.lastIndexOf( "|" ); + // name = name.substring( y + 1, space_index ); + // } + // String new_value = null; + // for( String key : map.keySet() ) { + // if ( key.indexOf( name ) >= 0 ) { + // if ( new_value == null ) { + // new_value = map.get( key ); + // } + // else { + // System.out.println( name + " is not unique" ); + // System.exit( -1 ); + // } + // } + // } + // if ( new_value != null ) { if ( map.containsKey( name ) || ( numbers_of_chars_allowed_to_remove_if_not_found_in_map > 0 ) ) { String new_value = map.get( name ); int x = 0; -- 1.7.10.2