in progress
authorcmzmasek <cmzmasek@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Sun, 13 Apr 2014 03:55:57 +0000 (03:55 +0000)
committercmzmasek <cmzmasek@ca865154-3058-d1c3-3e42-d8f55a55bdbd>
Sun, 13 Apr 2014 03:55:57 +0000 (03:55 +0000)
forester/java/src/org/forester/io/parsers/util/ParserUtils.java
forester/java/src/org/forester/test/Test.java

index ef37f98..b37dbeb 100644 (file)
@@ -69,7 +69,7 @@ public final class ParserUtils {
     final public static Pattern  TAXOMONY_SN_PATTERN_STRAIN_2    = Pattern
                                                                          .compile( "\\b([A-Z][a-z]{2,30}[_ ][a-z]{3,30}[_ ]\\((?:str|subsp|var)[a-z]{0,5}\\.?[_ ]\\S{1,60}\\))(?:\\b|_)?" );
     final public static Pattern  TAXOMONY_SN_PATTERN_SP    = Pattern
-            .compile( "\\b([A-Z][a-z]{2,30}[_ ]sp\\.)(?:\\b|_)?" );
+            .compile( "\\b([A-Z][a-z]{2,30}[_ ]sp\\.?)(?:\\b|_)?" );
 
     final public static Pattern  TAXOMONY_SN_PATTERN_GENUS       = Pattern.compile( "([A-Z][a-z]{2,30})" );
     final private static Pattern TAXOMONY_CODE_PATTERN_PFS       = Pattern.compile( "(?:\\b|_)[A-Z0-9]{4,}_("
index c89be53..78fe31b 100644 (file)
@@ -4286,6 +4286,11 @@ public final class Test {
                 
                 
                 return false;
+            } if ( !ParserUtils.extractScientificNameFromNodeName( "Macrocera sp" )
+                    .equals( "Macrocera sp" ) ) {
+                
+                
+                return false;
             }
         }
         catch ( final Exception e ) {