Revision ab2f9bc5
Added by Andreas Müller almost 6 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/out/PesiTaxonExport.java | ||
---|---|---|
75 | 75 |
import eu.etaxonomy.cdm.strategy.cache.HTMLTagRules; |
76 | 76 |
import eu.etaxonomy.cdm.strategy.cache.TagEnum; |
77 | 77 |
import eu.etaxonomy.cdm.strategy.cache.name.INonViralNameCacheStrategy; |
78 |
import eu.etaxonomy.cdm.strategy.cache.name.NonViralNameDefaultCacheStrategy;
|
|
78 |
import eu.etaxonomy.cdm.strategy.cache.name.TaxonNameDefaultCacheStrategy;
|
|
79 | 79 |
import eu.etaxonomy.cdm.strategy.cache.name.ZooNameNoMarkerCacheStrategy; |
80 | 80 |
|
81 | 81 |
/** |
... | ... | |
116 | 116 |
private static ExtensionType expertNameExtensionType; |
117 | 117 |
private static ExtensionType speciesExpertNameExtensionType; |
118 | 118 |
private static ExtensionType cacheCitationExtensionType; |
119 |
public static NonViralNameDefaultCacheStrategy zooNameStrategy = ZooNameNoMarkerCacheStrategy.NewInstance();
|
|
120 |
public static NonViralNameDefaultCacheStrategy nonViralNameStrategy = NonViralNameDefaultCacheStrategy.NewInstance();
|
|
119 |
public static TaxonNameDefaultCacheStrategy zooNameStrategy = ZooNameNoMarkerCacheStrategy.NewInstance();
|
|
120 |
public static TaxonNameDefaultCacheStrategy nonViralNameStrategy = TaxonNameDefaultCacheStrategy.NewInstance();
|
|
121 | 121 |
private static int currentTaxonId; |
122 | 122 |
|
123 | 123 |
|
... | ... | |
528 | 528 |
// 2nd Round: Add ParentTaxonFk, TreeIndex to each Taxon |
529 | 529 |
private boolean doPhase02_OLD(PesiExportState state) { |
530 | 530 |
boolean success = true; |
531 |
boolean includeUnpublished = false; |
|
531 | 532 |
if (! state.getConfig().isDoTreeIndex()){ |
532 | 533 |
logger.info ("Ignore PHASE 2: ParentTaxonFk and TreeIndex"); |
533 | 534 |
return success; |
... | ... | |
563 | 564 |
txStatus = startTransaction(true); |
564 | 565 |
logger.info("Started transaction to fetch all rootNodes specific to Rank " + rank.getLabel() + " ..."); |
565 | 566 |
|
566 |
rankSpecificRootNodes = getClassificationService().listRankSpecificRootNodes(classification, rank, null, null, null); |
|
567 |
rankSpecificRootNodes = getClassificationService().listRankSpecificRootNodes(classification, rank, |
|
568 |
includeUnpublished, null, null, null); |
|
567 | 569 |
logger.info("Fetched " + rankSpecificRootNodes.size() + " RootNodes for Rank " + rank.getLabel()); |
568 | 570 |
|
569 | 571 |
commitTransaction(txStatus); |
... | ... | |
1651 | 1653 |
@SuppressWarnings("unused") |
1652 | 1654 |
private static String getWebSearchName(TaxonName taxonName) { |
1653 | 1655 |
//TODO extensions? |
1654 |
NonViralNameDefaultCacheStrategy strategy = getCacheStrategy(taxonName);
|
|
1656 |
TaxonNameDefaultCacheStrategy strategy = getCacheStrategy(taxonName);
|
|
1655 | 1657 |
String result = strategy.getNameCache(taxonName); |
1656 | 1658 |
return result; |
1657 | 1659 |
} |
... | ... | |
1688 | 1690 |
@SuppressWarnings("unused") |
1689 | 1691 |
private static String getSourceNameCache(TaxonName taxonName) { |
1690 | 1692 |
if (taxonName != null){ |
1691 |
Reference nomRef = (Reference)taxonName.getNomenclaturalReference();
|
|
1693 |
Reference nomRef = taxonName.getNomenclaturalReference(); |
|
1692 | 1694 |
if (nomRef != null){ |
1693 | 1695 |
logger.warn("Semantics of getAbbrevTitleCache has changed. Please check if output is still correct. See #5388"); |
1694 | 1696 |
return nomRef.getAbbrevTitleCache(); |
... | ... | |
2429 | 2431 |
|
2430 | 2432 |
} |
2431 | 2433 |
|
2432 |
protected static NonViralNameDefaultCacheStrategy getCacheStrategy(TaxonName taxonName) {
|
|
2434 |
protected static TaxonNameDefaultCacheStrategy getCacheStrategy(TaxonName taxonName) {
|
|
2433 | 2435 |
taxonName = CdmBase.deproxy(taxonName); |
2434 |
NonViralNameDefaultCacheStrategy cacheStrategy;
|
|
2436 |
TaxonNameDefaultCacheStrategy cacheStrategy;
|
|
2435 | 2437 |
if (taxonName.isZoological()){ |
2436 | 2438 |
cacheStrategy = zooNameStrategy; |
2437 | 2439 |
}else if (taxonName.isBotanical()) { |
Also available in: Unified diff
cleanup not compiling and other issues in app-import and pesi