@Test public void testgetLowestExistingRank() throws Exception { LinneanClassification cl = new NameUsage(); assertNull(Normalizer.getLowestExistingRank(cl)); cl.setOrder("oda"); assertEquals(Rank.ORDER, Normalizer.getLowestExistingRank(cl)); cl.setPhylum("fülum"); assertEquals(Rank.ORDER, Normalizer.getLowestExistingRank(cl)); cl.setSubgenus("sappjenuss"); assertEquals(Rank.SUBGENUS, Normalizer.getLowestExistingRank(cl)); }
@VisibleForTesting protected static Rank getLowestExistingRank(LinneanClassification lc) { for (Rank r : DWC_RANKS_REVERSE) { if (lc.getHigherRank(r) != null) { return r; } } return null; }
Normalizer extends ImportDb implements Runnable { @VisibleForTesting protected static Rank getLowestExistingRank(LinneanClassification lc) { for (Rank r : DWC_RANKS_REVERSE) { if (lc.getHigherRank(r) != null) { return r; } } return null; } }
Normalizer extends ImportDb implements Runnable { @VisibleForTesting protected static Rank getLowestExistingRank(LinneanClassification lc) { for (Rank r : DWC_RANKS_REVERSE) { if (lc.getHigherRank(r) != null) { return r; } } return null; } private  Normalizer(UUID datasetKey, UsageDao dao, File dwca, int batchSize,
                     MetricRegistry registry, Map<String, UUID> constituents, IdLookup lookup); }
Normalizer extends ImportDb implements Runnable { @VisibleForTesting protected static Rank getLowestExistingRank(LinneanClassification lc) { for (Rank r : DWC_RANKS_REVERSE) { if (lc.getHigherRank(r) != null) { return r; } } return null; } private  Normalizer(UUID datasetKey, UsageDao dao, File dwca, int batchSize,
                     MetricRegistry registry, Map<String, UUID> constituents, IdLookup lookup); static Normalizer create(NormalizerConfiguration cfg, UUID datasetKey, MetricRegistry registry,
                                  Map<String, UUID> constituents, IdLookup lookup); static Normalizer create(UUID datasetKey, UsageDao dao, File dwca, IdLookup lookup, int batchSize); static Normalizer create(NormalizerConfiguration cfg, UUID datasetKey); static Normalizer create(NormalizerConfiguration cfg, MetricRegistry registry, UUID datasetKey); void run(); void run(boolean closeDao); NormalizerStats getStats(); }
Normalizer extends ImportDb implements Runnable { @VisibleForTesting protected static Rank getLowestExistingRank(LinneanClassification lc) { for (Rank r : DWC_RANKS_REVERSE) { if (lc.getHigherRank(r) != null) { return r; } } return null; } private  Normalizer(UUID datasetKey, UsageDao dao, File dwca, int batchSize,
                     MetricRegistry registry, Map<String, UUID> constituents, IdLookup lookup); static Normalizer create(NormalizerConfiguration cfg, UUID datasetKey, MetricRegistry registry,
                                  Map<String, UUID> constituents, IdLookup lookup); static Normalizer create(UUID datasetKey, UsageDao dao, File dwca, IdLookup lookup, int batchSize); static Normalizer create(NormalizerConfiguration cfg, UUID datasetKey); static Normalizer create(NormalizerConfiguration cfg, MetricRegistry registry, UUID datasetKey); void run(); void run(boolean closeDao); NormalizerStats getStats();  }