Project

General

Profile

« Previous | Next » 

Revision e12efde6

Added by Andreas Müller over 7 years ago

NameParser: allow letter for issue

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/parser/NonViralNameParserImplRegExBase.java
186 186
    protected static String detail = pDetailAlternatives;
187 187

  
188 188
    //reference
189
    protected static String volume = nr4 + "[a-z]?" + fWs + "(\\("+ nr4  + "([-\u2013]" + nr4 + ")?\\))?" + "(\\((Suppl|Beibl|App|Beil|Misc)\\.\\))?";
189
    protected static String volume = nr4 + "[a-z]?" + fWs + "(\\("+ nr4 + "[a-z]?"  + "([-\u2013]" + nr4 + ")?\\))?" + "(\\((Suppl|Beibl|App|Beil|Misc)\\.\\))?";
190 190
    //this line caused problem https://dev.e-taxonomy.eu/trac/ticket/1556 in its original form: "([\u005E:\\.]" + fWs + ")";
191 191
    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
192 192
//  protected static String anySepChar = "([,\\-\\&\\.\\+\\']" + fWs + ")";
cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/parser/NonViralNameParserImplTest.java
1949 1949
//        assertEquals("930", name.getNomenclaturalMicroReference());
1950 1950
//        assertEquals("1759", nomRef.getYear());
1951 1951

  
1952
        //issue with letter "(1a)"
1953
        name = parser.parseReferencedName("Arthraerua (Kuntze) Schinz,"
1954
                + " Nat. Pflanzenfam. 3(1a): 109. 1893");
1955
        Assert.assertFalse("Name should be parsable", name.isProtectedTitleCache());
1956
        combinationAuthor = name.getCombinationAuthorship();
1957
        assertEquals( "Schinz", combinationAuthor.getNomenclaturalTitle());
1958
        nomRef = (Reference)name.getNomenclaturalReference();
1959
        Assert.assertFalse("Reference should be parsable", nomRef.isProtectedTitleCache());
1960
        assertEquals(ReferenceType.Book, nomRef.getType());
1961
        assertEquals("Nat. Pflanzenfam.", nomRef.getAbbrevTitle());
1962
        assertEquals("3(1a)", nomRef.getVolume());
1963
        assertEquals("109", name.getNomenclaturalMicroReference());
1964
        assertEquals("1893", nomRef.getYear());
1965

  
1952 1966
 }
1953 1967

  
1954 1968
}

Also available in: Unified diff