@Test public void testCompareUnparsedAuthor() throws Exception { ParsedName p1 = new ParsedName(); p1.setScientificName("Platanus x hispanica Mill. ex Münch., 1770"); p1.setGenusOrAbove("Platanus"); p1.setSpecificEpithet("hispanica"); p1.setNotho(NamePart.SPECIFIC); p1.setParsed(false); ParsedName p2 = new ParsedName(); p2.setScientificName("Platanus hispanica Mill. ex Münch."); p2.setGenusOrAbove("Platanus"); p2.setSpecificEpithet("hispanica"); p2.setNotho(NamePart.SPECIFIC); p2.setAuthorship("Mill. ex Münch."); p2.setParsed(true); assertEquals(Equality.UNKNOWN, comp.compare(p1, p2)); }
public Equality compare(@Nullable String authors1, @Nullable String year1, @Nullable String authors2, @Nullable String year2) { Equality result = compareAuthorteam(authors1, authors2, minCommonSubstring, MIN_AUTHOR_LENGTH_WITHOUT_LOOKUP); if (result != Equality.EQUAL) { Equality yresult = new YearComparator(year1, year2).compare(); if (yresult != Equality.UNKNOWN) { result = yresult; } } return result; }
AuthorComparator { public Equality compare(@Nullable String authors1, @Nullable String year1, @Nullable String authors2, @Nullable String year2) { Equality result = compareAuthorteam(authors1, authors2, minCommonSubstring, MIN_AUTHOR_LENGTH_WITHOUT_LOOKUP); if (result != Equality.EQUAL) { Equality yresult = new YearComparator(year1, year2).compare(); if (yresult != Equality.UNKNOWN) { result = yresult; } } return result; } }
AuthorComparator { public Equality compare(@Nullable String authors1, @Nullable String year1, @Nullable String authors2, @Nullable String year2) { Equality result = compareAuthorteam(authors1, authors2, minCommonSubstring, MIN_AUTHOR_LENGTH_WITHOUT_LOOKUP); if (result != Equality.EQUAL) { Equality yresult = new YearComparator(year1, year2).compare(); if (yresult != Equality.UNKNOWN) { result = yresult; } } return result; } private  AuthorComparator(Map<String, String> authors); }
AuthorComparator { public Equality compare(@Nullable String authors1, @Nullable String year1, @Nullable String authors2, @Nullable String year2) { Equality result = compareAuthorteam(authors1, authors2, minCommonSubstring, MIN_AUTHOR_LENGTH_WITHOUT_LOOKUP); if (result != Equality.EQUAL) { Equality yresult = new YearComparator(year1, year2).compare(); if (yresult != Equality.UNKNOWN) { result = yresult; } } return result; } private  AuthorComparator(Map<String, String> authors); static AuthorComparator createWithoutAuthormap(); static AuthorComparator createWithAuthormap(); static AuthorComparator createWithAuthormap(Map<String, String> authorMap); Equality compare(@Nullable String authors1, @Nullable String year1, @Nullable String authors2, @Nullable String year2); Equality compare(ParsedName n1, ParsedName n2); boolean compareStrict(String author1, @Nullable String year1, String author2, @Nullable String year2); }
AuthorComparator { public Equality compare(@Nullable String authors1, @Nullable String year1, @Nullable String authors2, @Nullable String year2) { Equality result = compareAuthorteam(authors1, authors2, minCommonSubstring, MIN_AUTHOR_LENGTH_WITHOUT_LOOKUP); if (result != Equality.EQUAL) { Equality yresult = new YearComparator(year1, year2).compare(); if (yresult != Equality.UNKNOWN) { result = yresult; } } return result; } private  AuthorComparator(Map<String, String> authors); static AuthorComparator createWithoutAuthormap(); static AuthorComparator createWithAuthormap(); static AuthorComparator createWithAuthormap(Map<String, String> authorMap); Equality compare(@Nullable String authors1, @Nullable String year1, @Nullable String authors2, @Nullable String year2); Equality compare(ParsedName n1, ParsedName n2); boolean compareStrict(String author1, @Nullable String year1, String author2, @Nullable String year2);  }