@Test public void testSplitByCommonDelimiters() throws Exception { assertThat(Normalizer.splitByCommonDelimiters("gx:1234")).containsExactly("gx:1234"); assertThat(Normalizer.splitByCommonDelimiters("1234|135286|678231612")).containsExactly("1234", "135286", "678231612"); assertThat(Normalizer.splitByCommonDelimiters("1234 135286 678231612")).containsExactly("1234", "135286", "678231612"); assertThat(Normalizer.splitByCommonDelimiters("1234; 135286; 678231612")).containsExactly("1234", "135286", "678231612"); assertThat(Normalizer.splitByCommonDelimiters("1234,135286 | 67.8231612")).containsExactly("1234,135286", "67.8231612"); }
@VisibleForTesting protected static List<String> splitByCommonDelimiters(String val) { if (Strings.isNullOrEmpty(val)) { return Lists.newArrayList(); } for (Splitter splitter : COMMON_SPLITTER) { List<String> vals = splitter.splitToList(val); if (vals.size() > 1) { return vals; } } return Lists.newArrayList(val); }
Normalizer extends ImportDb implements Runnable { @VisibleForTesting protected static List<String> splitByCommonDelimiters(String val) { if (Strings.isNullOrEmpty(val)) { return Lists.newArrayList(); } for (Splitter splitter : COMMON_SPLITTER) { List<String> vals = splitter.splitToList(val); if (vals.size() > 1) { return vals; } } return Lists.newArrayList(val); } }
Normalizer extends ImportDb implements Runnable { @VisibleForTesting protected static List<String> splitByCommonDelimiters(String val) { if (Strings.isNullOrEmpty(val)) { return Lists.newArrayList(); } for (Splitter splitter : COMMON_SPLITTER) { List<String> vals = splitter.splitToList(val); if (vals.size() > 1) { return vals; } } return Lists.newArrayList(val); } 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 List<String> splitByCommonDelimiters(String val) { if (Strings.isNullOrEmpty(val)) { return Lists.newArrayList(); } for (Splitter splitter : COMMON_SPLITTER) { List<String> vals = splitter.splitToList(val); if (vals.size() > 1) { return vals; } } return Lists.newArrayList(val); } 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 List<String> splitByCommonDelimiters(String val) { if (Strings.isNullOrEmpty(val)) { return Lists.newArrayList(); } for (Splitter splitter : COMMON_SPLITTER) { List<String> vals = splitter.splitToList(val); if (vals.size() > 1) { return vals; } } return Lists.newArrayList(val); } 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();  }