Solved an issue where a reference with an uppercase word (e.g. SSSR) was not parsable
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / strategy / parser / NonViralNameParserImplRegExBase.java
index 6726568f84f58f22d94072394fcddf8f4a98384a..b2a76c91f74424bb1486ecc5b424846bbf0c9295 100644 (file)
@@ -41,7 +41,7 @@ public abstract class NonViralNameParserImplRegExBase  {
     protected static String capitalWord = "\\p{javaUpperCase}\\p{javaLowerCase}*";\r
     protected static String nonCapitalWord = "\\p{javaLowerCase}+";\r
     protected static String word = "(" + capitalWord + "|" + nonCapitalWord + ")"; //word (capital or non-capital) with no '.' at the end\r
-    \r
+    protected static String uppercaseWord = "\\p{javaUpperCase}+";\r
     \r
     protected static String capitalDotWord = capitalWord + "\\.?"; //capitalWord with facultativ '.' at the end\r
     protected static String nonCapitalDotWord = nonCapitalWord + "\\.?"; //nonCapitalWord with facultativ '.' at the end\r
@@ -174,7 +174,7 @@ public abstract class NonViralNameParserImplRegExBase  {
     protected static String pTitleWordSeparator = "(\\."+ fWs+"|" + oWs + ")";  \r
     protected static String pSeriesPart = ",?" + fWs + "[sS]er(\\.)?" + oWs + "\\d{1,2},?";\r
     protected static String referenceTitleFirstPart = "(" + word + pTitleWordSeparator + ")";\r
-    protected static String referenceTitle = referenceTitleFirstPart + "*" + "("+ dotWord + "|" + pSeriesPart + ")";  //reference title may have words seperated by whitespace or dot. The last word may not have a whitespace at the end. There must be at least one word \r
+    protected static String referenceTitle = referenceTitleFirstPart + "*" + "("+ dotWord + "|" + uppercaseWord + "|" + pSeriesPart + ")";  //reference title may have words seperated by whitespace or dot. The last word may not have a whitespace at the end. There must be at least one word \r
     protected static String referenceTitleWithSepCharacters = "(((" + referenceTitle +"|\\(.+\\))"  + anySepChar + ")*" + referenceTitle + ")"; //,?\r
     //TODO test performance ??\r
     protected static String referenceTitleWithSepCharactersAndBrackets = referenceTitleWithSepCharacters + fWs + "(\\(" + referenceTitleWithSepCharacters + "\\)"+fWs+ ")?(" + referenceTitleWithSepCharacters +")?"  ; \r