Revision f98b108b
Added by Andreas Müller about 12 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/out/PesiTaxonExport.java | ||
---|---|---|
357 | 357 |
|
358 | 358 |
|
359 | 359 |
int partitionCount = 0; |
360 |
while ((list = getNextTaxonPartition(null, limit, partitionCount++)).size() > 0 ) { |
|
360 |
while ((list = getNextTaxonPartition(null, limit, partitionCount++, null)).size() > 0 ) {
|
|
361 | 361 |
|
362 | 362 |
logger.info("Fetched " + list.size() + " " + pluralString + ". Exporting..."); |
363 | 363 |
for (TaxonBase<?> taxon : list) { |
... | ... | |
456 | 456 |
// 2nd Round: Add ParentTaxonFk, TreeIndex to each Taxon |
457 | 457 |
private boolean doPhase02(PesiExportState state) { |
458 | 458 |
boolean success = true; |
459 |
if (! state.getConfig().isDoTreeIndex()){ |
|
460 |
logger.info ("Ignore PHASE 2: ParentTaxonFk and TreeIndex"); |
|
461 |
return success; |
|
462 |
} |
|
463 |
|
|
459 | 464 |
List<Classification> classificationList = null; |
460 | 465 |
logger.info("PHASE 2: Add ParenTaxonFk and TreeIndex..."); |
461 | 466 |
|
... | ... | |
558 | 563 |
int count = 0; |
559 | 564 |
int pastCount = 0; |
560 | 565 |
boolean success = true; |
566 |
if (! state.getConfig().isDoTreeIndex()){ |
|
567 |
logger.info ("Ignore PHASE 3: Add Rank data, KingdomFk, TypeNameFk, expertFk and speciesExpertFk..."); |
|
568 |
return success; |
|
569 |
} |
|
561 | 570 |
// Get the limit for objects to save within a single transaction. |
562 | 571 |
int limit = state.getConfig().getLimitSave(); |
563 | 572 |
|
... | ... | |
569 | 578 |
TransactionStatus txStatus = startTransaction(true); |
570 | 579 |
logger.info("Started new transaction. Fetching some " + pluralString + " (max: " + limit + ") ..."); |
571 | 580 |
int partitionCount = 0; |
572 |
while ((list = getNextTaxonPartition(null, limit, partitionCount++)).size() > 0) {
|
|
581 |
while ((list = getNextTaxonPartition(TaxonBase.class, limit, partitionCount++, null)).size() > 0) {
|
|
573 | 582 |
|
574 | 583 |
logger.info("Fetched " + list.size() + " " + pluralString + ". Exporting..."); |
575 | 584 |
for (TaxonBase<?> taxon : list) { |
... | ... | |
658 | 667 |
int pastCount; |
659 | 668 |
boolean success = true; |
660 | 669 |
// Get the limit for objects to save within a single transaction. |
670 |
if (! state.getConfig().isDoTreeIndex()){ |
|
671 |
logger.info ("Ignore PHASE 4: Creating Inferred Synonyms..."); |
|
672 |
return success; |
|
673 |
} |
|
674 |
|
|
661 | 675 |
int limit = state.getConfig().getLimitSave(); |
662 |
|
|
663 | 676 |
// Create inferred synonyms for accepted taxa |
664 | 677 |
logger.info("PHASE 4: Creating Inferred Synonyms..."); |
665 | 678 |
|
Also available in: Unified diff
Latest changes for PESI export and introduce transformers in export mappings