Revision be6b41e5
Added by Andreas Müller over 4 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/out/PesiDescriptionExport.java | ||
---|---|---|
74 | 74 |
* <li>Phase 2: Export of TaxonName extensions <code>taxComment</code>, <code>fauComment</code> and <code>fauExtraCodes</code> as Notes.</ul> |
75 | 75 |
* @author e.-m.lee |
76 | 76 |
* @since 23.02.2010 |
77 |
* |
|
78 | 77 |
*/ |
79 | 78 |
@Component |
80 | 79 |
public class PesiDescriptionExport extends PesiExportBase { |
... | ... | |
183 | 182 |
private boolean doPhase01(PesiExportState state, PesiExportMapping notesMapping, PesiExportMapping occurrenceMapping, PesiExportMapping addSourceSourceMapping, |
184 | 183 |
PesiExportMapping additionalSourceMapping, PesiExportMapping vernacularMapping, PesiExportMapping imageMapping) throws SQLException { |
185 | 184 |
|
186 |
System.out.println("PHASE 1 of occurence import");
|
|
185 |
System.out.println("PHASE 1 of description import");
|
|
187 | 186 |
logger.info("PHASE 1..."); |
188 | 187 |
int count = 0; |
189 | 188 |
int pastCount = 0; |
... | ... | |
197 | 196 |
logger.info("Started new transaction. Fetching some " + pluralString + " (max: " + limit + ") ..."); |
198 | 197 |
List<String> propPath = Arrays.asList(new String[]{"descriptions.elements.*"}); |
199 | 198 |
|
200 |
logger.debug("Start snapshot, before starting loop"); |
|
201 |
ProfilerController.memorySnapshot(); |
|
199 |
if (logger.isDebugEnabled()){ |
|
200 |
logger.debug("Start snapshot, before starting loop"); |
|
201 |
ProfilerController.memorySnapshot(); |
|
202 |
} |
|
202 | 203 |
//taxon descriptions |
203 | 204 |
int partitionCount = 0; |
204 | 205 |
while ((taxonList = getNextTaxonPartition(Taxon.class, limit, partitionCount++, propPath )) != null ) { |
... | ... | |
329 | 330 |
boolean success = true; |
330 | 331 |
|
331 | 332 |
|
332 |
Set<DescriptionBase<?>> descriptions = new HashSet<DescriptionBase<?>>();
|
|
333 |
Set<DescriptionBase<?>> descriptions = new HashSet<>(); |
|
333 | 334 |
descriptions.addAll(taxon.getDescriptions()); |
334 | 335 |
|
335 | 336 |
for (DescriptionBase<?> desc : descriptions){ |
Also available in: Unified diff
cleanup