Project

General

Profile

« Previous | Next » 

Revision 0498d2f2

Added by Andreas Müller over 8 years ago

Fix preliminary 2 capitel author parsing #5096

View differences:

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

  
85 85

  
86 86
    //AuthorString
87
	protected static String authorPart = "(" + "(O'|d'|D'|L'|'t|ten\\s||le\\s|zur\\s)?" + capital2charDotWord + "('" + nonCapitalDotWord + ")?" + "|[vV][ao]n(\\sder)?|da|du|de(n|l|\\sla)?)" ;
87
	protected static String authorPart = "(" + "(O'|d'|D'|L'|'t|ten\\s||le\\s|zur\\s)?" + "(" + capital2charDotWord + "|DC.)" + "('" + nonCapitalDotWord + ")?" + "|[vV][ao]n(\\sder)?|da|du|de(n|l|\\sla)?)" ;
88 88
    protected static String author = "(" + authorPart + "(" + fWs + "|-)" + ")+" + "(f\\.|fil\\.|secundus)?" ;
89 89
    protected static String finalTeamSplitter = "(" + fWs + "(&)" + fWs + "|" + oWs + "et" + oWs + ")";
90 90
    protected static String notFinalTeamSplitter = "(?:" + fWs + "," + fWs + "|" + finalTeamSplitter + ")";
cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/parser/NonViralNameParserImplTest.java
326 326
		assertFalse(authorname.hasProblem());
327 327
		assertEquals("Basionym author should have 3 authors", 2, ((Team)authorname.getExBasionymAuthorship()).getTeamMembers().size());
328 328
        Assert.assertTrue("ExbasionymAuthorship must have more members'", ((Team)authorname.getExBasionymAuthorship()).isHasMoreMembers());
329

  
330
        //author with 2 capitals
331
        fullNameString = "Campanula rhodensis A. DC.";
332
        NonViralName name = parser.parseFullName(fullNameString);
333
        assertFalse(name.hasProblem());
334

  
329 335
	}
330 336

  
331 337
	@Test
......
1564 1570
	public final void testNomenclaturalStatus() {
1565 1571
		BotanicalName name = BotanicalName.NewInstance(Rank.FAMILY(), "Acanthopale", null, null, null, null, null, null, null);
1566 1572
		name.addStatus(NomenclaturalStatus.NewInstance(NomenclaturalStatusType.ALTERNATIVE()));
1567

  
1568 1573
		BotanicalName name2 = BotanicalName.NewInstance(Rank.FAMILY());
1569

  
1570 1574
		parser.parseReferencedName(name2, name.getFullTitleCache(),	name2.getRank(), true);
1571

  
1572 1575
		parser.parseReferencedName(name2, name.getFullTitleCache(),	name2.getRank(), true);
1573

  
1574 1576
		Assert.assertEquals("Title cache should be same. No duplication of nom. status should take place", name.getFullTitleCache(), name2.getFullTitleCache());
1577
	}
1575 1578

  
1576

  
1579
	@Test
1580
	public final void testSpecificAuthors(){
1581
//	    Campanula rhodensis A. DC.
1577 1582
	}
1578 1583

  
1579 1584
}

Also available in: Unified diff