search binary characters
authorcmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Thu, 28 Jul 2011 20:06:36 +0000 (20:06 +0000)
committercmzmasek@gmail.com <cmzmasek@gmail.com@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Thu, 28 Jul 2011 20:06:36 +0000 (20:06 +0000)
forester/java/src/org/forester/phylogeny/PhylogenyMethods.java

index 5b936d5..b118fb5 100644 (file)
@@ -1011,6 +1011,15 @@ public class PhylogenyMethods {
                     }
                 }
             }
+            else if ( node.getNodeData().getBinaryCharacters() != null ) {
+                final String[] bc_ary = node.getNodeData().getBinaryCharacters().getPresentCharactersAsStringArray();
+                I: for( final String bc : bc_ary ) {
+                    if ( match( bc, query, case_sensitive, partial ) ) {
+                        match = true;
+                        break I;
+                    }
+                }
+            }
             if ( match ) {
                 nodes.add( node );
             }
@@ -1093,6 +1102,16 @@ public class PhylogenyMethods {
                         }
                     }
                 }
+                else if ( node.getNodeData().getBinaryCharacters() != null ) {
+                    final String[] bc_ary = node.getNodeData().getBinaryCharacters()
+                            .getPresentCharactersAsStringArray();
+                    I: for( final String bc : bc_ary ) {
+                        if ( match( bc, query, case_sensitive, partial ) ) {
+                            match = true;
+                            break I;
+                        }
+                    }
+                }
                 if ( !match ) {
                     all_matched = false;
                     break;