@Test public void testVerbatimParent() throws Exception { NormalizerStats stats = normalize(11); assertEquals(1, stats.getRoots()); try (Transaction tx = beginTx()) { final NameUsage sspalgarbiensis = getUsageByTaxonId("10001"); assertUsage(sspalgarbiensis, Rank.SUBSPECIES, "Calendula incana subsp. algarbiensis (Boiss.) Ohle", false); final NameUsage algarbiensis = getUsageByKey(sspalgarbiensis.getBasionymKey()); assertUsage(algarbiensis, Rank.SPECIES, "Calendula algarbiensis Boss.", true); final NameUsage eckerleinii = getUsageByKey(algarbiensis.getAcceptedKey()); assertUsage(eckerleinii, Rank.SPECIES, "Calendula eckerleinii Ohle", false); final NameUsage incana = getUsageByKey(sspalgarbiensis.getParentKey()); assertUsage(incana, Rank.SPECIES, "Calendula incana Willd.", false); final NameUsage callendula = getUsageByKey(incana.getParentKey()); assertUsage(callendula, Rank.GENUS, "Calendula L.", false); assertEquals(callendula.getKey(), eckerleinii.getParentKey()); final NameUsage compositae = getUsageByKey(callendula.getParentKey()); assertUsage(compositae, Rank.FAMILY, "Compositae Giseke", false); final NameUsage asteraceae = getUsageByTaxonId("11"); assertUsage(asteraceae, Rank.FAMILY, "Asteraceae", true); assertEquals(compositae.getKey(), asteraceae.getAcceptedKey()); final NameUsage plant = getUsageByKey(compositae.getParentKey()); assertUsage(plant, Rank.KINGDOM, "Plantae", false); } }
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();  }