Project

General

Profile

Revision d40ad0be

IDd40ad0be524bc14061fff662a7b40de301f4ed19
Parent 9892fe45
Child 0c949c56

Added by Andreas Müller over 2 years ago

fix #6060 parse author with -e-

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/parser/NonViralNameParserImplRegExBase.java
93 93

  
94 94
    //AuthorString
95 95
    protected static String qm = "[" + UTF8.RIGHT_SINGLE_QUOT + "'`]";
96
    protected static String authorPart = "(" + "([OdDL]"+qm+"|[’'`]t|ten\\s||le\\s|zur\\s)?" + "(" + capital2charDotWord + "|DC.)" + "(" + qm + nonCapitalDotWord + ")?" + "|[vV][ao]n(\\sder)?|da|du|de(n|l|\\sla)?)" ;
96
    protected static String authorPart = "(" + "([OdDL]"+qm+"|[’'`]t|ten\\s||le\\s|zur\\s)?" + "(" + capital2charDotWord + "|DC.)" + "(" + qm + nonCapitalDotWord + ")?" + "|[vV][ao]n(\\sder)?|da|du|-e|de(n|l|\\sla)?)" ;
97 97
    protected static String author = "(" + authorPart + "(" + fWs + "|-)" + ")+" + "(f\\.|fil\\.|secundus)?" ;
98 98
    protected static String finalTeamSplitter = "(" + fWs + "(&)" + fWs + "|" + oWs + "et" + oWs + ")";
99 99
    protected static String notFinalTeamSplitter = "(?:" + fWs + "," + fWs + "|" + finalTeamSplitter + ")";
cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/parser/NonViralNameParserImplTest.java
2030 2030
        Assert.assertFalse("Name should be parsable", name.isProtectedTitleCache());
2031 2031
        assertEquals( "O`Brian", name.getCombinationAuthorship().getNomenclaturalTitle());
2032 2032

  
2033
        //-e-  #6060
2034
        name = parser.parseReferencedName("Thamniopsis stenodictyon (Sehnem) Oliveira-e-Silva & O.Yano");
2035
        Assert.assertFalse("Name should be parsable", name.isProtectedTitleCache());
2036
        Team team = (Team)name.getCombinationAuthorship();
2037
        assertEquals( "Oliveira-e-Silva", team.getTeamMembers().get(0).getNomenclaturalTitle());
2033 2038

  
2034 2039
 }
2035 2040

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)