@Test public void testDenormedClassification() throws Exception { NormalizerStats stats = normalize(12); try (Transaction tx = beginTx()) { assertUsage("1", false, "Lepiota seminuda", null, null, Rank.SPECIES, "Lepiota", "Agaricaceae", "Agaricales", "Agaricomycetes", "Basidiomycota"); assertUsage("2", false, "Lepiota seminuda", null, null, Rank.SPECIES, "Lepiota", "Agaricaceae", "Agaricales", "Agaricomycetes", "Basidiomycota"); assertUsage("3", false, "Lepiota seminuda", null, null, Rank.SPECIES, "Agaricales", "Agaricomycetes", "Basidiomycota"); assertUsage("4", false, "Lepiota seminuda", null, null, Rank.SPECIES, "Lepiota", "Agaricaceae", "Agaricales", "Agaricomycetes", "Basidiomycota", "Fungi"); assertQuantity(2, "Lepiota"); assertQuantity(2, "Agaricaceae"); assertQuantity(2, "Agaricales"); assertQuantity(2, "Agaricomycetes"); } }
private void normalize() throws NormalizationFailedException { LOG.info("Start processing explicit relations ..."); int counter = 0; Transaction tx = dao.getNeo().beginTx(); try { for (Node n : dao.getNeo().getAllNodes()) { setupRelation(n); counter++; relationMeter.mark(); tx = renewTx(tx); if (counter % 10000 == 0) { LOG.debug("Processed relations for {} nodes", counter); checkInterrupted(); } } } finally { tx.success(); tx.close(); } applyDenormedClassification(); cleanupRelations(); LOG.info("Relation setup completed, {} nodes processed. Setup rate: {}", counter, relationMeter.getMeanRate()); }
Normalizer extends ImportDb implements Runnable { private void normalize() throws NormalizationFailedException { LOG.info("Start processing explicit relations ..."); int counter = 0; Transaction tx = dao.getNeo().beginTx(); try { for (Node n : dao.getNeo().getAllNodes()) { setupRelation(n); counter++; relationMeter.mark(); tx = renewTx(tx); if (counter % 10000 == 0) { LOG.debug("Processed relations for {} nodes", counter); checkInterrupted(); } } } finally { tx.success(); tx.close(); } applyDenormedClassification(); cleanupRelations(); LOG.info("Relation setup completed, {} nodes processed. Setup rate: {}", counter, relationMeter.getMeanRate()); } }
Normalizer extends ImportDb implements Runnable { private void normalize() throws NormalizationFailedException { LOG.info("Start processing explicit relations ..."); int counter = 0; Transaction tx = dao.getNeo().beginTx(); try { for (Node n : dao.getNeo().getAllNodes()) { setupRelation(n); counter++; relationMeter.mark(); tx = renewTx(tx); if (counter % 10000 == 0) { LOG.debug("Processed relations for {} nodes", counter); checkInterrupted(); } } } finally { tx.success(); tx.close(); } applyDenormedClassification(); cleanupRelations(); LOG.info("Relation setup completed, {} nodes processed. Setup rate: {}", counter, relationMeter.getMeanRate()); } private  Normalizer(UUID datasetKey, UsageDao dao, File dwca, int batchSize,
                     MetricRegistry registry, Map<String, UUID> constituents, IdLookup lookup); }
Normalizer extends ImportDb implements Runnable { private void normalize() throws NormalizationFailedException { LOG.info("Start processing explicit relations ..."); int counter = 0; Transaction tx = dao.getNeo().beginTx(); try { for (Node n : dao.getNeo().getAllNodes()) { setupRelation(n); counter++; relationMeter.mark(); tx = renewTx(tx); if (counter % 10000 == 0) { LOG.debug("Processed relations for {} nodes", counter); checkInterrupted(); } } } finally { tx.success(); tx.close(); } applyDenormedClassification(); cleanupRelations(); LOG.info("Relation setup completed, {} nodes processed. Setup rate: {}", counter, relationMeter.getMeanRate()); } 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 { private void normalize() throws NormalizationFailedException { LOG.info("Start processing explicit relations ..."); int counter = 0; Transaction tx = dao.getNeo().beginTx(); try { for (Node n : dao.getNeo().getAllNodes()) { setupRelation(n); counter++; relationMeter.mark(); tx = renewTx(tx); if (counter % 10000 == 0) { LOG.debug("Processed relations for {} nodes", counter); checkInterrupted(); } } } finally { tx.success(); tx.close(); } applyDenormedClassification(); cleanupRelations(); LOG.info("Relation setup completed, {} nodes processed. Setup rate: {}", counter, relationMeter.getMeanRate()); } 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();  }