@Test public void testNorm() throws Exception { assertEquals("malvastrum yelow vein virus satelite dna s", IdLookupImpl.norm("Malvastrum yellow vein virus satellite DNA ß")); assertNull(IdLookupImpl.norm(null)); assertNull(IdLookupImpl.norm("")); assertNull(IdLookupImpl.norm(" ")); assertEquals("abies", IdLookupImpl.norm("Abies")); assertEquals("abies", IdLookupImpl.norm("ABiES")); assertEquals("abies alba", IdLookupImpl.norm("Abiés alba")); assertEquals("albino", IdLookupImpl.norm("Albiño")); assertEquals("donatia novaezelandiae", IdLookupImpl.norm("Donatia novae-zelandiæ")); assertEquals("abies olsen", IdLookupImpl.norm("Abies ölsen")); assertEquals("abies oeftaen", IdLookupImpl.norm("Abies œftæn")); assertEquals("carex caioueti", IdLookupImpl.norm("Carex ×cayouettei")); assertEquals("carex comosa carex lupulina", IdLookupImpl.norm("Carex comosa × Carex lupulina")); assertEquals("aeropyrum coilshaped vira", IdLookupImpl.norm("Aeropyrum coil-shaped virus")); assertEquals("†lachnus boneti", IdLookupImpl.norm("†Lachnus bonneti")); assertEquals("bold:aaj6407", IdLookupImpl.norm("BOLD:AAJ6407")); assertEquals("sh486523.07fu", IdLookupImpl.norm("SH486523.07FU")); }
@VisibleForTesting protected static String norm(String x) { x = SciNameNormalizer.normalize(x); return StringUtils.isBlank(x) ? null : x.toLowerCase(); }
IdLookupImpl implements IdLookup { @VisibleForTesting protected static String norm(String x) { x = SciNameNormalizer.normalize(x); return StringUtils.isBlank(x) ? null : x.toLowerCase(); } }
IdLookupImpl implements IdLookup { @VisibleForTesting protected static String norm(String x) { x = SciNameNormalizer.normalize(x); return StringUtils.isBlank(x) ? null : x.toLowerCase(); } private  IdLookupImpl(DB db); }
IdLookupImpl implements IdLookup { @VisibleForTesting protected static String norm(String x) { x = SciNameNormalizer.normalize(x); return StringUtils.isBlank(x) ? null : x.toLowerCase(); } private  IdLookupImpl(DB db); static IdLookupImpl persistent(File db); static IdLookupImpl temp(); IdLookupImpl load(Iterable<LookupUsage> usages); IdLookupImpl load(ClbConfiguration clb, boolean includeDeleted); @Override void close(); int getKeyMax(); AuthorComparator getAuthorComparator(); @Override LookupUsage match(String canonicalName, Rank rank, Kingdom kingdom); @Override List<LookupUsage> match(String canonicalName); @Override LookupUsage match(final String canonicalName, @Nullable String authorship, @Nullable String year, Rank rank, @Nullable TaxonomicStatus status, Kingdom kingdom); @Override int size(); @Override int deletedIds(); @Override Iterator<LookupUsage> iterator(); @Override Spliterator<LookupUsage> spliterator(); }
IdLookupImpl implements IdLookup { @VisibleForTesting protected static String norm(String x) { x = SciNameNormalizer.normalize(x); return StringUtils.isBlank(x) ? null : x.toLowerCase(); } private  IdLookupImpl(DB db); static IdLookupImpl persistent(File db); static IdLookupImpl temp(); IdLookupImpl load(Iterable<LookupUsage> usages); IdLookupImpl load(ClbConfiguration clb, boolean includeDeleted); @Override void close(); int getKeyMax(); AuthorComparator getAuthorComparator(); @Override LookupUsage match(String canonicalName, Rank rank, Kingdom kingdom); @Override List<LookupUsage> match(String canonicalName); @Override LookupUsage match(final String canonicalName, @Nullable String authorship, @Nullable String year, Rank rank, @Nullable TaxonomicStatus status, Kingdom kingdom); @Override int size(); @Override int deletedIds(); @Override Iterator<LookupUsage> iterator(); @Override Spliterator<LookupUsage> spliterator();  }