Project

General

Profile

Revision c70266b8

IDc70266b8a4f731bfc839599f54ecc5b355796b5e
Parent 66ad8f4a
Child 734fb920

Added by Andreas Müller over 1 year ago

ref #7304 reduce author part in booksections to 2 words in name parser

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/parser/NonViralNameParserImplRegExBase.java
193 193
    protected static String anySepChar = "([\u005E:a-zA-Z]" + fWs + ")"; //all characters except for the detail separator, a stricter version would be [,\\-\\&] and some other characters
194 194
//  protected static String anySepChar = "([,\\-\\&\\.\\+\\']" + fWs + ")";
195 195

  
196
    protected static int authorSeparatorMaxPosition = 4;  //Author may have a maximum of 4 words
196
    protected static int authorSeparatorMaxPosition = 3;  //author may have a maximum of 2 words
197 197
    protected static String pTitleWordSeparator = "(\\."+ fWs+"|" + oWs + "|\\.?[-\u2013])";
198 198
    protected static String pSeriesPart = ",?" + fWs + "[sS]er(\\.)?" + oWs + "\\d{1,2},?";
199 199

  
cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/parser/NonViralNameParserImplTest.java
2285 2285
        //or even better IV. 111 (Heft 36), but this is currently not implemented
2286 2286
        assertEquals("111 (Heft 36)", ref.getInReference().getVolume());
2287 2287

  
2288
        nameStr = "Bufonia kotschyana subsp. densa Chrtek & Křísa in Acta Univ.Carol., Biol. 43(2): 105. 1999";
2289
        name = parser.parseReferencedName(nameStr);
2290
        Assert.assertFalse("Name should be parsable", name.isProtectedTitleCache());
2291
        String author = name.getAuthorshipCache();
2292
        assertEquals("Chrtek & Křísa", author);
2293
        ref = (Reference)name.getNomenclaturalReference();
2294
        Assert.assertNotNull("Nomenclatural reference should be an article and therefore have an in reference", ref.getInReference());
2295
        Assert.assertEquals(ReferenceType.Journal, ref.getInReference().getType());
2288 2296

  
2289 2297
    }
2290 2298

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)