Project

General

Profile

« Previous | Next » 

Revision c9409531

Added by Andreas Müller almost 10 years ago

revert methodCall renaming

View differences:

cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/faunaEuropaea/FaunaEuropaeaRefImport.java
56 56
	/* Interval for progress info message when retrieving taxa */
57 57
	private int modCount = 10000;
58 58

  
59
	/* (non-Javadoc)
60
	 * @see eu.etaxonomy.cdm.io.common.CdmIoBase#doCheck(eu.etaxonomy.cdm.io.common.IImportConfigurator)
61
	 */
62 59
	@Override
63 60
	protected boolean doCheck(FaunaEuropaeaImportState state) {
64 61
		boolean result = true;
......
82 79
//		}
83 80
	}
84 81
	
85
	/* (non-Javadoc)
86
	 * @see eu.etaxonomy.cdm.io.common.CdmIoBase#doInvoke(eu.etaxonomy.cdm.io.common.IImportConfigurator, eu.etaxonomy.cdm.api.application.CdmApplicationController, java.util.Map)
87
	 */
88 82
	@Override
89 83
	protected void doInvoke(FaunaEuropaeaImportState state) {				
90 84
		/*
......
208 202
	        	
209 203
				if ((i++ % limit) == 0) {
210 204

  
211
					txStatus = startTransactionForImports();
205
					txStatus = startTransaction();
212 206
					references = new HashMap<Integer,Reference>(limit);
213 207
					authors = new HashMap<String,TeamOrPersonBase>(limit);
214 208
					
......
281 275
	        	
282 276
	        	
283 277
	        }
284
	        rsRefs = null;
285 278
	        if (references != null){
286 279
	        	commitReferences(references, authors, referenceUuids, i, txStatus);
287 280
	        	references= null;
......
291 284
			logger.error("SQLException:" +  e);
292 285
			state.setUnsuccessfull();
293 286
		}
294
		references = null;
295
		authors = null;
296 287
		
297 288
	}
298 289

  
......
423 414
				
424 415
			
425 416
		
426
			if (((i % limit) == 0 && i > 1 ) || i == count) { 
427

  
428
				try {
429

  
430
					Set<UUID> uuidSet;
431
					commitTaxaReferenceRel(taxonUuids, fauEuTaxonMap,
432
							referenceUuids, referenceIDs, limit, txStatus, i,
433
							taxon);
434

  
435
					taxonUuids = null;
436
					references = null;
437
					taxonList = null;
438
					fauEuTaxonMap = null;
439
					referenceIDs = null;
440
					referenceList = null;
441
					uuidSet = null;
442
					
443

  
444
				} catch (Exception e) {
445
					logger.warn("An exception occurred when creating reference, reference could not be saved.");
417
				if (((i % limit) == 0 && i > 1 ) || i == count) { 
418
	
419
					try {
420
	
421
						Set<UUID> uuidSet;
422
						commitTaxaReferenceRel(taxonUuids, fauEuTaxonMap,
423
								referenceUuids, referenceIDs, limit, txStatus, i,
424
								taxon);
425
	
426
						taxonUuids = null;
427
						references = null;
428
						taxonList = null;
429
						fauEuTaxonMap = null;
430
						referenceIDs = null;
431
						referenceList = null;
432
						uuidSet = null;
433
						
434
	
435
					} catch (Exception e) {
436
						logger.warn("An exception occurred when creating reference, reference could not be saved.");
437
					}
446 438
				}
447 439
			}
440
			if (taxonUuids != null){
441
				commitTaxaReferenceRel(taxonUuids, fauEuTaxonMap,
442
						referenceUuids, referenceIDs, limit, txStatus, i,
443
						taxon);
444
			}
445
			rsTaxRefs.close();
446
		} catch (SQLException e) {
447
				logger.error("SQLException:" +  e);
448
				state.setUnsuccessfull();
448 449
		}
449
		if (taxonUuids != null){
450
			commitTaxaReferenceRel(taxonUuids, fauEuTaxonMap,
451
					referenceUuids, referenceIDs, limit, txStatus, i,
452
					taxon);
453
		}
454
		rsTaxRefs.close();
455
} catch (SQLException e) {
456
		logger.error("SQLException:" +  e);
457
		state.setUnsuccessfull();
458
}
459 450
		taxonUuids = null;
460 451
		references = null;
461 452
		taxonList = null;
......
556 547
		
557 548
	}
558 549

  
559
	
560
	
561

  
562
	
563

  
564
	/* (non-Javadoc)
565
	 * @see eu.etaxonomy.cdm.io.common.CdmIoBase#isIgnore(eu.etaxonomy.cdm.io.common.IImportConfigurator)
566
	 */
550
	@Override
567 551
	protected boolean isIgnore(FaunaEuropaeaImportState state){
568 552
		return (state.getConfig().getDoReferences() == IImportConfigurator.DO_REFERENCES.NONE);
569 553
	}

Also available in: Unified diff